diff --git a/makesite.py b/makesite.py index 408b9fa..fe4a8a3 100644 --- a/makesite.py +++ b/makesite.py @@ -45,50 +45,63 @@ def create_menu(page): """ Create the menu for the given page. """ - menu = [""] - - menu.append('Pages') - for title, target in NAV.items(): - if isinstance(target, str): - if target.startswith(("https://", "http://", "/")): - menu.append(f"{title}") + menu = "" + + if True: + menuitems = [] + menuitems.append('Pages') + for title, target in NAV.items(): + if isinstance(target, str): + if target.startswith(("https://", "http://", "/")): + menuitems.append(f"{title}") + else: + menuitems.append(f"{title}") + if target == page.name: + menuitems[-1] = menuitems[-1].replace("{title}") + if target.get("", None) == page.name: + menuitems[-1] = menuitems[-1].replace("{subtitle}") + else: + menuitems.append( + f"{subtitle}" + ) + if subtarget == page.name: + menuitems[-1] = menuitems[-1].replace("class='", "class='current ") else: - menu.append(f"{title}") - if target == page.name: - menu[-1] = menu[-1].replace("{title}") - if target.get("", None) == page.name: - menu[-1] = menu[-1].replace("{subtitle}") - else: - menu.append( - f"{subtitle}" - ) - if subtarget == page.name: - menu[-1] = menu[-1].replace("class='", "class='current ") - else: - raise RuntimeError(f"Unexpected NAV entry {type(target)}") + raise RuntimeError(f"Unexpected NAV entry {type(target)}") + + menu += "
" + menu += "
".join(menuitems) + menu += "
" subtitles = [title for level, title in page.headers if level == 2] if subtitles: - menu.append("
Current page") - menu += [ + menuitems = [] + menuitems.append("Current page") + menuitems += [ f"{title}" for title in subtitles ] - if NEWS: - menu.append('
News') - for title, url in NEWS.items(): - # menu.append(f"{title}") - menu.append(f"{title}") + menu += "
" + menu += "
" + menu += "
".join(menuitems) + menu += "
" + + # if NEWS: + # menuitems = [] + # menuitems.append('
News') + # for title, url in NEWS.items(): + # # menuitems.append(f"{title}") + # menuitems.append(f"{title}") - return "
".join(menu) + return menu def create_blog_relatated_pages(posts): @@ -345,6 +358,10 @@ def _split(self): level = len(line.split(" ")[0]) title = line.split(" ", 1)[1] title_short = "".join(c for c in title if ord(c) < 256).strip() + while "", i1) + title_short = title_short[:i1] + title_short[i2+4:] title_short = title_short.split("(")[0].split("<")[0].strip().replace("`", "") headers.append((level, title_short)) parts.append((level, title_short, title)) diff --git a/pages/index.md b/pages/index.md index 1742dee..f7839fa 100644 --- a/pages/index.md +++ b/pages/index.md @@ -1,47 +1,134 @@ - -pygfx-org +
+ +Pygfx
+A powerful and reliable render engine for Python -*The collective behind the Pygfx render engine and associated projects.* -## ๐Ÿ’ซ Projects + + + -
- -

Pygfx

- A powerful render engine for Python

- github.com/pygfx/pygfx
- pygfx.readthedocs.io
-
+

+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. +

+ + +๏‚› Source +๏€พ Gallery +๏€ญ Documentation +๏€„ Support & Sponsoring + +
+ + +## ๏‚ก News + +* `25-09-2024` Released [pygfx v0.5.0](https://github.com/pygfx/pygfx/releases/tag/v0.5.0) +* `17-09-2024` Released [wgpu-py v0.18.1](https://github.com/pygfx/wgpu-py/releases/tag/v0.18.1) + + +## ๏„ต Getting started + +Pygfx runs almost anywhere, you don't need a fancy GPU. + +* Install with ``pip install pygfx glfw``. +* Check out the [guide](https://docs.pygfx.org/stable/guide.html). +* Have a look at the examples in the [gallery](https://pygfx.readthedocs.io/stable/_gallery/index.html). + + +## ๏Ÿ™ Projects + +The following projects fall under the pygfx.org umbrella: + +
-
- -

wgpu-py

- WebGPU for Python

- github.com/pygfx/wgpu
- wgpu-py.readthedocs.io
+
+ ๏€ญ Docs + ๏‚› Source +

Pygfx

+ A powerful and reliable render engine for Python. The main project. +
+ +
+ ๏€ญ Docs + ๏‚› Source +

wgpu-py

+ WebGPU for Python. Pygfx uses this to control your GPU. +
+ +
+ ๏€ญ Docs + ๏‚› Source +

RenderCanvas

+ One canvas API, multiple backends. Enables Pygfx to + render into an Qt/wx application, Jupyter notebook, and more. +
+ +
+ ๏€ญ Docs + ๏‚› Source +

pylinalg

+ Linear algebra utilities for Python. Used in Pygfx for its transform system. +
-
-

Other

- Projects that we also contribute to

- wgpu-native
- jupyter_rfb
- pylinalg +We also help maintain the following projects: + +
+
+ ๏‚› Source +

wgpu-native

+ Provides a C-API for WebGPU by implementing webgpu.h. Wrapped by wgpu-py. +
+ +
+ ๏‚› Source +

jupyter_rfb

+ A remote frame-buffer for Jupyter. Enables Jupyter support in RenderCanvas. +
-## ๐Ÿš€ Mission +## ๏€„ Mission We are dedicated to bring powerful and reliable visualization to the Python world. 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. + Pygfx provides a basis on top of which a multitude of visualizations become possible. From applications to libraries, from games to plotting. +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. + + +## ๏“˜ Ecosystem + +The following notable projects build on top of Pygfx or wgpu-py: + +
+ +
+
+ ๏€ญ Docs + ๏‚› Source +

Fastplotlib

+ Next-gen plotting library built on Pygfx. +
+
+ +
+
+ ๏‚› Source +

Shadertoy

+ Shadertoy implementation based on wgpu-py +
+
+ +
-## โค๏ธ Current sponsors +## ๏–„ Current sponsors -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) +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)

Ramona optics

@@ -57,7 +144,7 @@ Pygfx and wgpu are open source and free to use. To develop these projects we rel -## ๐Ÿ‘ฅ Team +## ๎”ณ Core team

diff --git a/pages/sponsor.md b/pages/sponsor.md index 731232b..fe0dd22 100644 --- a/pages/sponsor.md +++ b/pages/sponsor.md @@ -1,48 +1,87 @@ - + -# Sponsoring Pygfx +# Sponsoring / support contracts -## ๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘ Keep Pygfx independent and active +## ๏€„ Keep Pygfx independent Maintaining and growing wgpu and Pygfx costs time and dedication. We rely on sponsors to maintain (and grow) the project further. -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. +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. -## ๐ŸŽ What you get +## ๏”บ How funds are used -* Most importantly, sponsors help ensure that Pygfx is actively maintained! -* Sponsors also get priority on bug reports and feature requests. -* An honorable mention on the front page of pygfx.org! -* In the top tiers, one-on-one support to help you use Pygfx to the max. +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. +Surplus funds are used as a buffer (to create some runway), onboarding additional developers, and maybe organize an event. -We employ a few different [sponsorship tiers](https://github.com/sponsors/pygfx). +## ๏• What you get -## ๐Ÿงพ Ways to sponsor Pygfx +A sponsorship represents a support contract that offers the following benefits: -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)! +* Ongoing development on the project. +* Priority on bug reports and feature requests. +* Company logo on the front page of pygfx.org. +* In the top tiers: in-person support to help you use Pygfx to the max. -### Directly -The pygfx-org is a trademark of *Almar Klein scientific computing*, based in The Netherlands. -We can provide an invoice and you pay by bank transfer. -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. +## ๏€ข Tiers + -### Via Github + -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. + + -### Via OpenCollective +
-You can sponsor us via [https://opencollective.com/pygfx](https://opencollective.com/pygfx). These funds and how they are spent are publicly visible. +## ๏Š‘ Payment options -## ๐Ÿ’ฐ How funds are spent +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)! -Sponsorship funds for Pygfx are primarily used to fund our developer time. -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. +* We can provide an **invoice** and you pay by **bank transfer**. We can also setup a formal support contract if needed. +* You can also sponsor via **Github's sponsors**: [https://github.com/sponsors/pygfx](https://github.com/sponsors/pygfx) +* You can sponsor us via [opencollective](https://opencollective.com/pygfx). These funds and how they are spent are publicly visible. +## ๏‰Ž Legal stuff + +Funds are managed via *Almar Klein Scientific Computing*: + +* Location: Almere, The Netherlands +* CoC number: 61855448 +* Tax id: NL001380600B82 diff --git a/static/UbuntuCondensed_latin.woff2 b/static/UbuntuCondensed_latin.woff2 new file mode 100644 index 0000000..af2ed57 Binary files /dev/null and b/static/UbuntuCondensed_latin.woff2 differ diff --git a/static/Ubuntu_latin.woff2 b/static/Ubuntu_latin.woff2 new file mode 100644 index 0000000..171099b Binary files /dev/null and b/static/Ubuntu_latin.woff2 differ diff --git a/static/fa-brands-400.woff2 b/static/fa-brands-400.woff2 new file mode 100644 index 0000000..d84512f Binary files /dev/null and b/static/fa-brands-400.woff2 differ diff --git a/static/fa-regular-400.woff2 b/static/fa-regular-400.woff2 new file mode 100644 index 0000000..452b49c Binary files /dev/null and b/static/fa-regular-400.woff2 differ diff --git a/static/fa-solid-900.woff2 b/static/fa-solid-900.woff2 new file mode 100644 index 0000000..fec1fae Binary files /dev/null and b/static/fa-solid-900.woff2 differ diff --git a/static/pygfx.png b/static/pygfx.png deleted file mode 100644 index 409abc0..0000000 Binary files a/static/pygfx.png and /dev/null differ diff --git a/static/pygfx1024.png b/static/pygfx1024.png new file mode 100644 index 0000000..d55e7d3 Binary files /dev/null and b/static/pygfx1024.png differ diff --git a/static/pygfx192.png b/static/pygfx192.png new file mode 100644 index 0000000..d55e7d3 Binary files /dev/null and b/static/pygfx192.png differ diff --git a/style.css b/style.css index 228ca00..8ab5afe 100644 --- a/style.css +++ b/style.css @@ -1,36 +1,71 @@ -/*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */ -html{line-height:1.15;-webkit-text-size-adjust:100%} -body{margin:0} -h1{font-size:2em;margin:.67em 0} -hr{box-sizing:content-box;height:0;overflow:visible} -pre{font-family:monospace,monospace;font-size:1em} -a{background-color:transparent} -abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted} -b,strong{font-weight:bolder} -code,kbd,samp{font-family:monospace,monospace;font-size:1em} -small{font-size:80%} -sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline} -sub{bottom:-.25em} -sup{top:-.5em} -img{border-style:none} -button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible} -button,select{text-transform:none} -button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button} -button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0} -button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText} -fieldset{padding:.35em .75em .625em} -legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal} -progress{vertical-align:baseline} -textarea{overflow:auto} -[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0} -[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto} -[type="search"]{-webkit-appearance:textfield;outline-offset:-2px} -[type="search"]::-webkit-search-decoration{-webkit-appearance:none} -::-webkit-file-upload-button{-webkit-appearance:button;font:inherit} -details{display:block} -summary{display:list-item} -template{display:none} -[hidden]{display:none} +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ +html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none} + +/**************** Fonts ****************/ + +/* latin */ +@font-face { + font-family: 'Ubuntu'; + font-style: normal; + font-weight: 400; + /*font-display: swap; does not work well with canvas? */ + src: url(Ubuntu_latin.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +/* latin */ +@font-face { + font-family: 'Ubuntu Condensed'; + font-style: normal; + font-weight: 400; + /*font-display: swap;*/ + src: url(UbuntuCondensed_latin.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +@font-face { + font-family: 'FontAwesome'; + font-style: normal; + font-weight: 400; + font-display: $fa-font-display; + src: url('fa-regular-400.woff2') format('woff2'); +} +@font-face { + font-family: 'FontAwesome'; + font-style: normal; + font-weight: 900; + font-display: $fa-font-display; + src: url('fa-solid-900.woff2') format('woff2'); +} +@font-face { + font-family: 'FontAwesome'; + font-style: normal; + font-weight: 400; + font-display: $fa-font-display; + src: url('fa-brands-400.woff2') format('woff2'); +} + +.far { + font-family: 'FontAwesome'; + font-weight: 400; + font-style: normal; + margin-right: 0.5em; +} +.fab { + font-family: 'FontAwesome'; + font-weight: 400; + font-style: normal; + margin-right: 0.5em; +} +.fas { + font-family: 'FontAwesome'; + font-weight: 900; + font-style: normal; + margin-right: 0.5em; +} + + +/**************** Main ****************/ html { height: 100%; @@ -38,17 +73,18 @@ html { body { height: 100%; - font-family: Ubuntu,"Helvetica Neue",Arial,sans-serif; color: #404040; - font-weight: normal; background: #fafafa; + font-family: "Ubuntu", Verdana, sans-serif; + font-weight: normal; + font-size: 110%; } .content { box-sizing: border-box; padding: 1em 1em; width: 100%; - position: static; + position: relative; max-width: none; margin: 0; margin-top: 1em; @@ -76,58 +112,10 @@ p, li { border-radius: 8px; xx-box-shadow: 0 0 5px rgba(0, 0, 0, 0.2); } - -.projectbox, .sponsorbox, .profilebox { - box-sizing: border-box; - display: inline-block; - position: relative; /* so stuff can be abs-positined inside */ - width: 100%; - line-height: 1.5; - background: #fcfcfc; - padding: 20px; - margin: 0.5em; - border: 1px solid #ccc; - border-radius: 8px; -} -.profilebox { - text-align: center; -} -.projectbox, .sponsorbox { - padding-top: 0; -} -.projectbox h3, .sponsorbox h3 { - color:#444; - font-size: 110%; -} -.sponsorbox img { - margin-bottom: 8px; - height: 50px; -} - -img.stars-badge { - position: absolute; - display: block; - top: 10px; - right: 10px; -} - -img.profile { - width: 80px; - height: 80px; - border-radius: 40px; +.menu .block2 { + display: none; } -@media screen and (min-width: 500px) { - .projectbox { - width: 450px; - } - .sponsorbox { - width: 450px; - } - .profilebox { - width: 130px; - } -} @media screen and (min-width: 1300px) { .content { width: 1000px; @@ -145,6 +133,9 @@ img.profile { max-width: 250px; margin-top: 0; } + .menu .block2 { + display: block; + } } @media screen and (min-width: 1650px) { .content { @@ -156,6 +147,8 @@ img.profile { } } +/**************** Basic components ****************/ + a:link, a:visited, a:active { color: #36C; text-decoration: none; @@ -164,9 +157,10 @@ a:hover { text-decoration: underline; } .menu .header { + font-family: "Ubuntu Condensed", Verdana, sans-serif; color: #aaa; display: block; - border-bottom: 1px solid #ccc; + xx-border-bottom: 1px solid #ccc; } .menu a { font-size: 120%; @@ -182,22 +176,6 @@ a:hover { /*margin-left: 1.5em;*/ } -.menu .ad { - box-sizing: border-box; - max-width: 270px; - white-space: normal; - text-align: center; -} -.menu .ad a { - font-size: 70%; - line-height: 100%; - margin: 0; -} -.menu .ad a.a-ad { - font-size: 95%; - text-decoration: none; -} - a.anch:hover { text-decoration: none; } @@ -234,11 +212,14 @@ code { } h1, h2, h3, h4 { color: #555; - font-family: Consolas, "DejaVu Sans Mono", Monaco, "Courier New", Courier, monospace; + font-family: "Ubuntu", Verdana, sans-serif;; } a.header:hover { color: #2A4; } +h1 { font-size: 250%; } +h2 { font-size: 180%; } +h3 { font-size: 120%; } h2 { margin-top: 1.3em; xx-border-bottom: 1px solid rgba(20, 100, 40, 0.3); @@ -262,3 +243,96 @@ img.thumb { margin: 0 1em 0.5em 0; border-radius: 4px; } + +a.button { + display: inline-block; + margin: 3px; + padding: 0.6em; + color: #fff; + background-color: #007EC6; + border: none; + border-radius: 5px; + text-decoration: none; +} +a.button:hover { + background-color: #009EE6; + text-decoration: none; +} +a.button.yellow { background-color: #FFC532; color:#000;} +a.button.yellow:hover { background-color: #EFB522;} + +/**************** Special panels ****************/ + +.project-container { + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: scenter; + align-items: stretch; + +} + +.projectbox, .sponsorbox, .profilebox, .sponsor-tier-box { + box-sizing: border-box; + display: inline-block; + position: relative; /* so stuff can be abs-positined inside */ + width: 100%; + line-height: 1.5; + background: #fcfcfc; + padding: 18px; + margin: 0.5em; + border: 1px solid #ccc; + border-radius: 8px; +} +.projectbox { border-color: #9DF; } +.sponsor-tier-box { border-color: #FFC532; } +.sponsorbox { border-color: #FFC532; } + +.profilebox { + text-align: center; +} +.projectbox h3, .sponsorbox h3, .sponsor-tier-box h3 { + margin-top: 0; + color:#444; +} +.projectbox ul, .sponsorbox ul, .sponsor-tier-box ul { + margin-bottom: 0; +} +.projectbox a.button { + padding: 2px 6px; + margin-left: 5px; + float: right; + background-color: #50AEF6 +} +.projectbox a.button:hover { + background-color: #308ED6 +} +.sponsorbox img { + margin-bottom: 8px; + height: 50px; +} + +img.stars-badge { + position: absolute; + display: block; + top: 10px; + right: 10px; +} + +img.profile { + width: 80px; + height: 80px; + border-radius: 40px; +} + +@media screen and (min-width: 500px) { + .projectbox { + width: 450px; + } + .sponsorbox { + width: 450px; + } + .profilebox { + width: 130px; + } +} \ No newline at end of file diff --git a/template.html b/template.html index 51a3d4a..0892421 100644 --- a/template.html +++ b/template.html @@ -4,6 +4,9 @@ {title} + + + @@ -14,7 +17,6 @@