hexo-theme-linen 1.0.25 → 1.0.27

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-linen",
3
- "version": "1.0.25",
3
+ "version": "1.0.27",
4
4
  "description": "A clean Hexo theme",
5
5
  "main": "index.js",
6
6
  "homepage": "https://github.com/lynanbreeze/hexo-theme-linen",
@@ -1,7 +1,7 @@
1
1
  module.exports.defaultConfig = {
2
2
  enable: false,
3
- loadingImage: "../img/lazyload/loading.svg",
4
- errorTipImage: "../img/lazyload/error-tip.svg",
3
+ loadingImage: "../linen-theme/img/lazyload/loading.svg",
4
+ errorTipImage: "../linen-theme/img/lazyload/error-tip.svg",
5
5
  intersectionRatio: 0.25,
6
6
  placeholderRatio: 3 / 2,
7
7
  showTransition: true,
@@ -17,12 +17,6 @@
17
17
  .nav-header.is-post.hide {
18
18
  transform: translateY(-100%);
19
19
  }
20
- .nav-header .header-inner .right .buttonSet .button.rss {
21
- margin-right: 16px;
22
- &:last-child {
23
- margin-right: 0;
24
- }
25
- }
26
20
  .nav-header .header-inner .right .buttonSet .button.toc {
27
21
  display: block;
28
22
  }
@@ -49,9 +43,14 @@
49
43
  -ms-overflow-style: unset;
50
44
  scrollbar-width: unset;
51
45
  @include safe-padding(15px);
52
- .toc-item-wrap:not(.active) {
53
- opacity: unset;
46
+ .toc-item-wrap {
54
47
  transition: unset;
48
+ will-change: auto;
49
+ transform: none;
50
+ &:not(.active) {
51
+ opacity: unset;
52
+ transition: unset;
53
+ }
55
54
  }
56
55
  &:hover {
57
56
  .toc-item-wrap:not(.active) {
@@ -89,7 +88,7 @@
89
88
  }
90
89
  body.resizing {
91
90
  #toc,
92
- post-series {
91
+ .post-series {
93
92
  display: none;
94
93
  }
95
94
  .nav-header {
@@ -568,8 +567,8 @@
568
567
  .nav-header .header-inner .right .navItems .navItem:not(:last-child) {
569
568
  margin-right: 10px;
570
569
  }
571
- .nav-header .header-inner .right .buttonSet .button:not(:last-child) {
572
- margin-right: 10px;
570
+ .nav-header .header-inner .right .buttonSet {
571
+ gap: 10px;
573
572
  }
574
573
  .nav-header .header-inner .right .buttonSet .button.hdr-switch {
575
574
  display: none;
@@ -286,13 +286,11 @@ body {
286
286
  flex: 0 0 auto;
287
287
  display: flex;
288
288
  align-items: center;
289
+ gap: 16px;
289
290
  .button {
290
291
  width: 25px;
291
292
  height: 25px;
292
293
  transition: opacity ease 0.3s;
293
- &:not(:last-child) {
294
- margin-right: 16px;
295
- }
296
294
  &.toc {
297
295
  background-image: url("../img/icons/toc1.svg");
298
296
  background-size: contain;
@@ -324,7 +322,6 @@ body {
324
322
  &.rss {
325
323
  background-image: url("../img/icons/rss.svg");
326
324
  background-size: cover;
327
- margin-right: 0;
328
325
  }
329
326
  &.hdr-switch {
330
327
  background-image: url("../img/icons/hdr.svg");
@@ -572,6 +569,9 @@ body {
572
569
  }
573
570
  #page-content {
574
571
  text-autospace: normal;
572
+ > :last-child {
573
+ margin-bottom: 0;
574
+ }
575
575
  }
576
576
  .post-meta {
577
577
  @include defaultFont;
@@ -934,6 +934,10 @@ body {
934
934
 
935
935
  .tags {
936
936
  @include tags;
937
+ margin-top: 1em;
938
+ &:empty {
939
+ display: none;
940
+ }
937
941
  }
938
942
  .lazyload-outer-wrap {
939
943
  .caption {
@@ -1085,12 +1089,11 @@ body {
1085
1089
  }
1086
1090
 
1087
1091
  .post-nav-wrap {
1088
- margin-top: 1em;
1092
+ margin: $postWidgetGap auto 0 auto;
1089
1093
  box-sizing: border-box;
1090
1094
  padding: 1em $commonPadding 0 $commonPadding;
1091
1095
  padding-top: 14px;
1092
1096
  background-color: #fff;
1093
- margin-bottom: 1em;
1094
1097
  .post-nav {
1095
1098
  display: flex;
1096
1099
  justify-content: space-between;
@@ -1159,7 +1162,7 @@ body {
1159
1162
  }
1160
1163
 
1161
1164
  .copyright-desc {
1162
- margin: $postWidgetGap auto;
1165
+ margin: $postWidgetGap auto 0 auto;
1163
1166
  padding: 0 $commonPadding;
1164
1167
  font-size: 14px;
1165
1168
  color: $grayerText;
@@ -1504,7 +1507,7 @@ body {
1504
1507
  }
1505
1508
  }
1506
1509
  #gitalk-container {
1507
- margin-top: 1em;
1510
+ margin-top: $postWidgetGap;
1508
1511
  padding: 0 $commonPadding;
1509
1512
  background-color: #fff;
1510
1513
  min-height: 197px;
@@ -1772,7 +1775,7 @@ body {
1772
1775
  .series-nav {
1773
1776
  background-color: #f5f5f5;
1774
1777
  width: calc(100% - min(6vw, 30px));
1775
- margin: $postWidgetGap auto 1em auto;
1778
+ margin: $postWidgetGap auto 0 auto;
1776
1779
  padding: 1em;
1777
1780
  padding-top: 0.65em;
1778
1781
  border-radius: 2px;
@@ -2338,6 +2341,11 @@ body {
2338
2341
  user-select: none;
2339
2342
  -ms-overflow-style: none;
2340
2343
  scrollbar-width: none;
2344
+ -webkit-overflow-scrolling: touch;
2345
+ -webkit-font-smoothing: antialiased;
2346
+ -moz-osx-font-smoothing: grayscale;
2347
+ -webkit-transform: translateZ(0);
2348
+ transform: translateZ(0);
2341
2349
  &::after {
2342
2350
  content: "";
2343
2351
  position: absolute;
@@ -2347,9 +2355,15 @@ body {
2347
2355
  height: 100%;
2348
2356
  background-color: #f5f5f5;
2349
2357
  }
2350
- .toc-item-wrap:not(.active) {
2351
- opacity: 0.1;
2352
- transition: ease opacity 0.3s;
2358
+ .toc-item-wrap {
2359
+ transition: opacity 0.3s ease;
2360
+ will-change: opacity;
2361
+ -webkit-backface-visibility: hidden;
2362
+ backface-visibility: hidden;
2363
+ transform: translateZ(0);
2364
+ &:not(.active) {
2365
+ opacity: 0.1;
2366
+ }
2353
2367
  }
2354
2368
  &:hover {
2355
2369
  .toc-item-wrap:not(.active) {
@@ -2462,6 +2476,11 @@ body {
2462
2476
  max-height: 100vh;
2463
2477
  overflow-y: auto;
2464
2478
  position: relative;
2479
+ -webkit-overflow-scrolling: touch;
2480
+ -webkit-font-smoothing: antialiased;
2481
+ -moz-osx-font-smoothing: grayscale;
2482
+ -webkit-transform: translateZ(0);
2483
+ transform: translateZ(0);
2465
2484
  &::after {
2466
2485
  content: "";
2467
2486
  position: absolute;
@@ -2492,10 +2511,16 @@ body {
2492
2511
  margin-bottom: 4px;
2493
2512
  }
2494
2513
  }
2495
- .series-item-link:not(.active),
2496
- .series-year-divider:not(.active) {
2497
- opacity: 0.1;
2498
- transition: ease opacity 0.3s;
2514
+ .series-item-link,
2515
+ .series-year-divider {
2516
+ transition: opacity 0.3s ease;
2517
+ will-change: opacity;
2518
+ -webkit-backface-visibility: hidden;
2519
+ backface-visibility: hidden;
2520
+ transform: translateZ(0);
2521
+ &:not(.active) {
2522
+ opacity: 0.1;
2523
+ }
2499
2524
  }
2500
2525
  &:hover {
2501
2526
  .series-item-link:not(.active),
@@ -2612,6 +2637,7 @@ html[lang="zh-CN"] {
2612
2637
  }
2613
2638
 
2614
2639
  #related-posts {
2640
+ margin-top: $postWidgetGap;
2615
2641
  @include pageXPadding;
2616
2642
  border-top: solid 1px #f5f5f5;
2617
2643
  .related-posts-title {
@@ -2664,6 +2690,7 @@ html[lang="zh-CN"] {
2664
2690
  }
2665
2691
 
2666
2692
  .sponsor-list {
2693
+ margin: $postWidgetGap auto 0 auto;
2667
2694
  padding: 0 1em;
2668
2695
  .sponsor-list-header {
2669
2696
  font-size: 1.2em;
@@ -39,9 +39,6 @@
39
39
  #toc-toggle {
40
40
  display: none;
41
41
  }
42
- .button.rss {
43
- margin-right: 0 !important;
44
- }
45
42
  .copy-btn {
46
43
  display: none;
47
44
  }
@@ -86,9 +86,6 @@ $postWidth: max(min(1192px, 68vw), 960px);
86
86
  @mixin tags {
87
87
  @include defaultFont;
88
88
  margin-bottom: -10px;
89
- &:last-child {
90
- margin-bottom: calc(1rem - 10px);
91
- }
92
89
  .tag-item {
93
90
  background-color: #f5f5f5;
94
91
  padding: 4px 7px 4px 6px;