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.
@@ -1,4 +1,8 @@
1
- const { Component, Fragment, cacheComponent } = require("../../include/util/common");
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 448 512" role="img" aria-label="Travellings Icon">
24
- <path
25
- fill="var(--text)"
26
- d="M96 0C43 0 0 43 0 96v256c0 48 35.2 87.7 81.1 94.9l-46 46c-7 7-2 19.1 7.9 19.1h39.7c8.5 0 16.6-3.4 22.6-9.4L160 448h128l54.6 54.6c6 6 14.1 9.4 22.6 9.4h39.7c10 0 15-12.1 7.9-19.1l-46-46c46-7.1 81.1-46.9 81.1-94.9V96c0-53-43-96-96-96zM64 128c0-17.7 14.3-32 32-32h80c17.7 0 32 14.3 32 32v96c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32zm208-32h80c17.7 0 32 14.3 32 32v96c0 17.7-14.3 32-32 32h-80c-17.7 0-32-14.3-32-32v-96c0-17.7 14.3-32 32-32M64 352a32 32 0 1 1 64 0a32 32 0 1 1-64 0m288-32a32 32 0 1 1 0 64a32 32 0 1 1 0-64"
27
- ></path>
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 href={siteUrl} style={"font-family: homemade-apple; color: var(--text); display: flex; align-items: center; padding: 0 1em;"}>
42
- GnixAij
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 theme-selector-trigger"
70
+ class="navbar-item"
62
71
  title="Choose Theme"
63
72
  onclick="window.openThemeModal?.()"
64
73
  >
65
- <svg viewBox="0 0 14 14" role="img" aria-label="Theme Selector">
66
- <g fill="none">
67
- <path
68
- fill="var(--red)"
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 14 14" role="img" aria-label="Search Icon">
113
- <g fill="none" fill-rule="evenodd" clip-rule="evenodd">
114
- <path
115
- fill="var(--text)"
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>
@@ -29,7 +29,6 @@ class FloatingToc extends Component {
29
29
  stroke-width="2"
30
30
  stroke-linecap="round"
31
31
  stroke-linejoin="round"
32
- aria-label="Table of Contents"
33
32
  >
34
33
  <title>Table of Contents</title>
35
34
  <line x1="8" y1="6" x2="21" y2="6"></line>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-gnix",
3
- "version": "5.0.4",
3
+ "version": "5.0.5",
4
4
  "author": "Efterklang <gaojiaxing0220@gmail.com>",
5
5
  "license": "MIT",
6
6
  "description": "Second generation of Hexo theme Icarus, now with Catppuccin flavor and night mode support.",
@@ -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
- .navbar button {
443
- background: 0 0;
444
- border: none;
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: 15px;
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 */