Skip to content

Add bindings section #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 41 additions & 8 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,17 @@ <h1 class="title is-1 pb-6">

<!-- Showcase Projects -->
<section class="section is-medium">
<div class="container">
<h1 class="title is-1"><a name="bindings">#</a> Bindings</h1>
<br>
<p class="subtitle is-4">Ported <b>wgpu</b>? <a
href="https://github.com/gfx-rs/wgpu-rs.github.io">Make a PR</a>, and reach out to us on <a
href="https://matrix.to/#/#wgpu-users:matrix.org">#wgpu-users</a>!</p>
<br>

<div id="bindings_container"></div>
</div>

<div class="container">
<h1 class="title is-1"><a name="showcase">#</a> Showcase</h1>
<br>
Expand Down Expand Up @@ -200,6 +211,16 @@ <h1 class="title is-1"><a name="showcase">#</a> Showcase</h1>
</script>

<script>
// List of bindings; Edit this list to add or remove projects
const bindings_list = [
{
"name": "wgpu4k",
"description": "Work-in-progress binding for Kotlin/Multiplatform",
"website": "https://GitHub.com/wgpu4k/wgpu4k",
"thumbnail": "https://avatars.githubusercontent.com/u/163670885"
}
]
Comment on lines +215 to +222
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need a thumbnail, just a boring list would be okay

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the fancy link box or just a bullet list?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just bullet list is fine


// List of showcase projects; Edit this list to add or remove projects
const showcase_list = [
{
Expand Down Expand Up @@ -406,15 +427,27 @@ <h1 class="title is-1"><a name="showcase">#</a> Showcase</h1>
`;
}

const showcase_container = document.getElementById("showcase_container");
const sections = [
{
"container": "bindings_container",
"entries": bindings_list
},
{
"container": "showcase_container",
"entries": showcase_list
}
];

for (let { name, description, website, thumbnail } of showcase_list) {
showcase_container.insertAdjacentHTML("beforeend", showcase_template({
name,
description,
website,
thumbnail
}));
for (let { container, entries } of sections) {
const container_element = document.getElementById(container);
for (let { name, description, website, thumbnail } of entries) {
container_element.insertAdjacentHTML("beforeend", showcase_template({
name,
description,
website,
thumbnail
}));
}
}
</script>
</body>
Expand Down