hematite 0.1.14 → 0.1.15
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 +4 -4
- data/_includes/img/chain-link.svg +29 -0
- data/_includes/settings.html +1 -0
- data/_sass/_colors.scss +40 -7
- data/_sass/_elements.scss +4 -0
- data/_sass/_layout.scss +18 -5
- data/assets/js/Settings.mjs +12 -13
- data/assets/js/linkButtonGenerator.mjs +5 -2
- data/assets/string_data/en.mjs +1 -0
- data/assets/string_data/es.mjs +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a65a76e006bbd87ea26a66325be19c7acb2308d195f05763874847ed12e57b45
|
4
|
+
data.tar.gz: 1236b78bc5fc3da5b7135690276bb054aad7fe0c83f8dcf0cfe94ced4fce401d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4dd620ed3184b4d68aaa698f8fe9d5266e1f75dd9dc8daaa397a8d8ce107d95d32dd18efb85a7646bbe28e25d108b8e5ac6e7597c82879eced10e15d9c5ccfc3
|
7
|
+
data.tar.gz: ddc863b0e58fc4386c43a6d421de74f538d581aa4956875e25afc8a27f9d651de1c5116f75e3d5cc6bd7f2812458b64fedb2788c612382c9d9a99c13418674be
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<svg class="chain-link-root" width="120" height="120" version="1.1" viewBox="5 0 115 115" xmlns="http://www.w3.org/2000/svg">
|
3
|
+
<style>
|
4
|
+
.chain-link-group {
|
5
|
+
stroke: var(--primary-text-color);
|
6
|
+
fill: var(--primary-text-color);
|
7
|
+
transform: scale(1, 1);
|
8
|
+
cursor: pointer;
|
9
|
+
|
10
|
+
transition: transform 0.5s ease;
|
11
|
+
}
|
12
|
+
|
13
|
+
*:hover > .chain-link-root > .chain-link-group, *:focus-visible > .chain-link-root > .chain-link-group {
|
14
|
+
transform: scale(0.9, 0.9) rotate(3deg);
|
15
|
+
}
|
16
|
+
|
17
|
+
.first-link {
|
18
|
+
transition: transform 0.5s ease;
|
19
|
+
}
|
20
|
+
|
21
|
+
*:hover > .chain-link-root .first-link, *:focus-visible > .chain-link-root .first-link {
|
22
|
+
transform: rotate(-1deg) translate(3px, 5px);
|
23
|
+
}
|
24
|
+
</style>
|
25
|
+
<g class="chain-link-group" stroke-width="1.3073px">
|
26
|
+
<path class="first-link" d="m33.397 50.158c-2.6598 5.036-2.2862 10.261-1.9847 14.517 0 0-15.64 22.738-7.7042 28.627 11.282 8.3732 27.844-11.316 35.784-22.274 4.6398-6.404 11.497-17.806 4.8574-22.551-4.4648-3.1911-15.534 6.396-15.534 6.396 2.4001-4.8081 3.8451-9.2997 8.8749-14.979 0 0 12.876-7.89 17.582-4.4037 10.785 7.9897 4.045 26.844-2.9517 37.755-11.67 18.198-40.276 49.141-57.96 35.093-15.977-12.692 19.037-58.18 19.037-58.18z"/>
|
27
|
+
<path class="second-link chain-link" d="m76.584 70.435c3.391-6.7587 5.3144-12.629 6.102-17.811 0 0 15.266-26.145 6.953-34.912-9.4283-9.9438-27.656 11.689-35.415 22.752-4.5343 6.4656-10.798 17.514-4.4871 22.614 3.5372 2.8589 13.627-3.6947 13.627-3.6947-3.7755 9.069-3.9072 9.1256-8.0298 14.333 0 0-12.197 5.8204-16.306 2.4937-10.388-8.4101-4.8557-26.982 2.3324-37.79 11.277-16.957 39.806-44.356 56.165-30.668 7.7991 6.5255 4.0194 21.892 0.36418 31.865-2.4291 6.628-21.307 30.818-21.307 30.818z"/>
|
28
|
+
</g>
|
29
|
+
</svg>
|
data/_includes/settings.html
CHANGED
@@ -59,6 +59,7 @@ pageThemeSelect.innerHTML =
|
|
59
59
|
`
|
60
60
|
<option value='${Settings.THEME_AUTO}'>${stringLookup('page_theme_auto')}</option>
|
61
61
|
<option value='${Settings.THEME_DARK}'>${stringLookup('page_theme_dark')}</option>
|
62
|
+
<option value='${Settings.THEME_DARKEST}'>${stringLookup('page_theme_darkest')}</option>
|
62
63
|
<option value='${Settings.THEME_LIGHT}'>${stringLookup('page_theme_light')}</option>
|
63
64
|
`;
|
64
65
|
|
data/_sass/_colors.scss
CHANGED
@@ -29,15 +29,11 @@
|
|
29
29
|
--syntax-comment-fg: #338;
|
30
30
|
--syntax-name-fg: #331;
|
31
31
|
--syntax-normal-fg: black;
|
32
|
+
--code-background-color: #f9f5f5;
|
32
33
|
}
|
33
34
|
|
34
|
-
@media screen {
|
35
|
-
:root:not(.darkTheme), :root.lightTheme {
|
36
|
-
--code-background-color: #f9f5f5;
|
37
|
-
}
|
38
|
-
}
|
39
35
|
|
40
|
-
@mixin dark-theme-colors {
|
36
|
+
@mixin very-dark-theme-colors {
|
41
37
|
--primary-text-color: white;
|
42
38
|
--secondary-text-color: white;
|
43
39
|
--text-color-faint: #ccc;
|
@@ -47,7 +43,7 @@
|
|
47
43
|
--selected-item-fg-color: white;
|
48
44
|
--selected-item-bg-color: #530033;
|
49
45
|
|
50
|
-
--primary-background-color:
|
46
|
+
--primary-background-color: #000;
|
51
47
|
--secondary-background-color: #111;
|
52
48
|
--code-background-color: #222;
|
53
49
|
--line-color-light: #222;
|
@@ -70,6 +66,39 @@
|
|
70
66
|
--syntax-normal-fg: white;
|
71
67
|
}
|
72
68
|
|
69
|
+
@mixin dark-theme-colors {
|
70
|
+
--primary-text-color: white;
|
71
|
+
--secondary-text-color: white;
|
72
|
+
--text-color-faint: #ccc;
|
73
|
+
--link-color: #fa0;
|
74
|
+
--visited-link-color: #f0a;
|
75
|
+
|
76
|
+
--selected-item-fg-color: white;
|
77
|
+
--selected-item-bg-color: #530033;
|
78
|
+
|
79
|
+
--primary-background-color: #333;
|
80
|
+
--secondary-background-color: #222;
|
81
|
+
--code-background-color: #222;
|
82
|
+
--line-color-light: #555;
|
83
|
+
--line-color-normal: #aaa;
|
84
|
+
|
85
|
+
--color-alert-background: #300;
|
86
|
+
--color-alert-foreground: white;
|
87
|
+
|
88
|
+
--shadow-color-light: rgba(220, 220, 200, 0.5);
|
89
|
+
|
90
|
+
|
91
|
+
// Syntax highlighting
|
92
|
+
--syntax-keyword-fg: pink;
|
93
|
+
--syntax-string-fg: #cfc;
|
94
|
+
--syntax-number-fg: #eef;
|
95
|
+
--syntax-bracket-fg: #faf;
|
96
|
+
--syntax-operator-fg: #aff;
|
97
|
+
--syntax-comment-fg: #aef;
|
98
|
+
--syntax-name-fg: #edf;
|
99
|
+
--syntax-normal-fg: white;
|
100
|
+
}
|
101
|
+
|
73
102
|
@media screen and (prefers-color-scheme: dark) {
|
74
103
|
:root:not(.lightTheme) {
|
75
104
|
@include dark-theme-colors;
|
@@ -80,5 +109,9 @@
|
|
80
109
|
:root.darkTheme {
|
81
110
|
@include dark-theme-colors;
|
82
111
|
}
|
112
|
+
|
113
|
+
:root.veryDarkTheme {
|
114
|
+
@include very-dark-theme-colors;
|
115
|
+
}
|
83
116
|
}
|
84
117
|
|
data/_sass/_elements.scss
CHANGED
data/_sass/_layout.scss
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
@import "_calendar";
|
5
5
|
|
6
6
|
.main-container {
|
7
|
-
box-shadow:
|
7
|
+
box-shadow: 0px -1px 2px var(--shadow-color-light);
|
8
8
|
background-color: var(--primary-background-color);
|
9
9
|
|
10
10
|
max-width: $site-content-preferred-width;
|
@@ -139,15 +139,28 @@ nav#post_next_prev {
|
|
139
139
|
}
|
140
140
|
|
141
141
|
.linkToHeaderContainer {
|
142
|
-
float: right;
|
143
|
-
opacity: 0.1;
|
144
142
|
cursor: pointer;
|
143
|
+
position: absolute;
|
144
|
+
opacity: 0;
|
145
|
+
|
146
|
+
a {
|
147
|
+
margin-left: -1em;
|
148
|
+
|
149
|
+
svg {
|
150
|
+
width: 1em;
|
151
|
+
height: 0.7em;
|
152
|
+
}
|
153
|
+
}
|
145
154
|
|
146
155
|
transition: opacity 0.2s ease;
|
147
156
|
}
|
148
157
|
|
149
|
-
|
150
|
-
|
158
|
+
h1, h2, h3, h4, h5, h6 {
|
159
|
+
&:hover, &:focus-visible {
|
160
|
+
.linkToHeaderContainer {
|
161
|
+
opacity: 1;
|
162
|
+
}
|
163
|
+
}
|
151
164
|
}
|
152
165
|
|
153
166
|
.spacer {
|
data/assets/js/Settings.mjs
CHANGED
@@ -8,6 +8,7 @@ const THEME_TRANSITION_TIME = 500; // ms
|
|
8
8
|
class Settings {
|
9
9
|
THEME_AUTO = 'auto';
|
10
10
|
THEME_DARK = 'dark';
|
11
|
+
THEME_DARKEST = 'darkest';
|
11
12
|
THEME_LIGHT = 'light';
|
12
13
|
|
13
14
|
FONT_DEFAULT = 'default';
|
@@ -94,20 +95,13 @@ class Settings {
|
|
94
95
|
return this.getFontSize() != this.FONT_SIZE_DEFAULT;
|
95
96
|
}
|
96
97
|
|
97
|
-
forcingDarkTheme_() {
|
98
|
-
return this.getTheme() == this.THEME_DARK;
|
99
|
-
}
|
100
|
-
|
101
|
-
forcingLightTheme_() {
|
102
|
-
return this.getTheme() == this.THEME_LIGHT;
|
103
|
-
}
|
104
|
-
|
105
98
|
async applySettings() {
|
106
99
|
document.documentElement.classList.add("changingTheme");
|
107
100
|
|
108
101
|
// Clean up previous changes. We might be re-applying styles.
|
109
102
|
document.documentElement.classList.remove("lightTheme");
|
110
103
|
document.documentElement.classList.remove("darkTheme");
|
104
|
+
document.documentElement.classList.remove("veryDarkTheme");
|
111
105
|
|
112
106
|
if (!this.style_) {
|
113
107
|
this.style_ = document.createElement("style");
|
@@ -147,11 +141,16 @@ class Settings {
|
|
147
141
|
document.documentElement.appendChild(this.style_);
|
148
142
|
|
149
143
|
// Theme
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
144
|
+
switch (this.getTheme()) {
|
145
|
+
case this.THEME_DARK:
|
146
|
+
document.documentElement.classList.add("darkTheme");
|
147
|
+
break;
|
148
|
+
case this.THEME_DARKEST:
|
149
|
+
document.documentElement.classList.add("veryDarkTheme");
|
150
|
+
break;
|
151
|
+
case this.THEME_LIGHT:
|
152
|
+
document.documentElement.classList.add("lightTheme");
|
153
|
+
break;
|
155
154
|
}
|
156
155
|
|
157
156
|
if (this.getHeaderMinimized()) {
|
@@ -1,8 +1,10 @@
|
|
1
|
+
---
|
2
|
+
---
|
1
3
|
|
2
4
|
import { PageAlert } from "./PageAlert.mjs";
|
3
5
|
import { stringLookup as _L } from './strings.mjs';
|
4
6
|
|
5
|
-
const
|
7
|
+
const INTERIOR_LINK_CONTENT_HTML = `{% include img/chain-link.svg %}`;
|
6
8
|
const INTERIOR_LINK_CONTAINER_CLSS = "linkToHeaderContainer";
|
7
9
|
|
8
10
|
/// Creates 🔗 buttons for every header with an ID.
|
@@ -25,9 +27,10 @@ function createLinkButton_(header) {
|
|
25
27
|
let headerText = header.innerText;
|
26
28
|
|
27
29
|
container.classList.add(INTERIOR_LINK_CONTAINER_CLSS);
|
28
|
-
link.innerText = INTERIOR_LINK_TEXT;
|
29
30
|
link.title = _L("copy_link_to_header", headerText);
|
30
31
|
link.href = `#${header.getAttribute('id')}`;
|
32
|
+
link.innerHTML = INTERIOR_LINK_CONTENT_HTML;
|
33
|
+
|
31
34
|
link.onclick = () => {
|
32
35
|
navigator.clipboard.writeText(link.href);
|
33
36
|
PageAlert.builder()
|
data/assets/string_data/en.mjs
CHANGED
data/assets/string_data/es.mjs
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hematite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henry Heino
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-06-
|
11
|
+
date: 2022-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -36,6 +36,7 @@ files:
|
|
36
36
|
- _config.yml
|
37
37
|
- _includes/extern_library_imports.html
|
38
38
|
- _includes/footer.html
|
39
|
+
- _includes/img/chain-link.svg
|
39
40
|
- _includes/img/hamburger_menu.svg
|
40
41
|
- _includes/img/loading_icon.svg
|
41
42
|
- _includes/img/search_icon.svg
|