From bfdc596f72c2449322997c889ebb002ab2dd8f05 Mon Sep 17 00:00:00 2001 From: piazzai <42124135+piazzai@users.noreply.github.com> Date: Sun, 2 Jun 2024 17:44:24 +0200 Subject: [PATCH 01/13] Upgrade gem version --- hacked-jekyll.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hacked-jekyll.gemspec b/hacked-jekyll.gemspec index b6a8b81..8a3c30f 100644 --- a/hacked-jekyll.gemspec +++ b/hacked-jekyll.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |spec| spec.name = "hacked-jekyll" - spec.version = "2.2.1" + spec.version = "3.0.0" spec.authors = ["piazzai"] spec.email = ["42124135+piazzai@users.noreply.github.com"] From 6005a298f2e1f14ba3ff0a68c13b215c4d35e021 Mon Sep 17 00:00:00 2001 From: piazzai <42124135+piazzai@users.noreply.github.com> Date: Sun, 2 Jun 2024 17:44:30 +0200 Subject: [PATCH 02/13] Switch to local build --- demo/Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo/Gemfile b/demo/Gemfile index 8e580ab..c119916 100644 --- a/demo/Gemfile +++ b/demo/Gemfile @@ -1,3 +1,3 @@ source 'https://rubygems.org' -gem 'hacked-jekyll', '~> 2.2' +gem 'hacked-jekyll', path: '../' From f27e7e125c032aedf9736d175b5a28d1a7cb6629 Mon Sep 17 00:00:00 2001 From: piazzai <42124135+piazzai@users.noreply.github.com> Date: Sun, 2 Jun 2024 17:45:20 +0200 Subject: [PATCH 03/13] Simplify dependencies --- hacked-jekyll.gemspec | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hacked-jekyll.gemspec b/hacked-jekyll.gemspec index 8a3c30f..5e5aaf1 100644 --- a/hacked-jekyll.gemspec +++ b/hacked-jekyll.gemspec @@ -12,7 +12,5 @@ Gem::Specification.new do |spec| spec.files = `git ls-files -z`.split("\x0").select { |f| f.match(%r!^(assets|_data|_layouts|_includes|_sass|LICENSE|README|_config\.yml)!i) } - spec.add_runtime_dependency "jekyll", "~> 4.3", ">= 4.3.3" - spec.add_runtime_dependency "jekyll-seo-tag", "~> 2.8" - spec.add_runtime_dependency "jekyll-sitemap", "~> 1.4" + spec.add_runtime_dependency "github-pages", "~> 231" end From f3e1d4222eb6eae3499c8f780ffd9f2923211b59 Mon Sep 17 00:00:00 2001 From: piazzai <42124135+piazzai@users.noreply.github.com> Date: Sun, 2 Jun 2024 17:46:12 +0200 Subject: [PATCH 04/13] Consolidate config files --- _config.yml | 16 ---------------- demo/_config.yml | 13 +++++++++++++ 2 files changed, 13 insertions(+), 16 deletions(-) delete mode 100644 _config.yml diff --git a/_config.yml b/_config.yml deleted file mode 100644 index 5256dea..0000000 --- a/_config.yml +++ /dev/null @@ -1,16 +0,0 @@ -title: "" -description: "" -baseurl: "" -url: "" - -lowercase: true -show_quotes: true -show_commas: true -target: _self - -plugins: - - jekyll-seo-tag - - jekyll-sitemap - -sass: - sourcemap: never diff --git a/demo/_config.yml b/demo/_config.yml index d3ec2f8..c318606 100644 --- a/demo/_config.yml +++ b/demo/_config.yml @@ -5,6 +5,19 @@ url: https://piazzai.github.io theme: hacked-jekyll +lowercase: true +show_quotes: true +show_commas: true +target: _self + exclude: - LICENSE - README.md + +plugins: + - jekyll-seo-tag + - jekyll-sitemap + +sass: + sourcemap: never + \ No newline at end of file From baabc630c2ea7655cd39eb0072da5e78b41fdd01 Mon Sep 17 00:00:00 2001 From: piazzai <42124135+piazzai@users.noreply.github.com> Date: Sun, 2 Jun 2024 17:52:08 +0200 Subject: [PATCH 05/13] Exclude vendor folder --- demo/_config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/demo/_config.yml b/demo/_config.yml index c318606..e0fd3cc 100644 --- a/demo/_config.yml +++ b/demo/_config.yml @@ -13,6 +13,7 @@ target: _self exclude: - LICENSE - README.md + - vendor/ plugins: - jekyll-seo-tag From 0e897643173e9cacf6b8950a1fe090db75c83ebe Mon Sep 17 00:00:00 2001 From: piazzai <42124135+piazzai@users.noreply.github.com> Date: Sun, 2 Jun 2024 17:52:37 +0200 Subject: [PATCH 06/13] Add webrick dependency --- hacked-jekyll.gemspec | 1 + 1 file changed, 1 insertion(+) diff --git a/hacked-jekyll.gemspec b/hacked-jekyll.gemspec index 5e5aaf1..3476e16 100644 --- a/hacked-jekyll.gemspec +++ b/hacked-jekyll.gemspec @@ -13,4 +13,5 @@ Gem::Specification.new do |spec| spec.files = `git ls-files -z`.split("\x0").select { |f| f.match(%r!^(assets|_data|_layouts|_includes|_sass|LICENSE|README|_config\.yml)!i) } spec.add_runtime_dependency "github-pages", "~> 231" + spec.add_runtime_dependency "webrick", "~> 1.8", "1.8.1" end From cd13fbb2f6e22f3c507614dd6b7e76f7c2fc2548 Mon Sep 17 00:00:00 2001 From: piazzai <42124135+piazzai@users.noreply.github.com> Date: Sun, 2 Jun 2024 17:52:43 +0200 Subject: [PATCH 07/13] Reinstall gems --- demo/Gemfile.lock | 248 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 221 insertions(+), 27 deletions(-) diff --git a/demo/Gemfile.lock b/demo/Gemfile.lock index 3dc4ba9..32074ee 100644 --- a/demo/Gemfile.lock +++ b/demo/Gemfile.lock @@ -1,48 +1,217 @@ +PATH + remote: .. + specs: + hacked-jekyll (3.0.0) + github-pages (~> 231) + webrick (~> 1.8, = 1.8.1) + GEM remote: https://rubygems.org/ specs: + activesupport (7.1.3.3) + base64 + bigdecimal + concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + minitest (>= 5.1) + mutex_m + tzinfo (~> 2.0) addressable (2.8.6) public_suffix (>= 2.0.2, < 6.0) + base64 (0.2.0) + bigdecimal (3.1.8) + coffee-script (2.4.1) + coffee-script-source + execjs + coffee-script-source (1.12.2) colorator (1.1.0) + commonmarker (0.23.10) concurrent-ruby (1.3.1) + connection_pool (2.4.1) + dnsruby (1.72.1) + simpleidn (~> 0.2.1) + drb (2.2.1) em-websocket (0.5.3) eventmachine (>= 0.12.9) http_parser.rb (~> 0) + ethon (0.16.0) + ffi (>= 1.15.0) eventmachine (1.2.7) - ffi (1.16.3) + execjs (2.9.1) + faraday (2.9.0) + faraday-net_http (>= 2.0, < 3.2) + faraday-net_http (3.1.0) + net-http + ffi (1.17.0) forwardable-extended (2.6.0) - google-protobuf (3.25.3-x86_64-linux) - hacked-jekyll (2.2.0) - jekyll (~> 4.3, >= 4.3.3) - jekyll-seo-tag (~> 2.8) - jekyll-sitemap (~> 1.4) + gemoji (4.1.0) + github-pages (231) + github-pages-health-check (= 1.18.2) + jekyll (= 3.9.5) + jekyll-avatar (= 0.8.0) + jekyll-coffeescript (= 1.2.2) + jekyll-commonmark-ghpages (= 0.4.0) + jekyll-default-layout (= 0.1.5) + jekyll-feed (= 0.17.0) + jekyll-gist (= 1.5.0) + jekyll-github-metadata (= 2.16.1) + jekyll-include-cache (= 0.2.1) + jekyll-mentions (= 1.6.0) + jekyll-optional-front-matter (= 0.3.2) + jekyll-paginate (= 1.1.0) + jekyll-readme-index (= 0.3.0) + jekyll-redirect-from (= 0.16.0) + jekyll-relative-links (= 0.6.1) + jekyll-remote-theme (= 0.4.3) + jekyll-sass-converter (= 1.5.2) + jekyll-seo-tag (= 2.8.0) + jekyll-sitemap (= 1.4.0) + jekyll-swiss (= 1.0.0) + jekyll-theme-architect (= 0.2.0) + jekyll-theme-cayman (= 0.2.0) + jekyll-theme-dinky (= 0.2.0) + jekyll-theme-hacker (= 0.2.0) + jekyll-theme-leap-day (= 0.2.0) + jekyll-theme-merlot (= 0.2.0) + jekyll-theme-midnight (= 0.2.0) + jekyll-theme-minimal (= 0.2.0) + jekyll-theme-modernist (= 0.2.0) + jekyll-theme-primer (= 0.6.0) + jekyll-theme-slate (= 0.2.0) + jekyll-theme-tactile (= 0.2.0) + jekyll-theme-time-machine (= 0.2.0) + jekyll-titles-from-headings (= 0.5.3) + jemoji (= 0.13.0) + kramdown (= 2.4.0) + kramdown-parser-gfm (= 1.1.0) + liquid (= 4.0.4) + mercenary (~> 0.3) + minima (= 2.5.1) + nokogiri (>= 1.13.6, < 2.0) + rouge (= 3.30.0) + terminal-table (~> 1.4) + github-pages-health-check (1.18.2) + addressable (~> 2.3) + dnsruby (~> 1.60) + octokit (>= 4, < 8) + public_suffix (>= 3.0, < 6.0) + typhoeus (~> 1.3) + html-pipeline (2.14.3) + activesupport (>= 2) + nokogiri (>= 1.4) http_parser.rb (0.8.0) i18n (1.14.5) concurrent-ruby (~> 1.0) - jekyll (4.3.3) + jekyll (3.9.5) addressable (~> 2.4) colorator (~> 1.0) em-websocket (~> 0.5) - i18n (~> 1.0) - jekyll-sass-converter (>= 2.0, < 4.0) + i18n (>= 0.7, < 2) + jekyll-sass-converter (~> 1.0) jekyll-watch (~> 2.0) - kramdown (~> 2.3, >= 2.3.1) - kramdown-parser-gfm (~> 1.0) + kramdown (>= 1.17, < 3) liquid (~> 4.0) - mercenary (>= 0.3.6, < 0.5) + mercenary (~> 0.3.3) pathutil (~> 0.9) - rouge (>= 3.0, < 5.0) + rouge (>= 1.7, < 4) safe_yaml (~> 1.0) - terminal-table (>= 1.8, < 4.0) - webrick (~> 1.7) - jekyll-sass-converter (3.0.0) - sass-embedded (~> 1.54) + jekyll-avatar (0.8.0) + jekyll (>= 3.0, < 5.0) + jekyll-coffeescript (1.2.2) + coffee-script (~> 2.2) + coffee-script-source (~> 1.12) + jekyll-commonmark (1.4.0) + commonmarker (~> 0.22) + jekyll-commonmark-ghpages (0.4.0) + commonmarker (~> 0.23.7) + jekyll (~> 3.9.0) + jekyll-commonmark (~> 1.4.0) + rouge (>= 2.0, < 5.0) + jekyll-default-layout (0.1.5) + jekyll (>= 3.0, < 5.0) + jekyll-feed (0.17.0) + jekyll (>= 3.7, < 5.0) + jekyll-gist (1.5.0) + octokit (~> 4.2) + jekyll-github-metadata (2.16.1) + jekyll (>= 3.4, < 5.0) + octokit (>= 4, < 7, != 4.4.0) + jekyll-include-cache (0.2.1) + jekyll (>= 3.7, < 5.0) + jekyll-mentions (1.6.0) + html-pipeline (~> 2.3) + jekyll (>= 3.7, < 5.0) + jekyll-optional-front-matter (0.3.2) + jekyll (>= 3.0, < 5.0) + jekyll-paginate (1.1.0) + jekyll-readme-index (0.3.0) + jekyll (>= 3.0, < 5.0) + jekyll-redirect-from (0.16.0) + jekyll (>= 3.3, < 5.0) + jekyll-relative-links (0.6.1) + jekyll (>= 3.3, < 5.0) + jekyll-remote-theme (0.4.3) + addressable (~> 2.0) + jekyll (>= 3.5, < 5.0) + jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0) + rubyzip (>= 1.3.0, < 3.0) + jekyll-sass-converter (1.5.2) + sass (~> 3.4) jekyll-seo-tag (2.8.0) jekyll (>= 3.8, < 5.0) jekyll-sitemap (1.4.0) jekyll (>= 3.7, < 5.0) + jekyll-swiss (1.0.0) + jekyll-theme-architect (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-cayman (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-dinky (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-hacker (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-leap-day (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-merlot (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-midnight (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-minimal (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-modernist (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-primer (0.6.0) + jekyll (> 3.5, < 5.0) + jekyll-github-metadata (~> 2.9) + jekyll-seo-tag (~> 2.0) + jekyll-theme-slate (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-tactile (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-time-machine (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-titles-from-headings (0.5.3) + jekyll (>= 3.3, < 5.0) jekyll-watch (2.2.1) listen (~> 3.0) + jemoji (0.13.0) + gemoji (>= 3, < 5) + html-pipeline (~> 2.2) + jekyll (>= 3.0, < 5.0) kramdown (2.4.0) rexml kramdown-parser-gfm (1.1.0) @@ -51,32 +220,57 @@ GEM listen (3.9.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - mercenary (0.4.0) + mercenary (0.3.6) + minima (2.5.1) + jekyll (>= 3.5, < 5.0) + jekyll-feed (~> 0.9) + jekyll-seo-tag (~> 2.1) + minitest (5.23.1) + mutex_m (0.2.0) + net-http (0.4.1) + uri + nokogiri (1.16.5-x86_64-linux) + racc (~> 1.4) + octokit (4.25.1) + faraday (>= 1, < 3) + sawyer (~> 0.9) pathutil (0.16.2) forwardable-extended (~> 2.6) public_suffix (5.0.5) - rake (13.2.1) + racc (1.8.0) rb-fsevent (0.11.2) rb-inotify (0.11.1) ffi (~> 1.0) rexml (3.2.8) strscan (>= 3.0.9) - rouge (4.2.1) + rouge (3.30.0) + rubyzip (2.3.2) safe_yaml (1.0.5) - sass-embedded (1.69.5) - google-protobuf (~> 3.23) - rake (>= 13.0.0) + sass (3.7.4) + sass-listen (~> 4.0.0) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + sawyer (0.9.2) + addressable (>= 2.3.5) + faraday (>= 0.17.3, < 3) + simpleidn (0.2.3) strscan (3.1.0) - terminal-table (3.0.2) - unicode-display_width (>= 1.1.1, < 3) - unicode-display_width (2.5.0) + terminal-table (1.8.0) + unicode-display_width (~> 1.1, >= 1.1.1) + typhoeus (1.4.1) + ethon (>= 0.9.0) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + unicode-display_width (1.8.0) + uri (0.13.0) webrick (1.8.1) PLATFORMS x86_64-linux DEPENDENCIES - hacked-jekyll (~> 2.2) + hacked-jekyll! BUNDLED WITH 2.3.5 From 7cbf44cefa8ab3d23d8559a906dff0074b686c18 Mon Sep 17 00:00:00 2001 From: piazzai <42124135+piazzai@users.noreply.github.com> Date: Sun, 2 Jun 2024 18:57:51 +0200 Subject: [PATCH 08/13] Update README --- README.md | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index a0ec71a..8b9e09c 100644 --- a/README.md +++ b/README.md @@ -90,30 +90,36 @@ Finally, it is possible to render `value` as a hash, which is a list of key-valu You can customize the appearance of the rendered JSON object using site variables. These have default values that can be overridden by specifying a new value in your `_config.yml` file. -| Variable | Default | Purpose | -| ------------- | :-----------------: | ----------------------------------------------------- | -| `lowercase` | `true` | Set all keys and values to lowercase | -| `color_bg` | `var(--oc-gray-9)` | Set the background color | -| `color_punct` | `var(--oc-green-9)` | Set the color of quote marks, commas, and parentheses | -| `color_key` | `var(--oc-green-4)` | Set the color of all keys | -| `color_val` | `var(--oc-green-4)` | Set the color of all key values | -| `color_hover` | `var(--oc-green-5)` | Set the color of values on hover (if they are links) | -| `show_quotes` | `true` | Display quote marks around keys and values | -| `show_commas` | `true` | Display commas between key-value pairs | -| `target` | `_self` | Set the target tab/window of hyperlinks | - -All color defaults use the naming convention of the Open Color library ([read here](https://yeun.github.io/open-color/documents.html)). You can change them to any other color in the library, any base CSS color, or any three or six-digit hex color. For example: +| Variable | Default | Purpose | +| ------------- | :-------: | ---------------------------------------------------- | +| `color_bg` | `gray-9` | Set the background color | +| `color_punct` | `green-9` | Set the color of quotes, commas, and brackets | +| `color_key` | `green-4` | Set the color of keys | +| `color_value` | `green-4` | Set the color of values | +| `color_hover` | `green-5` | Set the color of values on hover (if they are links) | +| `quotes` | `true` | Display quote marks around keys and/or values | +| `commas` | `true` | Display commas between key-value pairs | +| `lowercase` | `true` | Transform all keys and/or values to lowercase | +| `newtab` | `false` | Open links in a new tab | + +The `color_*` variables follow the Open Color library's naming convention ([read here](https://yeun.github.io/open-color/documents.html)). You can change them to any color in the library using the same convention. For example: ```yaml -color_bg: var(--oc-indigo-8) -color_punct: black -color_key: '#fff' -color_val: '#cc5de8' +color_bg: indigo-5 +color_punct: teal-6 +color_key: grape-7 +color_value: lime-8 +color_hover: cyan-9 ``` -If you use Open Color names, remember to wrap them in a CSS variable. +The variables `quotes` and `lowercase` are true by default and can be set to false, but they can also be set to `keys` or `values` in order to restrict their effect to either keys or values. For example, the following code will display quote marks only around values and transform only keys to lowercase: -Customizing the CSS is possible by creating a file `_sass/_custom.scss`. You can use this both to define new styles or to overwrite the theme's defaults. The file will be automatically compiled during build. +```yaml +quotes: values +lowercase: keys +``` + +It is possible to customize the CSS by creating a file `_sass/_custom.scss`. You can use this to define new styles as well as overwrite the theme's defaults. The file will be automatically compiled during build. ## Bugs From 8bbcf4165a21a6ffbd2738eed94f5e19ff81d097 Mon Sep 17 00:00:00 2001 From: piazzai <42124135+piazzai@users.noreply.github.com> Date: Sun, 2 Jun 2024 18:58:55 +0200 Subject: [PATCH 09/13] Revamp theme variables --- _layouts/home.html | 57 ++++++++++++++++++++++++++++-------------- _sass/_default.scss | 10 +++----- assets/css/styles.scss | 27 +++++++++++++------- demo/_config.yml | 5 ---- 4 files changed, 59 insertions(+), 40 deletions(-) diff --git a/_layouts/home.html b/_layouts/home.html index 9238b3d..2d88724 100644 --- a/_layouts/home.html +++ b/_layouts/home.html @@ -2,13 +2,32 @@ layout: default --- -{% if site.show_quotes -%} -{% assign quote = '"' -%} -{% endif -%} -{% if site.show_commas -%} +{% case site.quotes -%} +{% when 'keys' -%} +{% assign quote_key = '"' -%} +{% assign quote_value = '' -%} +{% when 'values' -%} +{% assign quote_key = '' -%} +{% assign quote_value = '"' -%} +{% when false -%} +{% assign quote_key = '' -%} +{% assign quote_value = '' -%} +{% else -%} +{% assign quote_key = '"' -%} +{% assign quote_value = '"' -%} +{% endcase -%} + +{% if site.commas == false -%} +{% assign comma = '' -%} +{% else -%} {% assign comma = ',' -%} {% endif -%} -{% assign target = site.target | prepend: 'target="' | append: '"' -%} + +{% if site.newtab == true -%} +{% assign tab = '_blank' -%} +{% else -%} +{% assign tab = '_self' -%} +{% endif -%}
- {{ quote }}{{ value.key }}{{ quote }}: - {{ quote }}{{ value.value }}{{ quote }} + {{ quote_key }}{{ value.key }}{{ quote_key }}: + {{ quote_value }}{{ value.value }}{{ quote_value }} {%- unless forloop.last -%} {{ comma }} {%- endunless %}
{% else -%}- {{ quote }}{{ value.key }}{{ quote }}: - {{ quote }}{{ value.value }}{{ quote }} + {{ quote_key }}{{ value.key }}{{ quote_key }}: + {{ quote_value }}{{ value.value }}{{ quote_value }} {%- unless forloop.last -%} {{ comma }} {%- endunless %} @@ -44,18 +63,18 @@ {%- endfor -%} ] {%- elsif pair.value.first -%} - {{ quote }}{{ pair.key }}{{ quote }}: [ + {{ quote_key }}{{ pair.key }}{{ quote_key }}: [ {% for value in pair.value -%} {% if value.url -%}
- {{ quote }}{{ value.value }}{{ quote }} + {{ quote_value }}{{ value.value }}{{ quote_value }} {%- unless forloop.last -%} {{ comma }} {%- endunless %}
{% else -%}- {{ quote }}{{ value }}{{ quote }} + {{ quote_value }}{{ value }}{{ quote_value }} {%- unless forloop.last -%} {{ comma }} {%- endunless %} @@ -64,11 +83,11 @@ {%- endfor -%} ] {%- elsif pair.url -%} - {{ quote }}{{ pair.key }}{{ quote }}: - {{ quote }}{{ pair.value }}{{ quote }} + {{ quote_key }}{{ pair.key }}{{ quote_key }}: + {{ quote_value }}{{ pair.value }}{{ quote_value }} {%- else -%} - {{ quote }}{{ pair.key }}{{ quote }}: - {{ quote }}{{ pair.value }}{{ quote }} + {{ quote_key }}{{ pair.key }}{{ quote_key }}: + {{ quote_value }}{{ pair.value }}{{ quote_value }} {%- endif -%} {%- unless forloop.last -%} {{ comma }} diff --git a/_sass/_default.scss b/_sass/_default.scss index c6a2faa..2fcbbcf 100644 --- a/_sass/_default.scss +++ b/_sass/_default.scss @@ -86,15 +86,11 @@ a:active { .key { color: $color_key; + text-transform: $transform_key; } .error, .value { - color: $color_val; -} - -.error, -.key, -.value { - text-transform: $transform_case; + color: $color_value; + text-transform: $transform_value; } diff --git a/assets/css/styles.scss b/assets/css/styles.scss index b32dc98..eae6fe0 100644 --- a/assets/css/styles.scss +++ b/assets/css/styles.scss @@ -1,17 +1,26 @@ --- --- -$color_bg: {{ site.color_bg | default: 'var(--oc-gray-9)' }}; -$color_punct: {{ site.color_punct | default: 'var(--oc-green-9)' }}; -$color_key: {{ site.color_key | default: 'var(--oc-green-4)' }}; -$color_val: {{ site.color_val | default: 'var(--oc-green-4)' }}; -$color_hover: {{ site.color_hover | default: 'var(--oc-green-5)' }}; +$color_bg: var(--oc-{{ site.color_bg | default: 'gray-9' }}); +$color_punct: var(--oc-{{ site.color_punct | default: 'green-9' }}); +$color_key: var(--oc-{{ site.color_key | default: 'green-4' }}); +$color_value: var(--oc-{{ site.color_value | default: 'green-4' }}); +$color_hover: var(--oc-{{ site.color_hover | default: 'green-5' }}); -{% if site.lowercase -%} -$transform_case: lowercase; +{% case site.lowercase -%} +{% when 'keys' -%} +$transform_key: lowercase; +$transform_value: none; +{% when 'values' -%} +$transform_key: none; +$transform_value: lowercase; +{% when false -%} +$transform_key: none; +$transform_value: none; {% else -%} -$transform_case: none; -{% endif -%} +$transform_key: lowercase; +$transform_value: lowercase; +{% endcase -%} @import "default"; @import "custom"; diff --git a/demo/_config.yml b/demo/_config.yml index e0fd3cc..5005358 100644 --- a/demo/_config.yml +++ b/demo/_config.yml @@ -5,11 +5,6 @@ url: https://piazzai.github.io theme: hacked-jekyll -lowercase: true -show_quotes: true -show_commas: true -target: _self - exclude: - LICENSE - README.md From 1ec3a0211c6759481b70b11af34097771b80d18c Mon Sep 17 00:00:00 2001 From: piazzai <42124135+piazzai@users.noreply.github.com> Date: Sun, 2 Jun 2024 19:03:44 +0200 Subject: [PATCH 10/13] Change font face properties --- _sass/_default.scss | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/_sass/_default.scss b/_sass/_default.scss index 2fcbbcf..0845255 100644 --- a/_sass/_default.scss +++ b/_sass/_default.scss @@ -1,17 +1,17 @@ @font-face { font-family: "hack"; - src: url("../webfonts/hack-regular-subset.woff2") format("woff2"); + font-display: swap; font-style: normal; font-weight: 400; - text-rendering: optimizeLegibility; + src: url("../webfonts/hack-regular-subset.woff2") format("woff2"); } @font-face { font-family: "hack"; - src: url("../webfonts/hack-italic-subset.woff2") format("woff2"); + font-display: swap; font-style: italic; font-weight: 400; - text-rendering: optimizeLegibility; + src: url("../webfonts/hack-italic-subset.woff2") format("woff2"); } body { From aab7366768383b12a4d7814b059577fe440a7e99 Mon Sep 17 00:00:00 2001 From: piazzai <42124135+piazzai@users.noreply.github.com> Date: Sun, 2 Jun 2024 19:08:56 +0200 Subject: [PATCH 11/13] Load remote gem --- demo/Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo/Gemfile b/demo/Gemfile index c119916..651824a 100644 --- a/demo/Gemfile +++ b/demo/Gemfile @@ -1,3 +1,3 @@ source 'https://rubygems.org' -gem 'hacked-jekyll', path: '../' +gem 'hacked-jekyll', '~> 3.0' From 608bc15ae81e3ef626eb2cc96d782dfe42a44d5f Mon Sep 17 00:00:00 2001 From: piazzai <42124135+piazzai@users.noreply.github.com> Date: Sun, 2 Jun 2024 19:09:09 +0200 Subject: [PATCH 12/13] Delete lockfile --- demo/Gemfile.lock | 276 ---------------------------------------------- 1 file changed, 276 deletions(-) delete mode 100644 demo/Gemfile.lock diff --git a/demo/Gemfile.lock b/demo/Gemfile.lock deleted file mode 100644 index 32074ee..0000000 --- a/demo/Gemfile.lock +++ /dev/null @@ -1,276 +0,0 @@ -PATH - remote: .. - specs: - hacked-jekyll (3.0.0) - github-pages (~> 231) - webrick (~> 1.8, = 1.8.1) - -GEM - remote: https://rubygems.org/ - specs: - activesupport (7.1.3.3) - base64 - bigdecimal - concurrent-ruby (~> 1.0, >= 1.0.2) - connection_pool (>= 2.2.5) - drb - i18n (>= 1.6, < 2) - minitest (>= 5.1) - mutex_m - tzinfo (~> 2.0) - addressable (2.8.6) - public_suffix (>= 2.0.2, < 6.0) - base64 (0.2.0) - bigdecimal (3.1.8) - coffee-script (2.4.1) - coffee-script-source - execjs - coffee-script-source (1.12.2) - colorator (1.1.0) - commonmarker (0.23.10) - concurrent-ruby (1.3.1) - connection_pool (2.4.1) - dnsruby (1.72.1) - simpleidn (~> 0.2.1) - drb (2.2.1) - em-websocket (0.5.3) - eventmachine (>= 0.12.9) - http_parser.rb (~> 0) - ethon (0.16.0) - ffi (>= 1.15.0) - eventmachine (1.2.7) - execjs (2.9.1) - faraday (2.9.0) - faraday-net_http (>= 2.0, < 3.2) - faraday-net_http (3.1.0) - net-http - ffi (1.17.0) - forwardable-extended (2.6.0) - gemoji (4.1.0) - github-pages (231) - github-pages-health-check (= 1.18.2) - jekyll (= 3.9.5) - jekyll-avatar (= 0.8.0) - jekyll-coffeescript (= 1.2.2) - jekyll-commonmark-ghpages (= 0.4.0) - jekyll-default-layout (= 0.1.5) - jekyll-feed (= 0.17.0) - jekyll-gist (= 1.5.0) - jekyll-github-metadata (= 2.16.1) - jekyll-include-cache (= 0.2.1) - jekyll-mentions (= 1.6.0) - jekyll-optional-front-matter (= 0.3.2) - jekyll-paginate (= 1.1.0) - jekyll-readme-index (= 0.3.0) - jekyll-redirect-from (= 0.16.0) - jekyll-relative-links (= 0.6.1) - jekyll-remote-theme (= 0.4.3) - jekyll-sass-converter (= 1.5.2) - jekyll-seo-tag (= 2.8.0) - jekyll-sitemap (= 1.4.0) - jekyll-swiss (= 1.0.0) - jekyll-theme-architect (= 0.2.0) - jekyll-theme-cayman (= 0.2.0) - jekyll-theme-dinky (= 0.2.0) - jekyll-theme-hacker (= 0.2.0) - jekyll-theme-leap-day (= 0.2.0) - jekyll-theme-merlot (= 0.2.0) - jekyll-theme-midnight (= 0.2.0) - jekyll-theme-minimal (= 0.2.0) - jekyll-theme-modernist (= 0.2.0) - jekyll-theme-primer (= 0.6.0) - jekyll-theme-slate (= 0.2.0) - jekyll-theme-tactile (= 0.2.0) - jekyll-theme-time-machine (= 0.2.0) - jekyll-titles-from-headings (= 0.5.3) - jemoji (= 0.13.0) - kramdown (= 2.4.0) - kramdown-parser-gfm (= 1.1.0) - liquid (= 4.0.4) - mercenary (~> 0.3) - minima (= 2.5.1) - nokogiri (>= 1.13.6, < 2.0) - rouge (= 3.30.0) - terminal-table (~> 1.4) - github-pages-health-check (1.18.2) - addressable (~> 2.3) - dnsruby (~> 1.60) - octokit (>= 4, < 8) - public_suffix (>= 3.0, < 6.0) - typhoeus (~> 1.3) - html-pipeline (2.14.3) - activesupport (>= 2) - nokogiri (>= 1.4) - http_parser.rb (0.8.0) - i18n (1.14.5) - concurrent-ruby (~> 1.0) - jekyll (3.9.5) - addressable (~> 2.4) - colorator (~> 1.0) - em-websocket (~> 0.5) - i18n (>= 0.7, < 2) - jekyll-sass-converter (~> 1.0) - jekyll-watch (~> 2.0) - kramdown (>= 1.17, < 3) - liquid (~> 4.0) - mercenary (~> 0.3.3) - pathutil (~> 0.9) - rouge (>= 1.7, < 4) - safe_yaml (~> 1.0) - jekyll-avatar (0.8.0) - jekyll (>= 3.0, < 5.0) - jekyll-coffeescript (1.2.2) - coffee-script (~> 2.2) - coffee-script-source (~> 1.12) - jekyll-commonmark (1.4.0) - commonmarker (~> 0.22) - jekyll-commonmark-ghpages (0.4.0) - commonmarker (~> 0.23.7) - jekyll (~> 3.9.0) - jekyll-commonmark (~> 1.4.0) - rouge (>= 2.0, < 5.0) - jekyll-default-layout (0.1.5) - jekyll (>= 3.0, < 5.0) - jekyll-feed (0.17.0) - jekyll (>= 3.7, < 5.0) - jekyll-gist (1.5.0) - octokit (~> 4.2) - jekyll-github-metadata (2.16.1) - jekyll (>= 3.4, < 5.0) - octokit (>= 4, < 7, != 4.4.0) - jekyll-include-cache (0.2.1) - jekyll (>= 3.7, < 5.0) - jekyll-mentions (1.6.0) - html-pipeline (~> 2.3) - jekyll (>= 3.7, < 5.0) - jekyll-optional-front-matter (0.3.2) - jekyll (>= 3.0, < 5.0) - jekyll-paginate (1.1.0) - jekyll-readme-index (0.3.0) - jekyll (>= 3.0, < 5.0) - jekyll-redirect-from (0.16.0) - jekyll (>= 3.3, < 5.0) - jekyll-relative-links (0.6.1) - jekyll (>= 3.3, < 5.0) - jekyll-remote-theme (0.4.3) - addressable (~> 2.0) - jekyll (>= 3.5, < 5.0) - jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0) - rubyzip (>= 1.3.0, < 3.0) - jekyll-sass-converter (1.5.2) - sass (~> 3.4) - jekyll-seo-tag (2.8.0) - jekyll (>= 3.8, < 5.0) - jekyll-sitemap (1.4.0) - jekyll (>= 3.7, < 5.0) - jekyll-swiss (1.0.0) - jekyll-theme-architect (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-cayman (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-dinky (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-hacker (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-leap-day (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-merlot (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-midnight (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-minimal (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-modernist (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-primer (0.6.0) - jekyll (> 3.5, < 5.0) - jekyll-github-metadata (~> 2.9) - jekyll-seo-tag (~> 2.0) - jekyll-theme-slate (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-tactile (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-time-machine (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-titles-from-headings (0.5.3) - jekyll (>= 3.3, < 5.0) - jekyll-watch (2.2.1) - listen (~> 3.0) - jemoji (0.13.0) - gemoji (>= 3, < 5) - html-pipeline (~> 2.2) - jekyll (>= 3.0, < 5.0) - kramdown (2.4.0) - rexml - kramdown-parser-gfm (1.1.0) - kramdown (~> 2.0) - liquid (4.0.4) - listen (3.9.0) - rb-fsevent (~> 0.10, >= 0.10.3) - rb-inotify (~> 0.9, >= 0.9.10) - mercenary (0.3.6) - minima (2.5.1) - jekyll (>= 3.5, < 5.0) - jekyll-feed (~> 0.9) - jekyll-seo-tag (~> 2.1) - minitest (5.23.1) - mutex_m (0.2.0) - net-http (0.4.1) - uri - nokogiri (1.16.5-x86_64-linux) - racc (~> 1.4) - octokit (4.25.1) - faraday (>= 1, < 3) - sawyer (~> 0.9) - pathutil (0.16.2) - forwardable-extended (~> 2.6) - public_suffix (5.0.5) - racc (1.8.0) - rb-fsevent (0.11.2) - rb-inotify (0.11.1) - ffi (~> 1.0) - rexml (3.2.8) - strscan (>= 3.0.9) - rouge (3.30.0) - rubyzip (2.3.2) - safe_yaml (1.0.5) - sass (3.7.4) - sass-listen (~> 4.0.0) - sass-listen (4.0.0) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - sawyer (0.9.2) - addressable (>= 2.3.5) - faraday (>= 0.17.3, < 3) - simpleidn (0.2.3) - strscan (3.1.0) - terminal-table (1.8.0) - unicode-display_width (~> 1.1, >= 1.1.1) - typhoeus (1.4.1) - ethon (>= 0.9.0) - tzinfo (2.0.6) - concurrent-ruby (~> 1.0) - unicode-display_width (1.8.0) - uri (0.13.0) - webrick (1.8.1) - -PLATFORMS - x86_64-linux - -DEPENDENCIES - hacked-jekyll! - -BUNDLED WITH - 2.3.5 From 9c212036d90aa3547a9890638557862988c4524a Mon Sep 17 00:00:00 2001 From: piazzai <42124135+piazzai@users.noreply.github.com> Date: Sun, 2 Jun 2024 19:09:29 +0200 Subject: [PATCH 13/13] Rebuild demo site --- docs/404.html | 2 +- docs/Gemfile | 3 + docs/Gemfile.lock | 272 +++++++++++++++++++++++++++++++++++++ docs/assets/css/styles.css | 61 +++------ docs/index.html | 2 +- 5 files changed, 296 insertions(+), 44 deletions(-) create mode 100644 docs/Gemfile create mode 100644 docs/Gemfile.lock diff --git a/docs/404.html b/docs/404.html index 94d0233..6cec1b6 100644 --- a/docs/404.html +++ b/docs/404.html @@ -8,7 +8,7 @@