juicelang-theme 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1857c34526041b03d7010ae6b70a49bc3ba0ed05c06c2adfc12c45e04bf5291c
4
- data.tar.gz: e2899cca4e2da583339f930f7a77586d1c967acbe953dd99aca01cac71bc2b8d
3
+ metadata.gz: 12436424ca778c719fffacc719f1fa81091ef5791b94cdfe8d06096e6f0a00b8
4
+ data.tar.gz: ff1005f20cabf80f23c8add5676b07c2ee3f046e66b49664c58f9d0d74587fd1
5
5
  SHA512:
6
- metadata.gz: 9d79814b3887ea852a94fd971d19feeae55f5b8db19b87c3cd008949443902bb9fe1adb181f69dc6c314042fe7716ab98ab7b110edbbe06f146ac0830da6bd7f
7
- data.tar.gz: 611dde90cd990caf9daf7be5f015ec3f7794bfd4f1a36263df3e5d75c4913074276a3a41260adfd5db6e5783f290ec973e0a5d9db9cf8b9a17c83a47d2e2b843
6
+ metadata.gz: 8718140adac100f401cc188909e361de642f8ec3090000d7cea80e822d36ecda7fd1849f811af40b6eb1c787379623b8382a77c08482fdd96ab293e360902236
7
+ data.tar.gz: ce1580eff042d71af048c66bc941f121ab7e5c925efa3e14fbe729cf8065d8b577292a16429e23aefe7f5b23e9445a9691153fc61976d013348e03c87a414b4c
data/_includes/logo.html CHANGED
@@ -1,5 +1,43 @@
1
1
  <!-- Generator: Gravit.io -->
