jekyll-theme-paperwiki 0.1.1 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,24 @@
1
+ ---
2
+ permalink: /wiki:search
3
+ title: Search results
4
+ ---
5
+
6
+ <h1>{{ page.title }}</h1>
7
+
8
+ <dl id="search-results"></dl>
9
+
10
+ <script>
11
+ window.pages = {
12
+ {% for page in site.wiki %}
13
+ "{{ page.url | slugify }}": {
14
+ "title": "{{ page.title | xml_escape }}",
15
+ "content": {{ page.content | markdownify | strip_newlines | strip_html | jsonify }},
16
+ "url": "{{ site.url | append: page.url | xml_escape }}",
17
+ "path": "{{ page.url | xml_escape }}"
18
+ }{% unless forloop.last %},{% endunless %}
19
+ {% endfor %}
20
+ };
21
+ </script>
22
+
23
+ <script src="/assets/js/lunr.js"></script>
24
+ <script src="/assets/js/search.js"></script>
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 "<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>"
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,24 @@
1
+ module Jekyll
2
+ module Tags
3
+ class InterlinearGlossTag < Liquid::Block
4
+
5
+ require "shellwords"
6
+
7
+ # 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
8
+ def initialize(tag_name, text, tokens)
9
+ super
10
+ # @text = text.shellsplit
11
+ # @wordcount = @text[0].length
12
+ # object_lang, morphemic_analysis, morphemic_gloss, target_lang
13
+ end
14
+
15
+ def render(context)
16
+ # "<table class=\"interlinear-gloss\"><tbody><tr><td colspan=\"7\">#{@text[0]}</td></tr>" + "<tr><td>#{@text[1]}</td></tr></tbody></table>"
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 [interlinear], and the class that implements it [InterlinearGlossTag].
24
+ Liquid::Template.register_tag('interlinear', Jekyll::Tags::InterlinearGlossTag)
@@ -17,6 +17,8 @@
17
17
  }
18
18
  }
19
19
 
20
+
21
+
20
22
  .collections-content {
21
23
  grid-column: span 10 / auto;
22
24
 
@@ -35,6 +37,55 @@
35
37
  }
36
38
  }
37
39
 
40
+
41
+
42
+ .collections-header {
43
+ display: flex;
44
+ align-items: center;
45
+ justify-content: space-between;
46
+
47
+ padding: 1.5rem;
48
+ margin-bottom: 1rem;
49
+
50
+ background-color: $color-paperdark;
51
+ border: 1px solid #faf7f6;
52
+ border-radius: 1.5rem;
53
+ }
54
+
55
+ .collections-stats {
56
+ }
57
+
58
+ .collections-search {
59
+ }
60
+
61
+ .collections-searchbar {
62
+ width: 100%;
63
+ padding: 12px 16px;
64
+
65
+ border: 1px solid transparent;
66
+ border-radius: 1rem;
67
+
68
+ font-size: $fontsize-body;
69
+
70
+ transition: 0.25s;
71
+ appearance: none;
72
+ outline: none;
73
+ }
74
+
75
+ .collections-searchbar:hover {
76
+ border: 1px solid $color-launchpadsearch;
77
+ box-shadow: 0 0 6px $color-globalsearchbar;
78
+ }
79
+
80
+ .collections-searchbar:focus {
81
+ outline: none;
82
+ border-color: $color-globalsearchbar;
83
+ box-shadow: 0 0 6px $color-globalsearchbar;
84
+ transition: 0.25s;
85
+ }
86
+
87
+
88
+
38
89
  .reference-desk {
39
90
  display: grid;
40
91
  grid-template-columns: repeat(12, 1fr);
@@ -102,6 +153,8 @@
102
153
  }
103
154
 
