From 145087acc190c9faefdc822bc2f6034037b2d158 Mon Sep 17 00:00:00 2001 From: Matt Campbell Date: Sun, 1 Sep 2024 16:48:41 -0500 Subject: [PATCH] Replace the theme with simple styles and templates (#10) --- .gitmodules | 3 - LICENSE-APACHE | 176 ++++++++++++++++++ LICENSE => LICENSE-CC-BY | 0 README.md | 15 ++ config.toml | 53 +----- content/_index.md | 10 - content/blog/003_integration_into_bevy.md | 3 - .../blog/004_talon_implements_accesskit.md | 4 - content/blog/005_rustconf_2023.md | 3 - content/blog/_index.md | 10 +- content/{pages => }/contact.md | 5 - content/{pages => }/how-it-works.md | 11 -- content/pages/_index.md | 6 - static/main.css | 56 ++++++ templates/base.html | 50 +++++ templates/blog_index.html | 16 ++ templates/blog_post.html | 7 + templates/index.html | 6 + templates/page.html | 6 + themes/tabi | 1 - 20 files changed, 337 insertions(+), 104 deletions(-) delete mode 100644 .gitmodules create mode 100644 LICENSE-APACHE rename LICENSE => LICENSE-CC-BY (100%) create mode 100644 README.md rename content/{pages => }/contact.md (66%) rename content/{pages => }/how-it-works.md (98%) delete mode 100644 content/pages/_index.md create mode 100644 static/main.css create mode 100644 templates/base.html create mode 100644 templates/blog_index.html create mode 100644 templates/blog_post.html create mode 100644 templates/index.html create mode 100644 templates/page.html delete mode 160000 themes/tabi diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index ff27576..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "themes/tabi"] - path = themes/tabi - url = https://github.com/welpo/tabi.git diff --git a/LICENSE-APACHE b/LICENSE-APACHE new file mode 100644 index 0000000..1b5ec8b --- /dev/null +++ b/LICENSE-APACHE @@ -0,0 +1,176 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS diff --git a/LICENSE b/LICENSE-CC-BY similarity index 100% rename from LICENSE rename to LICENSE-CC-BY diff --git a/README.md b/README.md new file mode 100644 index 0000000..a957180 --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +# AccessKit website + +This repository contains the source for the [AccessKit website](https://accesskit.dev/). It is derived from the code for the [Linebender website](https://github.com/linebender/linebender.github.io). + +## Development + +The steps you need to get building the website locally are: + + 1. [Install Zola](https://www.getzola.org/documentation/getting-started/installation/) + 2. Run `zola serve` in a terminal + 3. Go to the address logged to the terminal window (usually [localhost:1111](http://localhost:1111)). + +## Deployment + +This website is automatically deployed every time a PR is merged using Github Actions. diff --git a/config.toml b/config.toml index 135f267..a05a95b 100644 --- a/config.toml +++ b/config.toml @@ -1,55 +1,4 @@ base_url = "https://accesskit.dev" -author = "The AccessKit contributors" -compile_sass = false -build_search_index = false -theme = "tabi" title = "AccessKit" +description = "Accessibility infrastructure for UI toolkits" generate_feeds = true -taxonomies = [ - { name = "categories", feed = true }, - { name = "tags", feed = true }, -] - -[markdown] -highlight_code = true -highlight_theme = "css" - -[extra] -invert_title_order = true - -menu = [ - { name = "How it Works", url = "how-it-works", trailing_slash = true }, - { name = "Blog", url = "blog", trailing_slash = true }, - { name = "Contact", url = "contact", trailing_slash = true }, -] - -quick_navigation_buttons = true - -show_author = true -show_reading_time = true -long_date_format = "%d %B %Y" -short_date_format = "%d %B %Y" -separator = "|" - -socials = [ - { name = "GitHub", url = "https://github.com/AccessKit/accesskit", icon = "github" }, - { name = "Follow us on Fosstodon", url = "https://fosstodon.org/@accesskit", icon = "mastodon" }, - { name = "YouTube", url = "https://www.youtube.com/@accesskit2196", icon = "youtube" }, -] - -footer_menu = [ - { name = "Sponsor the Project", url = "https://github.com/sponsors/mwcampbell" }, - { name = "Report an Issue", url = "https://github.com/AccessKit/accesskit/issues/new" }, -] - -copyright = "[accesskit.dev](/) © $CURRENT_YEAR by $AUTHOR is licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/?ref=chooser-v1)" - -allowed_domains = [ - { directive = "font-src", domains = ["'self'", "data:"] }, - { directive = "img-src", domains = ["'self'", "https://*", "data:"] }, - { directive = "media-src", domains = ["'self'", "https://cdn.jsdelivr.net/"] }, - { directive = "script-src", domains = ["'self'"] }, - { directive = "style-src", domains = ["'self'"] }, - { directive = "frame-src", domains = ["https://www.youtube.com"] }, -] -enable_csp = true diff --git a/content/_index.md b/content/_index.md index a20f937..75181c9 100644 --- a/content/_index.md +++ b/content/_index.md @@ -1,16 +1,6 @@ +++ -title = "Recent Posts" -sort_by = "date" -template = "section.html" - -[extra] -header = { title = "AccessKit" } -section_path = "blog/_index.md" -max_posts = 5 +++ -## Accessibility infrastructure for UI toolkits - AccessKit makes it easier to implement accessibility, for screen readers and other assistive technologies, in toolkits that render their own user interface elements. It provides a cross-platform, cross-language abstraction over accessibility APIs, so toolkit developers only have to implement accessibility once. ## Getting started diff --git a/content/blog/003_integration_into_bevy.md b/content/blog/003_integration_into_bevy.md index 9bded7b..58ea331 100644 --- a/content/blog/003_integration_into_bevy.md +++ b/content/blog/003_integration_into_bevy.md @@ -3,9 +3,6 @@ title = "AccessKit integration makes Bevy the first general-purpose game engine path = "accesskit-integration-makes-bevy-the-first-general-purpose-game-engine-with-built-in-accessibility-support" authors = ["Matt Campbell"] date = 2023-03-06T18:57:39Z - -[taxonomies] -categories = ["Integrations", "Milestones"] +++ [Bevy](https://bevyengine.org/), a popular game engine for the Rust programming language, just released version 0.10, with built-in AccessKit integration. As [Bevy’s own announcement](https://bevyengine.org/news/bevy-0-10/#accesskit-integration-into-bevy-ui) says, this makes Bevy the first general-purpose game engine with first-party accessibility support. diff --git a/content/blog/004_talon_implements_accesskit.md b/content/blog/004_talon_implements_accesskit.md index 144b4ec..9be9bbc 100644 --- a/content/blog/004_talon_implements_accesskit.md +++ b/content/blog/004_talon_implements_accesskit.md @@ -3,10 +3,6 @@ title = "Talon Voice Control Application Implements AccessKit in Latest Beta" path = "talon-voice-control-application-implements-accesskit-in-latest-beta" authors = ["Matt Campbell"] date = 2023-03-16T15:24:48Z - -[taxonomies] -categories = ["Integrations", "Milestones"] -tags = ["Egui", "Talon"] +++ It is with great pleasure that we recognize [Talon](https://talonvoice.com/), a cross-platform diff --git a/content/blog/005_rustconf_2023.md b/content/blog/005_rustconf_2023.md index f797e47..dac7cc2 100644 --- a/content/blog/005_rustconf_2023.md +++ b/content/blog/005_rustconf_2023.md @@ -3,9 +3,6 @@ title = "AccessKit featured at RustConf" path = "accesskit-featured-at-rustconf" authors = ["Matt Campbell"] date = 2023-10-04T15:20:33Z - -[taxonomies] -categories = ["Milestones"] +++ I recently gave a presentation at [RustConf 2023](https://rustconf.com/schedule/making-guis-accessible-across-platforms-and-languages-with-rust). This presentation discusses making graphical user interfaces (GUIs) accessible across platforms and programming languages with Rust, by way of the AccessKit project. The presentation will feature demonstrations of what currently works, and further discuss how the community can get involved. diff --git a/content/blog/_index.md b/content/blog/_index.md index a90f89b..c3b2873 100644 --- a/content/blog/_index.md +++ b/content/blog/_index.md @@ -1,10 +1,8 @@ +++ title = "Blog" -template = "section.html" sort_by = "date" -paginate_by = 5 - -[extra] -show_previous_next_article_links = true -invert_previous_next_article_links = true +template = "blog_index.html" +page_template = "blog_post.html" +++ + +# Blog diff --git a/content/pages/contact.md b/content/contact.md similarity index 66% rename from content/pages/contact.md rename to content/contact.md index 7922acd..016e915 100644 --- a/content/pages/contact.md +++ b/content/contact.md @@ -1,10 +1,5 @@ +++ title = "Contact" -template = "info-page.html" -path = "contact" - -[extra] -header = { title = "Contact" } +++ ## Send us an Email diff --git a/content/pages/how-it-works.md b/content/how-it-works.md similarity index 98% rename from content/pages/how-it-works.md rename to content/how-it-works.md index f07dff9..c407a4a 100644 --- a/content/pages/how-it-works.md +++ b/content/how-it-works.md @@ -1,16 +1,5 @@ - - - - - - - - - +++ title = "How it works" -template = "info-page.html" -path = "how-it-works" +++ ## Data schema diff --git a/content/pages/_index.md b/content/pages/_index.md deleted file mode 100644 index 33b4800..0000000 --- a/content/pages/_index.md +++ /dev/null @@ -1,6 +0,0 @@ -+++ -render = false - -[extra] -hide_from_feed = true -+++ diff --git a/static/main.css b/static/main.css new file mode 100644 index 0000000..d0bc750 --- /dev/null +++ b/static/main.css @@ -0,0 +1,56 @@ +html { + color-scheme: dark light; +} +body { + max-width: 40em; + margin-right: auto; + margin-left: auto; + padding-right: 1em; + padding-left: 1em; + font-family: system-ui, sans-serif; + line-height: 1.5; +} +.site-header { + display: flex; + flex-flow: row wrap; + width: 100%; + padding-top: 0.5em; + padding-bottom: 1em; + align-items: center; +} +.site-title { + flex: 1; + font-size: 150%; +} +nav ul, footer ul { + list-style: none; + margin: 0; + padding-left: 0; +} +nav ul li, footer ul li { + display: inline-block; +} +nav ul li:not(:last-child), footer ul li:not(:last-child) { + margin-right: 1.25em; +} +main { + padding-bottom: 1em; +} +footer { + border-top: 1px solid; +} +footer ul { + padding-top: 0.5em; +} +.blog-list { + list-style: none; +} +.blog-list li { + margin-bottom: 1em; +} +.list-post-title { + font-size: 120%; +} +h3, h4, h5, h6 { + font-size: 100%; +} diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..21e8eda --- /dev/null +++ b/templates/base.html @@ -0,0 +1,50 @@ + + + + + + {% if page.title %}{{page.title}} - {{config.title}}{% else %}{{config.title}}: {{config.description}}{% endif %} + + + + + + + + + + {% if config.generate_feeds %} + + {% endif %} + + + +
+ {% block content %}{% endblock content %} +
+ + + diff --git a/templates/blog_index.html b/templates/blog_index.html new file mode 100644 index 0000000..42b4741 --- /dev/null +++ b/templates/blog_index.html @@ -0,0 +1,16 @@ +{% extends "base.html" %} + +{% block content %} +{{ section.content | safe }} + +{% endblock content %} diff --git a/templates/blog_post.html b/templates/blog_post.html new file mode 100644 index 0000000..a0cca8e --- /dev/null +++ b/templates/blog_post.html @@ -0,0 +1,7 @@ +{% extends "base.html" %} + +{% block content %} +

{{ page.title }}

+

{{ page.authors | join(sep=", ") }}, {{ page.date | date(format="%B %-d, %Y") }}

+{{ page.content | safe }} +{% endblock content %} diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..4f8a3e6 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,6 @@ +{% extends "base.html" %} + +{% block content %} +

{{config.description}}

+{{ section.content | safe }} +{% endblock content %} diff --git a/templates/page.html b/templates/page.html new file mode 100644 index 0000000..0ea71d7 --- /dev/null +++ b/templates/page.html @@ -0,0 +1,6 @@ +{% extends "base.html" %} + +{% block content %} +

{{ page.title }}

+{{ page.content | safe }} +{% endblock content %} diff --git a/themes/tabi b/themes/tabi deleted file mode 160000 index ce3be5c..0000000 --- a/themes/tabi +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ce3be5c007fa23bfa6ebb09b3fcab9e2ad9f06fa