2
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="isolation:isolate" viewBox="0 0 304.515 401.253" width="304.515pt" height="401.253pt">
3
- <path d=" M 169.986 5.776 L 0.939 368.3 C -1.395 373.305 0.771 379.254 5.776 381.589 C 110.721 430.525 235.914 384.959 284.85 280.015 C 333.788 175.069 288.222 49.876 183.276 0.939 C 178.268 -1.395 172.32 0.771 169.986 5.776 Z M 196.703 345.358 C 196.584 345.942 196.398 346.508 196.149 347.04 C 195.545 348.338 194.574 349.449 193.34 350.224 C 182.35 357.121 170.586 362.879 158.376 367.335 C 117.878 382.118 75.247 382.758 35.09 369.187 C 33.069 368.506 31.435 366.993 30.596 365.032 C 29.757 363.073 29.793 360.846 30.695 358.912 L 96.47 217.856 C 97.602 215.428 99.943 213.787 102.613 213.554 C 105.282 213.32 107.872 214.527 109.411 216.721 L 195.496 339.567 C 196.672 341.249 197.111 343.342 196.703 345.358 Z M 279.29 187.879 C 280.846 189.333 281.698 191.258 281.657 193.386 C 281.13 219.738 275.037 245.522 263.556 270.143 C 252.109 294.691 236.192 315.906 216.256 333.255 C 214.651 334.651 212.53 335.285 210.419 335.027 C 208.309 334.769 206.405 333.619 205.186 331.877 L 120.103 210.36 C 118.566 208.166 118.338 205.558 119.47 203.129 C 120.603 200.7 122.966 199.3 125.634 199.066 L 273.536 186.127 C 275.656 185.942 277.735 186.425 279.29 187.879 Z M 192.616 31.367 C 228.581 53.257 256.362 87.285 270.842 127.183 C 275.232 139.285 278.365 151.873 280.148 164.596 C 280.35 166.042 280.126 167.504 279.517 168.806 C 279.27 169.338 278.982 170.089 278.609 170.555 C 277.329 172.164 275.466 173.427 273.417 173.606 L 123.596 185.71 C 121.012 186.94 118.356 184.984 116.822 182.789 C 115.284 180.595 115.044 177.871 116.177 175.442 L 181.914 34.542 C 182.816 32.609 184.501 31.182 186.543 30.564 C 188.585 29.946 190.796 30.259 192.616 31.367 Z "
4
- fill="rgb(255,255,255)"/>
2
+ <svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
3
+ width="1336.379px" height="481.502px" viewBox="258.641 57.528 1336.379 481.502"
4
+ enable-background="new 258.641 57.528 1336.379 481.502" xml:space="preserve">
5
+ <g>
6
+ <path x="258.641" y="57.528" fill="black" id="SVGID_1_" d="M462.625,64.461L259.768,499.488c-2.8,6.007-0.202,13.146,5.805,15.945
7
+ c125.935,58.724,276.167,4.045,334.89-121.89c58.729-125.935,4.046-276.164-121.89-334.89
8
+ C472.562,55.854,465.426,58.454,462.625,64.461z M494.686,471.959c-0.143,0.703-0.365,1.38-0.665,2.02
9
+ c-0.725,1.56-1.89,2.892-3.37,3.819c-13.188,8.274-27.304,15.188-41.955,20.534c-48.6,17.738-99.756,18.507-147.943,2.221
10
+ c-2.425-0.815-4.386-2.632-5.394-4.981c-1.007-2.354-0.964-5.025,0.118-7.347l78.932-169.268c1.358-2.915,4.167-4.882,7.369-5.162
11
+ c3.203-0.279,6.312,1.166,8.159,3.801l103.302,147.413C494.648,467.03,495.176,469.541,494.686,471.959z M593.79,282.984
12
+ c1.868,1.744,2.891,4.055,2.841,6.608c-0.634,31.622-7.945,62.562-21.721,92.107c-13.736,29.46-32.838,54.914-56.762,75.731
13
+ c-1.928,1.68-4.472,2.438-7.005,2.132c-2.532-0.312-4.814-1.691-6.28-3.781L402.768,309.96c-1.846-2.632-2.121-5.762-0.761-8.675
14
+ c1.359-2.915,4.194-4.596,7.396-4.875l177.482-15.529C589.429,280.66,591.924,281.24,593.79,282.984z M489.781,95.171
15
+ c43.156,26.267,76.496,67.101,93.872,114.978c5.267,14.523,9.025,29.63,11.166,44.896c0.243,1.737-0.026,3.489-0.76,5.053
16
+ c-0.298,0.639-0.642,1.54-1.089,2.1c-1.535,1.93-3.771,3.444-6.229,3.66l-179.786,14.524c-3.1,1.477-6.289-0.87-8.129-3.503
17
+ c-1.846-2.635-2.132-5.903-0.773-8.817l78.886-169.083c1.08-2.319,3.104-4.031,5.555-4.773
18
+ C484.945,93.465,487.598,93.84,489.781,95.171z M834.648,190.636L725.42,424.715c-18.983,40.339-51.694,65.906-93.739,65.906
19
+ h-6.817l14.538-31.249h6.249c20.455,0,35.587-12.499,46.248-34.657l109.226-234.079H834.648z M820.932,131.548
20
+ c3.771-12.5,17.648-22.726,30.717-22.726s20.78,10.227,17.012,22.726c-3.77,12.499-17.648,22.726-30.717,22.726
21
+ S817.163,144.047,820.932,131.548z M1033.507,190.636h33.521L964.874,408.807h-33.521l17.386-36.93h-2.271
22
+ c-20.319,22.157-50.63,39.771-83.585,39.771c-40.908,0-57.854-26.705-31.972-82.383l65.1-138.63h33.523l-63.848,136.356
23
+ c-14.709,31.816-4.401,52.271,23.438,52.271c25,0,64.747-18.75,83.901-59.658L1033.507,190.636z M1128.392,190.636h33.523
24
+ l-102.157,218.171h-33.521L1128.392,190.636z M1149.51,130.98c3.768-12.5,17.647-22.726,30.718-22.726
25
+ c13.068,0,20.776,10.226,17.009,22.726c-3.771,12.499-17.649,22.726-30.718,22.726
26
+ C1153.453,153.706,1145.74,143.479,1149.51,130.98z M1161.63,300.857c30.699-66.475,91.909-113.062,151.142-113.062
27
+ c45.879,0,67.769,27.271,54.436,68.178h-33.521c4.151-19.885-5.139-38.066-34.543-38.066c-39.346,0-80.931,32.384-103.648,81.813
28
+ c-23.914,50.566-13.397,83.52,26.517,83.52c25.994,0,52.438-14.204,70.004-38.066h33.52
29
+ c-24.294,38.633-69.566,68.178-117.719,68.178C1146.312,413.352,1130.987,366.195,1161.63,300.857z M1384.753,301.426
30
+ c31.156-67.042,92.366-113.631,151.313-113.631c45.596,0,80.95,27.84,42.67,109.085l-6.557,14.204h-158.664
31
+ c-24.201,53.406-7.413,72.156,34.632,72.156c26.848,0,51.297-11.363,70.506-34.09l27.94,9.091
32
+ c-25.703,32.952-68.181,55.11-112.64,55.11C1371.029,413.352,1353.314,368.467,1384.753,301.426z M1551.374,282.108
33
+ c17.528-36.93,7.002-64.201-29.502-64.201c-36.646,0-78.915,33.237-94.93,64.201H1551.374z"/>
34
+ </g>
35
+ <linearGradient id="logo-gradient" gradientUnits="userSpaceOnUse" x1="258.6411" y1="298.2793" x2="1595.02" y2="298.2793">
36
+ <stop offset="0" style="stop-color:#DF8E15"/>
37
+ <stop offset="1" style="stop-color:#EE5A16"/>
38
+ </linearGradient>
39
+ <linearGradient id="logo-gradient-hover" gradientUnits="userSpaceOnUse" x1="258.6411" y1="298.2793" x2="1595.02" y2="298.2793">
40
+ <stop offset="0" style="stop-color:#DF8E15"/>
41
+ <stop offset="1" style="stop-color:#EE5A16"/>
42
+ </linearGradient>
5
43
  </svg>