104
155
  .collections-portal_card:hover {
156
+ border: 1px solid transparent;
157
+ box-shadow: 0 0 6px $color-projectborder;
105
158
  .portal-icon {
106
159
  color: $color-projectcard;
107
160
 
@@ -68,6 +68,21 @@
68
68
 
69
69
  .entry-summary {}
70
70
 
71
+ .entry-other_projects {
72
+ padding: 1rem;
73
+ margin: 1em 0;
74
+ border-radius: 1em;
75
+ background-color: #f9f7f6;
76
+ font-size: $fontsize-small;
77
+
78
+ ul {
79
+ list-style: none;
80
+ margin-left: 1rem;
81
+ padding: 0;
82
+ margin-bottom: 0;
83
+ }
84
+ }
85
+
71
86
  .entry-quickstats {
72
87
  grid-column: span 3 / auto;
73
88
  padding: 0.5em;
@@ -104,33 +119,60 @@
104
119
 
105
120
  .entry-tags {
106
121
  margin-bottom: 2em;
122
+ padding: 1rem;
123
+ border-radius: 1em;
124
+ background-color: #f9f7f6;
107
125
  font-size: $fontsize-small;
108
126
  text-transform: uppercase;
109
127
 
110
- ul {
111
- display: inline-flex;
112
- flex-wrap: wrap;
113
- list-style-type: none;
114
- margin: 0 1em 0 0;
115
- // border: 1px solid pink;
128
+ a {
129
+ text-decoration: none;
116
130
  }
131
+ }
117
132
 
118
- ul ul {
119
- display: inline-flex;
120
- flex-wrap: wrap;
121
- margin-right: .5em;
122
- // border: 1px solid pink;
123
- }
133
+ .entry-subhead_pair {
134
+ display: inline;
135
+ margin-right: 1em;
136
+ }
124
137
 
125
- li {
126
- // display: inline-flex;
127
- // flex-wrap: wrap;
128
- padding-right: .5em;
129
- // border: 1px solid pink;
130
- color: #9f9b97;
131
- }
138
+ .entry-subhead_key,
139
+ .entry-subhead_value {
140
+ display: inline;
141
+ }
132
142
 
133
- a {
134
- text-decoration: none;
143
+ .entry-subhead_key {
144
+ margin-right: 0.4em;
145
+ }
146
+
147
+ .entry-subhead_value {
148
+ margin-right: 0.9em;
149
+ }
150
+
151
+
152
+
153
+ a.footnote {
154
+ text-decoration: none;
155
+ }
156
+ a.footnote::before {
157
+ content: "[";
158
+ }
159
+ a.footnote::after {
160
+ content: "]";
161
+ }
162
+
163
+ .footnotes {
164
+ // grid-column: span 7 / auto;
165
+
166
+ padding: 1rem;
167
+ border-radius: 1em;
168
+ background-color: #f9f7f6;
169
+ font-size: $fontsize-small;
170
+ ol {
171
+ padding-left: 1rem;
172
+ margin: 0;
173
+ li {
174
+ margin: 0;
175
+ padding: 0;
176
+ }
135
177
  }
136
178
  }
@@ -62,16 +62,18 @@
62
62
  }
63
63
 
64
64
  .global-search {
65
- padding-bottom: 4px;
66
- // border-bottom: 1px solid $color-bodytext;
65
+ padding-bottom: 2px;
67
66
  }
68
67
 
69
68
  .global-searchbar {
70
- padding: 0 0.5em;
71
- border: 1px solid #f5f2ef;
69
+ padding: 0.2rem 1rem;
70
+ border: 1px solid transparent;
72
71
  border-radius: 8px;
73
72
  font-size: $fontsize-small;
74
73
  transition: 0.25s;
74
+ appearance: none;
75
+ outline: none;
76
+ line-height: 2rem;
75
77
  }
76
78
 
77
79
  .global-searchbar::placeholder {
@@ -79,13 +81,14 @@
79
81
  }
80
82
 
81
83
  .global-searchbar:hover {
82
- border: 1px solid $color-globalsearchbar;
84
+ border: 1px solid $color-launchpadsearch;
85
+ box-shadow: 0 0 6px $color-globalsearchbar;
83
86
  }
84
87
 
85
88
  .global-searchbar:focus {
86
89
  outline: none;
87
90
  border-color: $color-globalsearchbar;
88
- box-shadow: 0 0 10px $color-globalsearchbar;
91
+ box-shadow: 0 0 6px $color-globalsearchbar;
89
92
  transition: 0.25s;
90
93
  }
91
94
 
@@ -104,12 +107,18 @@
104
107
 
105
108
  .global-nav-link {
106
109
  display: inline-block;
110
+ padding-top: 0.3rem;
107
111
 
108
112
  margin-right: 1.75rem;
109
113
 
114
+ border-bottom: 2px solid #f6bf5d;
115
+
110
116
  font-size: $fontsize-small;
111
117
  text-decoration: none;
112
118
  text-transform: uppercase;
119
+ &:hover {
120
+ opacity: 0.75;
121
+ }
113
122
  }
114
123
 
115
124
  .global-nav-link:visited {
@@ -26,26 +26,28 @@
26
26
  }
27
27
 
28
28
  .launchpad-searchbar {
29
- width: 40%;
30
-
29
+ width: 60%;
31
30
  padding: 12px 16px;
32
31
 
32
+ border: 1px solid transparent;
33
33
  border-radius: 1rem;
34
- border: 1px solid $color-launchpadsearchbar;
35
34
 
36
35
  font-size: $fontsize-body;
37
36
 
38
37
  transition: 0.25s;
38
+ appearance: none;
39
+ outline: none;
39
40
  }
40
41
 
41
- .launchpad-searchbar::placeholder {
42
- color: #f5a79d;
42
+ .launchpad-searchbar:hover {
43
+ border: 1px solid $color-launchpadsearch;
44
+ box-shadow: 0 0 6px $color-globalsearchbar;
43
45
  }
44
46
 
45
47
  .launchpad-searchbar:focus {
46
48
  outline: none;
47
- border-color: $color-launchpadsearchbar;
48
- box-shadow: 0 0 10px $color-launchpadsearchbar;
49
+ border-color: $color-globalsearchbar;
50
+ box-shadow: 0 0 6px $color-globalsearchbar;
49
51
  transition: 0.25s;
50
52
  }
51
53
 
@@ -54,63 +56,70 @@
54
56
  font-size: $fontsize-larger;
55
57
  }
56
58
 
57
- .launchpad-search_submit {
58
- padding: 12px 20px;
59
+ .launchpad-search_select {
60
+ padding: 16px 16px 17px 16px;
59
61
 
60
- background: $color-launchpadsearchbar;
61
- border: 1px solid $color-launchpadsearchbar;
62
+ border: 1px solid transparent;
62
63
  border-radius: 1rem;
63
64
 
64
- font-size: $fontsize-body;
65
- }
65
+ background-color: $color-globalsearchbar;
66
66
 
67
- .launchpad-projects {
68
- grid-column: span 12 / auto;
67
+ font-size: $fontsize-body;
69
68
 
70
- display: grid;
71
- grid-template-columns: repeat(12, 1fr);
72
- grid-gap: 32px;
69
+ transition: 0.25s;
70
+ // appearance: none;
73
71
  }
74
72
 
73
+ .launchpad-search_select:hover {
74
+ border: 1px solid $color-launchpadsearch;
75
+ box-shadow: 0 0 6px $color-globalsearchbar;
76
+ }
75
77
 
78
+ .launchpad-search_select:focus {
79
+ outline: none;
80
+ border-color: $color-globalsearchbar;
81
+ box-shadow: 0 0 6px $color-globalsearchbar;
82
+ transition: 0.25s;
83
+ }
76
84
 
77
- /*------------------------------------*\
78
- # !IF ONLY ONE PROJECT IS SHOWN
79
- \*------------------------------------*/
80
-
81
- .launchpad-wiki_card {
82
- grid-column: span 12 / auto;
83
- padding: 28px;
85
+ .launchpad-search_submit {
86
+ padding: 12px 20px;
84
87
 
85
- background-color: $color-projecthover;
86
- border-radius: 1.5rem;
87
- border: 1px solid $color-projectborder;
88
+ background: $color-launchpadsearchbar;
89
+ border: 1px solid transparent;
90
+ border-radius: 1rem;
88
91
 
89
- text-decoration: none;
90
- color: $color-bodytext;
92
+ font-size: $fontsize-body;
91
93
  }
92
94
 
93
- .launchpad-wiki_card:link {
94
- color: $color-bodytext;
95
+ .launchpad-search_submit:hover {
96
+ border: 1px solid $color-launchpadsearch;
97
+ box-shadow: 0 0 6px $color-globalsearchbar;
98
+ transition: 0.25s;
95
99
  }
96
100
 
97
- .launchpad-wiki_card:hover {
98
- background-color: $color-projecthover;
101
+ .launchpad-search_submit:focus {
102
+ outline: none;
103
+ border-color: $color-globalsearchbar;
104
+ box-shadow: 0 0 6px $color-globalsearchbar;
105
+ transition: 0.25s;
106
+ }
99
107
 
100
- color: $color-projectcard;
108
+ .launchpad-projects {
109
+ grid-column: span 12 / auto;
101
110
 
102
- transition: 0.2s;
111
+ display: grid;
112
+ grid-template-columns: repeat(12, 1fr);
113
+ grid-gap: 32px;
103
114
  }
104
115
 
105
- .launchpad-project_card:visited {
106
- color: $color-bodytext;
107
- }
116
+
108
117
 
109
118
  /*------------------------------------*\
110
119
  # !IF MULTIPLE PROJECTS ARE SHOWN
111
120
  \*------------------------------------*/
112
121
 
113
- .launchpad-project_card {
122
+ .launchpad-card {
114
123
  grid-column: span 4 / auto;
115
124
 
116
125
  padding: 36px 28px 28px;
@@ -141,11 +150,13 @@
141
150
  }
142
151
  }
143
152
 
144
- .launchpad-project_card:link {
153
+ .launchpad-card:link {
145
154
  color: $color-bodytext;
146
155
  }
147
156
 
148
- .launchpad-project_card:hover {
157
+ .launchpad-card:hover {
158
+ border: 1px solid transparent;
159
+ box-shadow: 0 0 6px $color-projectborder;
149
160
  .project-icon {
150
161
  background-color: $color-projecthover;
151
162
 
@@ -156,6 +167,31 @@
156
167
  color: $color-bodytext;
157
168
  }
158
169
 
159
- .launchpad-project_card:visited {
170
+ .launchpad-card:visited {
160
171
  color: $color-bodytext;
161
172
  }
173
+
174
+
175
+
176
+ /*------------------------------------*\
177
+ # !IF ONLY ONE PROJECT IS SHOWN
178
+ \*------------------------------------*/
179
+
180
+ .launchpad-card_wiki {
181
+ background-color: $color-projecthover;
182
+ border-radius: 1.5rem;
183
+ border: 1px solid $color-projecthover;
184
+ }
185
+
186
+ .launchpad-card_wiki:hover {
187
+ background-color: $color-projecthover;
188
+
189
+ color: $color-projectcard;
190
+ .project-icon {
191
+ background-color: $color-paperlight;
192
+
193
+ color: $color-projectcard;
194
+
195
+ transition: 0.2s;
196
+ }
197
+ }
Binary file
data/assets/js/search.js CHANGED
@@ -40,7 +40,8 @@ var resultPages = results.map(function (match) {
40
40
  resultsString = "";
41
41
  resultPages.forEach(function (r) {
42
42
  resultsString += "<dt>";
43
- resultsString += "<a class='result' href='" + r.url + "'>" + r.title + "</a></dt>";
44
- resultsString += "<dd>" + r.content.substring(0, 200) + "..." + "</dd>";
43
+ resultsString += "<a class='result' href='" + r.url + "'>" + r.title + "</a></dt>";
44
+ // resultsString += "<dd><a href='/" + r.collection + "'>" + r.collection + "</a>";
45
+ resultsString += "<dd>" + r.content.substring(0, 200) + "..." + "</dd>";
45
46
  });
46
47
  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.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - pomeloshark
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-27 00:00:00.000000000 Z
11
+ date: 2023-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -35,13 +35,14 @@ files:
35
35
  - README.md
36
36
  - _config.yml
37
37
  - _data/navigation.yml
38
+ - _includes/collections_header.html
38
39
  - _includes/collections_sidebar.html
39
40
  - _includes/global_footer.html
40
41
  - _includes/global_head.html
41
42
  - _includes/global_header.html
42
- - _layouts/_dictionary.html
43
43
  - _layouts/collections.html
44
44
  - _layouts/default.html
45
+ - _layouts/entry.html
45
46
  - _layouts/grammar.html
46
47
  - _layouts/launchpad.html
47
48
  - _layouts/page.html
@@ -50,9 +51,15 @@ files:
50
51
  - _layouts/reference_desk.html
51
52
  - _layouts/wiki.html
52
53
  - _layouts/work.html
53
- - _pages/blog.md
54
+ - _pages/random.html
54
55
  - _pages/search.md
55
- - _pages/wiki.md
56
+ - _pages/wiki/wiki.md
57
+ - _pages/wiki/wiki_all.md
58
+ - _pages/wiki/wiki_contents.md
59
+ - _pages/wiki/wiki_random.md
60
+ - _pages/wiki/wiki_search.md
61
+ - _plugins/gloss.rb
62
+ - _plugins/interlinear.rb
56
63
  - _plugins/ipa.rb
57
64
  - _plugins/lang.rb
58
65
  - _sass/partials/_base.scss
@@ -68,7 +75,6 @@ files:
68
75
  - _sass/variables/_colors.scss
69
76
  - _sass/variables/_fonts.scss
70
77
  - assets/css/style.scss
71
- - assets/fonts/.DS_Store
72
78
  - assets/fonts/Inter/.DS_Store
73
79
  - assets/fonts/Inter/Inter-Bold.otf
74
80
  - assets/fonts/Inter/Inter-Bold.woff
@@ -106,7 +112,6 @@ files:
106
112
  - assets/fonts/RemixIcon/remixicon.woff
107
113
  - assets/fonts/RemixIcon/remixicon.woff2
108
114
  - assets/images/favicon.png
109
- - assets/js/list.js
110
115
  - assets/js/lunr.js
111
116
  - assets/js/search.js
112
117
  - assets/js/toc.js
@@ -1,10 +0,0 @@
1
- <!---No front matter bc this is a work in progress lol--->
2
-
3
- <dl>
4
- {% for item in site.data.lexicon %}
5
- <dt>{{ item.term }}</dt>
6
- <dd>{{ item.def }}</dd>
7
- {% endfor %}
8
- </dl>
9
-
10
- <!---Idk if it's possible to set a template that can retrieve the name of the correct file from the url or if I'm just gonna have to do them all individually--->
data/_pages/blog.md DELETED
@@ -1,13 +0,0 @@
1
- ---
2
- permalink: /blog
3
- ---
4
-
5
- <h1>Latest posts</h1>
6
-
7
- <ul class="blog-list">
8
- {% for post in site.posts %}
9
- <li class="blog-entry">
10
- <h2><a href="{{ post.url }}">{{ post.title }}</a></h2>
11
- </li>
12
- {% endfor %}
13
- </ul>
Binary file