From 9071d9fdcaf8b2239fa6efa3a6828d5a65a201bd Mon Sep 17 00:00:00 2001 From: Keavon Chambers Date: Sun, 18 Dec 2022 21:35:46 -0800 Subject: [PATCH] Simplify website template code --- website/content/blog/_index.md | 23 ++++++++- website/content/contact/_index.md | 8 ++++ website/content/contribute/_index.md | 8 ++++ website/content/features/_index.md | 8 ++++ website/content/index/_index.md | 4 -- website/content/license/_index.md | 8 ++++ website/content/logo/_index.md | 72 +++++++++++++++++++++++++++- website/content/press/_index.md | 8 ++++ website/sass/page.scss | 0 website/templates/404.html | 8 ++-- website/templates/article.html | 2 +- website/templates/base.html | 34 +++++++------ website/templates/blog.html | 18 ++----- website/templates/index.html | 3 +- website/templates/logo.html | 70 --------------------------- website/templates/page.html | 13 ++--- 16 files changed, 162 insertions(+), 125 deletions(-) delete mode 100644 website/content/index/_index.md delete mode 100644 website/sass/page.scss delete mode 100644 website/templates/logo.html diff --git a/website/content/blog/_index.md b/website/content/blog/_index.md index 63104821e5..8ee37ec863 100644 --- a/website/content/blog/_index.md +++ b/website/content/blog/_index.md @@ -1,7 +1,28 @@ +++ title = "Blog" template = "blog.html" -sort_by = "date" page_template = "article.html" +sort_by = "date" generate_feed = true +++ + +
+
+ +# Blog. + +
+ +Latest news and articles from the Graphite team. + +

+ + RSS + RSS Feed + +

