hexo-theme-gnix 5.0.4 → 5.0.5
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.
- package/layout/common/navbar.jsx +26 -39
- package/layout/common/toc.jsx +0 -1
- package/package.json +1 -1
- package/source/css/default.css +17 -18
package/layout/common/navbar.jsx
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
const {
|
|
1
|
+
const {
|
|
2
|
+
Component,
|
|
3
|
+
Fragment,
|
|
4
|
+
cacheComponent,
|
|
5
|
+
} = require("../../include/util/common");
|
|
2
6
|
|
|
3
7
|
function isSameLink(a, b) {
|
|
4
8
|
function santize(url) {
|
|
@@ -20,11 +24,11 @@ const renderLinkIcon = (link) => {
|
|
|
20
24
|
// start with '<' means svg icon
|
|
21
25
|
if (link.icon === "travellings") {
|
|
22
26
|
return (
|
|
23
|
-
<svg viewBox="0 0
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
d="
|
|
27
|
-
|
|
27
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
28
|
+
<title>train_4_line</title>
|
|
29
|
+
<g id="train_4_line" fill="currentColor">
|
|
30
|
+
<path d="M14.72 2a5 5 0 0 1 4.855 3.802l.049.217 1.4 7c.496 2.482-.929 4.83-3.14 5.663l-.21.073L19.6 20.2a1 1 0 0 1-1.095 1.669L18.4 21.8 14.667 19H9.333L5.6 21.8a1 1 0 0 1-1.296-1.518L4.4 20.2l1.926-1.445c-2.26-.735-3.768-3.031-3.39-5.503l.04-.233 1.4-7a5 5 0 0 1 4.68-4.014L9.28 2h5.442Zm0 2H9.28a3 3 0 0 0-2.943 2.412l-1.4 7A3 3 0 0 0 7.88 17h8.242a3 3 0 0 0 2.942-3.588l-1.4-7A3 3 0 0 0 14.72 4m-6.47 9.25a1.25 1.25 0 1 1 0 2.5 1.25 1.25 0 0 1 0-2.5m7.5 0a1.25 1.25 0 1 1 0 2.5 1.25 1.25 0 0 1 0-2.5M14.61 6a1.5 1.5 0 0 1 1.416 1.005l.039.131.75 3a1.5 1.5 0 0 1-1.324 1.858L15.36 12H8.64a1.5 1.5 0 0 1-1.481-1.735l.026-.129.75-3a1.5 1.5 0 0 1 1.319-1.13L9.39 6zm-.39 2H9.78l-.5 2h5.44z"></path>
|
|
31
|
+
</g>
|
|
28
32
|
</svg>
|
|
29
33
|
);
|
|
30
34
|
}
|
|
@@ -38,8 +42,13 @@ class Navbar extends Component {
|
|
|
38
42
|
return (
|
|
39
43
|
<nav class="navbar navbar-main" onclick="handleNavbarClick(event);">
|
|
40
44
|
<div class="navbar-container">
|
|
41
|
-
<a
|
|
42
|
-
|
|
45
|
+
<a
|
|
46
|
+
href={siteUrl}
|
|
47
|
+
style={
|
|
48
|
+
"font-family: homemade-apple; color: var(--text); display: flex; align-items: center; padding: 0 1em;"
|
|
49
|
+
}
|
|
50
|
+
>
|
|
51
|
+
GnixAij
|
|
43
52
|
</a>
|
|
44
53
|
<div class="navbar-menu">
|
|
45
54
|
{Object.keys(menu).length ? (
|
|
@@ -58,30 +67,14 @@ class Navbar extends Component {
|
|
|
58
67
|
<div class="navbar-end">
|
|
59
68
|
<button
|
|
60
69
|
type="button"
|
|
61
|
-
class="navbar-item
|
|
70
|
+
class="navbar-item"
|
|
62
71
|
title="Choose Theme"
|
|
63
72
|
onclick="window.openThemeModal?.()"
|
|
64
73
|
>
|
|
65
|
-
<svg viewBox="0 0
|
|
66
|
-
<
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
d="M14 12.5v-3A1.5 1.5 0 0 0 12.5 8H3a3 3 0 1 0 0 6h9.5a1.5 1.5 0 0 0 1.5-1.5"
|
|
70
|
-
></path>
|
|
71
|
-
<path
|
|
72
|
-
fill="var(--blue)"
|
|
73
|
-
d="M12.339 3.783L10.218 1.66a1.5 1.5 0 0 0-2.122 0L.88 8.88a3 3 0 0 0 4.24 4.24l7.218-7.217a1.5 1.5 0 0 0 0-2.121"
|
|
74
|
-
></path>
|
|
75
|
-
<path
|
|
76
|
-
fill="var(--green)"
|
|
77
|
-
d="M4.5 0h-3A1.5 1.5 0 0 0 0 1.5V11a3 3 0 0 0 6 0V1.5A1.5 1.5 0 0 0 4.5 0"
|
|
78
|
-
></path>
|
|
79
|
-
<path
|
|
80
|
-
fill="var(--base)"
|
|
81
|
-
fill-rule="evenodd"
|
|
82
|
-
d="M1.395 3.375a.625.625 0 1 0 0 1.25h3.21a.625.625 0 1 0 0-1.25zm0 4.5a.625.625 0 1 0 0 1.25h3.21a.625.625 0 1 0 0-1.25z"
|
|
83
|
-
clip-rule="evenodd"
|
|
84
|
-
></path>
|
|
74
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
75
|
+
<title>brightness_fill</title>
|
|
76
|
+
<g id="brightness_fill" fill="currentColor">
|
|
77
|
+
<path d="M12 18.5a1.5 1.5 0 0 1 1.493 1.356L13.5 20v1a1.5 1.5 0 0 1-2.993.144L10.5 21v-1a1.5 1.5 0 0 1 1.5-1.5m4.596-1.904a1.5 1.5 0 0 1 2.008-.103l.114.103.707.707a1.5 1.5 0 0 1-2.008 2.225l-.114-.103-.707-.707a1.5 1.5 0 0 1 0-2.122m-11.314 0a1.5 1.5 0 0 1 2.225 2.008l-.103.114-.707.707a1.5 1.5 0 0 1-2.225-2.008l.103-.114zM12 6a6 6 0 1 1 0 12 6 6 0 0 1 0-12m0 3a3 3 0 0 0-.176 5.995L12 15zm-8 1.5a1.5 1.5 0 0 1 .144 2.993L4 13.5H3a1.5 1.5 0 0 1-.144-2.993L3 10.5zm17 0a1.5 1.5 0 0 1 .144 2.993L21 13.5h-1a1.5 1.5 0 0 1-.144-2.993L20 10.5zM4.575 4.575a1.5 1.5 0 0 1 2.008-.103l.114.103.707.707a1.5 1.5 0 0 1-2.008 2.225l-.114-.103-.707-.707a1.5 1.5 0 0 1 0-2.122m12.728 0a1.5 1.5 0 0 1 2.225 2.008l-.103.114-.707.707a1.5 1.5 0 0 1-2.225-2.008l.103-.114zM12 1.5a1.5 1.5 0 0 1 1.493 1.356L13.5 3v1a1.5 1.5 0 0 1-2.993.144L10.5 4V3A1.5 1.5 0 0 1 12 1.5"></path>
|
|
85
78
|
</g>
|
|
86
79
|
</svg>
|
|
87
80
|
</button>
|
|
@@ -109,16 +102,10 @@ class Navbar extends Component {
|
|
|
109
102
|
class="navbar-item search"
|
|
110
103
|
title={searchTitle}
|
|
111
104
|
>
|
|
112
|
-
<svg viewBox="0 0
|
|
113
|
-
<
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
d="M.5.125a.5.5 0 0 0-.5.5v10a.5.5 0 0 0 .5.5h4.756A4.5 4.5 0 0 1 5 9.625c0-1.271.527-2.42 1.375-3.238v-4.96A2 2 0 0 0 4.5.126zm7.125 1.303v4.105a4.5 4.5 0 0 1 6.347 3.584H14V.625a.5.5 0 0 0-.5-.5h-4a2 2 0 0 0-1.875 1.303"
|
|
117
|
-
/>
|
|
118
|
-
<path
|
|
119
|
-
fill="var(--blue)"
|
|
120
|
-
d="M7.75 9.625a1.75 1.75 0 1 1 3.5 0a1.75 1.75 0 0 1-3.5 0m1.75-3.25a3.25 3.25 0 1 0 1.706 6.017l1.263 1.263a.75.75 0 0 0 1.06-1.06l-1.262-1.264A3.25 3.25 0 0 0 9.5 6.375"
|
|
121
|
-
/>
|
|
105
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
106
|
+
<title>search_line</title>
|
|
107
|
+
<g id="search_line" fill="currentColor">
|
|
108
|
+
<path d="M10.5 2a8.5 8.5 0 1 0 5.262 15.176l3.652 3.652a1 1 0 0 0 1.414-1.414l-3.652-3.652A8.5 8.5 0 0 0 10.5 2M4 10.5a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0"></path>
|
|
122
109
|
</g>
|
|
123
110
|
</svg>
|
|
124
111
|
</button>
|
package/layout/common/toc.jsx
CHANGED
package/package.json
CHANGED
package/source/css/default.css
CHANGED
|
@@ -425,7 +425,7 @@ body {
|
|
|
425
425
|
top: env(safe-area-inset-top);
|
|
426
426
|
left: 0;
|
|
427
427
|
right: 0;
|
|
428
|
-
transition: transform 0.3s ease-in-out;
|
|
428
|
+
/* transition: transform 0.3s ease-in-out; */
|
|
429
429
|
z-index: 100;
|
|
430
430
|
font-family: var(--font-sans-serif);
|
|
431
431
|
border-bottom: 0.5px solid var(--surface0);
|
|
@@ -437,12 +437,11 @@ body {
|
|
|
437
437
|
width: auto;
|
|
438
438
|
display: flex;
|
|
439
439
|
min-height: 4rem;
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
cursor: pointer;
|
|
440
|
+
button {
|
|
441
|
+
background: none;
|
|
442
|
+
border: none;
|
|
443
|
+
cursor: pointer;
|
|
444
|
+
}
|
|
446
445
|
}
|
|
447
446
|
|
|
448
447
|
.navbar-main.navbar--hidden {
|
|
@@ -458,8 +457,18 @@ body {
|
|
|
458
457
|
position: relative;
|
|
459
458
|
flex-grow: 0;
|
|
460
459
|
flex-shrink: 0;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
.navbar-end {
|
|
461
463
|
svg {
|
|
462
|
-
width:
|
|
464
|
+
width: 1.2em;
|
|
465
|
+
}
|
|
466
|
+
.navbar-item {
|
|
467
|
+
&:hover {
|
|
468
|
+
scale: 1.1;
|
|
469
|
+
transition: all 0.2s ease;
|
|
470
|
+
color: var(--lavender);
|
|
471
|
+
}
|
|
463
472
|
}
|
|
464
473
|
}
|
|
465
474
|
|
|
@@ -573,16 +582,6 @@ body {
|
|
|
573
582
|
opacity: 1;
|
|
574
583
|
}
|
|
575
584
|
|
|
576
|
-
.theme-selector-trigger {
|
|
577
|
-
cursor: pointer;
|
|
578
|
-
transition: all 0.2s ease;
|
|
579
|
-
|
|
580
|
-
&:hover {
|
|
581
|
-
color: var(--blue);
|
|
582
|
-
transform: scale(1.1);
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
|
|
586
585
|
/* #endregion Theme Selector */
|
|
587
586
|
|
|
588
587
|
/* #region Pagination */
|