styless 1.0.0 → 1.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c04e614c874df07339624470daaf3d44161544ad4fe4a1beec8aacd437e8efb9
4
- data.tar.gz: 3c0008e71888cf674ba155301cdd00ec7b293e18d322ccf544cd14c2a3580e77
3
+ metadata.gz: 9cd9570825177ddf137a46b5f343de819174140157fcdb85072d3105495d0b9f
4
+ data.tar.gz: 97801d15d54e0e6b00cba53e8aa3ebc6fc827dd5a2659826e73883519a6f4025
5
5
  SHA512:
6
- metadata.gz: b8034249cb597822b2db3ebd76b95d8e8e8db94ac5186f7c027ee137198d9fd2d42f3b1247c760ec4afc1cd5faab6c0ba39bffb06c6a73acb7fba47cf957834b
7
- data.tar.gz: aa385879978750e24aacdc036385b8426564ff106f3d8205bfe3b1f43e9a1fd086aa73e7e2d566ce647865cf550cd56547e53e15bb24f131935f0fa4c6475648
6
+ metadata.gz: 88da9046be589ccdce4466e35f3f9ff95789230d8013d08d3746c4e0f26d693d92c53957b8f4f23f39fa50c81e79a14d0185ccc5d1325e4276ce40f2f14c2ed9
7
+ data.tar.gz: 7194c540a99071dde69950f10448442b223b3cc789081acf2109caea4dafa5aa3d7b097e4465bef07540049d1e6b33e4e133d9636df783654b24485910977ffc
data/README.md CHANGED
@@ -52,15 +52,41 @@ $ bundle exec jekyll serve
52
52
 
53
53
  If you're hosting your site on GitHub Pages, [set up GitHub Pages and Jekyll locally](https://help.github.com/en/articles/setting-up-your-github-pages-site-locally-with-jekyll) so that you can more easily work in your development environment.
54
54
 
