jekyll-theme-paperwiki 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +15 -11
- data/_config.yml +32 -0
- data/_includes/collections_header.html +1 -5
- data/_includes/entry_tags.html +36 -0
- data/_includes/search_results.html +8 -0
- data/_includes/wiki_sidebar.html +67 -0
- data/_layouts/entry.html +8 -0
- data/_layouts/search.html +12 -0
- data/_layouts/wiki.html +9 -106
- data/_plugins/blockquote.rb +28 -0
- data/_plugins/gloss.rb +22 -0
- data/_plugins/interlinear.rb +37 -0
- data/_plugins/ipa.rb +23 -0
- data/_plugins/lang.rb +28 -0
- data/_plugins/sidenote.rb +24 -0
- data/_sass/partials/_base.scss +88 -10
- data/_sass/partials/_collections.scss +9 -12
- data/_sass/partials/_entries.scss +51 -17
- data/_sass/partials/_global.scss +22 -11
- data/_sass/partials/_glossing.scss +2 -2
- data/_sass/partials/_languages.scss +10 -0
- data/_sass/partials/_launchpad.scss +1 -1
- data/_sass/partials/_search.scss +13 -1
- data/_sass/style.scss +1 -0
- data/_sass/variables/_colors.scss +34 -3
- data/assets/.DS_Store +0 -0
- data/assets/js/search.js +23 -20
- metadata +14 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96dc441b57acdaf6886f2e20b25d4b95855cef23475163a86fd42dfaafcc282e
|
4
|
+
data.tar.gz: 0b11702d89f94b83299c46118f9d7cee573774ba775611cf72168aa5a135a527
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 308ed2f06df61653cf4ee6a45c79bb3164a00c42d3cc94a8645530dfda98942f5c345f42588a50317eb78e4491bf1ff1fde52609c983fe96644f71fb2cec5502
|
7
|
+
data.tar.gz: 6944c6581d6f26a18f823d50c11ae19dbec6c73a5141473f5ce1a02f657f251afd7b5fc3f23957714f77eb1458a6b466949ff5ec559b9cd8ee54d00350c4c08d
|
data/README.md
CHANGED
@@ -1,8 +1,12 @@
|
|
1
1
|
# jekyll-theme-paperwiki
|
2
2
|
|
3
|
-
The intent of this theme is to get all the code out of the way and to allow you to write Markdown articles; the best way to do that is to install the theme as a gem. However, if you want to tinker with the code, just download this repository.
|
3
|
+
For storing your worldbuilding notes! The intent of this theme is to get all the code out of the way and to allow you to write Markdown articles; the best way to do that is to install the theme as a gem. However, if you want to tinker with the code, just download this repository.
|
4
4
|
|
5
|
-
|
5
|
+
For the easiest starting point, I have uploaded a sample site that you can download with everything preconfigured, so if you're unfamiliar with Jekyll you can bypass all the setup and get right to it. See that repo for instructions.
|
6
|
+
|
7
|
+
I've tried to adhere to accessible and easy to read design principles while retaining the look and layout of a classic wiki that we're all familiar with - I've aped some elements of Wikipedia's organizational system and layout while trying to make it as clean and user friendly as possible.
|
8
|
+
|
9
|
+
This theme is not mobile friendly, as I personally do absolutely no work on mobile and thus my development skills are lacking. There is also no dark mode or other alternate colour scheme, but please feel free to fork this project and add whatever functionality it's missing.
|
6
10
|
|
7
11
|
|
8
12
|
|
@@ -15,7 +19,7 @@ In case you're unfamiliar with it, a basic Jekyll site includes the following:
|
|
15
19
|
+ The `_site` folder contains everything that Jekyll outputs when it builds the site. Don't edit anything in this folder, as it will be rewritten the next time you serve the site.
|
16
20
|
+ The `assets` folder contains things like fonts, images, and Javascript files. It also contains a `.scss` file importing all of your SCSS so that Jekyll can convert it to regular CSS.
|
17
21
|
|
18
|
-
This theme comes with all of these prepackaged, so most of what you have to do is edit the `_config.yaml` file. The theme has some default config set already, but you can override these in your own config file if you wish. You can also add any of the above folders with includes, layouts, or SCSS to override the theme's
|
22
|
+
This theme comes with all of these prepackaged, so most of what you have to do is edit the `_config.yaml` file. The theme has some default config set already, but you can override these in your own config file if you wish. You can also add any of the above folders to your own project with includes, layouts, or SCSS to override the theme's files. For example, you will want to add your own `assets` folder to store your own images, including one titled `favicon.png` in order to override the placeholder one i've included.
|
19
23
|
|
20
24
|
|
21
25
|
|
@@ -46,12 +50,10 @@ This will give you a very bare bones Jekyll site, with an index page, a folder f
|
|
46
50
|
|
47
51
|
(Don't worry about the .gitignore or the Gemfile.lock.)
|
48
52
|
|
49
|
-
(You can also move your `_posts` folder into your `collections` folder if you want; I find it makes things a little neater.)
|
50
|
-
|
51
53
|
To use this theme, open your Jekyll site's `Gemfile`, delete the line that says `gem "minima"` and replace it with this line:
|
52
54
|
|
53
55
|
```ruby
|
54
|
-
gem "jekyll-theme-paperwiki", "~> 0.1.
|
56
|
+
gem "jekyll-theme-paperwiki", "~> 0.1.4"
|
55
57
|
```
|
56
58
|
|
57
59
|
And add this line to your Jekyll site's `_config.yml`:
|
@@ -98,9 +100,10 @@ All of your wiki pages should be written in markdown, and you must begin each `.
|
|
98
100
|
Between these two lines is where you include *front matter*, such as specifying the layout or the permalink to the page. However, you can leave the front matter blank - wiki pages have layouts and permalinks set by default in the theme's config file, and you only need to specify them if you want to override the defaults. You also do not need to specify a title for the page, as it is automatically taken from the filename. All you absolutely need is the two triple-dashed lines, as Jekyll needs it to know that the front matter is there in order to output the page.
|
99
101
|
|
100
102
|
Caveats:
|
101
|
-
-
|
103
|
+
- If the site won't build due to an error with the random page, make sure you have more than one wiki article for it to draw from
|
104
|
+
- You may need to specify a permalink and a title if you want to use certain characters that are not allowed in filenames -- say, some IPA characters. Otherwise just title your articles "Article title.md", with spaces, not underscores or hyphens, and the default settings will take care of the rest.
|
105
|
+
|
102
106
|
|
103
|
-
|
104
107
|
|
105
108
|
## Config
|
106
109
|
|
@@ -119,7 +122,8 @@ collections:
|
|
119
122
|
However, if you would like to have additional collections akin to the Wikimedia Foundation's other projects - such as Wikisource, Wikispecies, or Wiktionary - then you can specify them in the same format as above, also under the `collections` key:
|
120
123
|
|
121
124
|
```yaml
|
122
|
-
|
125
|
+
collections:
|
126
|
+
COLLECTION_NAME:
|
123
127
|
output: true
|
124
128
|
permalink: /:collection/:name
|
125
129
|
```
|
@@ -141,9 +145,9 @@ You will also need to add a data file listing your projects: create a folder tit
|
|
141
145
|
desc: A brief description here
|
142
146
|
```
|
143
147
|
|
144
|
-
For the icon, find one you like from RemixIcon and copy the code.
|
148
|
+
For the icon, find one you like from [RemixIcon](https://remixicon.com/) and copy the code.
|
145
149
|
|
146
|
-
This will add links to each different collection on your homepage, and allow you to limit the scope of your searches to a single collection or expand it to cover all of them at once.
|
150
|
+
This will add links to each different collection on your homepage, and allow you to limit the scope of your searches to a single collection or expand it to cover all of them at once. The search logic is already taken care of in the theme itself; it just needs the names of your collections.
|
147
151
|
|
148
152
|
|
149
153
|
|
data/_config.yml
CHANGED
@@ -1,12 +1,32 @@
|
|
1
|
+
# Build settings
|
2
|
+
include: ['_pages'] # forces custom pages to be organized into their own directory
|
3
|
+
|
4
|
+
# Plugins
|
5
|
+
# plugins:
|
6
|
+
# - jekyll-ipa
|
1
7
|
|
2
8
|
random_redirect:
|
3
9
|
pages: true
|
4
10
|
|
11
|
+
multi_projects: true
|
12
|
+
entry_tags_top: true
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
# Sets the collections directory and defines your collections.
|
5
17
|
collections_dir: collections
|
6
18
|
collections:
|
7
19
|
wiki:
|
8
20
|
output: true
|
9
21
|
permalink: /:collection/:name
|
22
|
+
works:
|
23
|
+
output: true
|
24
|
+
permalink: /:collection/:name
|
25
|
+
grammars:
|
26
|
+
output: true
|
27
|
+
permalink: /:collection/:name
|
28
|
+
|
29
|
+
|
10
30
|
|
11
31
|
# Front matter defaults, so you don't need to set layouts on every new page.
|
12
32
|
# As long as pages are in the correct folder, they'll automatically have the
|
@@ -31,3 +51,15 @@ defaults:
|
|
31
51
|
type: "wiki"
|
32
52
|
values:
|
33
53
|
layout: "wiki"
|
54
|
+
-
|
55
|
+
scope:
|
56
|
+
path: "_works" # all pages in the works folder
|
57
|
+
type: "works"
|
58
|
+
values:
|
59
|
+
layout: "work"
|
60
|
+
-
|
61
|
+
scope:
|
62
|
+
path: "_grammars" # all pages in the grammars folder
|
63
|
+
type: "grammars"
|
64
|
+
values:
|
65
|
+
layout: "grammar"
|
@@ -4,11 +4,7 @@
|
|
4
4
|
{% for item in site.data.projects %}
|
5
5
|
{% if page.url contains item.link %}
|
6
6
|
Total number of {{ item.name | downcase }} entries:
|
7
|
-
|
8
|
-
{{ site.wiki.size }}
|
9
|
-
{% else %}
|
10
|
-
? for now
|
11
|
-
{% endif %}
|
7
|
+
<strong>{{ site.[page.project].size }}</strong>
|
12
8
|
{% endif %}
|
13
9
|
{% endfor %}
|
14
10
|
</section>
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<div class="entry-subhead_pair">
|
2
|
+
|
3
|
+
<span class="entry-subhead_key">Portals:</span>
|
4
|
+
<span>
|
5
|
+
<a href="/{{ page.collection }}/portal:{{ page.portal }}" class="entry-subhead_value">
|
6
|
+
{{ page.portal }}
|
7
|
+
</a>
|
8
|
+
</span>
|
9
|
+
|
10
|
+
</div>
|
11
|
+
|
12
|
+
<div class="entry-subhead_pair">
|
13
|
+
|
14
|
+
<span class="entry-subhead_key">Categories:</span>
|
15
|
+
<span>
|
16
|
+
{% for item in page.categories %}
|
17
|
+
<a href="/{{ page.collection }}/category:{{ item | slugify }}" class="entry-subhead_value">
|
18
|
+
{{ item }}
|
19
|
+
</a>
|
20
|
+
{% endfor %}
|
21
|
+
</span>
|
22
|
+
|
23
|
+
</div>
|
24
|
+
|
25
|
+
<div class="entry-subhead_pair">
|
26
|
+
|
27
|
+
<span class="entry-subhead_key">Tags:</span>
|
28
|
+
<span>
|
29
|
+
{% for item in page.tags %}
|
30
|
+
<a href="/{{ page.category }}/tag:{{ item }}" class="entry-subhead_value">
|
31
|
+
{{ item }}
|
32
|
+
</a>
|
33
|
+
{% endfor %}
|
34
|
+
</span>
|
35
|
+
|
36
|
+
</div>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
"{{ page.url | slugify }}": {
|
2
|
+
"title": "{{ page.title | xml_escape }}",
|
3
|
+
"content": {{ page.content | markdownify | strip_newlines | strip_html | jsonify }},
|
4
|
+
"portal": "{{ page.portal | xml_escape }}",
|
5
|
+
"categories": "{{ page.categories | array_to_sentence_string: "" | xml_escape }}",
|
6
|
+
"url": "{{ site.url | append: page.url | xml_escape }}",
|
7
|
+
"path": "{{ page.url | xml_escape }}"
|
8
|
+
}
|
@@ -0,0 +1,67 @@
|
|
1
|
+
<section class="entry-sidebar">
|
2
|
+
|
3
|
+
{% if page.other_projects %}
|
4
|
+
|
5
|
+
<section class="entry-other_projects">
|
6
|
+
View in other collections:
|
7
|
+
<ul>
|
8
|
+
{% for item in page.other_projects %}
|
9
|
+
<li>
|
10
|
+
<a href="/{{ item }}{{ page.url | remove_first: "/wiki" }}">{{ item | capitalize }}</a>
|
11
|
+
</li>
|
12
|
+
{% endfor %}
|
13
|
+
</ul>
|
14
|
+
</section>
|
15
|
+
|
16
|
+
{% endif %}
|
17
|
+
|
18
|
+
|
19
|
+
{% if page.image %}
|
20
|
+
<figure>
|
21
|
+
<img src="{{ page.image }}" width=auto class="entry-image">
|
22
|
+
{% if page.image_caption %}
|
23
|
+
<figcaption>{{ page.image_caption }}</figcaption>
|
24
|
+
{% endif %}
|
25
|
+
</figure>
|
26
|
+
{% endif %}
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
{% if page.quickstats %}
|
31
|
+
|
32
|
+
<section class="entry-quickstats">
|
33
|
+
|
34
|
+
<table class="stats-table">
|
35
|
+
{% for stat in page.quickstats %}
|
36
|
+
{% if stat[0] == "colspan_2" %}
|
37
|
+
<tr>
|
38
|
+
<td colspan="2" class="entry-quickstats_double">
|
39
|
+
{{ stat[1] | replace: "_", " " | capitalize }}
|
40
|
+
</td>
|
41
|
+
</tr>
|
42
|
+
{% else %}
|
43
|
+
<tr>
|
44
|
+
<td>{{ stat[0] | replace: "_", " " | capitalize }}</td>
|
45
|
+
<td>{{ stat[1] }}</td>
|
46
|
+
</tr>
|
47
|
+
{% endif %}
|
48
|
+
{% endfor %}
|
49
|
+
</table>
|
50
|
+
|
51
|
+
</section>
|
52
|
+
|
53
|
+
{% endif %}
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
{% if page.quicknotes %}
|
58
|
+
|
59
|
+
<section class="entry-quicknotes">
|
60
|
+
|
61
|
+
{{ page.quicknotes }}
|
62
|
+
|
63
|
+
</section>
|
64
|
+
|
65
|
+
{% endif %}
|
66
|
+
|
67
|
+
<section>
|
data/_layouts/entry.html
CHANGED
data/_layouts/wiki.html
CHANGED
@@ -4,121 +4,24 @@
|
|
4
4
|
|
5
5
|
<article class="entry entry-wiki">
|
6
6
|
|
7
|
-
|
8
|
-
|
9
7
|
<h1>
|
10
8
|
{{ page.title }}
|
11
9
|
</h1>
|
12
10
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
<section class="entry-other_projects">
|
18
|
-
View in other collections:
|
19
|
-
<ul>
|
20
|
-
{% for item in page.other_projects %}
|
21
|
-
<li>
|
22
|
-
<a href="/{{ item }}{{ page.url | remove_first: "/wiki" }}">{{ item | capitalize }}</a>
|
23
|
-
</li>
|
24
|
-
{% endfor %}
|
25
|
-
</ul>
|
11
|
+
{% if site.entry_tags_top %}
|
12
|
+
<section class="entry-tags entry-tags_top">
|
13
|
+
{% include entry_tags.html %}
|
26
14
|
</section>
|
27
|
-
|
28
15
|
{% endif %}
|
29
16
|
|
30
|
-
|
31
|
-
|
32
|
-
<section class="entry-tags">
|
33
|
-
|
34
|
-
<div class="entry-subhead_pair">
|
35
|
-
|
36
|
-
<span class="entry-subhead_key">Portals:</span>
|
37
|
-
<span>
|
38
|
-
<a href="/wiki/portal:{{ page.portal }} class="entry-subhead_value"">
|
39
|
-
{{ page.portal }}
|
40
|
-
</a>
|
41
|
-
</span>
|
42
|
-
|
43
|
-
</div>
|
44
|
-
|
45
|
-
<div class="entry-subhead_pair">
|
46
|
-
|
47
|
-
<span class="entry-subhead_key">Categories:</span>
|
48
|
-
<span>
|
49
|
-
{% for item in page.categories %}
|
50
|
-
<a href="/wiki/category:{{ item | slugify }}" class="entry-subhead_value">
|
51
|
-
{{ item }}
|
52
|
-
</a>
|
53
|
-
{% endfor %}
|
54
|
-
</span>
|
55
|
-
|
56
|
-
</div>
|
57
|
-
|
58
|
-
<div class="entry-subhead_pair">
|
59
|
-
|
60
|
-
<span class="entry-subhead_key">Tags:</span>
|
61
|
-
<span>
|
62
|
-
{% for item in page.tags %}
|
63
|
-
<a href="/wiki/tag:{{ item }}" class="entry-subhead_value">
|
64
|
-
{{ item }}
|
65
|
-
</a>
|
66
|
-
{% endfor %}
|
67
|
-
</span>
|
68
|
-
|
69
|
-
</div>
|
70
|
-
|
71
|
-
</section>
|
72
|
-
|
73
17
|
{{ content }}
|
74
18
|
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
{% if page.quickstats %}
|
80
|
-
|
81
|
-
<section class="entry-quickstats">
|
82
|
-
|
83
|
-
{% if page.image %}
|
84
|
-
<figure>
|
85
|
-
<img src="{{ page.image }}" width=auto class="stats-image">
|
86
|
-
<figcaption>{{ page.image_caption }}</figcaption>
|
87
|
-
</figure>
|
88
|
-
{% endif %}
|
89
|
-
|
90
|
-
<section class="stats-facts">
|
91
|
-
|
92
|
-
<table class="stats-table">
|
93
|
-
{% if page.type == "person" %}
|
94
|
-
<tr><td>Name</td><td>{{ page.fullname }}</td></tr>
|
95
|
-
<tr><td>Birthday</td><td>{{ page.birthday }}</td></tr>
|
96
|
-
<tr><td>Birthplace</td><td>{{ page.birthplace }}</td></tr>
|
97
|
-
<tr><td>Known for</td><td>{{ page.known_for }}</td></tr>
|
98
|
-
{% endif %}
|
99
|
-
{% if page.type == "planet" %}
|
100
|
-
<tr><td>Orbital period</td><td>{{ page.orbital_period }}</td></tr>
|
101
|
-
<tr><td>Semimajor axis</td><td>{{ page.semimajor_axis }}</td></tr>
|
102
|
-
<tr><td>Orbital eccentricity</td><td>{{ page.eccentricity }}</td></tr>
|
103
|
-
<tr><td>Aphelion</td><td>{{ page.aphelion }}</td></tr>
|
104
|
-
<tr><td>Perihelion</td><td>{{ page.perihelion }}</td></tr>
|
105
|
-
<tr><td>Orbital speed</td><td>{{ page.orbital_speed }}</td></tr>
|
106
|
-
<tr><td>Orbital period</td><td>{{ page.orbital_period }}</td></tr>
|
107
|
-
<tr><td>Orbital inclination</td><td>{{ page.orbital_inclination }}</td></tr>
|
108
|
-
<tr><td>Satellites</td><td>{{ page.satellites }}</td></tr>
|
109
|
-
<tr><td>Radius (mean)</td><td>{{ page.radius }}</td></tr>
|
110
|
-
<tr><td>Radius (equatorial)</td><td>{{ page.radius_equatorial }}</td></tr>
|
111
|
-
<tr><td>Radius (polar)</td><td>{{ page.radius_polar }}</td></tr>
|
112
|
-
<tr><td>Circumference</td><td>{{ page.circumference }}</td></tr>
|
113
|
-
<tr><td>Surface area</td><td>{{ page.surface_area }}</td></tr>
|
114
|
-
<tr><td>Sidereal day</td><td>{{ page.sidereal_day }}</td></tr>
|
115
|
-
<tr><td>Synodic day</td><td>{{ page.synodic_day }}</td></tr>
|
116
|
-
<tr><td>Axial tilt</td><td>{{ page.axial_tilt }}</td></tr>
|
117
|
-
{% endif %}
|
118
|
-
</table>
|
119
|
-
|
19
|
+
{% if site.entry_tags_top == false %}
|
20
|
+
<section class="entry-tags entry-tags_bottom">
|
21
|
+
{% include entry_tags.html %}
|
120
22
|
</section>
|
23
|
+
{% endif %}
|
121
24
|
|
122
|
-
|
25
|
+
</article>
|
123
26
|
|
124
|
-
{%
|
27
|
+
{% include wiki_sidebar.html %}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# usage: {% blockquote text[0] text[1] text[2]%}
|
2
|
+
# usage: {% blockquote text[0] text[1] text[2]%}
|
3
|
+
# text[0]: the text of the blockquote
|
4
|
+
# text[1]: the author of the blockquote
|
5
|
+
# text[2]: the source of the blockquote
|
6
|
+
|
7
|
+
module Jekyll
|
8
|
+
module Tags
|
9
|
+
class RenderBlockquoteTag < Liquid::Tag
|
10
|
+
|
11
|
+
require "shellwords"
|
12
|
+
|
13
|
+
# initialize is called when we encounter the {% blockquote %} Liquid tag; 'blockquote' is the tag name and anything immediately after it is passed in via the second argument
|
14
|
+
def initialize(tag_name, text, tokens)
|
15
|
+
super
|
16
|
+
@text = text.shellsplit
|
17
|
+
end
|
18
|
+
|
19
|
+
def render(context)
|
20
|
+
"<figure><blockquote>#{@text[0]}<figcaption>#{@text[1]}, <cite>#{@text[2]}</cite></figcaption></blockquote></figure>"
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
# The register_tag method takes two arguments: the user-facing name of the tag [blockquote], and the class that implements it [RenderBlockquoteTag].
|
28
|
+
Liquid::Template.register_tag("blockquote", Jekyll::Tags::RenderBlockquoteTag)
|
data/_plugins/gloss.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
module Jekyll
|
2
|
+
module InterlinearGlossFilter # Liquid just uses the method name as the filter name; there's no extra level of name-mapping like there is with tags and blocks
|
3
|
+
|
4
|
+
def gloss(input) # will be available as the "gloss" filter
|
5
|
+
@text = input
|
6
|
+
puts "<table><tbody><tr>"
|
7
|
+
|
8
|
+
lexemes = @text.split(" ")
|
9
|
+
lexemes.each do |word|
|
10
|
+
puts "<td class=\"gloss_item\">#{word}</td>"
|
11
|
+
end
|
12
|
+
|
13
|
+
puts "</tr></tbody><table>"
|
14
|
+
|
15
|
+
# morphemic_analysis
|
16
|
+
# morphemic_gloss
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
Liquid::Template.register_filter(Jekyll::InterlinearGlossFilter)
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# usage:
|
2
|
+
# {% interlinear %}
|
3
|
+
# sentence in object lang
|
4
|
+
# sentence in object lang broken down into morphemes
|
5
|
+
# interlinear gloss of morphemes
|
6
|
+
# translation into target lang
|
7
|
+
# {% endinterlinear %}
|
8
|
+
|
9
|
+
module Jekyll
|
10
|
+
module Tags
|
11
|
+
class InterlinearGlossTag < Liquid::Block
|
12
|
+
|
13
|
+
require "shellwords"
|
14
|
+
|
15
|
+
# initialize is called when we encounter the {% interlinear %} Liquid tag; 'interlinear' is the tag name and anything immediately after it is passed in via the second argument
|
16
|
+
def initialize(tag_name, text, tokens)
|
17
|
+
super
|
18
|
+
@text = text.shellsplit # splits the input string into individual words
|
19
|
+
# @wordcount = @text[0].length # counts the number of words in the string
|
20
|
+
|
21
|
+
# object_lang, morphemic_analysis, morphemic_gloss, target_lang
|
22
|
+
end
|
23
|
+
|
24
|
+
def render(context)
|
25
|
+
"<table class=\"interlinear-gloss\">
|
26
|
+
<tbody>
|
27
|
+
<tr>
|
28
|
+
<td colspan=\"#{@wordcount}\">#{@text[0]}</td>
|
29
|
+
</tr>" + "<tr><td>#{@text[1]}</td></tr><tr><td>#{@text[2]}</td></tr><tr><td>#{@text[3]}</td></tr></tbody></table>"
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
# The register_tag method takes two arguments: the user-facing name of the tag [interlinear], and the class that implements it [InterlinearGlossTag].
|
37
|
+
Liquid::Template.register_tag("interlinear", Jekyll::Tags::InterlinearGlossTag)
|
data/_plugins/ipa.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# usage: {% ipa /phonemic text/%}
|
2
|
+
# usage: {% ipa [phonetic text]%}
|
3
|
+
|
4
|
+
module Jekyll
|
5
|
+
module Tags
|
6
|
+
class RenderPhoneticTag < Liquid::Tag
|
7
|
+
|
8
|
+
# initialize is called when we encounter the {% ipa %} Liquid tag; 'ipa' is the tag name and anything immediately after it is passed in via the second argument
|
9
|
+
def initialize(tag_name, text, tokens)
|
10
|
+
super
|
11
|
+
@text = text
|
12
|
+
end
|
13
|
+
|
14
|
+
def render(context)
|
15
|
+
"<abbr class=\"gloss\" title=\"International Phonetic Alphabet\">IPA</abbr>: <span class=\"ipa\">#{@text}</span>"
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
# The register_tag method takes two arguments: the user-facing name of the tag [ipa], and the class that implements it [RenderPhoneticTag].
|
23
|
+
Liquid::Template.register_tag("ipa", Jekyll::Tags::RenderPhoneticTag)
|
data/_plugins/lang.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# usage: {% lang text[0] text[1] text[2]%}
|
2
|
+
# usage: {% lang ko 바이 괕 모 iced jelly dish%}
|
3
|
+
# text[0] = language code
|
4
|
+
# text[1] = the text, in latin script or not
|
5
|
+
# text[2] = the translation into english
|
6
|
+
|
7
|
+
module Jekyll
|
8
|
+
module Tags
|
9
|
+
class DefineLanguageTag < Liquid::Tag
|
10
|
+
|
11
|
+
require "shellwords"
|
12
|
+
|
13
|
+
# initialize is called when we encounter the {% lang %} Liquid tag; 'lang' is the tag name and anything immediately after it is passed in via the second argument
|
14
|
+
def initialize(tag_name, text, tokens)
|
15
|
+
super
|
16
|
+
@text = text.shellsplit
|
17
|
+
end
|
18
|
+
|
19
|
+
def render(context)
|
20
|
+
"<abbr class=\"gloss\" title=\"#{@text[0]}\">#{@text[0]}</abbr>: <strong>#{@text[1]}</strong> <em>#{@text[2]}</em>"
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
# The register_tag method takes two arguments: the user-facing name of the tag [lang], and the class that implements it [DefineLanguageTag].
|
28
|
+
Liquid::Template.register_tag('lang', Jekyll::Tags::DefineLanguageTag)
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# usage: {% sidenote %}
|
2
|
+
|
3
|
+
module Jekyll
|
4
|
+
module Tags
|
5
|
+
class RenderSideNoteTag < Liquid::Tag
|
6
|
+
|
7
|
+
require "shellwords"
|
8
|
+
|
9
|
+
# initialize is called when we encounter the {% sidenote %} Liquid tag; 'sidenote' is the tag name and anything immediately after it is passed in via the second argument
|
10
|
+
def initialize(tag_name, text, tokens)
|
11
|
+
super
|
12
|
+
@text = text.shellsplit
|
13
|
+
end
|
14
|
+
|
15
|
+
def render(context)
|
16
|
+
"<label for='#{@text[0]}' class='margin-toggle sidenote-number'></label><input type='checkbox' id='#{@text[0]}' class='margin-toggle'/><span class='sidenote'>#{@text[1]} </span>"
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
# The register_tag method takes two arguments: the user-facing name of the tag [sidenote], and the class that implements it [RenderSideNoteTag].
|
24
|
+
Liquid::Template.register_tag("sidenote", Jekyll::Tags::RenderSideNoteTag)
|
data/_sass/partials/_base.scss
CHANGED
@@ -60,7 +60,7 @@ h3 {
|
|
60
60
|
font-size: $fontsize-h3;
|
61
61
|
font-variant: small-caps;
|
62
62
|
padding: 0.71em 0 0.9em 0;
|
63
|
-
color:
|
63
|
+
color: $color-h3;
|
64
64
|
}
|
65
65
|
|
66
66
|
a,
|
@@ -97,15 +97,18 @@ blockquote {
|
|
97
97
|
margin-left: 3em;
|
98
98
|
margin-right: 3em;
|
99
99
|
margin-bottom: 1.75rem;
|
100
|
-
padding
|
100
|
+
padding: 1.75em;
|
101
101
|
|
102
|
-
|
102
|
+
background-color: $color-paperdark;
|
103
|
+
border-left: 0.5em solid $color-shortbread;
|
103
104
|
|
104
|
-
|
105
|
-
display: block;
|
106
|
-
width: 100%;
|
105
|
+
figcaption {
|
107
106
|
text-align: right;
|
108
107
|
}
|
108
|
+
|
109
|
+
figcaption cite {
|
110
|
+
display: inline;
|
111
|
+
}
|
109
112
|
}
|
110
113
|
|
111
114
|
ul ul {
|
@@ -131,15 +134,90 @@ samp {
|
|
131
134
|
}
|
132
135
|
|
133
136
|
code,
|
134
|
-
kbd
|
135
|
-
.
|
136
|
-
|
137
|
+
kbd {
|
138
|
+
padding: 0.4em 0.5em 0.2em;
|
139
|
+
|
140
|
+
background-color: $color-codebg;
|
141
|
+
color: $color-codetext;
|
142
|
+
border-radius: 4px;
|
143
|
+
}
|
144
|
+
|
145
|
+
kbd {
|
146
|
+
position: relative;
|
147
|
+
top: -1px;
|
148
|
+
display: inline-block;
|
149
|
+
min-width: 0.75rem;
|
150
|
+
padding: 0.2rem 0.5rem;
|
151
|
+
line-height: 1;
|
152
|
+
|
153
|
+
background-color: $color-paperlight;
|
154
|
+
border: 1px solid $color-linen;
|
155
|
+
box-shadow: 0 2px 0 1px $color-linen;
|
156
|
+
|
157
|
+
cursor: default;
|
158
|
+
|
159
|
+
font-family: $fontfamily-body;
|
160
|
+
text-align: center;
|
161
|
+
color: $color-bodytext;
|
162
|
+
|
163
|
+
transition: .1s;
|
164
|
+
&:hover {
|
165
|
+
box-shadow: 0 1px 0 0.5px $color-linen;
|
166
|
+
top: 1px;
|
167
|
+
}
|
168
|
+
}
|
169
|
+
|
170
|
+
pre {
|
171
|
+
padding: 1rem;
|
137
172
|
|
138
173
|
background-color: $color-codebg;
|
139
174
|
color: $color-codetext;
|
140
|
-
border-radius:
|
175
|
+
border-radius: 6px;
|
141
176
|
}
|
142
177
|
|
143
178
|
input[type="search"] {
|
144
179
|
background-color: $color-searchbg;
|
145
180
|
}
|
181
|
+
|
182
|
+
.tooltip {
|
183
|
+
position: relative;
|
184
|
+
}
|
185
|
+
|
186
|
+
.tooltip:before {
|
187
|
+
content: attr(data-tooltip);
|
188
|
+
position: absolute;
|
189
|
+
width: 100px;
|
190
|
+
background-color: #062B45;
|
191
|
+
color: #fff;
|
192
|
+
text-align: center;
|
193
|
+
padding: 10px;
|
194
|
+
line-height: 1.2;
|
195
|
+
border-radius: 6px;
|
196
|
+
z-index: 1;
|
197
|
+
opacity: 0;
|
198
|
+
transition: opacity .6s;
|
199
|
+
bottom: 125%;
|
200
|
+
left: 50%;
|
201
|
+
margin-left: -60px;
|
202
|
+
font-size: 0.75em;
|
203
|
+
visibility: hidden;
|
204
|
+
}
|
205
|
+
|
206
|
+
.tooltip:after {
|
207
|
+
content: "";
|
208
|
+
position: absolute;
|
209
|
+
bottom: 75%;
|
210
|
+
left: 50%;
|
211
|
+
margin-left: -5px;
|
212
|
+
border-width: 5px;
|
213
|
+
border-style: solid;
|
214
|
+
opacity: 0;
|
215
|
+
transition: opacity .6s;
|
216
|
+
border-color: #062B45 transparent transparent transparent;
|
217
|
+
visibility: hidden;
|
218
|
+
}
|
219
|
+
|
220
|
+
.tooltip:hover:before, .tooltip:hover:after {
|
221
|
+
opacity: 1;
|
222
|
+
visibility: visible;
|
223
|
+
}
|
@@ -6,7 +6,8 @@
|
|
6
6
|
grid-column: span 2 / auto;
|
7
7
|
padding: 4.5em 2em;
|
8
8
|
|
9
|
-
background-color: $color-
|
9
|
+
background-color: $color-collections_sidebar;
|
10
|
+
border-right: 1px solid $color-shortbread;
|
10
11
|
|
11
12
|
font-size: $fontsize-small;
|
12
13
|
|
@@ -22,10 +23,6 @@
|
|
22
23
|
.collections-content {
|
23
24
|
grid-column: span 10 / auto;
|
24
25
|
|
25
|
-
// display: grid;
|
26
|
-
// grid-template-columns: repeat(12, 1fr);
|
27
|
-
// grid-gap: 2em;
|
28
|
-
|
29
26
|
padding: 1.56em 2em 1.56em*2;
|
30
27
|
|
31
28
|
h1 {
|
@@ -47,8 +44,8 @@
|
|
47
44
|
padding: 1.5rem;
|
48
45
|
margin-bottom: 1rem;
|
49
46
|
|
50
|
-
background-color: $color-
|
51
|
-
border: 1px solid
|
47
|
+
background-color: $color-collections_header;
|
48
|
+
border: 1px solid $color-collections_header_border;
|
52
49
|
border-radius: 1.5rem;
|
53
50
|
}
|
54
51
|
|
@@ -62,7 +59,7 @@
|
|
62
59
|
width: 100%;
|
63
60
|
padding: 12px 16px;
|
64
61
|
|
65
|
-
border: 1px solid
|
62
|
+
border: 1px solid $color-searchbar_border;
|
66
63
|
border-radius: 1rem;
|
67
64
|
|
68
65
|
font-size: $fontsize-body;
|
@@ -73,14 +70,14 @@
|
|
73
70
|
}
|
74
71
|
|
75
72
|
.collections-searchbar:hover {
|
76
|
-
border: 1px solid $color-
|
77
|
-
box-shadow: 0 0 6px $color-
|
73
|
+
border: 1px solid $color-searchbar_border_hover;
|
74
|
+
box-shadow: 0 0 6px $color-searchbar_shadow_hover;
|
78
75
|
}
|
79
76
|
|
80
77
|
.collections-searchbar:focus {
|
81
78
|
outline: none;
|
82
|
-
border-color: $color-
|
83
|
-
box-shadow: 0 0 6px $color-
|
79
|
+
border-color: $color-searchbar_border_focus;
|
80
|
+
box-shadow: 0 0 6px $color-searchbar_shadow_focus;
|
84
81
|
transition: 0.25s;
|
85
82
|
}
|
86
83
|
|
@@ -4,6 +4,7 @@
|
|
4
4
|
\*------------------------------------*/
|
5
5
|
|
6
6
|
|
7
|
+
|
7
8
|
.entry {
|
8
9
|
padding: 1.56em 2em;
|
9
10
|
|
@@ -33,6 +34,9 @@
|
|
33
34
|
grid-column: span 10 / auto;
|
34
35
|
}
|
35
36
|
|
37
|
+
|
38
|
+
|
39
|
+
// The auto-generated table of contents.
|
36
40
|
.entry-index {
|
37
41
|
position: -webkit-sticky; /* Safari */
|
38
42
|
position: sticky;
|
@@ -41,11 +45,23 @@
|
|
41
45
|
|
42
46
|
grid-column: span 2 / auto;
|
43
47
|
|
44
|
-
padding:
|
48
|
+
padding: 2em 1em 2em 0.75em;
|
45
49
|
|
46
50
|
font-size: $fontsize-small;
|
47
51
|
}
|
48
52
|
|
53
|
+
.entry-index ul {
|
54
|
+
list-style: none;
|
55
|
+
padding-left: 1rem;
|
56
|
+
a {
|
57
|
+
text-decoration: none;
|
58
|
+
}
|
59
|
+
}
|
60
|
+
|
61
|
+
.entry-index_return {
|
62
|
+
margin-bottom: 1.5rem;
|
63
|
+
}
|
64
|
+
|
49
65
|
.entry-index ol {
|
50
66
|
list-style: none;
|
51
67
|
padding-left: 1rem;
|
@@ -66,13 +82,17 @@
|
|
66
82
|
}
|
67
83
|
|
68
84
|
|
69
|
-
|
85
|
+
|
86
|
+
// The righthand sidebar.
|
87
|
+
.entry-sidebar {
|
88
|
+
grid-column: span 3 / auto;
|
89
|
+
}
|
70
90
|
|
71
91
|
.entry-other_projects {
|
72
92
|
padding: 1rem;
|
73
|
-
margin: 1em
|
93
|
+
margin: 1em;
|
74
94
|
border-radius: 1em;
|
75
|
-
background-color:
|
95
|
+
background-color: $color-entry_secondary;
|
76
96
|
font-size: $fontsize-small;
|
77
97
|
|
78
98
|
ul {
|
@@ -83,17 +103,13 @@
|
|
83
103
|
}
|
84
104
|
}
|
85
105
|
|
86
|
-
.entry-
|
87
|
-
grid-column: span 3 / auto;
|
88
|
-
padding: 0.5em;
|
89
|
-
}
|
90
|
-
|
91
|
-
.stats-image {
|
106
|
+
.entry-image {
|
92
107
|
padding: 0.2em 0.2em 0.1em 0.2em;
|
93
108
|
max-width: 100%;
|
94
109
|
}
|
95
110
|
|
96
|
-
.
|
111
|
+
.entry-quickstats {
|
112
|
+
padding: 0.5em;
|
97
113
|
font-size: $fontsize-small;
|
98
114
|
}
|
99
115
|
|
@@ -107,21 +123,29 @@
|
|
107
123
|
}
|
108
124
|
tr td:first-child {
|
109
125
|
text-align: right;
|
110
|
-
padding-right: 0.5em;
|
111
126
|
background-color: $color-linen;
|
112
127
|
}
|
113
128
|
tr td:last-child {
|
114
129
|
background-color: $color-paperdark;
|
115
130
|
}
|
131
|
+
.entry-quickstats_double {
|
132
|
+
text-align: center !important;
|
133
|
+
}
|
134
|
+
}
|
135
|
+
|
136
|
+
.entry-quicknotes {
|
137
|
+
padding: 0.5em;
|
138
|
+
font-size: $fontsize-small;
|
139
|
+
text-align: center;
|
116
140
|
}
|
117
141
|
|
118
142
|
|
119
143
|
|
144
|
+
// The navigation, which can be at the top or bottom of the article.
|
120
145
|
.entry-tags {
|
121
|
-
margin-bottom: 2em;
|
122
146
|
padding: 1rem;
|
123
147
|
border-radius: 1em;
|
124
|
-
background-color:
|
148
|
+
background-color: $color-entry_secondary;
|
125
149
|
font-size: $fontsize-small;
|
126
150
|
text-transform: uppercase;
|
127
151
|
|
@@ -130,6 +154,14 @@
|
|
130
154
|
}
|
131
155
|
}
|
132
156
|
|
157
|
+
.entry-tags_top {
|
158
|
+
margin-bottom: 2em;
|
159
|
+
}
|
160
|
+
|
161
|
+
.entry-tags_bottom {
|
162
|
+
margin-top: 2em;
|
163
|
+
}
|
164
|
+
|
133
165
|
.entry-subhead_pair {
|
134
166
|
display: inline;
|
135
167
|
margin-right: 1em;
|
@@ -150,8 +182,10 @@
|
|
150
182
|
|
151
183
|
|
152
184
|
|
185
|
+
// The footnotes section and the footnotes themselves.
|
153
186
|
a.footnote {
|
154
187
|
text-decoration: none;
|
188
|
+
line-height: 0;
|
155
189
|
}
|
156
190
|
a.footnote::before {
|
157
191
|
content: "[";
|
@@ -161,11 +195,9 @@ a.footnote::after {
|
|
161
195
|
}
|
162
196
|
|
163
197
|
.footnotes {
|
164
|
-
// grid-column: span 7 / auto;
|
165
|
-
|
166
198
|
padding: 1rem;
|
167
199
|
border-radius: 1em;
|
168
|
-
background-color:
|
200
|
+
background-color: $color-entry_secondary;
|
169
201
|
font-size: $fontsize-small;
|
170
202
|
ol {
|
171
203
|
padding-left: 1rem;
|
@@ -176,3 +208,5 @@ a.footnote::after {
|
|
176
208
|
}
|
177
209
|
}
|
178
210
|
}
|
211
|
+
|
212
|
+
.tooltip {}
|
data/_sass/partials/_global.scss
CHANGED
@@ -67,7 +67,7 @@
|
|
67
67
|
|
68
68
|
.global-searchbar {
|
69
69
|
padding: 0.2rem 1rem;
|
70
|
-
border: 1px solid
|
70
|
+
border: 1px solid $color-searchbar_border;
|
71
71
|
border-radius: 8px;
|
72
72
|
font-size: $fontsize-small;
|
73
73
|
transition: 0.25s;
|
@@ -81,14 +81,14 @@
|
|
81
81
|
}
|
82
82
|
|
83
83
|
.global-searchbar:hover {
|
84
|
-
border: 1px solid $color-
|
85
|
-
box-shadow: 0 0 6px $color-
|
84
|
+
border: 1px solid $color-searchbar_border_hover;
|
85
|
+
box-shadow: 0 0 6px $color-searchbar_shadow_hover;
|
86
86
|
}
|
87
87
|
|
88
88
|
.global-searchbar:focus {
|
89
89
|
outline: none;
|
90
|
-
border-color: $color-
|
91
|
-
box-shadow: 0 0 6px $color-
|
90
|
+
border-color: $color-searchbar_border_focus;
|
91
|
+
box-shadow: 0 0 6px $color-searchbar_shadow_focus;
|
92
92
|
transition: 0.25s;
|
93
93
|
}
|
94
94
|
|
@@ -106,18 +106,29 @@
|
|
106
106
|
}
|
107
107
|
|
108
108
|
.global-nav-link {
|
109
|
+
position: relative;
|
109
110
|
display: inline-block;
|
110
|
-
padding-top: 0.
|
111
|
-
|
111
|
+
padding-top: 0.15rem;
|
112
112
|
margin-right: 1.75rem;
|
113
113
|
|
114
|
-
border-bottom: 2px solid #f6bf5d;
|
115
|
-
|
116
114
|
font-size: $fontsize-small;
|
117
115
|
text-decoration: none;
|
118
116
|
text-transform: uppercase;
|
119
|
-
|
120
|
-
|
117
|
+
&::after {
|
118
|
+
content: ' ';
|
119
|
+
position: absolute;
|
120
|
+
top: 100%;
|
121
|
+
left: 25%;
|
122
|
+
|
123
|
+
width: 50%;
|
124
|
+
height: 1px;
|
125
|
+
border-bottom: 2px solid $color-global_nav_underline;
|
126
|
+
|
127
|
+
transition: 0.4s;
|
128
|
+
}
|
129
|
+
&:hover::after {
|
130
|
+
width: 100%;
|
131
|
+
left: 0;
|
121
132
|
}
|
122
133
|
}
|
123
134
|
|
data/_sass/partials/_search.scss
CHANGED
@@ -3,5 +3,17 @@
|
|
3
3
|
\*------------------------------------*/
|
4
4
|
|
5
5
|
#search-results dd {
|
6
|
-
|
6
|
+
}
|
7
|
+
|
8
|
+
.search_result {}
|
9
|
+
|
10
|
+
.search_result-details {
|
11
|
+
margin-bottom: 0;
|
12
|
+
margin-left: 1.75rem;
|
13
|
+
font-size: $fontsize-small;
|
14
|
+
text-transform: uppercase;
|
15
|
+
}
|
16
|
+
|
17
|
+
.search_result-preview {
|
18
|
+
margin-bottom: 1.75rem;
|
7
19
|
}
|
data/_sass/style.scss
CHANGED
@@ -2,17 +2,24 @@
|
|
2
2
|
# COLOUR SCHEME
|
3
3
|
\*------------------------------------*/
|
4
4
|
|
5
|
+
// neutrals
|
5
6
|
$color-paperlight: #fdfcfc; // off white
|
6
7
|
$color-paperdark: #fbf9f8;
|
7
8
|
$color-linen: #f6f2ef; // shortbread
|
9
|
+
$color-shortbread: #f9f6f4;//#f8f4f2;
|
8
10
|
$color-ink: #4b4a46; // dark umber
|
11
|
+
$color-inkwarm: #504b38;
|
12
|
+
$color-ink_faded: #828077;
|
13
|
+
|
14
|
+
// brights
|
9
15
|
$color-limeade: #e2edbf;
|
10
16
|
$color-pistachio: #f1f5e1;
|
11
17
|
$color-kiwi: #a7c854;
|
12
18
|
$color-melon: #f1a393;
|
13
19
|
$color-peach: #f7dcd3;
|
14
|
-
$color-
|
20
|
+
$color-mango: #f6bf5d;
|
15
21
|
|
22
|
+
// links
|
16
23
|
$color-bluelight: #4083ae;
|
17
24
|
$color-bluedark: #356d90;
|
18
25
|
$color-purple: #61609d;
|
@@ -21,19 +28,27 @@ $color-purple: #61609d;
|
|
21
28
|
# COLOUR SCHEME values
|
22
29
|
\*------------------------------------*/
|
23
30
|
|
31
|
+
// Colours that apply to the body of all pages.
|
24
32
|
$color-bodybg: $color-linen;
|
25
33
|
$color-contentbg: $color-paperlight;
|
26
|
-
$color-globalbg: $color-paperdark;
|
27
|
-
$color-globalborder: #f7f2ef;
|
28
34
|
|
35
|
+
// Global text and link colours.
|
29
36
|
$color-bodytext: $color-ink;
|
37
|
+
$color-h3: $color-ink_faded;
|
38
|
+
|
30
39
|
$color-link: $color-bluelight;
|
31
40
|
$color-linkhover: $color-bluedark;
|
32
41
|
$color-linkactive: $color-purple;
|
33
42
|
$color-linkvisited: $color-purple;
|
34
43
|
|
44
|
+
// Colours that apply to the global header and footer.
|
45
|
+
$color-globalbg: $color-paperdark;
|
46
|
+
$color-globalborder: $color-shortbread;
|
47
|
+
$color-global_nav_underline: $color-mango;
|
48
|
+
|
35
49
|
$color-globalsearchbar: $color-peach;
|
36
50
|
|
51
|
+
// Colours that apply to the index page or launchpad.
|
37
52
|
$color-launchpadsearch: $color-linen;
|
38
53
|
$color-launchpadborder: $color-linen;
|
39
54
|
$color-launchpadsearchbar: $color-melon;
|
@@ -41,9 +56,25 @@ $color-projectcard: $color-kiwi;
|
|
41
56
|
$color-projectborder: $color-linen;
|
42
57
|
$color-projecthover: $color-limeade;
|
43
58
|
|
59
|
+
// General searchbar colours.
|
60
|
+
$color-searchbar_border: $color-shortbread;
|
61
|
+
$color-searchbar_border_hover: $color-linen;
|
62
|
+
$color-searchbar_border_focus: $color-peach;
|
63
|
+
$color-searchbar_shadow_hover: $color-peach;
|
64
|
+
$color-searchbar_shadow_focus: $color-peach;
|
65
|
+
|
66
|
+
// Colours that apply only to collections pages.
|
67
|
+
$color-collections_sidebar: $color-paperdark;
|
68
|
+
$color-collections_header: $color-paperdark;
|
69
|
+
$color-collections_header_border: $color-shortbread;//#faf7f6;
|
70
|
+
|
71
|
+
// Colours that apply only to entry pages.
|
44
72
|
$color-articleborder: $color-linen;
|
73
|
+
$color-entry_secondary: $color-paperdark;
|
45
74
|
|
46
75
|
$color-searchbg: $color-paperlight;
|
47
76
|
$color-codebg: $color-pistachio;
|
48
77
|
$color-codetext: $color-inkwarm;
|
49
78
|
$color-hr: $color-linen;
|
79
|
+
|
80
|
+
$color-blockquoteborder: $color-linen;
|
data/assets/.DS_Store
ADDED
Binary file
|
data/assets/js/search.js
CHANGED
@@ -1,36 +1,39 @@
|
|
1
1
|
// Yoinked in its entirety from https://davidwalsh.name/adding-search-to-your-site-with-javascript
|
2
2
|
|
3
3
|
var searchIndex = lunr(function() {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
4
|
+
// define searchable fields for each page
|
5
|
+
this.ref("id");
|
6
|
+
this.field("title", { boost: 10 });
|
7
|
+
this.field("content");
|
8
|
+
this.field("portal");
|
9
|
+
this.field("categories");
|
10
|
+
for (var key in window.pages) {
|
11
|
+
this.add({
|
12
|
+
"id": key,
|
13
|
+
"title": pages[key].title,
|
14
|
+
"content": pages[key].content
|
15
|
+
});
|
16
|
+
}
|
14
17
|
});
|
15
18
|
|
16
19
|
|
17
20
|
|
18
21
|
function getQueryVariable(variable) {
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
+
var query = window.location.search.substring(1);
|
23
|
+
var vars = query.split("&");
|
24
|
+
for (var i = 0; i < vars.length; i++) {
|
22
25
|
var pair = vars[i].split("=");
|
23
26
|
if (pair[0] === variable) {
|
24
|
-
|
27
|
+
return decodeURIComponent(pair[1].replace(/\+/g, "%20"));
|
25
28
|
}
|
26
|
-
|
29
|
+
}
|
27
30
|
}
|
28
31
|
|
29
32
|
var searchTerm = getQueryVariable("q");
|
30
33
|
// creation of searchIndex from earlier example
|
31
34
|
var results = searchIndex.search(searchTerm);
|
32
35
|
var resultPages = results.map(function (match) {
|
33
|
-
|
36
|
+
return pages[match.ref];
|
34
37
|
});
|
35
38
|
|
36
39
|
|
@@ -39,9 +42,9 @@ var resultPages = results.map(function (match) {
|
|
39
42
|
// resultPages from previous example
|
40
43
|
resultsString = "";
|
41
44
|
resultPages.forEach(function (r) {
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
45
|
+
resultsString += "<dt class='search_result'>";
|
46
|
+
resultsString += "<a href='" + r.url + "'>" + r.title + "</a>";
|
47
|
+
resultsString += "<span class='search_result-details'>" + r.portal + " ⋅ " + r.categories + "</span></dt>"
|
48
|
+
resultsString += "<dd class='search_result-preview'>" + r.content.substring(0, 200) + "..." + "</dd>";
|
46
49
|
});
|
47
50
|
document.querySelector("#search-results").innerHTML = resultsString;
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-theme-paperwiki
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pomeloshark
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-01-
|
11
|
+
date: 2023-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -36,9 +36,12 @@ files:
|
|
36
36
|
- _data/navigation.yml
|
37
37
|
- _includes/collections_header.html
|
38
38
|
- _includes/collections_sidebar.html
|
39
|
+
- _includes/entry_tags.html
|
39
40
|
- _includes/global_footer.html
|
40
41
|
- _includes/global_head.html
|
41
42
|
- _includes/global_header.html
|
43
|
+
- _includes/search_results.html
|
44
|
+
- _includes/wiki_sidebar.html
|
42
45
|
- _layouts/collections.html
|
43
46
|
- _layouts/default.html
|
44
47
|
- _layouts/entry.html
|
@@ -48,20 +51,29 @@ files:
|
|
48
51
|
- _layouts/portal.html
|
49
52
|
- _layouts/post.html
|
50
53
|
- _layouts/reference_desk.html
|
54
|
+
- _layouts/search.html
|
51
55
|
- _layouts/wiki.html
|
52
56
|
- _layouts/work.html
|
57
|
+
- _plugins/blockquote.rb
|
58
|
+
- _plugins/gloss.rb
|
59
|
+
- _plugins/interlinear.rb
|
60
|
+
- _plugins/ipa.rb
|
61
|
+
- _plugins/lang.rb
|
62
|
+
- _plugins/sidenote.rb
|
53
63
|
- _sass/partials/_base.scss
|
54
64
|
- _sass/partials/_blog.scss
|
55
65
|
- _sass/partials/_collections.scss
|
56
66
|
- _sass/partials/_entries.scss
|
57
67
|
- _sass/partials/_global.scss
|
58
68
|
- _sass/partials/_glossing.scss
|
69
|
+
- _sass/partials/_languages.scss
|
59
70
|
- _sass/partials/_launchpad.scss
|
60
71
|
- _sass/partials/_page.scss
|
61
72
|
- _sass/partials/_search.scss
|
62
73
|
- _sass/style.scss
|
63
74
|
- _sass/variables/_colors.scss
|
64
75
|
- _sass/variables/_fonts.scss
|
76
|
+
- assets/.DS_Store
|
65
77
|
- assets/css/style.scss
|
66
78
|
- assets/fonts/Inter/.DS_Store
|
67
79
|
- assets/fonts/Inter/Inter-Bold.otf
|