hexo-theme-linen 1.0.50 → 1.0.52

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.
@@ -39,6 +39,22 @@
39
39
  font-display: swap;
40
40
  unicode-range: U+4E00-9FFF, U+3000-303F, U+FF00-FFEF;
41
41
  }
42
+ @font-face {
43
+ font-family: "source han serif cn";
44
+ src:
45
+ local("STSongti-SC-Black"),
46
+ local("Songti SC Black"),
47
+ local("SongtiSC-Black"),
48
+ local("Source Han Serif SC Heavy"),
49
+ local("Source Han Serif SC Bold"),
50
+ local("Source Han Serif CN Bold"),
51
+ url("../fonts/SourceHanSerifSC-Bold.woff2?v=#{$font-version}") format("woff2");
52
+
53
+ font-weight: 800 900;
54
+ font-style: normal;
55
+ font-display: swap;
56
+ unicode-range: U+4E00-9FFF, U+3000-303F, U+FF00-FFEF;
57
+ }
42
58
  @font-face {
43
59
  font-family: "LXGWWenKai";
44
60
  font-display: swap;
@@ -640,6 +656,597 @@ body {
640
656
  color: #000;
641
657
  }
642
658
  }
659
+ &.travel-post {
660
+ #page-content {
661
+ counter-reset: travel-h2;
662
+
663
+ h2#to-page-top,
664
+ h2.to-page-top {
665
+ height: 0;
666
+ min-height: 0;
667
+ margin: 0;
668
+ padding: 0;
669
+ overflow: hidden;
670
+ font-size: 0;
671
+ line-height: 0;
672
+ border: none;
673
+ pointer-events: none;
674
+
675
+ &::before,
676
+ &::after {
677
+ content: none;
678
+ display: none;
679
+ }
680
+ }
681
+
682
+ h2:not(#to-page-top):not(.to-page-top):not(.hidden) {
683
+ @include sourceSerifFont;
684
+ counter-increment: travel-h2;
685
+ display: block;
686
+ width: 100%;
687
+ box-sizing: border-box;
688
+ position: relative;
689
+ margin: 2.5em auto 1.35em;
690
+ padding: 0.25em 0.5em;
691
+ text-align: center;
692
+ font-size: 1.53em;
693
+ font-weight: 900;
694
+ line-height: 1.35;
695
+ letter-spacing: 0.08em;
696
+ color: #1d1d1d;
697
+ word-break: normal;
698
+ overflow-wrap: break-word;
699
+ text-wrap: balance;
700
+ border-radius: 4px;
701
+ scroll-margin-top: 1.4em;
702
+ transition: opacity 0.2s ease;
703
+
704
+ &:first-child {
705
+ margin-top: 1.4em;
706
+ }
707
+
708
+ &::before {
709
+ content: "✦ " counter(travel-h2, decimal-leading-zero);
710
+ position: static;
711
+ left: auto;
712
+ top: auto;
713
+ transform: none;
714
+ display: block;
715
+ width: fit-content;
716
+ height: auto;
717
+ margin: 0 auto 10px;
718
+ padding: 0 calc(34px - 0.16em) 0 34px;
719
+ font-family: $linkFontFamily;
720
+ font-size: 11px;
721
+ font-weight: 500;
722
+ line-height: 1;
723
+ letter-spacing: 0.16em;
724
+ color: #a8452e;
725
+ opacity: 1;
726
+ background:
727
+ linear-gradient(rgba(168, 69, 46, 0.35), rgba(168, 69, 46, 0.35))
728
+ left center / 24px 1px no-repeat,
729
+ linear-gradient(rgba(168, 69, 46, 0.35), rgba(168, 69, 46, 0.35))
730
+ right center / 24px 1px no-repeat;
731
+ transition:
732
+ background-size 0.3s ease,
733
+ opacity 0.25s ease;
734
+ }
735
+
736
+ &::after {
737
+ content: "";
738
+ display: block;
739
+ width: 22px;
740
+ height: 1.5px;
741
+ margin: 12px auto 0;
742
+ background-color: rgba(35, 35, 35, 0.22);
743
+ transition:
744
+ width 0.3s ease,
745
+ background-color 0.3s ease;
746
+ }
747
+
748
+ &:hover {
749
+ opacity: 0.78;
750
+
751
+ &::before {
752
+ opacity: 1;
753
+ transform: none;
754
+ background-size:
755
+ 28px 1px,
756
+ 28px 1px;
757
+ }
758
+
759
+ &::after {
760
+ width: 32px;
761
+ background-color: rgba(168, 69, 46, 0.55);
762
+ }
763
+ }
764
+ }
765
+
766
+ h2#to-page-top + h2:not(#to-page-top):not(.to-page-top):not(.hidden),
767
+ h2.to-page-top + h2:not(#to-page-top):not(.to-page-top):not(.hidden) {
768
+ margin-top: 1.4em;
769
+ }
770
+
771
+ p:has(.image-grid, .lazyload-outer-wrap, img)
772
+ + h2:not(#to-page-top):not(.to-page-top):not(.hidden),
773
+ .image-grid + h2:not(#to-page-top):not(.to-page-top):not(.hidden),
774
+ figure + h2:not(#to-page-top):not(.to-page-top):not(.hidden) {
775
+ margin-top: 2.9em;
776
+ }
777
+
778
+ h3 {
779
+ @include sourceSerifFont;
780
+ position: relative;
781
+ display: flex;
782
+ align-items: center;
783
+ width: 100%;
784
+ box-sizing: border-box;
785
+ margin: 1.9em 0 0.85em;
786
+ padding: 0;
787
+ font-size: 1.18em;
788
+ font-weight: 900;
789
+ line-height: 1.45;
790
+ letter-spacing: 0.04em;
791
+ color: $darkText;
792
+ word-break: normal;
793
+ overflow-wrap: break-word;
794
+ border-radius: 3px;
795
+ scroll-margin-top: 1.2em;
796
+ transition: opacity 0.2s ease;
797
+
798
+ &::before {
799
+ content: "✦";
800
+ position: static;
801
+ left: auto;
802
+ top: auto;
803
+ transform: none;
804
+ display: inline-block;
805
+ width: auto;
806
+ height: auto;
807
+ margin-right: 9px;
808
+ font-size: 10px;
809
+ font-weight: 400;
810
+ line-height: 1;
811
+ color: rgba(168, 69, 46, 0.78);
812
+ background-image: none;
813
+ background-color: transparent;
814
+ opacity: 1;
815
+ flex-shrink: 0;
816
+ transition:
817
+ color 0.25s ease,
818
+ transform 0.25s ease,
819
+ opacity 0.25s ease;
820
+ }
821
+
822
+ &::after {
823
+ content: "";
824
+ flex: 1;
825
+ min-width: 0;
826
+ height: 1px;
827
+ margin-left: 12px;
828
+ background: linear-gradient(
829
+ to right,
830
+ rgba(0, 0, 0, 0.08),
831
+ transparent 65%
832
+ );
833
+ transition: background 0.25s ease;
834
+ }
835
+
836
+ &:hover {
837
+ opacity: 0.78;
838
+
839
+ &::before {
840
+ opacity: 1;
841
+ transform: scale(1.15);
842
+ color: #a8452e;
843
+ }
844
+
845
+ &::after {
846
+ background: linear-gradient(
847
+ to right,
848
+ rgba(168, 69, 46, 0.25),
849
+ transparent 75%
850
+ );
851
+ }
852
+ }
853
+ }
854
+
855
+ p:has(.image-grid, .lazyload-outer-wrap, img) + h3,
856
+ .image-grid + h3,
857
+ figure + h3 {
858
+ margin-top: 2.2em;
859
+ }
860
+
861
+ h4 {
862
+ @include sourceSerifFont;
863
+ display: flex;
864
+ align-items: center;
865
+ width: 100%;
866
+ box-sizing: border-box;
867
+ margin: 1.55em 0 0.7em;
868
+ font-size: 1.04em;
869
+ font-weight: 900;
870
+ line-height: 1.5;
871
+ letter-spacing: 0.03em;
872
+ color: #2c2c2c;
873
+ word-break: normal;
874
+ overflow-wrap: break-word;
875
+
876
+ &::before {
877
+ content: "✦";
878
+ display: inline-block;
879
+ margin-right: 8px;
880
+ font-size: 8.5px;
881
+ font-weight: 400;
882
+ line-height: 1;
883
+ color: rgba(168, 69, 46, 0.55);
884
+ flex-shrink: 0;
885
+ }
886
+
887
+ &::after {
888
+ content: "";
889
+ flex: 1;
890
+ min-width: 0;
891
+ height: 1px;
892
+ margin-left: 10px;
893
+ background: linear-gradient(
894
+ to right,
895
+ rgba(0, 0, 0, 0.06),
896
+ transparent 48%
897
+ );
898
+ }
899
+ }
900
+
901
+ p:has(.image-grid, .lazyload-outer-wrap, img) + h4,
902
+ .image-grid + h4,
903
+ figure + h4 {
904
+ margin-top: 1.85em;
905
+ }
906
+
907
+ h5,
908
+ h6 {
909
+ @include sourceSerifFont;
910
+ letter-spacing: 0.03em;
911
+ color: $darkText;
912
+ }
913
+
914
+ table:not(:where(.highlight table)) {
915
+ width: 100%;
916
+ margin: 1.6em 0;
917
+ border: none;
918
+ border-top: 1px dashed rgba(168, 69, 46, 0.42);
919
+ border-bottom: 1px dashed rgba(168, 69, 46, 0.42);
920
+ border-collapse: collapse;
921
+ border-spacing: 0;
922
+ font-variant-numeric: tabular-nums;
923
+ font-size: 0.9em;
924
+ line-height: 1.65;
925
+
926
+ thead tr,
927
+ tr:nth-child(even) {
928
+ background-color: transparent;
929
+ }
930
+
931
+ thead tr {
932
+ font-family: inherit;
933
+ }
934
+
935
+ td:not(:last-child),
936
+ th:not(:last-child) {
937
+ border-right: none;
938
+ }
939
+
940
+ th,
941
+ td {
942
+ padding: 0.7em 0.75em;
943
+ word-break: normal;
944
+ overflow-wrap: break-word;
945
+
946
+ &:first-child {
947
+ padding-left: 0.25em;
948
+ }
949
+
950
+ &:last-child {
951
+ padding-right: 0.25em;
952
+ }
953
+ }
954
+
955
+ thead th {
956
+ @include defaultFont;
957
+ padding-top: 0.68em;
958
+ padding-bottom: 0.68em;
959
+ font-size: 0.82em;
960
+ font-weight: 600;
961
+ letter-spacing: 0.08em;
962
+ color: $moreGrayText;
963
+ border-bottom: 1px solid rgba(0, 0, 0, 0.1);
964
+ background-color: transparent;
965
+ }
966
+
967
+ tbody tr {
968
+ transition: background-color 0.2s ease;
969
+
970
+ &:hover {
971
+ background-color: rgba(168, 69, 46, 0.025);
972
+ }
973
+
974
+ &:last-child td {
975
+ border-bottom: none;
976
+ }
977
+ }
978
+
979
+ tbody td {
980
+ color: #2b2b2b;
981
+ border-bottom: 1px dashed rgba(0, 0, 0, 0.09);
982
+
983
+ &:first-child {
984
+ color: #a8452e;
985
+ }
986
+ }
987
+ }
988
+
989
+ .travel-route-block {
990
+ max-width: 640px;
991
+ margin: 1.4em auto 2em;
992
+
993
+ .travel-route-summary {
994
+ margin-bottom: 9px;
995
+ text-align: right;
996
+ font-family: $linkFontFamily, "SF Pro Text", -apple-system, sans-serif;
997
+ font-size: 11px;
998
+ line-height: 1;
999
+ letter-spacing: 0.1em;
1000
+ color: $moreGrayText;
1001
+ font-variant-numeric: tabular-nums;
1002
+ }
1003
+
1004
+ .travel-route-bar {
1005
+ display: flex;
1006
+ height: 8px;
1007
+ border-radius: 999px;
1008
+ overflow: hidden;
1009
+ gap: 2px;
1010
+ margin-bottom: 16px;
1011
+ }
1012
+
1013
+ .travel-route-seg {
1014
+ height: 100%;
1015
+ min-width: 6px;
1016
+ border-radius: 2px;
1017
+ background-color: var(--stop-color, #a8452e);
1018
+ transition:
1019
+ opacity 0.2s ease,
1020
+ transform 0.2s ease;
1021
+
1022
+ &:hover {
1023
+ opacity: 0.85;
1024
+ transform: scaleY(1.25);
1025
+ }
1026
+ }
1027
+
1028
+ .travel-route-grid {
1029
+ list-style: none;
1030
+ margin: 0;
1031
+ padding: 0;
1032
+ display: grid;
1033
+ grid-template-columns: repeat(var(--route-cols, 4), minmax(0, 1fr));
1034
+ gap: 10px 14px;
1035
+ }
1036
+
1037
+ .travel-route-item {
1038
+ list-style: none;
1039
+ margin: 0;
1040
+ padding: 9px 10px 8px;
1041
+ border-top: 1px dashed rgba(0, 0, 0, 0.11);
1042
+ display: flex;
1043
+ flex-direction: column;
1044
+ gap: 3px;
1045
+ transition:
1046
+ border-top-color 0.2s ease,
1047
+ background-color 0.2s ease;
1048
+
1049
+ &:hover {
1050
+ border-top-color: var(--stop-color, #a8452e);
1051
+ background-color: rgba(168, 69, 46, 0.025);
1052
+ }
1053
+ }
1054
+
1055
+ .travel-route-item-top {
1056
+ display: flex;
1057
+ align-items: center;
1058
+ justify-content: space-between;
1059
+ margin-bottom: 1px;
1060
+ }
1061
+
1062
+ .travel-route-index {
1063
+ font-family: $linkFontFamily;
1064
+ font-size: 10px;
1065
+ line-height: 1;
1066
+ color: #999;
1067
+ letter-spacing: 0.08em;
1068
+ font-variant-numeric: tabular-nums;
1069
+ }
1070
+
1071
+ .travel-route-dot {
1072
+ width: 6px;
1073
+ height: 6px;
1074
+ border-radius: 50%;
1075
+ background-color: var(--stop-color, #a8452e);
1076
+ flex-shrink: 0;
1077
+ }
1078
+
1079
+ .travel-route-place {
1080
+ @include sourceSerifFont;
1081
+ font-size: 15.5px;
1082
+ font-weight: 900;
1083
+ line-height: 1.4;
1084
+ color: $darkText;
1085
+ word-break: normal;
1086
+ overflow-wrap: break-word;
1087
+ }
1088
+
1089
+ .travel-route-days {
1090
+ font-family: $linkFontFamily, "SF Pro Text", -apple-system, sans-serif;
1091
+ font-size: 11.5px;
1092
+ line-height: 1.4;
1093
+ color: #a8452e;
1094
+ font-variant-numeric: tabular-nums;
1095
+ }
1096
+
1097
+ .travel-route-note {
1098
+ @include defaultFont;
1099
+ font-size: 11.5px;
1100
+ line-height: 1.45;
1101
+ color: $moreGrayText;
1102
+ margin-top: 1px;
1103
+ word-break: normal;
1104
+ overflow-wrap: break-word;
1105
+ }
1106
+ }
1107
+
1108
+ @media (max-width: 728px) {
1109
+ h2:not(#to-page-top):not(.to-page-top):not(.hidden) {
1110
+ margin: 2.2em auto 1.2em;
1111
+ font-size: 1.38em;
1112
+ letter-spacing: 0.06em;
1113
+ }
1114
+
1115
+ p:has(.image-grid, .lazyload-outer-wrap, img)
1116
+ + h2:not(#to-page-top):not(.to-page-top):not(.hidden),
1117
+ .image-grid + h2:not(#to-page-top):not(.to-page-top):not(.hidden),
1118
+ figure + h2:not(#to-page-top):not(.to-page-top):not(.hidden) {
1119
+ margin-top: 2.5em;
1120
+ }
1121
+
1122
+ h3 {
1123
+ margin: 1.7em 0 0.75em;
1124
+ font-size: 1.15em;
1125
+ }
1126
+
1127
+ p:has(.image-grid, .lazyload-outer-wrap, img) + h3,
1128
+ .image-grid + h3,
1129
+ figure + h3 {
1130
+ margin-top: 2em;
1131
+ }
1132
+
1133
+ h4 {
1134
+ margin: 1.4em 0 0.65em;
1135
+ font-size: 1.02em;
1136
+ }
1137
+
1138
+ table:not(:where(.highlight table)) {
1139
+ margin: 1.35em 0;
1140
+ font-size: 0.86em;
1141
+
1142
+ th,
1143
+ td {
1144
+ padding: 0.6em 0.55em;
1145
+ }
1146
+ }
1147
+
1148
+ .travel-route-block {
1149
+ .travel-route-grid {
1150
+ grid-template-columns: repeat(
1151
+ min(var(--route-cols, 3), 3),
1152
+ minmax(0, 1fr)
1153
+ );
1154
+ gap: 8px 12px;
1155
+ }
1156
+ }
1157
+ }
1158
+
1159
+ @media (max-width: 479px) {
1160
+ h2:not(#to-page-top):not(.to-page-top):not(.hidden) {
1161
+ margin: 2em auto 1.1em;
1162
+ font-size: max(min(5.8vw, 1.35em), 20px);
1163
+ letter-spacing: 0.05em;
1164
+
1165
+ &::before {
1166
+ margin-bottom: 8px;
1167
+ padding: 0 calc(28px - 0.14em) 0 28px;
1168
+ font-size: 10.5px;
1169
+ letter-spacing: 0.14em;
1170
+ background-size:
1171
+ 18px 1px,
1172
+ 18px 1px;
1173
+ }
1174
+
1175
+ &::after {
1176
+ width: 18px;
1177
+ margin-top: 10px;
1178
+ }
1179
+
1180
+ &:hover {
1181
+ &::before {
1182
+ background-size:
1183
+ 22px 1px,
1184
+ 22px 1px;
1185
+ }
1186
+
1187
+ &::after {
1188
+ width: 26px;
1189
+ }
1190
+ }
1191
+ }
1192
+
1193
+ h3 {
1194
+ font-size: max(min(4.6vw, 1.15em), 17.5px);
1195
+
1196
+ &::before {
1197
+ margin-right: 7px;
1198
+ font-size: 9px;
1199
+ }
1200
+
1201
+ &::after {
1202
+ margin-left: 10px;
1203
+ }
1204
+ }
1205
+
1206
+ h4 {
1207
+ font-size: max(min(4vw, 1.04em), 16px);
1208
+
1209
+ &::before {
1210
+ margin-right: 6px;
1211
+ font-size: 8px;
1212
+ }
1213
+
1214
+ &::after {
1215
+ margin-left: 8px;
1216
+ }
1217
+ }
1218
+
1219
+ .travel-route-block {
1220
+ .travel-route-grid {
1221
+ grid-template-columns: repeat(2, minmax(0, 1fr));
1222
+ gap: 8px 10px;
1223
+ }
1224
+
1225
+ .travel-route-item {
1226
+ padding: 8px 8px 6px;
1227
+ }
1228
+
1229
+ .travel-route-place {
1230
+ font-size: 14.5px;
1231
+ }
1232
+ }
1233
+ }
1234
+
1235
+ @media (prefers-reduced-motion: reduce) {
1236
+ h2,
1237
+ h2::before,
1238
+ h2::after,
1239
+ h3,
1240
+ h3::before,
1241
+ h3::after,
1242
+ table:not(:where(.highlight table)) tbody tr,
1243
+ .travel-route-block .travel-route-seg,
1244
+ .travel-route-block .travel-route-item {
1245
+ transition: none;
1246
+ }
1247
+ }
1248
+ }
1249
+ }
643
1250
  .post-meta {
644
1251
  @include defaultFont;
645
1252
  margin-top: -15px;
@@ -3985,6 +4592,22 @@ ul {
3985
4592
  }
3986
4593
  }
3987
4594
 
4595
+ .katex {
4596
+ font-size: 1.08em;
4597
+ }
4598
+
4599
+ .katex-display {
4600
+ margin: 1.1em 0;
4601
+ padding: 0.35em 0;
4602
+ overflow-x: auto;
4603
+ overflow-y: hidden;
4604
+ -webkit-overflow-scrolling: touch;
4605
+ }
4606
+
4607
+ .post-item .excerpt .katex-display {
4608
+ margin: 0.5em 0;
4609
+ }
4610
+
3988
4611
  @include mq.rules;
3989
4612
 
3990
4613
  @media (max-width: 900px) {