55
- ### Configure Styless
55
+ ### Customize Styless
56
+ You can use any css framework with styless. Just add your libraries to `_includes/head.html file in your site.
56
57
 
57
- - [See configuration options](configuration)
58
+ #### bootstrap
59
+ _includes/head.html
60
+ ```html
61
+ <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl" crossorigin="anonymous">
62
+ ```
63
+
64
+ Examples(some file like `index.md`)
65
+ ```markdown
66
+ [Link button](http://example.com/){: .btn .btn-primary }
67
+ <button type="button" class="btn btn-primary">Primary</button>
68
+ ```
69
+
70
+ ### Dark Theme
71
+ Styless has a built-in dark theme. Styless automatically selects dark theme, if browser users selected darkt theme from system settings. But you can easily toggle it.
72
+ - Enable
73
+ ```html
74
+ <button onclick="document.documentElement.classList.add('dark');">Enable Dark Theme</button>
75
+ ```
76
+ - Disable
77
+ ```html
78
+ <button onclick="document.documentElement.classList.remove('dark');">Enable Dark Theme</button>
79
+ ```
80
+ - Toggle
81
+ ```html
82
+ <button onclick="document.documentElement.classList.toggle('dark');">Enable Dark Theme</button>
83
+ ```
58
84
 
59
85
  ---
60
86
 
61
87
  ## About the project
62
88
 
63
- Styless is &copy; 2021-{{ "now" | date: "%Y" }} by @ksengine.
89
+ Styless is &copy; 2021-now by @ksengine.
64
90
 
65
91
  ### License
66
92
 
@@ -0,0 +1,99 @@
1
+ <ul class="nav-list">
2
+ {%- assign titled_pages = include.pages
3
+ | where_exp:"item", "item.title != nil" -%}
4
+
5
+ {%- comment -%}
6
+ The values of `title` and `nav_order` can be numbers or strings.
7
+ Jekyll gives build failures when sorting on mixtures of different types,
8
+ so numbers and strings need to be sorted separately.
9
+
10
+ Here, numbers are sorted by their values, and come before all strings.
11
+ An omitted `nav_order` value is equivalent to the page's `title` value
12
+ (except that a numerical `title` value is treated as a string).
13
+
14
+ The case-sensitivity of string sorting is determined by `site.nav_sort`.
15
+ {%- endcomment -%}
16
+
17
+ {%- assign string_ordered_pages = titled_pages
18
+ | where_exp:"item", "item.nav_order == nil" -%}
19
+ {%- assign nav_ordered_pages = titled_pages
20
+ | where_exp:"item", "item.nav_order != nil" -%}
21
+
22
+ {%- comment -%}
23
+ The nav_ordered_pages have to be added to number_ordered_pages and
24
+ string_ordered_pages, depending on the nav_order value.
25
+ The first character of the jsonify result is `"` only for strings.
26
+ {%- endcomment -%}
27
+ {%- assign nav_ordered_groups = nav_ordered_pages
28
+ | group_by_exp:"item", "item.nav_order | jsonify | slice: 0" -%}
29
+ {%- assign number_ordered_pages = "" | split:"X" -%}
30
+ {%- for group in nav_ordered_groups -%}
31
+ {%- if group.name == '"' -%}
32
+ {%- assign string_ordered_pages = string_ordered_pages | concat: group.items -%}
33
+ {%- else -%}
34
+ {%- assign number_ordered_pages = number_ordered_pages | concat: group.items -%}
35
+ {%- endif -%}
36
+ {%- endfor -%}
37
+
38
+ {%- assign sorted_number_ordered_pages = number_ordered_pages | sort:"nav_order" -%}
39
+
40
+ {%- comment -%}
41
+ The string_ordered_pages have to be sorted by nav_order, and otherwise title
42
+ (where appending the empty string to a numeric title converts it to a string).
43
+ After grouping them by those values, the groups are sorted, then the items
44
+ of each group are concatenated.
45
+ {%- endcomment -%}
46
+ {%- assign string_ordered_groups = string_ordered_pages
47
+ | group_by_exp:"item", "item.nav_order | default: item.title | append:''" -%}
48
+ {%- if site.nav_sort == 'case_insensitive' -%}
49
+ {%- assign sorted_string_ordered_groups = string_ordered_groups | sort_natural:"name" -%}
50
+ {%- else -%}
51
+ {%- assign sorted_string_ordered_groups = string_ordered_groups | sort:"name" -%}
52
+ {%- endif -%}
53
+ {%- assign sorted_string_ordered_pages = "" | split:"X" -%}
54
+ {%- for group in sorted_string_ordered_groups -%}
55
+ {%- assign sorted_string_ordered_pages = sorted_string_ordered_pages | concat: group.items -%}
56
+ {%- endfor -%}
57
+
58
+ {%- assign pages_list = sorted_number_ordered_pages | concat: sorted_string_ordered_pages -%}
59
+
60
+ {%- for node in pages_list -%}
61
+ {%- if node.parent == nil -%}
62
+ {%- unless node.nav_exclude -%}
63
+ <li class="nav-list-item{% if page.url == node.url or page.parent == node.title or page.grand_parent == node.title %} active{% endif %}">
64
+ {%- if node.has_children -%}
65
+ <a href="#" class="nav-list-expander"><svg viewBox="0 0 24 24"><use xlink:href="#svg-arrow-right"></use></svg></a>
66
+ {%- endif -%}
67
+ <a href="{{ node.url | absolute_url }}" class="nav-list-link{% if page.url == node.url %} active{% endif %}">{{ node.title }}</a>
68
+ {%- if node.has_children -%}
69
+ {%- assign children_list = pages_list | where: "parent", node.title -%}
70
+ <ul class="nav-list ">
71
+ {%- for child in children_list -%}
72
+ {%- unless child.nav_exclude -%}
73
+ <li class="nav-list-item {% if page.url == child.url or page.parent == child.title %} active{% endif %}">
74
+ {%- if child.has_children -%}
75
+ <a href="#" class="nav-list-expander"><svg viewBox="0 0 24 24"><use xlink:href="#svg-arrow-right"></use></svg></a>
76
+ {%- endif -%}
77
+ <a href="{{ child.url | absolute_url }}" class="nav-list-link{% if page.url == child.url %} active{% endif %}">{{ child.title }}</a>
78
+ {%- if child.has_children -%}
79
+ {%- assign grand_children_list = pages_list | where: "parent", child.title | where: "grand_parent", node.title -%}
80
+ <ul class="nav-list">
81
+ {%- for grand_child in grand_children_list -%}
82
+ {%- unless grand_child.nav_exclude -%}
83
+ <li class="nav-list-item {% if page.url == grand_child.url %} active{% endif %}">
84
+ <a href="{{ grand_child.url | absolute_url }}" class="nav-list-link{% if page.url == grand_child.url %} active{% endif %}">{{ grand_child.title }}</a>
85
+ </li>
86
+ {%- endunless -%}
87
+ {%- endfor -%}
88
+ </ul>
89
+ {%- endif -%}
90
+ </li>
91
+ {%- endunless -%}
92
+ {%- endfor -%}
93
+ </ul>
94
+ {%- endif -%}
95
+ </li>
96
+ {%- endunless -%}
97
+ {%- endif -%}
98
+ {%- endfor -%}
99
+ </ul>
@@ -1,17 +1,27 @@
1
1
  <!DOCTYPE html>
2
2
  <html lang="{{ site.lang | default: "en-US" }}">
3
- <head>
3
+ <head>
4
4
  <meta charset="UTF-8">
5
5
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1">
7
-
8
- {% seo %}
7
+ {% seo %}
9
8
  <link rel="stylesheet" href="{{ "/assets/css/styless.css?v=" | append: site.github.build_revision | relative_url }}">
10
- {% include head.html %}
11
- </head>
12
- <body>
13
-
14
- {{ content }}
15
-
16
- </body>
9
+ <script src="{{ "/assets/js/jit.js?v=" | append: site.github.build_revision | relative_url }}"></script>
10
+ <!--[if lt IE 9]>
11
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
12
+ <![endif]-->
13
+ </head>
14
+ <body>
15
+ {{ content }}
16
+ {% if site.google_analytics %}
17
+ <script>
18
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
19
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
20
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
21
+ })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
22
+ ga('create', '{{ site.google_analytics }}', 'auto');
23
+ ga('send', 'pageview');
24
+ </script>
25
+ {% endif %}
26
+ </body>
17
27
  </html>
data/_layouts/home.html CHANGED
@@ -1,12 +1,11 @@
1
1
  ---
2
2
  layout: default
3
3
  ---
4
- <div style='
5
- line-height: 1.5;
6
- word-wrap: break-word;
7
- max-width: 1012px;
8
- margin: 32px auto 32px auto;
9
- padding-right: 16px;
10
- padding-left: 16px;'>
11
- {{ content }}
12
- </div>
4
+ <div class="padding:1rem max-width:1012px margin:auto">
5
+ {{ content }}
6
+ {% if site.github.private != true and site.github.license %}
7
+ <div class="padding:1rem color:gray margin-top:1rem border-top-width:1px border-style:solid">
8
+ <center>This site is open source. {% github_edit_link "Improve this page" %}.</center>
9
+ </div>
10
+ {% endif %}
11
+ </div>
data/_layouts/page.html CHANGED
@@ -1,12 +1,4 @@
1
1
  ---
