simple-jekyll-theme 1.0.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.
@@ -0,0 +1,150 @@
1
+ code {
2
+ font-family: $font_code;
3
+
4
+ // inline code
5
+ margin: 1px;
6
+ padding: 3px 6px;
7
+ border-radius: 3px;
8
+ font-size: 0.85em;
9
+ background-color: $gray_light;
10
+ background-color: var(--float-color, $gray_light);
11
+ // Allow line break anywhere for code surrounded by backticks in markdown
12
+ &[class*="language-plaintext"] {
13
+ overflow-wrap: break-word;
14
+
15
+ word-break: break-all;
16
+ word-break: break-word;
17
+ }
18
+
19
+ // code block
20
+ pre & {
21
+ background: none;
22
+ border: none;
23
+ padding: 0;
24
+ margin: 0;
25
+ font-size: 0.8em;
26
+ line-height: 0.8;
27
+ }
28
+ }
29
+
30
+ // https://weblog.west-wind.com/posts/2019/Dec/30/A-HighlightJs-Copy-Code-Badge-Component
31
+ .highlighter-rouge {
32
+ position: relative;
33
+ }
34
+
35
+ .code-copy-btn {
36
+ color: rgba(255, 255, 255, 0.3);
37
+ background-color: rgba(255, 255, 255, 0.1);
38
+ opacity: 0;
39
+ transition: opacity 0.3s;
40
+ height: 30px;
41
+ width: 30px;
42
+ border: none;
43
+ border-radius: 50%;
44
+ position: absolute;
45
+ top: calc(min(100% - 36px, 12px));
46
+ right: 2.5%;
47
+
48
+ @media only screen and (max-width: #{$desktop-min-width}) {
49
+ opacity: 1;
50
+ }
51
+ }
52
+
53
+ .highlight:hover .code-copy-btn {
54
+ opacity: 1;
55
+ }
56
+
57
+ .code-copy-btn:hover {
58
+ color: rgba(255, 255, 255, 0.6);
59
+ background-color: rgba(255, 255, 255, 0.3);
60
+ cursor: copy;
61
+ }
62
+
63
+ .code-copy-btn:active {
64
+ color: rgba(255, 255, 255, 0.8);
65
+ }
66
+
67
+ /* Adjusted to give override background and text colour */
68
+ .highlight pre, pre, .highlight .hll {
69
+ // background-color: #49483E;
70
+ background-color: #222;
71
+ border: none;
72
+ // box-sizing: border-box;
73
+ width: 95%;
74
+ margin: 20px auto;
75
+ padding: 6px 10px;
76
+ border-radius: 10px;
77
+ color: #fff;
78
+ box-shadow: 0 5px 20px rgba(0,0,0,0.3);
79
+ box-shadow: 0 5px 20px var(--dark-shadow2, rgba(0,0,0,0.3));
80
+ overflow: scroll;
81
+ z-index: 2;
82
+
83
+ // @include phone {
84
+ // box-sizing: content-box;
85
+ // }
86
+ }
87
+
88
+ .gist pre {
89
+ color: #515151;
90
+ }
91
+
92
+ /*! Highlights taken from https://gist.github.com/asaaki/1007420 for Monokai theme */
93
+ .c { color: #75715e } /* Comment */
94
+ .err { color: #960050; background-color: #1e0010 } /* Error */
95
+ .k { color: #66d9ef } /* Keyword */
96
+ .l { color: #ae81ff } /* Literal */
97
+ .n { color: #f8f8f2 } /* Name */
98
+ .o { color: #f92672 } /* Operator */
99
+ .p { color: #f8f8f2 } /* Punctuation */
100
+ .cm { color: #75715e } /* Comment.Multiline */
101
+ .cp { color: #75715e } /* Comment.Preproc */
102
+ .c1 { color: #75715e } /* Comment.Single */
103
+ .cs { color: #75715e } /* Comment.Special */
104
+ .ge { font-style: italic } /* Generic.Emph */
105
+ .gs { font-weight: bold } /* Generic.Strong */
106
+ .kc { color: #66d9ef } /* Keyword.Constant */
107
+ .kd { color: #66d9ef } /* Keyword.Declaration */
108
+ .kn { color: #f92672 } /* Keyword.Namespace */
109
+ .kp { color: #66d9ef } /* Keyword.Pseudo */
110
+ .kr { color: #66d9ef } /* Keyword.Reserved */
111
+ .kt { color: #66d9ef } /* Keyword.Type */
112
+ .ld { color: #e6db74 } /* Literal.Date */
113
+ .m { color: #ae81ff } /* Literal.Number */
114
+ .s { color: #e6db74 } /* Literal.String */
115
+ .na { color: #a6e22e } /* Name.Attribute */
116
+ .nb { color: #f8f8f2 } /* Name.Builtin */
117
+ .nc { color: #a6e22e } /* Name.Class */
118
+ .no { color: #66d9ef } /* Name.Constant */
119
+ .nd { color: #a6e22e } /* Name.Decorator */
120
+ .ni { color: #f8f8f2 } /* Name.Entity */
121
+ .ne { color: #a6e22e } /* Name.Exception */
122
+ .nf { color: #a6e22e } /* Name.Function */
123
+ .nl { color: #f8f8f2 } /* Name.Label */
124
+ .nn { color: #f8f8f2 } /* Name.Namespace */
125
+ .nx { color: #a6e22e } /* Name.Other */
126
+ .py { color: #f8f8f2 } /* Name.Property */
127
+ .nt { color: #f92672 } /* Name.Tag */
128
+ .nv { color: #f8f8f2 } /* Name.Variable */
129
+ .ow { color: #f92672 } /* Operator.Word */
130
+ .w { color: #f8f8f2 } /* Text.Whitespace */
131
+ .mf { color: #ae81ff } /* Literal.Number.Float */
132
+ .mh { color: #ae81ff } /* Literal.Number.Hex */
133
+ .mi { color: #ae81ff } /* Literal.Number.Integer */
134
+ .mo { color: #ae81ff } /* Literal.Number.Oct */
135
+ .sb { color: #e6db74 } /* Literal.String.Backtick */
136
+ .sc { color: #e6db74 } /* Literal.String.Char */
137
+ .sd { color: #e6db74 } /* Literal.String.Doc */
138
+ .s2 { color: #e6db74 } /* Literal.String.Double */
139
+ .se { color: #ae81ff } /* Literal.String.Escape */
140
+ .sh { color: #e6db74 } /* Literal.String.Heredoc */
141
+ .si { color: #e6db74 } /* Literal.String.Interpol */
142
+ .sx { color: #e6db74 } /* Literal.String.Other */
143
+ .sr { color: #e6db74 } /* Literal.String.Regex */
144
+ .s1 { color: #e6db74 } /* Literal.String.Single */
145
+ .ss { color: #e6db74 } /* Literal.String.Symbol */
146
+ .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */
147
+ .vc { color: #f8f8f2 } /* Name.Variable.Class */
148
+ .vg { color: #f8f8f2 } /* Name.Variable.Global */
149
+ .vi { color: #f8f8f2 } /* Name.Variable.Instance */
150
+ .il { color: #ae81ff } /* Literal.Number.Integer.Long */
@@ -0,0 +1,122 @@
1
+ // Colours
2
+
3
+ // Light theme colors
4
+ $background_color : #fff;
5
+ $text_color : #222;
6
+ $blue : #2a76dd;
7
+ $blue_hover : #6ca0e8;
8
+ $gray_text : rgb(116, 129, 141);
9
+ $gray_element : rgb(230, 236, 241);
10
+ $gray_light : rgb(245, 247, 249);
11
+ $red : rgb(255, 70, 66);
12
+
13
+ @mixin color($property, $var, $fallback){
14
+ #{$property}: $fallback; // This is a fallback for browsers that don't support the next line.
15
+ #{$property}: var($var, $fallback);
16
+ }
17
+
18
+ @mixin frosted-glass{
19
+ @supports (-webkit-backdrop-filter: none) or (backdrop-filter: none) {
20
+ -webkit-backdrop-filter: saturate(180%) blur(20px) brightness(150%);
21
+ backdrop-filter: saturate(180%) blur(20px) brightness(150%);
22
+ // transition: background-color 0.5s cubic-bezier(0.28, 0.11, 0.32, 1);
23
+ }
24
+ }
25
+
26
+ // Dark theme colors
27
+ .theme-dark{
28
+ --background-color : #121212;
29
+ --text-color : rgba(255, 255, 255, 0.87);
30
+ --gray-element : rgba(255, 255, 255, 0.38);
31
+ --gray-text : rgba(255, 255, 255, 0.6);
32
+ --float-color : #222;
33
+ --dark-shadow1 : #000;
34
+ --dark-shadow2 : rgba(0,0,0,0.5);
35
+ --dark-shadow3 : rgba(0,0,0,0.1);
36
+ --dark-frosted-glass : #22222280;
37
+
38
+
39
+ #navbar{
40
+ @include frosted-glass;
41
+ }
42
+ }
43
+
44
+ .theme-transit {
45
+ transition: background-color 1s;
46
+ }
47
+
48
+
49
+ // Fonts
50
+
51
+ $font_normal : -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;
52
+ $font_code : SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace;
53
+
54
+ // Font Sizes
55
+
56
+ $Huge : 32pt; // main-header
57
+ $huge : 27pt; // header
58
+ $LARGE : 22pt; // h1
59
+ $Large : 18pt; // h2
60
+ $large : 16pt; // h3
61
+
62
+ $normalsize : 14pt;
63
+
64
+ $small : 13pt;
65
+ $footnotesize : 12pt;
66
+
67
+ // $Huge : 2.7rem; // main-header
68
+ // $huge : 2.2rem; // header
69
+ // $LARGE : 2rem; // h1
70
+ // $Large : 1.7rem; // h2
71
+ // $large : 1.5rem; // h3
72
+
73
+ // $normalsize : 1.1rem;
74
+
75
+ // $small : 1rem;
76
+ // $footnotesize : 0.9rem;
77
+
78
+
79
+
80
+ @mixin indented-box($side-color) {
81
+ padding-left: 10px;
82
+ margin: 10px;
83
+ border-left: 4px solid $side-color;
84
+ }
85
+
86
+ @mixin float-card {
87
+ z-index: 2;
88
+ border-radius: 10px;
89
+ border-width: 0px;
90
+ margin: 10px 0;
91
+ box-shadow: 9px 9px 16px rgba(0,0,0,0.1), -9px -9px 16px rgba(0,0,0,0.01);
92
+ box-shadow: 9px 9px 16px var(--dark-shadow2, rgba(0,0,0,0.1)), -9px -9px 16px var(--dark-shadow3, rgba(0,0,0,0.01));
93
+ @include color(background-color, --float-color, #fff);
94
+ }
95
+
96
+ @mixin gray-link {
97
+ a {
98
+ @include color(color, --gray-text, $gray_text);
99
+ @content;
100
+
101
+ &:hover {
102
+ color: $blue_hover;
103
+ }
104
+ }
105
+ }
106
+
107
+
108
+ // Break Points
109
+ $desktop-min-width: 1000px;
110
+ $phone-max-width: 500px;
111
+
112
+ @mixin tablet {
113
+ @media only screen and (min-width: #{$phone-max-width}) and (max-width: #{$desktop-min-width}) {
114
+ @content;
115
+ }
116
+ }
117
+
118
+ @mixin phone {
119
+ @media only screen and (max-width: #{$phone-max-width}) {
120
+ @content;
121
+ }
122
+ }
@@ -0,0 +1,377 @@
1
+ // Universal
2
+
3
+ .container{
4
+ width: 60%;
5
+ margin: auto;
6
+ overflow: visible;
7
+ z-index: 0;
8
+ }
9
+
10
+ html {
11
+ scroll-behavior: smooth;
12
+ }
13
+
14
+ body{
15
+ font-family: $font_normal;
16
+ font-size: $normalsize;
17
+ font-weight: 400;
18
+ line-height: 1.6;
19
+ margin: 0;
20
+ @include color(background-color, --background-color, $background_color);
21
+ @include color(color, --text-color, $text_color);
22
+ }
23
+
24
+ ::selection{
25
+ color: $blue_hover
26
+ }
27
+
28
+ .header {
29
+ font-size: $huge;
30
+ font-weight: 700;
31
+ }
32
+
33
+ h1{
34
+ font-size: $LARGE;
35
+ font-weight: 700;
36
+ }
37
+
38
+ h2{
39
+ font-size: $Large;
40
+ font-weight: 600;
41
+ }
42
+
43
+ h3{
44
+ font-size: $large;
45
+ font-weight: 600;
46
+ }
47
+
48
+ h4{
49
+ font-size: $normalsize;
50
+ font-weight: 400;
51
+ }
52
+
53
+ p {
54
+ padding-bottom: 10px;
55
+ }
56
+
57
+ a{
58
+ @include color(color, --text-color, $text_color);
59
+
60
+ &:hover{
61
+ color: $blue_hover;
62
+ }
63
+ }
64
+
65
+ ul {
66
+ list-style: square;
67
+ }
68
+
69
+ audio,
70
+ canvas,
71
+ iframe,
72
+ img,
73
+ svg,
74
+ video {
75
+ vertical-align: middle;
76
+ max-width: 100%;
77
+ }
78
+
79
+ // Preventing broken image symbol when using lazysizes
80
+ img.lazyload:not([src]) {
81
+ visibility: hidden;
82
+ }
83
+
84
+ figure {
85
+ margin-left: 0;
86
+ margin-right: 0;
87
+ }
88
+
89
+ figure > img {
90
+ display: block;
91
+ width: 60%;
92
+ margin: auto;
93
+ border-radius: 10px;
94
+ }
95
+
96
+ figcaption {
97
+ @include color(color, --gray-text, $gray_text);
98
+ font-size: $small;
99
+ text-align: center;
100
+ margin-top: 10px;
101
+ }
102
+
103
+ table {
104
+ margin: auto;
105
+ border-collapse: collapse;
106
+ width: 90%;
107
+ }
108
+
109
+ th, td {
110
+ padding: 10px;
111
+ }
112
+
113
+ tbody tr:hover {
114
+ @include color(background-color, --float-color, $gray_light);
115
+ }
116
+
117
+ caption {
118
+ @extend figcaption;
119
+ }
120
+
121
+ hr {
122
+ border: 0;
123
+ height: 2px;
124
+ @include color(background-color, --gray-element, $gray_element);
125
+ }
126
+
127
+ .footnotes {
128
+ ol {
129
+ font-size: $footnotesize;
130
+ }
131
+
132
+ p {
133
+ margin: 5px 0;
134
+ padding-bottom: 0;
135
+ }
136
+ }
137
+
138
+ .reversefootnote {
139
+ color: $blue;
140
+ text-decoration: none;
141
+
142
+ &:hover {
143
+ color: $blue_hover;
144
+ }
145
+ }
146
+
147
+
148
+
149
+ // Adjustment for anchor tag positioning with fixed header
150
+ :target {
151
+ &[id^="fn"]{
152
+ padding-top: 65px;
153
+ margin-top: -65px;
154
+ color: $blue;
155
+ a {
156
+ color: $blue;
157
+ }
158
+ }
159
+
160
+ &:not(div):not([id^="fn"]):before{
161
+ content: "";
162
+ display: block;
163
+ padding-top: 65px;
164
+ margin-top: -65px;
165
+ }
166
+ }
167
+
168
+
169
+
170
+ // Helper classes
171
+
172
+ .separator{
173
+ margin-top: 60px;
174
+ }
175
+
176
+ .no-select {
177
+ -webkit-touch-callout: none;
178
+ -webkit-user-select: none;
179
+ -moz-user-select: none;
180
+ -ms-user-select: none;
181
+ user-select: none;
182
+ }
183
+
184
+ // Hide visually and maintain layout, but not from screen readers
185
+ .transparent {
186
+ opacity: 0;
187
+ }
188
+
189
+ // Hide visually and from screen readers, but maintain layout
190
+ // .invisible {
191
+ // visibility: hidden;
192
+ // }
193
+
194
+
195
+ // Hide visually and from screen readers
196
+ // .hidden, [hidden] {
197
+ // display: none !important;
198
+ // }
199
+
200
+ // Like display: none; but visible to screen readers
201
+ // .visuallyhidden {
202
+ // position: absolute;
203
+ // overflow: hidden;
204
+ // clip: rect(0 0 0 0);
205
+ // height: 1px; width: 1px;
206
+ // margin: -1px; padding: 0; border: 0;
207
+ // }
208
+
209
+ // +--------------------+----------------+-----------------+
210
+ // | Property | occupies space | consumes clicks |
211
+ // +--------------------+----------------+-----------------+
212
+ // | opacity: 0 | ✓ | ✓ |
213
+ // +--------------------+----------------+-----------------+
214
+ // | visibility: hidden | ✓ | ✗ |
215
+ // +--------------------+----------------+-----------------+
216
+ // | display: none | ✗ | ✗ |
217
+ // +--------------------+----------------+-----------------+
218
+
219
+
220
+ // Indented boxes
221
+
222
+ blockquote {
223
+ border-left-color: $gray_element;
224
+ @include indented-box(var(--gray-element, $gray_element));
225
+ p {
226
+ padding-bottom: 0;
227
+ }
228
+
229
+ &:not([class]) {
230
+ @include color(color, --gray-text, $gray_text);
231
+ @include gray-link;
232
+ }
233
+ }
234
+
235
+ .hint {
236
+ border-left-color: $blue;
237
+ }
238
+
239
+ .danger {
240
+ border-left-color: $red;
241
+ }
242
+
243
+
244
+
245
+ // Main Header
246
+
247
+ #main-header {
248
+ padding-top: 40px;
249
+ padding-bottom: 10px;
250
+ cursor: default;
251
+
252
+ a{
253
+ text-decoration: none;
254
+ font-family: 'Black Ops One', 'Source Code Pro', sans-serif;
255
+ font-size: $Huge;
256
+ margin: 0;
257
+ @include color(color, --text-color, $text_color);
258
+ }
259
+ }
260
+
261
+
262
+
263
+ // Navigation
264
+
265
+ #navbar{
266
+ @include color(background-color, --background-color, $background_color);
267
+ width: 100%;
268
+ padding: 15px 0;
269
+ z-index: 10;
270
+
271
+ .container {
272
+ display: flex;
273
+ align-items: center;
274
+ line-height: 1.5;
275
+ }
276
+
277
+ a{
278
+ color: $blue;
279
+ text-decoration: none;
280
+ font-weight: 600;
281
+ border-radius: 5px;
282
+ border: none;
283
+ padding: 0px 6px;
284
+ margin-right: 10px;
285
+ transition: background-color 0.3s ease-in;
286
+ display: inline-block;
287
+ }
288
+
289
+ a:not(.current):hover{
290
+ color: #fff;
291
+ background-color: $blue_hover;
292
+ }
293
+
294
+ .current{
295
+ color: #fff;
296
+ background-color: $blue;
297
+ cursor: default;
298
+ }
299
+
300
+ .icon {
301
+ display: block;
302
+ }
303
+ }
304
+
305
+ .sticky {
306
+ position: sticky;
307
+ top: 0;
308
+ box-shadow: 0 12px 12px -12px rgba(0, 0, 0, 0.5);
309
+ box-shadow: 0 12px 12px -12px var(--dark-shadow1, rgba(0, 0, 0, 0.5));
310
+ }
311
+
312
+ #dark-toggle-box {
313
+ display: none;
314
+ }
315
+
316
+ #dark-toggle-label {
317
+ margin-left: auto;
318
+ margin-right: 10px;
319
+ transition: all 0.3s ease-in-out;
320
+ transition-property: opacity, transform;
321
+ cursor: pointer;
322
+ display: none;
323
+ }
324
+
325
+ // Check support for CSS variable
326
+ @supports ( (--a: 0)) {
327
+ #dark-toggle-label {
328
+ display: block;
329
+ }
330
+ }
331
+
332
+ #dark-toggle-box:checked + #dark-toggle-label {
333
+ transform: rotate(180deg);
334
+ }
335
+
336
+ #navbar:hover #dark-toggle-label{
337
+ opacity: 1;
338
+ }
339
+
340
+
341
+
342
+ // Footer
343
+
344
+ #main-footer{
345
+ @include color(color, --gray-text, $gray_text);
346
+ @include gray-link;
347
+ margin-top: 60px;
348
+ padding-bottom: 60px;
349
+ font-size: $footnotesize;
350
+ font-weight: 300;
351
+
352
+ i, .icon {
353
+ margin-right: 5px;
354
+ }
355
+ }
356
+
357
+ #copyleft{
358
+ transition: opacity 0.15s;
359
+ }
360
+
361
+ #key:hover:after{
362
+ display: inline-block;
363
+ content: attr(aria-label);
364
+ }
365
+
366
+
367
+
368
+ // Icons if not using Font Awesome Kit
369
+
370
+ .icon {
371
+ display: inline-block;
372
+ width: 1em;
373
+ height: 1em;
374
+ stroke-width: 0;
375
+ stroke: currentColor;
376
+ fill: currentColor;
377
+ }