jekyll-theme-paperwiki 0.1.4 → 0.1.6

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.
@@ -15,94 +15,53 @@
15
15
  padding: 56px 0;
16
16
  }
17
17
 
18
+ // The section containing the search form.
18
19
  .launchpad-search {
19
20
  grid-column: span 12 / auto;
20
21
 
21
22
  padding: 36px 44px;
22
23
 
23
- background-color: $color-launchpadsearch;
24
- border: 1px solid #f0eae7;
24
+ background-color: $color-launchpad_search;
25
+ border: 1px solid $color-launchpad_search_border;
25
26
  border-radius: 1.5rem;
26
27
  }
27
28
 
28
- .launchpad-searchbar {
29
- width: 60%;
30
- padding: 12px 16px;
31
-
32
- border: 1px solid transparent;
33
- border-radius: 1rem;
34
-
35
- font-size: $fontsize-body;
36
-
37
- transition: 0.25s;
38
- appearance: none;
39
- outline: none;
40
- }
41
-
42
- .launchpad-searchbar:hover {
43
- border: 1px solid $color-launchpadsearch;
44
- box-shadow: 0 0 6px $color-globalsearchbar;
45
- }
46
-
47
- .launchpad-searchbar:focus {
48
- outline: none;
49
- border-color: $color-globalsearchbar;
50
- box-shadow: 0 0 6px $color-globalsearchbar;
51
- transition: 0.25s;
52
- }
53
-
29
+ // The elements within the search form itself.
54
30
  .launchpad-search label {
55
- font-family: $font-serif;
31
+ font-family: $fontfamily-header;
56
32
  font-size: $fontsize-larger;
57
33
  }
58
34
 
59
- .launchpad-search_select {
60
- padding: 16px 16px 17px 16px;
35
+ .launchpad-searchbar {
36
+ width: 60%;
37
+ padding: 12px 16px;
61
38
 
62
- border: 1px solid transparent;
63
39
  border-radius: 1rem;
64
40
 
65
- background-color: $color-globalsearchbar;
66
-
67
41
  font-size: $fontsize-body;
68
-
69
- transition: 0.25s;
70
- // appearance: none;
71
- }
72
-
73
- .launchpad-search_select:hover {
74
- border: 1px solid $color-launchpadsearch;
75
- box-shadow: 0 0 6px $color-globalsearchbar;
76
- }
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
42
  }
84
43
 
85
44
  .launchpad-search_submit {
86
45
  padding: 12px 20px;
46
+ appearance: none;
47
+ outline: none;
87
48
 
88
- background: $color-launchpadsearchbar;
89
- border: 1px solid transparent;
49
+ background: $color-launchpad_search_submit;
50
+ border: 0;
90
51
  border-radius: 1rem;
91
52
 
92
53
  font-size: $fontsize-body;
93
- }
94
54
 
95
- .launchpad-search_submit:hover {
96
- border: 1px solid $color-launchpadsearch;
97
- box-shadow: 0 0 6px $color-globalsearchbar;
98
- transition: 0.25s;
99
- }
55
+ transition: $transition;
100
56
 
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;
57
+ &:hover {
58
+ box-shadow: 0 0 7px $color-launchpad_search_submit_hover;
59
+ transition: $transition;
60
+ }
61
+ &:focus {
62
+ box-shadow: 0 0 7px $color-launchpad_search_submit_focus;
63
+ transition: $transition;
64
+ }
106
65
  }
107
66
 
108
67
  .launchpad-projects {
@@ -125,50 +84,55 @@
125
84
  padding: 36px 28px 28px;
126
85
 
127
86
  border-radius: 1.5rem;
128
- border: 1px solid $color-projectborder;
87
+ border: 1px solid $color-project_card_border;
129
88
 
130
89
  text-decoration: none;
131
- color: $color-bodytext;
90
+ color: $color-body_text;
91
+
92
+ transition: $transition;
132
93
 
133
94
  header {
134
- margin-top: 16px;
95
+ margin-top: 1rem;
135
96
 
136
97
  font-family: $fontfamily-header;
137
98
  font-size: $fontsize-med;
138
99
  }
139
100
 
140
101
  .project-icon {
141
- padding: 16px;
102
+ padding: 1rem;
142
103
 
143
104
  border-radius: 3rem;
144
- background-color: $color-projectcard;
105
+ background-color: $color-project_card_icon;
145
106
 
146
107
  color: #ffffff;
147
108
  font-size: $fontsize-med;
148
109
 
149
- transition: 0.2s;
110
+ transition: $transition;
150
111
  }
151
112
  }
152
113
 