2
2
  layout: default
3
3
  ---
4
- <div style='
5
- line-height: 1.5;
6
- word-wrap: break-word;
7
- max-width: 1012px;
8
- margin: 32px auto 32px auto;
9
- padding-right: 16px;
10
- padding-left: 16px;'>
11
- {{ content }}
12
- </div>
4
+ {{ content }}
data/_layouts/post.html CHANGED
@@ -1,12 +1,4 @@
1
1
  ---
2
2
  layout: default
3
3
  ---
4
- <div style='
5
- line-height: 1.5;
6
- word-wrap: break-word;
7
- max-width: 1012px;
8
- margin: 32px auto 32px auto;
9
- padding-right: 16px;
10
- padding-left: 16px;'>
11
- {{ content }}
12
- </div>
4
+ {{ content }}
data/_sass/styless.scss CHANGED
@@ -1,196 +1,90 @@
1
- *,
2
- *:after,
3
- *:before{
4
- box-sizing: border-box;
1
+ body {
2
+ margin: 0;
3
+ font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
4
+ "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif,
5
+ "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
6
+ line-height: 1.5;
5
7
  }
6
8
 
7
- /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
9
+ ul, ol {
10
+ padding-left: 2em;
8
11
 
9
- html {
10
- line-height: 1.15;
11
- -webkit-text-size-adjust: 100%
12
+ ul, ol {
13
+ margin-top: 0;
14
+ margin-bottom: 0;
15
+ }
12
16
  }
13
17
 
14
- body {
15
- margin: 0
18
+ textarea {
19
+ resize: vertical;
16
20
  }
17
21
 
18
- main {
19
- display: block
20
- }
22
+ table {
23
+ display: block;
24
+ width: 100%;
25
+ overflow: auto;
26
+ border-collapse: collapse;
21
27
 
22
- h1 {
23
- font-size: 2em;
24
- margin: .67em 0
25
- }
28
+ th {
29
+ font-weight: bold;
30
+ }
26
31
 
27
- hr {
28
- box-sizing: content-box;
29
- height: 0;
30
- overflow: visible
31
- }
32
+ th,
33
+ td {
34
+ padding: 6px 13px;
35
+ border: 1px solid lightgray;
36
+ }
32
37
 
33
- pre {
34
- font-family: monospace, monospace;
35
- font-size: 1em
36
- }
38
+ tr {
39
+ border-top: 1px solid gray;
37
40
 
38
- a {
39
- background-color: transparent
40
- }
41
-
42
- abbr[title] {
43
- border-bottom: none;
44
- text-decoration: underline;
45
- text-decoration: underline dotted
46
- }
41
+ &:nth-child(2n) {
42
+ background-color: lightgray;
43
+ }
44
+ }
47
45
 
48
- b,
49
- strong {
50
- font-weight: bolder
46
+ img {
47
+ background-color: transparent;
48
+ }
51
49
  }
52
50
 
53
51
  code,
54
52
  kbd,
53
+ pre,
55
54
  samp {
56
- font-family: monospace, monospace;
57
- font-size: 1em
58
- }
59
-
60
- small {
61
- font-size: 80%
62
- }
63
-
64
- sub,
65
- sup {
66
- font-size: 75%;
67
- line-height: 0;
68
- position: relative;
69
- vertical-align: baseline
70
- }
71
-
72
- sub {
73
- bottom: -.25em
74
- }
75
-
76
- sup {
77
- top: -.5em
78
- }
79
-
80
- img {
81
- border-style: none
82
- }
83
-
84
- button,
85
- input,
86
- optgroup,
87
- select,
88
- textarea {
89
- font-family: inherit;
90
- font-size: 100%;
91
- line-height: 1.15;
92
- margin: 0
55
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
56
+ "Liberation Mono", "Courier New", monospace;
93
57
  }
94
58
 
95
- button,
96
- input {
97
- overflow: visible
98
- }
99
-
100
- button,
101
- select {
102
- text-transform: none
103
- }
104
-
105
- [type=button],
106
- [type=reset],
107
- [type=submit],
108
- button {
109
- -webkit-appearance: button
110
- }
111
-
112
- [type=button]::-moz-focus-inner,
113
- [type=reset]::-moz-focus-inner,
114
- [type=submit]::-moz-focus-inner,
115
- button::-moz-focus-inner {
116
- border-style: none;
117
- padding: 0
118
- }
119
-
120
- [type=button]:-moz-focusring,
121
- [type=reset]:-moz-focusring,
122
- [type=submit]:-moz-focusring,
123
- button:-moz-focusring {
124
- outline: 1px dotted ButtonText
125
- }
126
-
127
- fieldset {
128
- padding: .35em .75em .625em
129
- }
130
-
131
- legend {
132
- box-sizing: border-box;
133
- color: inherit;
134
- display: table;
59
+ img,
60
+ video {
135
61
  max-width: 100%;
136
- padding: 0;
137
- white-space: normal
138
- }
139
-
140
- progress {
141
- vertical-align: baseline
142
- }
62
+ height: auto;
63
+ &[align=right] {
64
+ padding-left: 20px;
65
+ }
143
66
 
144
- textarea {
145
- overflow: auto
146
- }
147
-
148
- [type=checkbox],
149
- [type=radio] {
150
- box-sizing: border-box;
151
- padding: 0
67
+ &[align=left] {
68
+ padding-right: 20px;
69
+ }
152
70
  }
153
71
 
154
- [type=number]::-webkit-inner-spin-button,
155
- [type=number]::-webkit-outer-spin-button {
156
- height: auto
72
+ blockquote {
73
+ border-left: 1px solid lightgray;
74
+ margin: 0;
157
75
  }
158
76
 
159
- [type=search] {
160
- -webkit-appearance: textfield;
161
- outline-offset: -2px
162
- }
163
-
164
- [type=search]::-webkit-search-decoration {
165
- -webkit-appearance: none
166
- }
167
-
168
- ::-webkit-file-upload-button {
169
- -webkit-appearance: button;
170
- font: inherit
171
- }
172
-
173
- details {
174
- display: block
175
- }
176
-
177
- summary {
178
- display: list-item
77
+ pre {
78
+ border: 1px solid lightgray;
79
+ overflow-x: auto;
179
80
  }
180
81
 
181
- template {
182
- display: none
82
+ .highlight table td {
83
+ padding: 5px;
183
84
  }
184
-
185
- [hidden] {
186
- display: none
85
+ .highlight table pre {
86
+ margin: 0;
187
87
  }
188
-
189
- * {max-width: 100%;}
190
-
191
- .highlight .highlight{overflow: auto;}
192
- .highlight table td { padding: 5px; padding: 0.3125rem}
193
- .highlight table pre { margin: 0; }
194
88
  .highlight .cm {
195
89
  color: #999988;
196
90
  font-style: italic;
@@ -208,7 +102,8 @@ template {
208
102
  font-weight: bold;
209
103
  font-style: italic;
210
104
  }
211
- .highlight .c, .highlight .cd {
105
+ .highlight .c,
106
+ .highlight .cd {
212
107
  color: #999988;
213
108
  font-style: italic;
214
109
  }
@@ -273,7 +168,8 @@ template {
273
168
  color: #445588;
274
169
  font-weight: bold;
275
170
  }
276
- .highlight .k, .highlight .kv {
171
+ .highlight .k,
172
+ .highlight .kv {
277
173
  color: #000000;
278
174
  font-weight: bold;
279
175
  }
@@ -292,7 +188,9 @@ template {
292
188
  .highlight .mo {
293
189
  color: #009999;
294
190
  }
295
- .highlight .m, .highlight .mb, .highlight .mx {
191
+ .highlight .m,
192
+ .highlight .mb,
193
+ .highlight .mx {
296
194
  color: #009999;
297
195
  }
298
196
  .highlight .sb {
@@ -338,7 +236,7 @@ template {
338
236
  color: #999999;
339
237
  }
340
238
  .highlight .nb {
341
- color: #0086B3;
239
+ color: #0086b3;
342
240
  }
343
241
  .highlight .nc {
344
242
  color: #445588;
@@ -399,34 +297,43 @@ template {
399
297
  background-color: #f8f8f8;
400
298
  }
401
299
 
402
- @media (prefers-color-scheme: dark) {
300
+ @media print {
301
+ body {
302
+ padding: 0.4in;
303
+ font-size: 12pt;
304
+ color: #444;
305
+ }
306
+ }
307
+
308
+ .dark {
403
309
  a {
404
310
  color: rgb(140, 140, 250);
405
311
  }
312
+
406
313
  ::-webkit-scrollbar-track-piece {
407
314
  background-color: rgba(255, 255, 255, 0.2) !important;
408
315
  }
316
+
409
317
  ::-webkit-scrollbar-track {
410
318
  background-color: rgba(255, 255, 255, 0.3) !important;
411
319
  }
320
+
412
321
  ::-webkit-scrollbar-thumb {
413
322
  background-color: rgba(255, 255, 255, 0.5) !important;
414
323
  }
324
+
415
325
  embed[type="application/pdf"] {
416
- filter: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg"><filter id="filter"><feComponentTransfer color-interpolation-filters="sRGB"><feFuncR type="table" tableValues="0.9 0.09999999999999998" /><feFuncG type="table" tableValues="0.9 0.09999999999999998" /><feFuncB type="table" tableValues="0.9 0.09999999999999998" /></feComponentTransfer></filter></svg>#filter');
417
- -webkit-filter: invert(90%);
418
326
  filter: invert(90%);
419
- -webkit-filter: invert;
420
- filter: invert;
421
327
  }
422
328
 
423
- html {
424
- color: rgb(191, 191, 191);
425
- background: rgb(31, 31, 31) !important;
426
- }
329
+ color: rgb(191, 191, 191);
330
+ background: rgb(31, 31, 31) !important;
331
+
427
332
  body {
428
333
  background-color: rgb(31, 31, 31);
334
+ background-image: none !important;
429
335
  }
336
+
430
337
  input,
431
338
  select,
432
339
  textarea,
@@ -434,501 +341,299 @@ template {
434
341
  color: rgb(191, 191, 191);
435
342
  background-color: rgb(31, 31, 31);
436
343
  }
437
- font {
438
- color: rgb(191, 191, 191);
439
- }
440
-
441
- html {
442
- filter: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg"><filter id="filter"><feComponentTransfer color-interpolation-filters="sRGB"><feFuncR type="linear" slope="1" intercept="0" /><feFuncG type="linear" slope="1" intercept="0" /><feFuncB type="linear" slope="1" intercept="0" /></feComponentTransfer><feComponentTransfer color-interpolation-filters="sRGB"><feFuncR type="linear" slope="1" /><feFuncG type="linear" slope="1" /><feFuncB type="linear" slope="1" /></feComponentTransfer><feColorMatrix type="matrix" color-interpolation-filters="sRGB" values="1 0 0 0 0 0 1.01 0 0 0 0 0 1 0 0 0 0 0 1 0" /></filter></svg>#filter');
443
- -webkit-filter: contrast(100%) brightness(100%) saturate(100%);
444
- filter: contrast(100%) brightness(100%) saturate(100%);
445
- filter: progid:DXImageTransform.Microsoft.Light();
446
- }
447
-
448
- .highlight .highlight{border: 1px solid gray;}
449
344
 
450
- .highlight table td {
451
- padding: 5px;
452
- padding: 0.3125rem;
453
- }
454
- .highlight table pre {
455
- margin: 0px;
456
- }
457
- .highlight .cm {
458
- color: rgb(196, 196, 186);
459
- font-style: italic;
460
- }
461
- .highlight .cp {
462
- color: rgb(191, 191, 191);
463
- font-weight: bold;
464
- }
465
- .highlight .c1 {
466
- color: rgb(196, 196, 186);
467
- font-style: italic;
468
- }
469
- .highlight .cs {
470
- color: rgb(191, 191, 191);
471
- font-weight: bold;
472
- font-style: italic;
473
- }
474
- .highlight .c,
475
- .highlight .cd {
476
- color: rgb(196, 196, 186);
477
- font-style: italic;
478
- }
479
- .highlight .err {
480
- color: rgb(230, 153, 153);
481
- background-color: rgb(75, 47, 47);
482
- }
483
- .highlight .gd {
484
- color: rgb(191, 191, 191);
485
- background-color: rgb(69, 17, 17);
486
- }
487
- .highlight .ge {
488
- color: rgb(191, 191, 191);
489
- font-style: italic;
490
- }
491
- .highlight .gr {
492
- color: rgb(230, 153, 153);
493
- }
494
- .highlight .gh {
495
- color: rgb(191, 191, 191);
496
- }
497
- .highlight .gi {
498
- color: rgb(191, 191, 191);
499
- background-color: rgb(17, 69, 17);
500
- }
501
- .highlight .go {
502
- color: rgb(191, 191, 191);
503
- }
504
- .highlight .gp {
505
- color: rgb(191, 191, 191);
506
- }
507
- .highlight .gs {
508
- font-weight: bold;
509
- }
510
- .highlight .gu {
511
- color: rgb(191, 191, 191);
512
- }
513
- .highlight .gt {
514
- color: rgb(230, 153, 153);
515
- }
516
- .highlight .kc {
517
- color: rgb(191, 191, 191);
518
- font-weight: bold;
519
- }
520
- .highlight .kd {
521
- color: rgb(191, 191, 191);
522
- font-weight: bold;
523
- }
524
- .highlight .kn {
525
- color: rgb(191, 191, 191);
526
- font-weight: bold;
527
- }
528
- .highlight .kp {
529
- color: rgb(191, 191, 191);
530
- font-weight: bold;
531
- }
532
- .highlight .kr {
533
- color: rgb(191, 191, 191);
534
- font-weight: bold;
535
- }
536
- .highlight .kt {
537
- color: rgb(170, 181, 212);
538
- font-weight: bold;
539
- }
540
- .highlight .k,
541
- .highlight .kv {
542
- color: rgb(191, 191, 191);
543
- font-weight: bold;
544
- }
545
- .highlight .mf {
546
- color: rgb(153, 230, 230);
547
- }
548
- .highlight .mh {
549
- color: rgb(153, 230, 230);
550
- }
551
- .highlight .il {
552
- color: rgb(153, 230, 230);
553
- }
554
- .highlight .mi {
555
- color: rgb(153, 230, 230);
556
- }
557
- .highlight .mo {
558
- color: rgb(153, 230, 230);
559
- }
560
- .highlight .m,
561
- .highlight .mb,
562
- .highlight .mx {
563
- color: rgb(153, 230, 230);
564
- }
565
- .highlight .sb {
566
- color: rgb(230, 153, 172);
567
- }
568
- .highlight .sc {
569
- color: rgb(230, 153, 172);
570
- }
571
- .highlight .sd {
572
- color: rgb(230, 153, 172);
573
- }
574
- .highlight .s2 {
575
- color: rgb(230, 153, 172);
576
- }
577
- .highlight .se {
578
- color: rgb(230, 153, 172);
579
- }
580
- .highlight .sh {
581
- color: rgb(230, 153, 172);
582
- }
583
- .highlight .si {
584
- color: rgb(230, 153, 172);
585
- }
586
- .highlight .sx {
587
- color: rgb(230, 153, 172);
588
- }
589
- .highlight .sr {
590
- color: rgb(153, 230, 172);
591
- }
592
- .highlight .s1 {
593
- color: rgb(230, 153, 172);
594
- }
595
- .highlight .ss {
596
- color: rgb(230, 153, 210);
597
- }
598
- .highlight .s {
599
- color: rgb(230, 153, 172);
600
- }
601
- .highlight .na {
602
- color: rgb(153, 230, 230);
603
- }
604
- .highlight .bp {
605
- color: rgb(191, 191, 191);
606
- }
607
- .highlight .nb {
608
- color: rgb(153, 210, 230);
609
- }
610
- .highlight .nc {
611
- color: rgb(170, 181, 212);
612
- font-weight: bold;
613
- }
614
- .highlight .no {
615
- color: rgb(153, 230, 230);
616
- }
617
- .highlight .nd {
618
- color: rgb(177, 205, 205);
619
- font-weight: bold;
620
- }
621
- .highlight .ni {
622
- color: rgb(230, 153, 230);
623
- }
624
- .highlight .ne {
625
- color: rgb(230, 153, 153);
626
- font-weight: bold;
627
- }
628
- .highlight .nf {
629
- color: rgb(230, 153, 153);
630
- font-weight: bold;
631
- }
632
- .highlight .nl {
633
- color: rgb(230, 153, 153);
634
- font-weight: bold;
635
- }
636
- .highlight .nn {
637
- color: rgb(191, 191, 191);
638
- }
639
- .highlight .nt {
640
- color: rgb(153, 153, 230);
641
- }
642
- .highlight .vc {
643
- color: rgb(153, 230, 230);
644
- }
645
- .highlight .vg {
646
- color: rgb(153, 230, 230);
647
- }
648
- .highlight .vi {
649
- color: rgb(153, 230, 230);
650
- }
651
- .highlight .nv {
652
- color: rgb(153, 230, 230);
653
- }
654
- .highlight .ow {
655
- color: rgb(191, 191, 191);
656
- font-weight: bold;
657
- }
658
- .highlight .o {
659
- color: rgb(191, 191, 191);
660
- font-weight: bold;
661
- }
662
- .highlight .w {
345
+ font {
663
346
  color: rgb(191, 191, 191);
664
347
  }
665
- .highlight {
666
- background-color: rgb(33, 33, 33);
667
- }
668
- }
669
348
 
670
- .dark {
671
- color: rgb(191, 191, 191);
672
- background: rgb(31, 31, 31) !important;
673
- filter: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg"><filter id="filter"><feComponentTransfer color-interpolation-filters="sRGB"><feFuncR type="linear" slope="1" intercept="0" /><feFuncG type="linear" slope="1" intercept="0" /><feFuncB type="linear" slope="1" intercept="0" /></feComponentTransfer><feComponentTransfer color-interpolation-filters="sRGB"><feFuncR type="linear" slope="1" /><feFuncG type="linear" slope="1" /><feFuncB type="linear" slope="1" /></feComponentTransfer><feColorMatrix type="matrix" color-interpolation-filters="sRGB" values="1 0 0 0 0 0 1.01 0 0 0 0 0 1 0 0 0 0 0 1 0" /></filter></svg>#filter');
674
- -webkit-filter: contrast(100%) brightness(100%) saturate(100%);
675
349
  filter: contrast(100%) brightness(100%) saturate(100%);
676
- filter: progid:DXImageTransform.Microsoft.Light();
677
350
 
678
- body {
679
- background-color: rgb(31, 31, 31);
351
+ .filter {
352
+ width: 100%;
353
+ height: 100%;
354
+ position: fixed;
355
+ left: 0px;
356
+ top: 0px;
357
+ pointer-events: none;
358
+ z-index: 2147483647;
680
359
  }
681
360
 
682
- a {
683
- color: rgb(140, 140, 250);
684
- }
685
- ::-webkit-scrollbar-track-piece {
686
- background-color: rgba(255, 255, 255, 0.2) !important;
361
+ .yellow-filter {
362
+ background: rgba(255, 255, 0, 0.15);
363
+ opacity: 0;
687
364
  }
688
- ::-webkit-scrollbar-track {
689
- background-color: rgba(255, 255, 255, 0.3) !important;
690
- }
691
- ::-webkit-scrollbar-thumb {
692
- background-color: rgba(255, 255, 255, 0.5) !important;
693
- }
694
- embed[type="application/pdf"] {
695
- filter: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg"><filter id="filter"><feComponentTransfer color-interpolation-filters="sRGB"><feFuncR type="table" tableValues="0.9 0.09999999999999998" /><feFuncG type="table" tableValues="0.9 0.09999999999999998" /><feFuncB type="table" tableValues="0.9 0.09999999999999998" /></feComponentTransfer></filter></svg>#filter');
696
- -webkit-filter: invert(90%);
697
- filter: invert(90%);
698
- -webkit-filter: invert;
699
- filter: invert;
365
+
366
+ .blue-filter {
367
+ background: rgba(0, 0, 255, 0.15);
368
+ opacity: 0;
700
369
  }
701
370
 
702
- input,
703
- select,
704
- textarea,
705
- button {
706
- color: rgb(191, 191, 191);
707
- background-color: rgb(31, 31, 31);
371
+ .dim-filter {
372
+ background: rgba(0, 0, 0, 0.5);
373
+ opacity: 0;
708
374
  }
709
- font {
710
- color: rgb(191, 191, 191);
375
+
376
+ .transform-z {
377
+ transform: translateZ(0px);
711
378
  }
712
379
 
713
- .highlight .highlight{border: 1px solid gray;}
380
+ th,
381
+ td {
382
+ border-bottom: 1px solid rgb(69, 69, 69);
383
+ }
714
384
 
715
- .highlight table td {
716
- padding: 5px;
717
- padding: 0.3125rem;
385
+ blockquote {
386
+ border-left: 1px solid rgb(69, 69, 69);
718
387
  }
719
- .highlight table pre {
720
- margin: 0px;
388
+
389
+ pre {
390
+ border: 1px solid rgb(69, 69, 69);
721
391
  }
392
+
722
393
  .highlight .cm {
723
394
  color: rgb(196, 196, 186);
724
- font-style: italic;
725
395
  }
396
+
726
397
  .highlight .cp {
727
398
  color: rgb(191, 191, 191);
728
- font-weight: bold;
729
399
  }
400
+
730
401
  .highlight .c1 {
731
402
  color: rgb(196, 196, 186);
732
- font-style: italic;
733
403
  }
404
+
734
405
  .highlight .cs {
735
406
  color: rgb(191, 191, 191);
736
- font-weight: bold;
737
- font-style: italic;
738
407
  }
408
+
739
409
  .highlight .c,
740
410
  .highlight .cd {
741
411
  color: rgb(196, 196, 186);
742
- font-style: italic;
743
412
  }
413
+
744
414
  .highlight .err {
745
415
  color: rgb(230, 153, 153);
746
416
  background-color: rgb(75, 47, 47);
747
417
  }
418
+
748
419
  .highlight .gd {
749
420
  color: rgb(191, 191, 191);
750
421
  background-color: rgb(69, 17, 17);
751
422
  }
423
+
752
424
  .highlight .ge {
753
425
  color: rgb(191, 191, 191);
754
- font-style: italic;
755
426
  }
427
+
756
428
  .highlight .gr {
757
429
  color: rgb(230, 153, 153);
758
430
  }
431
+
759
432
  .highlight .gh {
760
433
  color: rgb(191, 191, 191);
761
434
  }
435
+
762
436
  .highlight .gi {
763
437
  color: rgb(191, 191, 191);
764
438
  background-color: rgb(17, 69, 17);
765
439
  }
440
+
766
441
  .highlight .go {
767
442
  color: rgb(191, 191, 191);
768
443
  }
444
+
769
445
  .highlight .gp {
770
446
  color: rgb(191, 191, 191);
771
447
  }
772
- .highlight .gs {
773
- font-weight: bold;
774
- }
448
+
775
449
  .highlight .gu {
776
450
  color: rgb(191, 191, 191);
777
451
  }
452
+
778
453
  .highlight .gt {
779
454
  color: rgb(230, 153, 153);
780
455
  }
456
+
781
457
  .highlight .kc {
782
458
  color: rgb(191, 191, 191);
783
- font-weight: bold;
784
459
  }
460
+
785
461
  .highlight .kd {
786
462
  color: rgb(191, 191, 191);
787
- font-weight: bold;
788
463
  }
464
+
789
465
  .highlight .kn {
790
466
  color: rgb(191, 191, 191);
791
- font-weight: bold;
792
467
  }
468
+
793
469
  .highlight .kp {
794
470
  color: rgb(191, 191, 191);
795
- font-weight: bold;
796
471
  }
472
+
797
473
  .highlight .kr {
798
474
  color: rgb(191, 191, 191);
799
- font-weight: bold;
800
475
  }
476
+
801
477
  .highlight .kt {
802
478
  color: rgb(170, 181, 212);
803
- font-weight: bold;
804
479
  }
480
+
805
481
  .highlight .k,
806
482
  .highlight .kv {
807
483
  color: rgb(191, 191, 191);
808
- font-weight: bold;
809
484
  }
485
+
810
486
  .highlight .mf {
811
487
  color: rgb(153, 230, 230);
812
488
  }
489
+
813
490
  .highlight .mh {
814
491
  color: rgb(153, 230, 230);
815
492
  }
493
+
816
494
  .highlight .il {
817
495
  color: rgb(153, 230, 230);
818
496
  }
497
+
819
498
  .highlight .mi {
820
499
  color: rgb(153, 230, 230);
821
500
  }
501
+
822
502
  .highlight .mo {
823
503
  color: rgb(153, 230, 230);
824
504
  }
505
+
825
506
  .highlight .m,
826
507
  .highlight .mb,
827
508
  .highlight .mx {
828
509
  color: rgb(153, 230, 230);
829
510
  }
511
+
830
512
  .highlight .sb {
831
513
  color: rgb(230, 153, 172);
832
514
  }
515
+
833
516
  .highlight .sc {
834
517
  color: rgb(230, 153, 172);
835
518
  }
519
+
836
520
  .highlight .sd {
837
521
  color: rgb(230, 153, 172);
838
522
  }
523
+
839
524
  .highlight .s2 {
840
525
  color: rgb(230, 153, 172);
841
526
  }
527
+
842
528
  .highlight .se {
843
529
  color: rgb(230, 153, 172);
844
530
  }
531
+
845
532
  .highlight .sh {
846
533
  color: rgb(230, 153, 172);
847
534
  }
535
+
848
536
  .highlight .si {
849
537
  color: rgb(230, 153, 172);
850
538
  }
539
+
851
540
  .highlight .sx {
852
541
  color: rgb(230, 153, 172);
853
542
  }
543
+
854
544
  .highlight .sr {
855
545
  color: rgb(153, 230, 172);
856
546
  }
547
+
857
548
  .highlight .s1 {
858
549
  color: rgb(230, 153, 172);
859
550
  }
551
+
860
552
  .highlight .ss {
861
553
  color: rgb(230, 153, 210);
862
554
  }
555
+
863
556
  .highlight .s {
864
557
  color: rgb(230, 153, 172);
865
558
  }
559
+
866
560
  .highlight .na {
867
561
  color: rgb(153, 230, 230);
868
562
  }
563
+
869
564
  .highlight .bp {
870
565
  color: rgb(191, 191, 191);
871
566
  }
567
+
872
568
  .highlight .nb {
873
569
  color: rgb(153, 210, 230);
874
570
  }
571
+
875
572
  .highlight .nc {
876
573
  color: rgb(170, 181, 212);
877
- font-weight: bold;
878
574
  }
575
+
879
576
  .highlight .no {
880
577
  color: rgb(153, 230, 230);
881
578
  }
579
+
882
580
  .highlight .nd {
883
581
  color: rgb(177, 205, 205);
884
- font-weight: bold;
885
582
  }
583
+
886
584
  .highlight .ni {
887
585
  color: rgb(230, 153, 230);
888
586
  }
587
+
889
588
  .highlight .ne {
890
589
  color: rgb(230, 153, 153);
891
- font-weight: bold;
892
590
  }
591
+
893
592
  .highlight .nf {
894
593
  color: rgb(230, 153, 153);
895
- font-weight: bold;
896
594
  }
595
+
897
596
  .highlight .nl {
898
597
  color: rgb(230, 153, 153);
899
- font-weight: bold;
900
598
  }
599
+
901
600
  .highlight .nn {
902
601
  color: rgb(191, 191, 191);
903
602
  }
603
+
904
604
  .highlight .nt {
905
605
  color: rgb(153, 153, 230);
906
606
  }
607
+
907
608
  .highlight .vc {
908
609
  color: rgb(153, 230, 230);
909
610
  }
611
+
910
612
  .highlight .vg {
911
613
  color: rgb(153, 230, 230);
912
614
  }
615
+
913
616
  .highlight .vi {
914
617
  color: rgb(153, 230, 230);
915
618
  }
619
+
916
620
  .highlight .nv {
917
621
  color: rgb(153, 230, 230);
918
622
  }
623
+
919
624
  .highlight .ow {
920
625
  color: rgb(191, 191, 191);
921
- font-weight: bold;
922
626
  }
627
+
923
628
  .highlight .o {
924
629
  color: rgb(191, 191, 191);
925
- font-weight: bold;
926
630
  }
631
+
927
632
  .highlight .w {
928
633
  color: rgb(191, 191, 191);
929
634
  }
635
+
930
636
  .highlight {
931
637
  background-color: rgb(33, 33, 33);
932
638
  }
933
639
  }
934
-
data/assets/js/jit.js ADDED
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+
3
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
4
+
5
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
6
+
7
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
8
+
9
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
10
+
11
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
12
+
13
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
14
+
15
+ (function (window) {
16
+ var moonHare = {};
17
+ moonHare.variants = {};
18
+ moonHare.plugins = {};
19
+ moonHare.filters = [];
20
+ moonHare.styleEl = window.document.createElement('style');
21
+ moonHare.styleEl.id = 'MOONHARE_STYLE_ELEMENT'; // Append <style> element to <head>
22
+
23
+ window.document.head.appendChild(moonHare.styleEl); // @copyright - jQuery(https://tldrlegal.com/license/mit-license)
24
+ // @reference https://github.com/jquery/jquery/blob/main/src/selector/escapeSelector.js
25
+
26
+ moonHare.escapeSelector = function (sel) {
27
+ var rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;
28
+
29
+ function fcssescape(ch, asCodePoint) {
30
+ if (asCodePoint) {
31
+ if (ch === "\0") {
32
+ return "\uFFFD";
33
+ }
34
+
35
+ return ch.slice(0, -1) + "\\" + ch.charCodeAt(ch.length - 1).toString(16) + " ";
36
+ }
37
+
38
+ return "\\" + ch;
39
+ }
40
+
41
+ return (sel + "").replace(rcssescape, fcssescape);
42
+ };
43
+
44
+ moonHare.defaultVariant = function (parts) {
45
+ if (parts.length === 1) {
46
+ Object.keys(this.plugins).forEach(function (pluginName) {
47
+ if (parts[0].startsWith(pluginName)) return this.plugins[pluginName].call(this, parts);
48
+ }, this);
49
+ return ['', ''];
50
+ }
51
+
52
+ if (parts.length === 2) {
53
+ return ['.' + this.escapeSelector(parts.join(':')), "{".concat(parts[0], ": ").concat(parts[1], ";}")];
54
+ }
55
+
56
+ return ['', ''];
57
+ };
58
+
59
+ moonHare.addStyles = function (styles) {
60
+ this.styleEl.innerHTML = styles;
61
+ };
62
+
63
+ moonHare.clearStyles = function () {
64
+ this.styleEl.innerHTML = '';
65
+ };
66
+
67
+ moonHare.generateStyles = function () {
68
+ var classList = [];
69
+
70
+ _toConsumableArray(window.document.querySelectorAll('*')).forEach(function (el) {
71
+ return classList = [].concat(_toConsumableArray(classList), _toConsumableArray(el.classList));
72
+ });
73
+
74
+ var styleSheet = classList.map(function (cls) {
75
+ var parts = cls.split(':');
76
+ return (this.variants[parts[0]] || this.defaultVariant).call(this, parts);
77
+ }, this);
78
+ this.filters.forEach(function (filter) {
79
+ styleSheet = filter.call(this, styleSheet);
80
+ }, this);
81
+ return styleSheet.flat().join('');
82
+ };
83
+
84
+ moonHare.start = function () {
85
+ this.addStyles(this.generateStyles());
86
+ };
87
+
88
+ if (window.document.readyState != 'loading') moonHare.start();else window.document.addEventListener('DOMContentLoaded', function(){moonHare.start()});
89
+ window.moonHare = moonHare;
90
+ })(window);
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: styless
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kavindu Santhusa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-19 00:00:00.000000000 Z
11
+ date: 2021-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -96,6 +96,7 @@ files:
96
96
  - LICENSE
97
97
  - README.md
98
98
  - _includes/head.html
99
+ - _includes/nav.html
99
100
  - _layouts/default.html
100
101
  - _layouts/home.html
101
102
  - _layouts/page.html
@@ -103,6 +104,7 @@ files:
103
104
  - _sass/styless.scss
104
105
  - assets/css/styless.scss
105
106
  - assets/images/.gitkeep
107
+ - assets/js/jit.js
106
108
  homepage: https://github.com/moonharelabs/styless
107
109
  licenses:
108
110
  - Unlicense
@@ -123,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
125
  - !ruby/object:Gem::Version
124
126
  version: '0'
125
127
  requirements: []
126
- rubygems_version: 3.0.3
128
+ rubygems_version: 3.0.3.1
127
129
  signing_key:
128
130
  specification_version: 4
129
131
  summary: The Unstyled Jekyll Theme.