@@ -0,0 +1,10 @@
1
+ <div id="{{ include.id }}" uk-offcanvas="mode: push{% if include.flip %}; flip: true{% endif %}">
2
+ <div class="uk-offcanvas-bar">
3
+ <ul class="uk-nav-default" uk-nav='{"toggle": "> a.nav-parent-toggle"}''>
4
+ {% assign navigation = site.data.navigation[include.navigation] %}
5
+ {% assign indexPage = site.pages | find: "path", navigation.index_path %}
6
+ <li class="uk-nav-header"><a href="{{ indexPage.url | absolute_url }}">{{ navigation.title }}</a></li>
7
+ {% include nav_list.html menu=navigation.menu accordion=true %}
8
+ </ul>
9
+ </div>
10
+ </div>
@@ -0,0 +1,20 @@
1
+ {% for item in include.menu %}
2
+ {% assign itemPage = site.pages | find: "path", item.path %}
3
+ {% if item.children %}
4
+ {% assign active = itemPage | is_active?: item.children %}
5
+ <li class="uk-parent{% if active %} uk-active uk-open{% endif %} uk-grid-collapse" uk-grid>
6
+ <a href="{{ itemPage.url | absolute_url }}">{{ itemPage.title }}</a>
7
+ {% if include.accordion %}
8
+ <a href="#" class="nav-parent-toggle uk-width-expand"{% if active %} aria-expanded="true"{% endif %}><span uk-nav-parent-icon></span></a>
9
+ {% endif %}
10
+ <ul class="uk-nav-sub uk-width-1-1">
11
+ {% include nav_list.html menu=item.children %}
12
+ </ul>
13
+ </li>
14
+ {% else %}
15
+ {% assign active = itemPage | is_active? %}
16
+ <li{% if active %} class="uk-active"{% endif %}>
17
+ <a href="{{ itemPage.url | absolute_url }}">{{ itemPage.title }}</a>
18
+ </li>
19
+ {% endif %}
20
+ {% endfor %}
@@ -20,52 +20,45 @@
20
20
  <meta name="application-name" content="juicelang">
21
21
  <meta name="msapplication-TileColor" content="#df8e15">
22
22
  <meta name="msapplication-config" content="{{ '/assets/images/icons/browserconfig.xml' | relative_url }}">