+ +
+ +
+
diff --git a/website/content/contact/_index.md b/website/content/contact/_index.md index 8776a67849..aeceb71c8e 100644 --- a/website/content/contact/_index.md +++ b/website/content/contact/_index.md @@ -3,7 +3,15 @@ title = "Contact the team" template = "page.html" +++ +
+
+ +# Contact the team. + * Members of the press, please see the [press resources](/press) page. * For general discussions, reach out on [Discord](https://discord.graphite.rs) or [Reddit](https://www.reddit.com/r/graphite/). * To report a bug or request a feature, please [file an issue](https://github.com/GraphiteEditor/Graphite/issues/new) on GitHub. * For other inquiries, please get in touch by email at . + +
+
diff --git a/website/content/contribute/_index.md b/website/content/contribute/_index.md index cc5246bcd7..e51428c49c 100644 --- a/website/content/contribute/_index.md +++ b/website/content/contribute/_index.md @@ -3,6 +3,11 @@ title = "Contribute to Graphite" template = "page.html" +++ +
+
+ +# Contribute to Graphite. + It's great to hear you are interested in contributing to Graphite! We want to make it as easy and frictionless as possible for you to get started. Here are the basics. ## Building and running the codebase. @@ -133,3 +138,6 @@ Once you begin writing code, please open a pull request immediately and mark it Open a new PR as a draft / Convert an existing PR to a draft: ![Screenhots showing GitHub's "Create pull request (arrow) > Create draft pull request" and "Still in progress? Convert to draft" buttons](https://static.graphite.rs/content/contribute/draft-pr.png) + +
+
diff --git a/website/content/features/_index.md b/website/content/features/_index.md index 4e15e6be56..9cee39c105 100644 --- a/website/content/features/_index.md +++ b/website/content/features/_index.md @@ -3,6 +3,11 @@ title = "Features and roadmap" template = "page.html" +++ +
+
+ +# Features and roadmap. + The current version of Graphite provides tools for designing vector art with Bezier curves, similar to tools like Inkscape, Illustrator, and Affinity Designer. These creations may be exported to SVG, JPG, or PNG formats. External images may be imported and placed in the document as a layer (but not directly edited yet). The present priority is building the node graph system and integrating it with the existing vector editing toolset. Once ready, work will shift to building a raster-based render engine. More advanced features will build off those core capabilities. @@ -60,3 +65,6 @@ Long Term: - Live video compositing - Animated SVG authorship - Distributed rendering system + +
+
diff --git a/website/content/index/_index.md b/website/content/index/_index.md deleted file mode 100644 index c97781a0a8..0000000000 --- a/website/content/index/_index.md +++ /dev/null @@ -1,4 +0,0 @@ -+++ -title = "" -template = "index.html" -+++ diff --git a/website/content/license/_index.md b/website/content/license/_index.md index 229b6b7a84..8b75d0e008 100644 --- a/website/content/license/_index.md +++ b/website/content/license/_index.md @@ -3,6 +3,11 @@ title = "Graphite license" template = "page.html" +++ +
+
+ +# Graphite license. + Graphite is open source software built by the community. The application is free to use by anyone for any purpose, even commercially. The artwork you produce is solely yours. The source code [available on GitHub](https://github.com/GraphiteEditor/Graphite) (including the Graphite editor application, Graphene system, libraries, and other software materials) is provided under the Apache 2.0 license posted below, unless otherwise noted. Artwork, including but not limited to logos, icons, SVG code, branding imagery, and sample art are excluded from this license and held under copyright by their respective owners. Learn about the [Graphite brand](/logo) for more information. @@ -185,3 +190,6 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS + +
+
diff --git a/website/content/logo/_index.md b/website/content/logo/_index.md index c633d01fb3..c24f74888f 100644 --- a/website/content/logo/_index.md +++ b/website/content/logo/_index.md @@ -1,8 +1,16 @@ +++ title = "Graphite logo" -template = "logo.html" +template = "page.html" + +[extra] +css = "/logo.css" +++ +
+
+ +# Graphite logo. + The Graphite logo is made available for community use. While the software is free and open source, the brand identity is more restrictive. Please be respectful of the Graphite brand by reviewing the usage policy. ## Usage policy. @@ -19,3 +27,65 @@ If in doubt, please send an email to for permission. ## Download. Download the complete [logo kit](https://static.graphite.rs/logos/graphite-logo-kit.zip) or a specific version in PNG or SVG format below. + +
+
+ +
+ +
+
+
+ + Graphite Logotype (Color) + Download (SVG) + Download (PNG 240x937) + Download (PNG 480x1874) +
+
+ + Graphite Icon (Color) + Download (SVG) + Download (PNG 240x240) + Download (PNG 480x480) +
+
+
+ +
+
+
+ + Graphite Logotype (Solid) + Download (SVG) + Download (PNG 240x937) + Download (PNG 480x1874) +
+
+ + Graphite Icon (Solid) + Download (SVG) + Download (PNG 240x240) + Download (PNG 480x480) +
+
+
+ +
+
+
+ + Graphite Logotype (Solid, White) + Download (SVG) + Download (PNG 240x937) + Download (PNG 480x1874) +
+
+ + Graphite Icon (Solid, White) + Download (SVG) + Download (PNG 240x240) + Download (PNG 480x480) +
+
+
diff --git a/website/content/press/_index.md b/website/content/press/_index.md index 2a7250dc4c..0083f88025 100644 --- a/website/content/press/_index.md +++ b/website/content/press/_index.md @@ -3,6 +3,11 @@ title = "Press resources" template = "page.html" +++ +
+
+ +# Press resources. + This page provides materials for members of the press and anyone looking to share Graphite with their audiences. ## Contact. @@ -12,3 +17,6 @@ Please get in touch if you'd like to conduct an interview, get any questions ans ## Logo. Logos in PNG and SVG format are available for use in articles talking about Graphite. See the [logo](/logo) page for downloads. + +
+
diff --git a/website/sass/page.scss b/website/sass/page.scss deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/website/templates/404.html b/website/templates/404.html index 66c13d6fcf..f3bb5211e2 100644 --- a/website/templates/404.html +++ b/website/templates/404.html @@ -1,13 +1,11 @@ {% extends "base.html" %} -{% block title %}Page not found.{% endblock title %} +{% block title %}Page not found{% endblock title %} {% block content %}
-

