From 4a77c449e99e425a3114a8018cdf2bf0ef6f440b Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Sun, 26 Jul 2020 20:11:53 +0100 Subject: [PATCH] Theme: Use data file to abstract sitenav and separate Amethyst config * Give the theme a name, Amethyst, after the purple gemstone. * Abstract the sitenav into a data file to prepare for future re-use. * Move the theme-related config into a subproperty named after the theme. --- LICENSE.txt | 4 - README.md | 2 +- _config.yml | 13 +- _data/sitenav.yml | 13 + _includes/opengraph.html | 6 +- _layouts/wrapper.html | 41 +-- _sass/amethyst.scss | 573 +++++++++++++++++++++++++++++++++++++++ _sass/variables.scss | 14 + css/styles.scss | 572 +------------------------------------- 9 files changed, 626 insertions(+), 612 deletions(-) create mode 100644 _data/sitenav.yml create mode 100644 _sass/amethyst.scss create mode 100644 _sass/variables.scss diff --git a/LICENSE.txt b/LICENSE.txt index 9b72886..f642c3f 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,9 +1,5 @@ Copyright OpenJS Foundation and other contributors, https://openjsf.org/ -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/qunitjs/qunitjs.com - Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including diff --git a/README.md b/README.md index 8faf5b5..fd29fc2 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ To update Jekyll and any plugins (e.g. after changes to `Gemfile`): bundle update ``` -To regenerate the site and serve locally at : +To regenerate the site and serve locally at : ```shell bundle exec jekyll serve diff --git a/_config.yml b/_config.yml index 66c5ed9..d4e2689 100644 --- a/_config.yml +++ b/_config.yml @@ -23,9 +23,9 @@ plugins: # Theme # We have a custom theme so the Jekyll is ignored. -# But, the default theee setting for github-pages is 'primer', -# which Jekyll would still compile. This is a problem because -# since at least 2015, the combination of Jekyll/Sass/Primer has +# But, the default theme setting for github-pages is 'primer', +# which Jekyll would still try to compile. This is a problem because +# since at least 2015, the combination of Jekyll/Sass/Primer is # broken and simply doesn't compile out of-the-box. # # - https://github.com/jekyll/jekyll/issues/7426 @@ -36,9 +36,10 @@ plugins: # Workaround by using the 'minima' for this no-op setting, # which does compile an (unused) file without issue. theme: minima -twitter_username: qunitjs -github_username: qunitjs -gitter_room: qunitjs/qunit +amethyst: + twitter: qunitjs + github: qunitjs + gitter: qunitjs/qunit # Conversion highlighter: rouge diff --git a/_data/sitenav.yml b/_data/sitenav.yml new file mode 100644 index 0000000..aba35f8 --- /dev/null +++ b/_data/sitenav.yml @@ -0,0 +1,13 @@ +- name: Guides + href: /guides/ + sub: + - name: Getting Started + href: /intro/ + - name: Plugins + href: /plugins/ + - name: 2.x Upgrade Guide + href: /upgrade-guide-2.x/ +- name: Documentation + href: https://api.qunitjs.com +- name: About + href: /about/ diff --git a/_includes/opengraph.html b/_includes/opengraph.html index f05a55d..6cddd13 100644 --- a/_includes/opengraph.html +++ b/_includes/opengraph.html @@ -16,8 +16,8 @@ {% endif -%} -{%- if site.twitter_username -%} - - +{%- if site.amethyst.twitter -%} + + {% endif -%} diff --git a/_layouts/wrapper.html b/_layouts/wrapper.html index 3da0dde..d504486 100644 --- a/_layouts/wrapper.html +++ b/_layouts/wrapper.html @@ -19,33 +19,20 @@ {% include search.html %} -