153
114
  .launchpad-card:link {
154
- color: $color-bodytext;
115
+ color: $color-body_text;
155
116
  }
156
117
 
157
118
  .launchpad-card:hover {
158
119
  border: 1px solid transparent;
159
- box-shadow: 0 0 6px $color-projectborder;
120
+ box-shadow: 0 0 6px $color-project_card_hover_shadow;
121
+
122
+ transition: $transition;
123
+
160
124
  .project-icon {
161
- background-color: $color-projecthover;
125
+ background-color: $color-project_card_icon_hover;
162
126
 
163
- color: $color-projectcard;
127
+ color: $color-project_card_icon;
164
128
 
165
- transition: 0.2s;
129
+ transition: $transition;
166
130
  }
167
- color: $color-bodytext;
131
+ color: $color-body_text;
168
132
  }
169
133
 
170
134
  .launchpad-card:visited {
171
- color: $color-bodytext;
135
+ color: $color-body_text;
172
136
  }
173
137
 
174
138
 
@@ -178,20 +142,22 @@
178
142
  \*------------------------------------*/
179
143
 
180
144
  .launchpad-card_wiki {
181
- background-color: $color-projecthover;
145
+ background-color: $color-wiki_card_background;
182
146
  border-radius: 1.5rem;
183
- border: 1px solid $color-projecthover;
147
+ border: 1px solid $color-wiki_card_border;
184
148
  }
185
149
 
186
150
  .launchpad-card_wiki:hover {
187
- background-color: $color-projecthover;
151
+ border: 1px solid transparent;
152
+ box-shadow: 0 0 6px $color-wiki_card_hover_shadow;
153
+
154
+ transition: $transition;
188
155
 
189
- color: $color-projectcard;
190
156
  .project-icon {
191
- background-color: $color-paperlight;
157
+ background-color: $color-paper_light;
192
158
 
193
- color: $color-projectcard;
159
+ color: $color-project_card_icon;
194
160
 
195
- transition: 0.2s;
161
+ transition: $transition;
196
162
  }
197
163
  }
@@ -3,5 +3,17 @@
3
3
  \*------------------------------------*/
4
4
 
5
5
  #search-results dd {
6
- margin-bottom: 1.75em;
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
@@ -1,6 +1,7 @@
1
1
  /* The variables directory contains any SCSS that doesn't create any actual CSS output. */
2
2
  @import "variables/colors";
3
3
  @import "variables/fonts";
4
+ @import "variables/misc";
4
5
 
5
6
  /* Partials are all the components of a webpage broken down into manageable chunks. Organized by page type (i.e. templates for wiki pages, grammars, etc). */
6
7
  @import "partials/base";
@@ -11,4 +12,5 @@
11
12
  @import "partials/entries";
12
13
  @import "partials/search";
13
14
  @import "partials/blog";
15
+ @import "partials/languages";
14
16
  @import "partials/glossing";
@@ -2,48 +2,101 @@
2
2
  # COLOUR SCHEME
3
3
  \*------------------------------------*/
4
4
 
5
- $color-paperlight: #fdfcfc; // off white
6
- $color-paperdark: #fbf9f8;
5
+ // neutrals
6
+ $color-paper_light: #fdfcfc; // off white
7
+ $color-paper_dark: #fbf9f8;
7
8
  $color-linen: #f6f2ef; // shortbread
9
+ $color-shortbread: #f9f6f4;//#f8f4f2;
10
+ $color-shortbread_dark: #f3efec;
8
11
  $color-ink: #4b4a46; // dark umber
12
+ $color-ink_warm: #504b38;
13
+ $color-ink_faded: #828077;
14
+
15
+ // brights
9
16
  $color-limeade: #e2edbf;
10
17
  $color-pistachio: #f1f5e1;
11
18
  $color-kiwi: #a7c854;
12
19
  $color-melon: #f1a393;
13
20
  $color-peach: #f7dcd3;
14
- $color-inkwarm: #504b38;
21
+ $color-mango: #f6bf5d;
15
22
 
16
- $color-bluelight: #4083ae;
17
- $color-bluedark: #356d90;
23
+ // links
24
+ $color-blue_light: #4083ae;
25
+ $color-blue_dark: #356d90;
18
26
  $color-purple: #61609d;
19
27
 
20
28
  /*------------------------------------*\
21
29
  # COLOUR SCHEME values
22
30
  \*------------------------------------*/
23
31
 