23
- <meta name="theme-color" content="#df8e15">
23
+ <meta name="theme-color" content="#df8e15" media="(prefers-color-scheme: light)">
24
+ <meta name="theme-color" content="#02020b" media="(prefers-color-scheme: dark)">
24
25
 
25
26
  <link href="{{ '/assets/css/default.css' | relative_url }}" rel="stylesheet">
26
27
  </head>
27
28
  <body>
28
- <div class="uk-container uk-container-expand header">
29
- <nav class="uk-navbar-container uk-container uk-container-small uk-navbar-transparent uk-light
30
- uk-flex-column uk-flex-row@m header-nav" uk-navbar>
31
- <div class="uk-navbar-left">
32
- <a class="uk-navbar-item uk-logo uk-text-italic uk-padding-small uk-padding-remove-left
33
- uk-visible@m logo" href="{{ site.url }}">
34
- <div class="uk-flex">
35
- <div class="logo-image">
36
- {% include logo.html %}
37
- </div>
38
- <div class="logo-text">
39
- <div class="uk-text-italic logo-name">juice</div>
40
- </div>
41
- </div>
42
- </a>
43
- <a class="uk-navbar-item uk-logo uk-padding-small uk-padding-remove-left uk-hidden@m mobile-logo"
44
- href="{{ site.url }}">
45
- <div class="uk-flex">
29
+ <nav class="uk-navbar-container uk-container uk-container-expand uk-navbar-transparent uk-light header" uk-navbar>
30
+ {% if page.nav %}
31
+ <div class="uk-navbar-left uk-margin-right uk-visible@m" id="offcanvas-toggle">
32
+ <a href="#offcanvas" class="uk-navbar-toggle uk-navbar-toggle-animate" uk-toggle uk-navbar-toggle-icon></a>
33
+ {% include nav.html id="offcanvas" navigation=page.nav %}
34
+ </div>
35
+ {% endif %}
36
+ <div class="uk-navbar-center header-center">
37
+ <div class="uk-navbar-container uk-container uk-container-small uk-navbar-transparent header-nav" uk-navbar>
38
+ <div class="uk-navbar-left">
39
+ <a class="uk-navbar-item uk-logo uk-text-italic uk-padding-small uk-padding-remove-left
40
+ logo" href="{{ site.url }}">
46
41
  <div class="logo-image">
47
42
  {% include logo.html %}
48
43
  </div>
49
- <div class="uk-flex uk-flex-column mobile-logo-text">
50
- <div class="uk-text-italic mobile-logo-name">juice</div>
51
- <div class="mobile-logo-subtitle">
52
- The <span class="uk-text-italic uk-text-bold">juicy</span> programming language
53
- </div>
44
+ </a>
45
+ </div>
46
+ <div class="uk-navbar-right">
47
+ <div class="uk-navbar-item uk-visible@m">
48
+ <div class="uk-text-large">
49
+ The <span class="uk-text-italic uk-text-bold">juicy</span> programming language
54
50
  </div>
55
51
  </div>
56
- </a>
57
- </div>
58
- <div class="uk-navbar-right uk-visible@m">
59
- <div class="uk-navbar-item">
60
- <div class="uk-text-large">
61
- The <span class="uk-text-italic uk-text-bold">juicy</span> programming language
62
- </div>
52
+ {% if page.nav %}
53
+ <a href="#mobile-offcanvas" class="uk-navbar-toggle uk-navbar-toggle-animate uk-hidden@m" uk-toggle uk-navbar-toggle-icon></a>
54
+ {% include nav.html id="mobile-offcanvas" flip=true navigation=page.nav %}
55
+ {% endif %}
63
56
  </div>
64
57
  </div>
65
- </nav>
66
- </div>
58
+ </div>
59
+ </nav>
67
60
  {{ content }}
68
- <div class="uk-container uk-container-small uk-margin-small-top footer">
61
+ <div class="uk-container uk-container-small footer">
69
62
  <nav class="uk-navbar-container uk-container uk-container-small uk-navbar-transparent" uk-navbar>
70
63
  <div class="uk-navbar-left">
71
64
  <div class="uk-navbar-item uk-padding-remove">&copy; {{ 'now' | date: "%Y" }}&nbsp;</div>
