Skip to content

Commit e3d4d18

Browse files
authoredNov 4, 2024
Merge pull request #2 from pygfx/more
Many tweaks
2 parents 9f17a28 + befa935 commit e3d4d18

13 files changed

+410
-191
lines changed
 

‎makesite.py

+53-36
Original file line numberDiff line numberDiff line change
@@ -45,50 +45,63 @@
4545
def create_menu(page):
4646
""" Create the menu for the given page.
4747
"""
48-
menu = [""]
49-
50-
menu.append('<span class="header">Pages</span>')
51-
for title, target in NAV.items():
52-
if isinstance(target, str):
53-
if target.startswith(("https://", "http://", "/")):
54-
menu.append(f"<a href='{target}'>{title}</a>")
48+
menu = ""
49+
50+
if True:
51+
menuitems = []
52+
menuitems.append('<span class="header">Pages</span>')
53+
for title, target in NAV.items():
54+
if isinstance(target, str):
55+
if target.startswith(("https://", "http://", "/")):
56+
menuitems.append(f"<a href='{target}'>{title}</a>")
57+
else:
58+
menuitems.append(f"<a href='{target}.html'>{title}</a>")
59+
if target == page.name:
60+
menuitems[-1] = menuitems[-1].replace("<a ", '<a class="current" ')
61+
elif isinstance(target, dict):
62+
menuitems.append(f"<a href='{target.get('', '#')}.html'>{title}</a>")
63+
if target.get("", None) == page.name:
64+
menuitems[-1] = menuitems[-1].replace("<a ", '<a class="current" ')
65+
if True: # any(page.name == subtarget for subtarget in target.values()):
66+
for subtitle, subtarget in target.items():
67+
if not subtitle:
68+
continue
69+
if subtarget.startswith(("https://", "http://", "/")):
70+
menuitems.append(f"<a class='sub' href='{subtarget}'>{subtitle}</a>")
71+
else:
72+
menuitems.append(
73+
f"<a class='sub' href='{subtarget}.html'>{subtitle}</a>"
74+
)
75+
if subtarget == page.name:
76+
menuitems[-1] = menuitems[-1].replace("class='", "class='current ")
5577
else:
56-
menu.append(f"<a href='{target}.html'>{title}</a>")
57-
if target == page.name:
58-
menu[-1] = menu[-1].replace("<a ", '<a class="current" ')
59-
elif isinstance(target, dict):
60-
menu.append(f"<a href='{target.get('', '#')}.html'>{title}</a>")
61-
if target.get("", None) == page.name:
62-
menu[-1] = menu[-1].replace("<a ", '<a class="current" ')
63-
if True: # any(page.name == subtarget for subtarget in target.values()):
64-
for subtitle, subtarget in target.items():
65-
if not subtitle:
66-
continue
67-
if subtarget.startswith(("https://", "http://", "/")):
68-
menu.append(f"<a class='sub' href='{subtarget}'>{subtitle}</a>")
69-
else:
70-
menu.append(
71-
f"<a class='sub' href='{subtarget}.html'>{subtitle}</a>"
72-
)
73-
if subtarget == page.name:
74-
menu[-1] = menu[-1].replace("class='", "class='current ")
75-
else:
76-
raise RuntimeError(f"Unexpected NAV entry {type(target)}")
78+
raise RuntimeError(f"Unexpected NAV entry {type(target)}")
79+
80+
menu += "<div class='block1'>"
81+
menu += "<br>".join(menuitems)
82+
menu += "</div>"
7783