24
- $color-bodybg: $color-linen;
25
- $color-contentbg: $color-paperlight;
26
- $color-globalbg: $color-paperdark;
27
- $color-globalborder: #f7f2ef;
28
-
29
- $color-bodytext: $color-ink;
30
- $color-link: $color-bluelight;
31
- $color-linkhover: $color-bluedark;
32
- $color-linkactive: $color-purple;
33
- $color-linkvisited: $color-purple;
32
+ // Colours that apply to the body of all pages.
33
+ $color-body_background: $color-linen;
34
+ $color-content_background: $color-paper_light;
34
35
 
35
- $color-globalsearchbar: $color-peach;
36
+ // Global text and link colours.
37
+ $color-body_text: $color-ink;
38
+ $color-h3: $color-ink_faded;
36
39
 
37
- $color-launchpadsearch: $color-linen;
38
- $color-launchpadborder: $color-linen;
39
- $color-launchpadsearchbar: $color-melon;
40
- $color-projectcard: $color-kiwi;
41
- $color-projectborder: $color-linen;
42
- $color-projecthover: $color-limeade;
40
+ $color-link: $color-blue_light;
41
+ $color-link_hover: $color-blue_dark;
42
+ $color-link_active: $color-purple;
43
+ $color-link_visited: $color-purple;
43
44
 
44
- $color-articleborder: $color-linen;
45
+ // General searchbar colours.
46
+ $color-searchbar_background: $color-paper_light;
47
+ $color-searchbar_border: $color-shortbread_dark;
48
+ $color-searchbar_border_hover: $color-linen;
49
+ $color-searchbar_border_focus: $color-peach;
50
+ $color-searchbar_shadow_hover: $color-peach;
51
+ $color-searchbar_shadow_focus: $color-peach;
45
52
 
46
- $color-searchbg: $color-paperlight;
47
- $color-codebg: $color-pistachio;
48
- $color-codetext: $color-inkwarm;
53
+ $color-code_background: $color-pistachio;
54
+ $color-code_text: $color-ink_warm;
49
55
  $color-hr: $color-linen;
56
+
57
+ $color-kbd_background: $color-paper_light;
58
+ $color-kbd_border: $color-linen;
59
+ $color-kbd_box_shadow: $color-linen;
60
+ $color-kbd_hover: $color-linen;
61
+
62
+ $color-blockquote_background: $color-paper_dark;
63
+ $color-blockquote_border: $color-shortbread;
64
+
65
+ /*------------------------------------*\
66
+ # COLOUR SCHEME values
67
+ # page- or section-specific
68
+ \*------------------------------------*/
69
+
70
+ // Colours that apply to the global header and footer.
71
+ $color-global_background: $color-paper_dark;
72
+ $color-global_border: $color-shortbread;
73
+ $color-global_nav_underline: $color-mango;
74
+
75
+ // Colours that apply to the index page or launchpad.
76
+ $color-launchpad_search: $color-linen;
77
+ $color-launchpad_search_border: $color-shortbread_dark;
78
+ $color-launchpad_search_submit: $color-melon;
79
+ $color-launchpad_search_submit_hover: $color-melon;
80
+ $color-launchpad_search_submit_focus: $color-melon;
81
+
82
+ $color-project_card_icon: $color-kiwi;
83
+ $color-project_card_border: $color-linen;
84
+ $color-project_card_hover_shadow: $color-linen;
85
+ $color-project_card_icon_hover: $color-limeade;
86
+
87
+ $color-wiki_card_background: $color-limeade;
88
+ $color-wiki_card_border: $color-limeade;
89
+ $color-wiki_card_hover_shadow: $color-limeade;
90
+
91
+ // Colours that apply only to collections pages.
92
+ $color-collections_sidebar: $color-paper_dark;
93
+ $color-collections_sidebar_border: $color-shortbread;
94
+ $color-collections_header: $color-paper_dark;
95
+ $color-collections_header_border: $color-shortbread;
96
+
97
+ $color-portal_card_border: $color-linen;
98
+ $color-portal_card_icon_hover: $color-kiwi;
99
+
100
+ // Colours that apply only to entry pages.
101
+ $color-article_border: $color-linen;
102
+ $color-entry_secondary: $color-paper_dark;
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
- this.ref("id");
5
- this.field("title", { boost: 10 });
6
- this.field("content");
7
- for (var key in window.pages) {
8
- this.add({
9
- "id": key,
10
- "title": pages[key].title,
11
- "content": pages[key].content
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
- var query = window.location.search.substring(1);
20
- var vars = query.split("&");
21
- for (var i = 0; i < vars.length; i++) {
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
- return decodeURIComponent(pair[1].replace(/\+/g, "%20"));
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
- return pages[match.ref];
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
- resultsString += "<dt>";
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
+ 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
4
+ version: 0.1.6
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-04 00:00:00.000000000 Z
11
+ date: 2023-01-14 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