Page not found (yet).

-

- Some pages are still actively under construction. Please check back in a few days! -

+

Page not found.

+
Home Page
diff --git a/website/templates/article.html b/website/templates/article.html index 9ce88533a0..55989b266e 100644 --- a/website/templates/article.html +++ b/website/templates/article.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% block title %}Blog | {{ page.title }}.{% endblock title %} +{% block title %}Blog | {{ page.title }}{% endblock title %} {% block head %} diff --git a/website/templates/base.html b/website/templates/base.html index 8422ec586d..89801518be 100644 --- a/website/templates/base.html +++ b/website/templates/base.html @@ -3,7 +3,7 @@ - Graphite | {% block title %}{% endblock title %} + Graphite | {% block title %}{% endblock title %}. {% block rss %} {% endblock %} @@ -13,30 +13,28 @@ diff --git a/website/templates/blog.html b/website/templates/blog.html index 02c41cf435..105a50c813 100644 --- a/website/templates/blog.html +++ b/website/templates/blog.html @@ -1,25 +1,13 @@ {% extends "base.html" %} -{% block title %}{{ section.title }}.{% endblock title %} +{% block title %}{{ section.title }}{% endblock title %} {% block head %} {% endblock head %} {% block content %} -
-
-

{{ section.title }}.

-
-

Latest news and articles from the Graphite team.

-

- - RSS - RSS Feed - -

-
-
-
+{{ section.content | safe }} +
{% for page in section.pages %}
diff --git a/website/templates/index.html b/website/templates/index.html index 0540d71062..dd145ef79b 100644 --- a/website/templates/index.html +++ b/website/templates/index.html @@ -1,6 +1,5 @@ {% extends "base.html" %} - -{% block title %}Redefining state-of-the-art graphics editing.{% endblock title %} +{% block title %}Redefining state-of-the-art graphics editing{% endblock title %} {% block head %} diff --git a/website/templates/logo.html b/website/templates/logo.html deleted file mode 100644 index d78a39d526..0000000000 --- a/website/templates/logo.html +++ /dev/null @@ -1,70 +0,0 @@ -{% extends "base.html" %} -{% block title %}{{ section.title }}.{% endblock title %} - -{% block head %} - -{% endblock head %} - -{% block content %} -
-
-

{{ section.title }}.

- {{ section.content | safe }} -
-
-
-
-
-
- - Graphite Logotype (Color) - Download (SVG) - Download (PNG 240x937) - Download (PNG 480x1874) -
- -
-
-
-
-
- - Graphite Logotype (Solid) - Download (SVG) - Download (PNG 240x937) - Download (PNG 480x1874) -
- -
-
-
-
-
- - Graphite Logotype (Solid, White) - Download (SVG) - Download (PNG 240x937) - Download (PNG 480x1874) -
-
- - Graphite Icon (Solid, White) - Download (SVG) - Download (PNG 240x240) - Download (PNG 480x480) -
-
-
-{% endblock content %} diff --git a/website/templates/page.html b/website/templates/page.html index 1780b6a2e8..b5fbe4908a 100644 --- a/website/templates/page.html +++ b/website/templates/page.html @@ -1,15 +1,12 @@ {% extends "base.html" %} -{% block title %}{{ section.title }}.{% endblock title %} +{% block title %}{{ section.title }}{% endblock title %} {% block head %} - +{% if section.extra.css %} + +{% endif %} {% endblock head %} {% block content %} -
-
-

{{ section.title }}.

- {{ section.content | safe }} -
-
+{{ section.content | safe }} {% endblock content %}