@@ -0,0 +1,40 @@
1
+ module Jekyll
2
+ module CustomFilters
3
+ def is_active?(pageHash, children = nil)
4
+ page = pageFromHash(pageHash)
5
+ return true if page.equal? currentPage
6
+
7
+ isActiveRecursion? children
8
+ end
9
+
10
+ def find(input, property, targetValue = nil)
11
+ standardFilters = Class.new.extend(Liquid::StandardFilters)
12
+ standardFilters.first(standardFilters.where(input, property, targetValue))
13
+ end
14
+
15
+
16
+ private
17
+
18
+ def currentPage
19
+ pageFromHash(@context.registers[:page])
20
+ end
21
+
22
+ def site
23
+ @context.registers[:site]
24
+ end
25
+
26
+ def pageFromHash(hash)
27
+ site.pages.find { |page|
28
+ page.path == hash['path']
29
+ }
30
+ end
31
+
32
+ def isActiveRecursion?(children)
33
+ children && children.any? { |item|
34
+ pageFromHash(item).equal?(currentPage) || isActiveRecursion?(item['children'])
35
+ }
36
+ end
37
+ end
38
+ end
39
+
40
+ Liquid::Template.register_filter(Jekyll::CustomFilters)
@@ -0,0 +1,96 @@
1
+ Jekyll::Hooks.register :site, :pre_render do |site|
2
+ require "rouge"
3
+
4
+ class EBNFLexer < Rouge::RegexLexer
5
+ title 'EBNF'
6
+ desc 'Extended Backus-Naur Form'
7
+ mimetypes 'text/x-ebnf'
8
+ tag 'ebnf'
9
+ filenames '*.ebnf'
10
+
11
+ state :whitespace do
12
+ rule %r/[\s\n]+/, Text
13
+ mixin :comment
14
+ end
15
+
16
+ state :comment do
17
+ rule %r/\(\*/, Comment::Multiline, :in_comment
18
+ end
19
+
20
+ state :in_comment do
21
+ rule %r/\*\)/, Comment::Multiline, :pop!
22
+ rule %r/[^*)]+/m, Comment::Multiline
23
+ rule %r/./, Comment::Multiline
24
+ end
25
+
26
+ state :root do
27
+ mixin :whitespace
28
+
29
+ rule %r/([A-Za-z][A-Za-z0-9_-]*)(\s*)(=)/ do
30
+ groups Name::Constant, Text, Punctuation
31
+
32
+ push :rhs; push :expecting_symbol
33
+ end
34
+ end
35
+
36
+ state :rhs do
37
+ mixin :whitespace
38
+ mixin :concat
39
+
40
+ rule %r/;/, Punctuation, :pop!
41
+ end
42
+
43
+ state :grouped_rhs do
44
+ mixin :whitespace
45
+ mixin :concat
46
+
47
+ rule(%r/\)/) { token Punctuation; pop! 2 }
48
+ end
49
+
50
+ state :optional_rhs do
51
+ mixin :whitespace
52
+ mixin :concat
53
+
54
+ rule(%r/\]/) { token Punctuation; pop! 2 }
55
+ end
56
+
57
+ state :repeating_rhs do
58
+ mixin :whitespace
59
+ mixin :concat
60
+
61
+ rule(%r/\}/) { token Punctuation; pop! 2 }
62
+ end
63
+
64
+ state :expecting_symbol do
65
+ mixin :whitespace
66
+
67
+ rule %r/\(/ do
68
+ token Punctuation
69
+ push :grouped_rhs; push :expecting_symbol
70
+ end
71
+
72
+ rule %r/\[/ do
73
+ token Punctuation
74
+ push :optional_rhs; push :expecting_symbol
75
+ end
76
+
77
+ rule %r/\{/ do
78
+ token Punctuation
79
+ push :repeating_rhs; push :expecting_symbol
80
+ end
81
+
82
+ rule %r/"[^"]+"/, Str, :pop!
83
+ rule %r/'[^']+'/, Str, :pop!
84
+ rule %r/\?[^?]+\?/, Comment::Preproc, :pop!
85
+ rule %r/[A-Za-z][A-Za-z0-9_-]*/, Name::Function, :pop!
86
+
87
+ rule %r/(0|[1-9][0-9]*)(\s*)(\*)/ do
88
+ groups Literal::Number, Text, Operator
89
+ end
90
+ end
91
+
92
+ state :concat do
93
+ rule %r/[,|]/, Punctuation, :expecting_symbol
94
+ end
95
+ end
96
+ end
@@ -0,0 +1,15 @@
1
+ Jekyll::Hooks.register :site, :pre_render do |site|
2
+ require "rouge"
3
+
4
+ class JuiceLexer < Rouge::RegexLexer
5
+ title 'Juice'
6
+ desc 'Extended Backus-Naur Form'
7
+ mimetypes 'text/x-juice'
8
+ tag 'juice'
9
+ filenames '*.juice'
10
+
11
+ state :root do
12
+ rule %r/./m, Text
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,58 @@
1
+ class Kramdown::Converter::CustomHtml < Kramdown::Converter::Html
2
+ def convert_em(el, indent)
3
+ "<span#{html_attributes(add_class(el.attr, "uk-text-italic"))}>#{inner(el, indent)}</span>"
4
+ end
5
+
6
+ def convert_strong(el, indent)
7
+ "<span#{html_attributes(add_class(el.attr, "uk-text-bold"))}>#{inner(el, indent)}</span>"
8
+ end
9
+
10
+
11
+ def convert_table(el, indent)
12
+ format_as_indented_block_html(el.type, add_class(el.attr, "uk-table uk-table-divider"), inner(el, indent), indent)
13
+ end
14
+
15
+ def convert_thead(el, indent)
16
+ format_as_indented_block_html(el.type, el.attr, inner(el, indent), indent)
17
+ end
18
+
19
+ def convert_tbody(el, indent)
20
+ format_as_indented_block_html(el.type, el.attr, inner(el, indent), indent)
21
+ end
22
+
23
+ def convert_tfoot(el, indent)
24
+ format_as_indented_block_html(el.type, el.attr, inner(el, indent), indent)
25
+ end
26
+
27
+ def convert_tr(el, indent)
28
+ format_as_indented_block_html(el.type, el.attr, inner(el, indent), indent)
29
+ end
30
+
31
+
32
+ def add_class(attr, class_name)
33
+ if attr.has_key?("class")
34
+ attr[:class] = attr[:class] + " " + class_name
35
+ else
36
+ attr[:class] = class_name
37
+ end
38
+ attr
39
+ end
40
+ end
41
+
42
+ class Jekyll::Converters::Markdown::CustomMarkdown < Jekyll::Converters::Markdown
43
+ def initialize(config)
44
+ require 'kramdown'
45
+ @config = config
46
+ rescue LoadError
47
+ STDERR.puts 'You are missing a library required for Markdown. Please run:'
48
+ STDERR.puts ' $ [sudo] gem install kramdown'
49
+ raise FatalException.new("Missing dependency: kramdown")
50
+ end
51
+
52
+ def convert(content)
53
+ Kramdown::Document.new(content, {
54
+ input: "GFM",
55
+ syntax_highlighter: "rouge"
56
+ }).to_CustomHtml
57
+ end
58
+ end
@@ -70,12 +70,22 @@ $navbar-gap: 0;
70
70
 
71
71
  @mixin hook-logo() {
72
72
  .logo-image {
73
- height: 1.5em;
73
+ height: 1em;
74
74
 
75
75
  svg {
76
- height: 1.5em;
76
+ height: 1em;
77
+ width: auto;
77
78
  vertical-align: top;
78
- width: 1.5em;
79
+ }
80
+ }
81
+
82
+ @media (min-width: $breakpoint-medium) {
83
+ .logo-image {
84
+ height: 1.5em;
85
+
86
+ svg {
87
+ height: 1.5em;
88
+ }
79
89
  }
80
90
  }
81
91
  }
@@ -188,41 +198,90 @@ $navbar-gap: 0;
188
198
  @import "syntax-highlighting";
189
199
 
190
200
 
191
- .header {
192
- background: #df8e15 linear-gradient(to right, #df8e15, #df8e15 50%, #ee5a16 50%, #ee5a16);
201
+ $half-container-small-width: $container-small-max-width / 2;
193
202
 
194
- .header-nav {
195
- background: #df8e15 linear-gradient(to right, #df8e15, #df8e15 1.5em, #ee5a16);
203
+ .header {
204
+ background: #df8e15 linear-gradient(to right, #df8e15, #df8e15 calc(50% - #{$half-container-small-width} + 1.5em), #ee5a16 calc(50% + #{$half-container-small-width}), #ee5a16);
205
+
206
+ .header-center {
207
+ display: flow-root;
208
+ position: inherit;
209
+ top: 0;
210
+ left: 0;
211
+ transform: none;
212
+ width: 100%;
196
213
  }
214
+ }
215
+
216
+ #offcanvas-toggle {
217
+ position: absolute;
218
+ height: 100%;
219
+ z-index: 1000;
220
+ }
197
221
 
198
- .logo {
199
- .logo-text {
200
- margin-left: .1em;
201
-
202
- .logo-name {
203
- transform: skewX(-17deg);
222
+ @supports (margin-left: unquote('max(calc(50% - #{$half-container-small-width}), 25px)')) {
223
+ @media (min-width: $breakpoint-medium) {
224
+ #offcanvas-toggle + .header-center {
225
+ .header-nav {
226
+ margin-left: unquote('max(calc(50% - #{$half-container-small-width}), 25px)');
204
227
  }
205
228
  }
206
229
  }
207
-
208
- .mobile-logo {
209
- font-size: 3rem;
210
-
211
- .mobile-logo-text {
212
- margin-left: .1em;
213
-
214
- .mobile-logo-name {
215
- transform: skewX(-17deg);
216
- line-height: 1.2em;
230
+ }
231
+
232
+ $languages: "ebnf", "juice";
233
+
234
+ .content {
235
+ & > :first-child {
236
+ margin-top: $margin-large-margin;
237
+ }
238
+
239
+ .highlighter-rouge {
240
+ position: relative;
241
+
242
+ @each $language in $languages {
243
+ &.language-#{$language} > .highlight > .highlight::after {
244
+ content: $language;
245
+ position: absolute;
246
+ top: $base-pre-padding;
247
+ right: $base-pre-padding;
217
248
  }
218
249
  }
219
-
220
- .mobile-logo-subtitle {
221
- font-size: .75rem;
222
- }
223
250
  }
224
251
  }
225
252
 
226
- .content > :first-child {
227
- margin-top: $margin-large-margin;
253
+ @media (prefers-color-scheme: dark) {
254
+ body {
255
+ background: #02020b;
256
+ }
257
+
258
+ .header {
259
+ background: #181E25;
260
+
261
+ .header-nav {
262
+ color: #ee5a16;
263
+ }
264
+
265
+ @supports (background-clip: text) or (-ms-background-clip: text) or (-webkit-background-clip: text) {
266
+ @media (min-width: $breakpoint-medium) {
267
+ .header-nav {
268
+ background: #df8e15 linear-gradient(to right, #df8e15, #df8e15 calc(50% - #{$half-container-small-width} + 1.5em), #ee5a16 calc(50% + #{$half-container-small-width}), #ee5a16);
269
+ background-clip: text;
270
+ -ms-background-clip: text;
271
+ -webkit-background-clip: text;
272
+ -webkit-text-fill-color: transparent;
273
+ }
274
+ }
275
+ }
276
+ }
277
+
278
+ .uk-logo {
279
+ .logo-image path {
280
+ fill: url(#logo-gradient) !important;
281
+ }
282
+
283
+ &:hover .logo-image path {
284
+ fill: url(#logo-gradient-hover) !important;
285
+ }
286
+ }
228
287
  }
@@ -2,7 +2,10 @@
2
2
  <browserconfig>
3
3
  <msapplication>
4
4
  <tile>
5
+ <square70x70logo src="assets/images/icons/mstile-70x70.png"/>
5
6
  <square150x150logo src="assets/images/icons/mstile-150x150.png"/>
7
+ <wide310x150logo src="assets/images/icons/mstile-310x150.png"/>
8
+ <square310x310logo src="assets/images/icons/mstile-310x310.png"/>
6
9
  <TileColor>#df8e15</TileColor>
7
10
  </tile>
8
11
  </msapplication>
data/assets/js/default.js CHANGED
@@ -0,0 +1,47 @@
1
+ const zip = (a, b) => a.map((k, i) => [k, b[i]]);
2
+
3
+ function darkmodeToggled(darkmode) {
4
+ if (darkmode) {
5
+ $('body').removeClass('uk-dark');
6
+ $('body').addClass('uk-light');
7
+ } else {
8
+ $('body').addClass('uk-dark');
9
+ $('body').removeClass('uk-light');
10
+ }
11
+ }
12
+
13
+ $(document).ready(function () {
14
+ if (window.matchMedia) {
15
+ darkmodeToggled(window.matchMedia('(prefers-color-scheme: dark)').matches);
16
+
17
+ window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', e => darkmodeToggled(e.matches));
18
+ }
19
+ });
20
+
21
+ function calculateGradient() {
22
+ let navWidth = $('.header-nav').width();
23
+ let logoWidth = $('.logo-image').width();
24
+ let percentage = logoWidth / navWidth + 0.2;
25
+
26
+ let start = [223, 142, 21];
27
+ let end = [238, 90, 22];
28
+
29
+ let calculateGradient = w => zip(start, end).map(c => Math.round(c[0] * (1 - w) + c[1] * w));
30
+
31
+ let gradientEnd = calculateGradient(percentage);
32
+ let hoverGradientStart = calculateGradient(0.4);
33
+ let hoverGradientEnd = calculateGradient(percentage + 0.4);
34
+
35
+ $('#logo-gradient').find('stop').eq(1).css('stop-color', `rgb(${gradientEnd[0]}, ${gradientEnd[1]}, ${gradientEnd[2]})`);
36
+
37
+ $('#logo-gradient-hover').find('stop').eq(0).css('stop-color', `rgb(${hoverGradientStart[0]}, ${hoverGradientStart[1]}, ${hoverGradientStart[2]})`);
38
+ $('#logo-gradient-hover').find('stop').eq(1).css('stop-color', `rgb(${hoverGradientEnd[0]}, ${hoverGradientEnd[1]}, ${hoverGradientEnd[2]})`);
39
+ }
40
+
41
+ $(document).ready(function () {
42
+ calculateGradient();
43
+
44
+ $(window).resize(function () {
45
+ calculateGradient();
46
+ });
47
+ });
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: juicelang-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josef Zoller
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-25 00:00:00.000000000 Z
11
+ date: 2022-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -48,10 +48,16 @@ files:
48
48
  - LICENSE.txt
49
49
  - README.md
50
50
  - _includes/logo.html
51
+ - _includes/nav.html
52
+ - _includes/nav_list.html
51
53
  - _layouts/default.html
52
54
  - _layouts/fullwidth_page.html
53
55
  - _layouts/page.html
54
56
  - _layouts/post.html
57
+ - _plugins/custom_filters.rb
58
+ - _plugins/ebnf_lexer.rb
59
+ - _plugins/juice_lexer.rb
60
+ - _plugins/markdown.rb
55
61
  - _sass/syntax-highlighting.scss
56
62
  - _sass/uikit/components/_import.components.scss
57
63
  - _sass/uikit/components/_import.scss
@@ -214,7 +220,6 @@ files:
214
220
  - assets/images/icons/favicon-16x16.png
215
221
  - assets/images/icons/favicon-32x32.png
216
222
  - assets/images/icons/favicon.ico
217
- - assets/images/icons/mstile-144x144.png
218
223
  - assets/images/icons/mstile-150x150.png
219
224
  - assets/images/icons/mstile-310x150.png
220
225
  - assets/images/icons/mstile-310x310.png
@@ -245,5 +250,5 @@ requirements: []
245
250
  rubygems_version: 3.3.7
246
251
  signing_key:
247
252
  specification_version: 4
248
- summary: The theme of thewebsite of the juice programming language
253
+ summary: The theme of the website of the juice programming language
249
254
  test_files: []
Binary file