7884
subtitles = [title for level, title in page.headers if level == 2]
7985
if subtitles:
80-
menu.append("<br /><span class='header'>Current page</span>")
81-
menu += [
86+
menuitems = []
87+
menuitems.append("<span class='header'>Current page</span>")
88+
menuitems += [
8289
f"<a class='sub' href='#{title.lower()}'>{title}</a>" for title in subtitles
8390
]
8491

85-
if NEWS:
86-
menu.append('<br /><span class="header">News</span>')
87-
for title, url in NEWS.items():
88-
# menu.append(f"<a class='sub' href='{url}'>{title}</a>")
89-
menu.append(f"<a href='{url}'>{title}</a>")
92+
menu += "<br>"
93+
menu += "<div class='block2'>"
94+
menu += "<br>".join(menuitems)
95+
menu += "</div>"
96+
97+
# if NEWS:
98+
# menuitems = []
99+
# menuitems.append('<br /><span class="header">News</span>')
100+
# for title, url in NEWS.items():
101+
# # menuitems.append(f"<a class='sub' href='{url}'>{title}</a>")
102+
# menuitems.append(f"<a href='{url}'>{title}</a>")
90103

91-
return "<br />".join(menu)
104+
return menu
92105

93106

94107
def create_blog_relatated_pages(posts):
@@ -345,6 +358,10 @@ def _split(self):
345358
level = len(line.split(" ")[0])
346359
title = line.split(" ", 1)[1]
347360
title_short = "".join(c for c in title if ord(c) < 256).strip()
361+
while "<i" in title_short:
362+
i1 = title_short.find("<i")
363+
i2 = title_short.find("</i>", i1)
364+
title_short = title_short[:i1] + title_short[i2+4:]
348365
title_short = title_short.split("(")[0].split("<")[0].strip().replace("`", "")
349366
headers.append((level, title_short))
350367
parts.append((level, title_short, title))

‎pages/index.md

+114-27
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,134 @@
1-
<img src='pygfx.png' width='96px' height='96px' />
2-
<span style='font-size:64px; font-family:Consolas, "DejaVu Sans Mono", Monaco, "Courier New", Courier, monospace; position: relative; top: -20px; left: 10px;'>pygfx-org</span>
1+
<center>
2+
<img src='pygfx1024.png' width='96px' height='96px' />
3+
<span style='font-size:100px; position: relative; top: -20px; left: 10px;'>Pygfx</span><br>
4+
<i style='font-size:110%;'>A powerful and reliable render engine for Python</i>
35

4-
*The collective behind the Pygfx render engine and associated projects.*
56

6-
## 💫 Projects
7+
<img src='https://img.shields.io/badge/uses-webgpu-blue?style=flat'/>
8+
<img src='https://img.shields.io/github/v/release/pygfx/pygfx?style=flat&label=version'/>
9+
<img src='https://img.shields.io/github/stars/pygfx/pygfx?style=flat'/>
710

8-
<div class=projectbox>
9-
<img class='stars-badge' src='https://img.shields.io/github/stars/pygfx/pygfx'/>
10-
<h3>Pygfx</h3>
11-
<i>A powerful render engine for Python</i><br><br>
12-
<img src='gh32.png' height=16 /> <a href="https://github.com/pygfx/pygfx">github.com/pygfx/<b>pygfx</b></a><br>
13-
<img src='rtd.png' height=16 /> <a href="https://pygfx.readthedocs.io"><b>pygfx</b>.readthedocs.io</a><br>
14-
</div>
11+
<p style='text-align:left; max-width:600px; margin: 2em 1em;'>
12+
Pygfx (py-graphics) is built on WebGPU, enabling superior performance and reliability compared to OpenGL-based solutions. It is designed for simplicity and versatility: with its modular architecture, you can effortlessly assemble graphical scenes for diverse applications, from scientific visualization to video game rendering.
13+
</p>
14+
15+
16+
<a class='button' href='https://github.com/pygfx/pygfx'><i class='fab'></i> Source</a>
17+
<a class='button' href='https://pygfx.readthedocs.io/stable/_gallery/index.html'><i class='fas'></i> Gallery</a>
18+
<a class='button' href='https://pygfx.readthedocs.io'><i class='fas'></i> Documentation</a>
19+
<a class='button yellow' href='sponsor.html'><i class='fas'></i> Support & Sponsoring</a>
20+
21+
</center>
22+
23+
24+
## <i class='fas'></i> News
25+
26+
* `25-09-2024` Released [pygfx v0.5.0](https://github.com/pygfx/pygfx/releases/tag/v0.5.0)
27+
* `17-09-2024` Released [wgpu-py v0.18.1](https://github.com/pygfx/wgpu-py/releases/tag/v0.18.1)
28+
29+
30+
## <i class='fas'></i> Getting started
31+
32+
Pygfx runs almost anywhere, you don't need a fancy GPU.
33+
34+
* Install with ``pip install pygfx glfw``.
35+
* Check out the [guide](https://docs.pygfx.org/stable/guide.html).
36+
* Have a look at the examples in the [gallery](https://pygfx.readthedocs.io/stable/_gallery/index.html).
37+
38+
39+
## <i class='fas'></i> Projects
40+
41+
The following projects fall under the pygfx.org umbrella:
42+
43+
<div class='project-container'>
1544

16-
<div class=projectbox>
17-
<img class='stars-badge' src='https://img.shields.io/github/stars/pygfx/wgpu-py'/>
18-
<h3>wgpu-py</h3>
19-
<i>WebGPU for Python</i><br><br>
20-
<img src='gh32.png' height=16 /> <a href="https://github.com/pygfx/wgpu">github.com/pygfx/<b>wgpu</b></a><br>
21-
<img src='rtd.png' height=16 /> <a href="https://wgpu-py.readthedocs.io"><b>wgpu-py</b>.readthedocs.io</a><br>
45+
<div class=projectbox>
46+
<a class='button' href='https://pygfx.readthedocs.io'><i class='fas'></i> Docs</a>
47+
<a class='button' href='https://github.com/pygfx/pygfx'><i class='fab'></i> Source</a>
48+
<h3>Pygfx</h3>
49+
A powerful and reliable render engine for Python. The main project.
50+
</div>
51+
52+
<div class=projectbox>
53+
<a class='button' href='https://wgpu-py.readthedocs.io'><i class='fas'></i> Docs</a>
54+
<a class='button' href='https://github.com/pygfx/wgpu-py'><i class='fab'></i> Source</a>
55+
<h3>wgpu-py</h3>
56+
WebGPU for Python. Pygfx uses this to control your GPU.
57+
</div>
58+
59+
<div class=projectbox>
60+
<a class='button' href='https://rendercanvas.readthedocs.io'><i class='fas'></i> Docs</a>
61+
<a class='button' href='https://github.com/pygfx/rendercanvas'><i class='fab'></i> Source</a>
62+
<h3>RenderCanvas</h3>
63+
One canvas API, multiple backends. Enables Pygfx to
64+
render into an Qt/wx application, Jupyter notebook, and more.
65+
</div>
66+
67+
<div class=projectbox>
68+
<a class='button' href='https://pylinalg.readthedocs.io'><i class='fas'></i> Docs</a>
69+
<a class='button' href='https://github.com/pygfx/pylinalg'><i class='fab'></i> Source</a>
70+
<h3>pylinalg</h3>
71+
Linear algebra utilities for Python. Used in Pygfx for its transform system.
72+
</div>
2273
</div>
2374

24-
<div class=projectbox>
25-
<h3>Other</h3>
26-
<i>Projects that we also contribute to</i><br><br>
27-
<img src='gh32.png' height=16 /> <a href='https://github.com/gfx-rs/wgpu-native'>wgpu-native</a><br>
28-
<img src='gh32.png' height=16 /> <a href='https://github.com/vispy/jupyter_rfb'>jupyter_rfb</a><br>
29-
<img src='gh32.png' height=16 /> <a href='https://github.com/pygfx/pylinalg'>pylinalg</a>
75+
We also help maintain the following projects:
76+
77+
<div class='project-container'>
78+
<div class=projectbox>
79+
<a class='button' href='https://github.com/gfx-rs/wgpu-native'><i class='fab'></i> Source</a>
80+
<h3>wgpu-native</h3>
81+
Provides a C-API for WebGPU by implementing <i>webgpu.h</i>. Wrapped by wgpu-py.
82+
</div>
83+
84+
<div class=projectbox>
85+
<a class='button' href='https://github.com/vispy/jupyter_rfb'><i class='fab'></i> Source</a>
86+
<h3>jupyter_rfb</h3>
87+
A remote frame-buffer for Jupyter. Enables Jupyter support in RenderCanvas.
88+
</div>
3089
</div>
3190

3291

33-
## 🚀 Mission
92+
## <i class='fas'></i> Mission
3493

3594
We are dedicated to bring powerful and reliable visualization to the Python world.
3695
We believe that WebGPU is the future for graphics and bring it to Python with the wgpu-py library. On top of that, we build Pygfx: a modern, versatile, and Pythonic rendering engine.
96+
3797
Pygfx provides a basis on top of which a multitude of visualizations become possible. From applications to libraries, from games to plotting.
98+
Pygfx is expressive in what you can do with it, but does not try hard to reduce the number of code-lines. We deliberately leave higher-level (domain specific) API's to downstream libraries.
99+
100+
101+
## <i class='fas'></i> Ecosystem
102+
103+
The following notable projects build on top of Pygfx or wgpu-py:
104+
105+
<div class='project-container'>
106+
107+
<div class='project-container'>
108+
<div class=projectbox>
109+
<a class='button' href='http://www.fastplotlib.org/ver/dev'><i class='fas'></i> Docs</a>
110+
<a class='button' href='https://github.com/fastplotlib/fastplotlib'><i class='fab'></i> Source</a>
111+
<h3>Fastplotlib</h3>
112+
Next-gen plotting library built on Pygfx.
113+
</div>
114+
</div>
115+
116+
<div class='project-container'>
117+
<div class=projectbox>
118+
<a class='button' href='https://github.com/pygfx/shadertoy'><i class='fab'></i> Source</a>
119+
<h3>Shadertoy</h3>
120+
Shadertoy implementation based on wgpu-py
121+
</div>
122+
</div>
123+
124+
</div>
38125

39126

40127
<a name='sponsors' />
41128

42-
## ❤️ Current sponsors
129+
## <i class='fas'></i> Current sponsors
43130

44-
Pygfx and wgpu are open source and free to use. To develop these projects we rely on funding from our sponsors. The more groups "chip in", the more time we can spend on moving the projects forwards. Recurring funding is especially welcome. [Learn more ...](sponsor.html)
131+
Pygfx is open source and free to use. To develop these projects we rely on funding from our sponsors. The more groups contribute, the more time we can spend on moving these projects forwards. [Learn more ...](sponsor.html)
45132

46133
<div class=sponsorbox>
47134
<h3>Ramona optics</h3>
@@ -57,7 +144,7 @@ Pygfx and wgpu are open source and free to use. To develop these projects we rel
57144

58145

59146

60-
## 👥 Team
147+
## <i class='fas'></i> Core team
61148

62149
<div class=profilebox>
63150
<img class='profile' src='https://github.com/almarklein.png' /><br>

‎pages/sponsor.md

+62-23
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,87 @@
1-
<img src='pygfx.png' width='96px' height='96px' />
1+
<img src='pygfx1024.png' width='96px' height='96px' />
22

3-
# Sponsoring Pygfx
3+
# Sponsoring / support contracts
44

55

6-
## 🧑‍🤝‍🧑 Keep Pygfx independent and active
6+
## <i class='fas'></i> Keep Pygfx independent
77

88
Maintaining and growing wgpu and Pygfx costs time and dedication. We rely on sponsors to maintain (and grow) the project further.
9-
If you represent a company / group that relies on Pygfx or wgpu-pu, we kindly ask for a sponsorship. That way we can keep replying to issues, review pull request, and move Pygfx further.
9+
If you represent a company / group that relies on Pygfx or wgpu-pu, please consider a sponsorship to help move Pygfx further, and get the support that you need.
1010

1111

12-
## 🎁 What you get
12+
## <i class='fas'></i> How funds are used
1313

14-
* Most importantly, sponsors help ensure that Pygfx is actively maintained!
15-
* Sponsors also get priority on bug reports and feature requests.
16-
* An honorable mention on the front page of pygfx.org!
17-
* In the top tiers, one-on-one support to help you use Pygfx to the max.
14+
Funds for Pygfx are primarily used to fund our developer time. This includes the work on Pygfx itself, keeping wgpu-py up-to-date with the development of WebGPU, and maintaining other dependencies like the render canvas.
15+
Surplus funds are used as a buffer (to create some runway), onboarding additional developers, and maybe organize an event.
1816

19-
We employ a few different [sponsorship tiers](https://github.com/sponsors/pygfx).
2017

18+
## <i class='fas'></i> What you get
2119

22-
## 🧾 Ways to sponsor Pygfx
20+
A sponsorship represents a support contract that offers the following benefits:
2321

24-
We provide a few ways to get funds to us. If you have questions, do not hesitate to reach out to [support@pygfx.com](mailto:support@pygfx.com)!
22+
* Ongoing development on the project.
23+
* Priority on bug reports and feature requests.
24+
* Company logo on the front page of pygfx.org.
25+
* In the top tiers: in-person support to help you use Pygfx to the max.
2526

26-
### Directly
2727

28-
The pygfx-org is a trademark of *Almar Klein scientific computing*, based in The Netherlands.
29-
We can provide an invoice and you pay by bank transfer.
30-
Incoming funds for Pygfx are received at a dedicated bank account, and insights into how the funds are spent are published on a yearly basis.
28+
## <i class='fas'></i> Tiers
3129

30+
<div class=sponsor-tier-box>
31+
<h3><i class='far'></i>Bronze tier at €500 per month</h3>
32+
<i>Your company or group relies on pygfx, and wants to help fund it.</i>
33+
<ul>
34+
<li>Company name (with link) on pygfx.org</li>
35+
</ul>
36+
</div>
3237

33-
### Via Github
38+
<div class=sponsor-tier-box>
39+
<h3><i class='far'></i>Silver tier at €1000 per month</h3>
40+
<i>Your company or group relies on pygfx, and wants to make sure it's actively maintained.</i>
41+
<ul>
42+
<li>Small company logo (with link) on pygfx.org</li>
43+
<li>Prioritized issues and bug reports</li>
44+
</ul>
45+
</div>
3446

35-
You can also sponsor via Github's sponsor system: [https://github.com/sponsors/pygfx](https://github.com/sponsors/pygfx). These funds are payed out by GitHub to the same bank account as mentioned above.
47+
<div class=sponsor-tier-box>
48+
<h3><i class='far'></i>Gold tier at €2000 per month</h3>
49+
<i>Your company or group relies on pygfx, and wants to help move it forward.</i>
50+
<ul>
51+
<li>Large company logo (with link) on pygfx.org</li>
52+
<li>Prioritized issues and bug reports</li>
53+
</ul>
54+
</div>
3655

56+
<div class=sponsor-tier-box>
57+
<h3><i class='far'></i>Platinum tier at €3000 per month</h3>
58+
<i>Your company or group relies on pygfx, you want to help move it forward, and want support for your developers.</i>
59+
<ul>
60+
<li>Large company logo (with link) on pygfx.org</li>
61+
<li>Prioritized issues and bug reports</li>
62+
<li>Private support meetings (up to 5h per month)</li>
63+
</ul>
64+
</div>
3765

38-
### Via OpenCollective
66+
<div class=sponsor-tier-box>
67+
<h3><i class='far'></i>Custom</h3>
68+
We're happy to discuss other options or one-time contributions. Feel free to <a href='mailto:support@pygfx.com'>reach out</a>!
69+
</div>
3970

40-
You can sponsor us via [https://opencollective.com/pygfx](https://opencollective.com/pygfx). These funds and how they are spent are publicly visible.
4171

72+
## <i class='fas'></i> Payment options
4273

43-
## 💰 How funds are spent
74+
We support a few different payment options. If you have questions or suggestions, do not hesitate to reach out to [support@pygfx.com](mailto:support@pygfx.com)!
4475

45-
Sponsorship funds for Pygfx are primarily used to fund our developer time.
46-
If we receive more funds than we can spend, the surplus acts as a buffer to create runway. If that buffer becomes large enough we plan to onboard additional developers.
76+
* We can provide an **invoice** and you pay by **bank transfer**. We can also setup a formal support contract if needed.
77+
* You can also sponsor via **Github's sponsors**: [https://github.com/sponsors/pygfx](https://github.com/sponsors/pygfx)
78+
* You can sponsor us via [opencollective](https://opencollective.com/pygfx). These funds and how they are spent are publicly visible.
4779

4880

81+
## <i class='fas'></i> Legal stuff
82+
83+
Funds are managed via *Almar Klein Scientific Computing*:
84+
85+
* Location: Almere, The Netherlands
86+
* CoC number: 61855448
87+
* Tax id: NL001380600B82

‎static/UbuntuCondensed_latin.woff2

27.6 KB
Binary file not shown.

‎static/Ubuntu_latin.woff2

33.2 KB
Binary file not shown.

‎static/fa-brands-400.woff2

115 KB
Binary file not shown.

‎static/fa-regular-400.woff2

24.9 KB
Binary file not shown.

‎static/fa-solid-900.woff2

154 KB
Binary file not shown.

‎static/pygfx.png

-54.1 KB
Binary file not shown.

‎static/pygfx1024.png

19.6 KB
Loading

‎static/pygfx192.png

19.6 KB
Loading

0 commit comments

Comments
 (0)