juicelang-theme 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/_includes/logo.html +41 -3
- data/_includes/nav.html +10 -0
- data/_includes/nav_list.html +20 -0
- data/_layouts/default.html +28 -35
- data/_layouts/fullwidth_page.html +1 -1
- data/_layouts/page.html +1 -1
- data/_plugins/custom_filters.rb +40 -0
- data/_plugins/ebnf_lexer.rb +96 -0
- data/_plugins/juice_lexer.rb +15 -0
- data/_plugins/markdown.rb +58 -0
- data/_sass/syntax-highlighting.scss +265 -0
- data/assets/css/default.scss +86 -19
- data/assets/images/icons/browserconfig.xml +3 -0
- data/assets/js/default.js +47 -0
- metadata +10 -4
- data/assets/images/icons/mstile-144x144.png +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 12436424ca778c719fffacc719f1fa81091ef5791b94cdfe8d06096e6f0a00b8
|
|
4
|
+
data.tar.gz: ff1005f20cabf80f23c8add5676b07c2ee3f046e66b49664c58f9d0d74587fd1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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"
|
|
3
|
-
|
|
4
|
-
|
|
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>
|
data/_includes/nav.html
ADDED
|
@@ -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 %}
|
data/_layouts/default.html
CHANGED
|
@@ -20,56 +20,49 @@
|
|
|
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
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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.baseurl }}">
|
|
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
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
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
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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
|
-
</
|
|
66
|
-
</
|
|
58
|
+
</div>
|
|
59
|
+
</nav>
|
|
67
60
|
{{ content }}
|
|
68
|
-
<div class="uk-container uk-container-small
|
|
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">© {{ 'now' | date: "%Y" }} </div>
|
|
72
|
-
<a class="uk-navbar-item uk-padding-remove-left" href="{{ site.
|
|
65
|
+
<a class="uk-navbar-item uk-padding-remove-left" href="{{ site.url }}">juice-lang</a>
|
|
73
66
|
</div>
|
|
74
67
|
<div class="uk-navbar-right">
|
|
75
68
|
<ul class="uk-navbar-nav">
|
data/_layouts/page.html
CHANGED
|
@@ -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
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
$syntax-background-color: #272822;
|
|
2
|
+
$syntax-comment-color: #75715e;
|
|
3
|
+
$syntax-error-color: #960050;
|
|
4
|
+
$syntax-error-background-color: #1e0010;
|
|
5
|
+
$syntax-keyword-color: #66d9ef;
|
|
6
|
+
$syntax-literal-color: #ae81ff;
|
|
7
|
+
$syntax-string-literal-color: #e6db74;
|
|
8
|
+
$syntax-color-light: #f8f8f2;
|
|
9
|
+
$syntax-operator-color: #f92672;
|
|
10
|
+
$syntax-name-color: #a6e22e;
|
|
11
|
+
|
|
12
|
+
.highlight {
|
|
13
|
+
pre {
|
|
14
|
+
background-color: $syntax-background-color;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.hll {
|
|
18
|
+
background-color: $syntax-background-color;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.c {
|
|
22
|
+
color: $syntax-comment-color;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.err {
|
|
26
|
+
color: $syntax-error-color;
|
|
27
|
+
background-color: $syntax-error-background-color;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.k {
|
|
31
|
+
color: $syntax-keyword-color;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.l {
|
|
35
|
+
color: $syntax-literal-color;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.n {
|
|
39
|
+
color: $syntax-color-light;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.o {
|
|
43
|
+
color: $syntax-operator-color;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.p {
|
|
47
|
+
color: $syntax-color-light;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.cm {
|
|
51
|
+
color: $syntax-comment-color;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.cp {
|
|
55
|
+
color: $syntax-comment-color;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.c1 {
|
|
59
|
+
color: $syntax-comment-color;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.cs {
|
|
63
|
+
color: $syntax-comment-color;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.ge {
|
|
67
|
+
font-style: italic
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.gs {
|
|
71
|
+
font-weight: bold
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.kc {
|
|
75
|
+
color: $syntax-keyword-color;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.kd {
|
|
79
|
+
color: $syntax-keyword-color;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.kn {
|
|
83
|
+
color: $syntax-operator-color;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.kp {
|
|
87
|
+
color: $syntax-keyword-color;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.kr {
|
|
91
|
+
color: $syntax-keyword-color;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.kt {
|
|
95
|
+
color: $syntax-keyword-color;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.ld {
|
|
99
|
+
color: $syntax-string-literal-color;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.m {
|
|
103
|
+
color: $syntax-literal-color;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.s {
|
|
107
|
+
color: $syntax-string-literal-color;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.na {
|
|
111
|
+
color: $syntax-name-color;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.nb {
|
|
115
|
+
color: $syntax-color-light;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.nc {
|
|
119
|
+
color: $syntax-name-color;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.no {
|
|
123
|
+
color: $syntax-keyword-color;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.nd {
|
|
127
|
+
color: $syntax-name-color;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.ni {
|
|
131
|
+
color: $syntax-color-light;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.ne {
|
|
135
|
+
color: $syntax-name-color;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.nf {
|
|
139
|
+
color: $syntax-name-color;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.nl {
|
|
143
|
+
color: $syntax-color-light;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.nn {
|
|
147
|
+
color: $syntax-color-light;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.nx {
|
|
151
|
+
color: $syntax-name-color;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.py {
|
|
155
|
+
color: $syntax-color-light;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.nt {
|
|
159
|
+
color: $syntax-operator-color;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.nv {
|
|
163
|
+
color: $syntax-color-light;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.ow {
|
|
167
|
+
color: $syntax-operator-color;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.w {
|
|
171
|
+
color: $syntax-color-light;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.mf {
|
|
175
|
+
color: $syntax-literal-color;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.mh {
|
|
179
|
+
color: $syntax-literal-color;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.mi {
|
|
183
|
+
color: $syntax-literal-color;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.mo {
|
|
187
|
+
color: $syntax-literal-color;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.sb {
|
|
191
|
+
color: $syntax-string-literal-color;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.sc {
|
|
195
|
+
color: $syntax-string-literal-color;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.sd {
|
|
199
|
+
color: $syntax-string-literal-color;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.s2 {
|
|
203
|
+
color: $syntax-string-literal-color;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.se {
|
|
207
|
+
color: $syntax-literal-color;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.sh {
|
|
211
|
+
color: $syntax-string-literal-color;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.si {
|
|
215
|
+
color: $syntax-string-literal-color;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.sx {
|
|
219
|
+
color: $syntax-string-literal-color;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.sr {
|
|
223
|
+
color: $syntax-string-literal-color;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.s1 {
|
|
227
|
+
color: $syntax-string-literal-color;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.ss {
|
|
231
|
+
color: $syntax-string-literal-color;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.bp {
|
|
235
|
+
color: $syntax-color-light;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.vc {
|
|
239
|
+
color: $syntax-color-light;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.vg {
|
|
243
|
+
color: $syntax-color-light;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.vi {
|
|
247
|
+
color: $syntax-color-light;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.il {
|
|
251
|
+
color: $syntax-literal-color;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.gu {
|
|
255
|
+
color: $syntax-comment-color;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.gd {
|
|
259
|
+
color: $syntax-operator-color;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.gi {
|
|
263
|
+
color: $syntax-name-color;
|
|
264
|
+
}
|
|
265
|
+
}
|
data/assets/css/default.scss
CHANGED
|
@@ -16,6 +16,7 @@ $logo-font-family: $base-heading-font-family;
|
|
|
16
16
|
|
|
17
17
|
$inverse-logo-hover-color: rgba(white, .85);
|
|
18
18
|
$logo-font-size: 4rem;
|
|
19
|
+
$navbar-gap: 0;
|
|
19
20
|
|
|
20
21
|
// 2. Import default variables and available mixins.
|
|
21
22
|
@import "uikit/variables-theme";
|
|
@@ -69,12 +70,22 @@ $logo-font-size: 4rem;
|
|
|
69
70
|
|
|
70
71
|
@mixin hook-logo() {
|
|
71
72
|
.logo-image {
|
|
72
|
-
height:
|
|
73
|
+
height: 1em;
|
|
73
74
|
|
|
74
75
|
svg {
|
|
75
|
-
height:
|
|
76
|
+
height: 1em;
|
|
77
|
+
width: auto;
|
|
76
78
|
vertical-align: top;
|
|
77
|
-
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
@media (min-width: $breakpoint-medium) {
|
|
83
|
+
.logo-image {
|
|
84
|
+
height: 1.5em;
|
|
85
|
+
|
|
86
|
+
svg {
|
|
87
|
+
height: 1.5em;
|
|
88
|
+
}
|
|
78
89
|
}
|
|
79
90
|
}
|
|
80
91
|
}
|
|
@@ -184,37 +195,93 @@ $logo-font-size: 4rem;
|
|
|
184
195
|
// 4. Import UIkit.
|
|
185
196
|
@import "uikit/uikit-theme";
|
|
186
197
|
|
|
198
|
+
@import "syntax-highlighting";
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
$half-container-small-width: $container-small-max-width / 2;
|
|
187
202
|
|
|
188
203
|
.header {
|
|
189
|
-
background: #df8e15 linear-gradient(to right, #df8e15, #df8e15 50
|
|
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%;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
#offcanvas-toggle {
|
|
217
|
+
position: absolute;
|
|
218
|
+
height: 100%;
|
|
219
|
+
z-index: 1000;
|
|
220
|
+
}
|
|
190
221
|
|
|
191
|
-
|
|
192
|
-
|
|
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)');
|
|
227
|
+
}
|
|
228
|
+
}
|
|
193
229
|
}
|
|
194
230
|
}
|
|
195
231
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
232
|
+
$languages: "ebnf", "juice";
|
|
233
|
+
|
|
234
|
+
.content {
|
|
235
|
+
& > :first-child {
|
|
236
|
+
margin-top: $margin-large-margin;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.highlighter-rouge {
|
|
240
|
+
position: relative;
|
|
199
241
|
|
|
200
|
-
|
|
201
|
-
|
|
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;
|
|
248
|
+
}
|
|
202
249
|
}
|
|
203
250
|
}
|
|
204
251
|
}
|
|
205
252
|
|
|
206
|
-
|
|
207
|
-
|
|
253
|
+
@media (prefers-color-scheme: dark) {
|
|
254
|
+
body {
|
|
255
|
+
background: #02020b;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.header {
|
|
259
|
+
background: #181E25;
|
|
208
260
|
|
|
209
|
-
|
|
210
|
-
|
|
261
|
+
.header-nav {
|
|
262
|
+
color: #ee5a16;
|
|
263
|
+
}
|
|
211
264
|
|
|
212
|
-
|
|
213
|
-
|
|
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
|
+
}
|
|
214
275
|
}
|
|
215
276
|
}
|
|
216
277
|
|
|
217
|
-
.
|
|
218
|
-
|
|
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
|
+
}
|
|
219
286
|
}
|
|
220
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.
|
|
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-
|
|
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,17 @@ 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
|
|
61
|
+
- _sass/syntax-highlighting.scss
|
|
55
62
|
- _sass/uikit/components/_import.components.scss
|
|
56
63
|
- _sass/uikit/components/_import.scss
|
|
57
64
|
- _sass/uikit/components/_import.utilities.scss
|
|
@@ -213,7 +220,6 @@ files:
|
|
|
213
220
|
- assets/images/icons/favicon-16x16.png
|
|
214
221
|
- assets/images/icons/favicon-32x32.png
|
|
215
222
|
- assets/images/icons/favicon.ico
|
|
216
|
-
- assets/images/icons/mstile-144x144.png
|
|
217
223
|
- assets/images/icons/mstile-150x150.png
|
|
218
224
|
- assets/images/icons/mstile-310x150.png
|
|
219
225
|
- assets/images/icons/mstile-310x310.png
|
|
@@ -244,5 +250,5 @@ requirements: []
|
|
|
244
250
|
rubygems_version: 3.3.7
|
|
245
251
|
signing_key:
|
|
246
252
|
specification_version: 4
|
|
247
|
-
summary: The theme of
|
|
253
|
+
summary: The theme of the website of the juice programming language
|
|
248
254
|
test_files: []
|
|
Binary file
|