databook-theme 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +21 -21
  3. data/README.MD +1 -1
  4. data/_includes/blog/blog.liquid +50 -50
  5. data/_includes/blog/features.liquid +36 -36
  6. data/_includes/blog/full.liquid +3 -3
  7. data/_includes/blog/list.liquid +41 -41
  8. data/_includes/blog/post.liquid +6 -6
  9. data/_includes/components/analytics.google.liquid +11 -11
  10. data/_includes/components/analytics.liquid +11 -11
  11. data/_includes/components/comments.disqus.liquid +17 -17
  12. data/_includes/components/comments.gitalk.liquid +22 -22
  13. data/_includes/components/comments.liquid +13 -13
  14. data/_includes/components/navmenu.items.liquid +51 -51
  15. data/_includes/components/navmenu.liquid +4 -4
  16. data/_includes/components/pagination.liquid +83 -83
  17. data/_includes/components/prevnext.liquid +1 -1
  18. data/_includes/components/search.baidu.liquid +7 -7
  19. data/_includes/components/search.bing.liquid +6 -6
  20. data/_includes/components/search.google.liquid +6 -6
  21. data/_includes/components/search.liquid +21 -21
  22. data/_includes/components/social_button.liquid +9 -9
  23. data/_includes/components/social_link.liquid +14 -14
  24. data/_includes/components/title.liquid +41 -41
  25. data/_includes/components/toc.liquid +28 -28
  26. data/_includes/custom/analytics.liquid +3 -3
  27. data/_includes/custom/blog.liquid +3 -3
  28. data/_includes/custom/body.liquid +3 -3
  29. data/_includes/custom/comments.liquid +3 -3
  30. data/_includes/custom/favicon.liquid +11 -0
  31. data/_includes/custom/footer.liquid +3 -3
  32. data/_includes/custom/head.liquid +3 -3
  33. data/_includes/custom/katex.liquid +15 -15
  34. data/_includes/custom/mathjax.liquid +19 -19
  35. data/_includes/custom/search.liquid +3 -3
  36. data/_includes/extensions/toc.liquid +182 -182
  37. data/_includes/functions/get_config.liquid +11 -11
  38. data/_includes/functions/get_config_data.liquid +23 -23
  39. data/_includes/functions/get_icon.liquid +5 -5
  40. data/_includes/functions/get_page_meta.liquid +74 -60
  41. data/_includes/functions/get_page_thumbnail.liquid +22 -23
  42. data/_includes/functions/get_page_title.liquid +7 -7
  43. data/_includes/functions/get_recent_posts.liquid +17 -17
  44. data/_includes/functions/get_taxonomy_link.liquid +9 -9
  45. data/_includes/head/head.liquid +11 -12
  46. data/_includes/head/meta.liquid +50 -41
  47. data/_includes/head/requirements.liquid +87 -87
  48. data/_includes/head/styles.liquid +10 -10
  49. data/_includes/js/codes.js +116 -116
  50. data/_includes/js/scrollspy.js +16 -16
  51. data/_includes/layout/article.liquid +74 -71
  52. data/_includes/layout/footer.liquid +53 -53
  53. data/_includes/layout/header.liquid +31 -31
  54. data/_includes/layout/hero.liquid +29 -29
  55. data/_includes/layout/page.liquid +33 -33
  56. data/_includes/layout/pagehead.liquid +17 -17
  57. data/_includes/layout/sidebar.liquid +178 -178
  58. data/_includes/localize +29 -29
  59. data/_includes/notice +6 -6
  60. data/_includes/version +1 -1
  61. data/_layouts/article.liquid +10 -10
  62. data/_layouts/default.liquid +132 -131
  63. data/_layouts/home.liquid +20 -20
  64. data/_layouts/page.liquid +9 -9
  65. data/_layouts/post.liquid +9 -9
  66. data/_layouts/system.liquid +35 -35
  67. data/_layouts/taxonomy.liquid +67 -67
  68. data/_sass/_databook.scss +42 -42
  69. data/_sass/_debug.scss +7 -7
  70. data/_sass/_variables.scss +24 -24
  71. data/_sass/base/_mixins.scss +32 -32
  72. data/_sass/base/_normalize.scss +45 -45
  73. data/_sass/base/_responsive.scss +28 -28
  74. data/_sass/components/_archive.scss +49 -49
  75. data/_sass/components/_blog.scss +249 -249
  76. data/_sass/components/_forms.scss +30 -30
  77. data/_sass/components/_hero.scss +70 -70
  78. data/_sass/components/_misc.scss +3 -3
  79. data/_sass/components/_notice.scss +27 -27
  80. data/_sass/components/_notification.scss +10 -10
  81. data/_sass/components/_post.scss +19 -19
  82. data/_sass/components/_sidebar.scss +303 -303
  83. data/_sass/components/_tabs.scss +67 -67
  84. data/_sass/components/_text.scss +27 -27
  85. data/_sass/components/_toc.scss +50 -50
  86. data/_sass/layout/_article.scss +211 -211
  87. data/_sass/layout/_body.scss +26 -26
  88. data/_sass/layout/_footer.scss +75 -75
  89. data/_sass/layout/_header.scss +124 -124
  90. data/_sass/layout/_main.scss +8 -8
  91. data/_sass/layout/_misc.scss +7 -7
  92. data/_sass/layout/_navbar.scss +323 -323
  93. data/_sass/layout/_sidebar.scss +115 -115
  94. data/_sass/layout/_wrapper.scss +7 -7
  95. data/_sass/theme/_scheme.scss +112 -112
  96. data/_sass/typography/_article.scss +49 -49
  97. data/_sass/typography/_doc.scss +104 -104
  98. data/_sass/typography/_highlight.scss +208 -208
  99. data/_sass/typography/_markdown.scss +18 -18
  100. data/_sass/typography/_table.scss +119 -119
  101. data/_sass/typography/_typography.scss +103 -108
  102. data/_sass/utilities/_thinscrollbar.scss +35 -35
  103. data/assets/databook/css/databook.scss +6 -6
  104. data/assets/databook/js/databook.js +8 -8
  105. data/assets/databook/js/search.js +47 -47
  106. data/assets/databook/version.json +9 -9
  107. data/assets/search.json +30 -30
  108. metadata +8 -8
  109. data/_includes/head/opengraph.liquid +0 -1
@@ -1,323 +1,323 @@
1
- // very ugly
2
- // todo: rewrite
3
-
4
- $triangle-size: 6px;
5
- $secondarymenu-overlay-size: 1px;
6
- $minimum-menu-width: 10rem;
7
-
8
- @mixin make_dropdown($multilevel: false) {
9
- display: none;
10
- flex-direction: column;
11
- background-color: var(--db-background-color);
12
- background-image: var(--db-surface-overlay);
13
- outline: 1px solid var(--db-border-color);
14
- box-shadow:
15
- -.1rem -.1rem .4rem var(--db-surface-shadow-color),
16
- .2rem .2rem .4rem var(--db-surface-shadow-color);
17
- border-radius: 1px 1px $border-radius-object $border-radius-object;
18
- min-width: $minimum-menu-width;
19
- position: absolute;
20
- top: calc( var(--db-header-height) - ( ( var(--db-header-height) - 100% ) / 2 ) - 1px );
21
- padding: .25rem 0;
22
- font-weight: normal;
23
- white-space: nowrap;
24
-
25
- @if $multilevel {
26
- left: 0;
27
- right: unset;
28
- } @else {
29
- left: -1rem;
30
- right: unset;
31
- }
32
-
33
- .c-navmenu__item {
34
- line-height: 3rem;
35
- font-weight: normal;
36
- border-radius: 1px;
37
- text-align: left;
38
- color: var(--db-text-color-active);
39
-
40
- .c-navmenu__text {
41
- display: block;
42
- padding: 0 1rem;
43
- }
44
-
45
- @if $multilevel {
46
- &:hover > .c-navmenu__text {
47
- background-color: var(--db-control-color);
48
- color: var(--db-control-text-color);
49
- }
50
- } @else {
51
- .c-navmenu__text:hover {
52
- background-color: var(--db-control-color);
53
- color: var(--db-control-text-color);
54
- }
55
- }
56
- }
57
-
58
- }
59
-
60
- @mixin make_dropdown_level2() {
61
- //border-top-width: 1px;
62
- border-radius: $border-radius-object;
63
- top: -.25rem;
64
- position: absolute;
65
-
66
- left: calc(100% - #{$secondarymenu-overlay-size});
67
- }
68
-
69
- @mixin make_horizon() {
70
- display: flex;
71
- flex-direction: row;
72
- border: none;
73
- outline: none;
74
- background: none;
75
- background-color: transparent;
76
- font-size: inherit;
77
- box-shadow: none;
78
- position: initial;
79
- padding: 0;
80
- border-radius: 0;
81
- text-align: center;
82
-
83
- > .c-navmenu__item {
84
- text-align: center;
85
- //min-width: $minimum-menu-width * .618;
86
- font-weight: bold;
87
- line-height: var(--db-header-height);
88
- color: var(--db-text-color-inactive);
89
- position: relative;
90
-
91
- &:hover {
92
- > .c-navmenu__text {
93
- background-color: unset;
94
- color: var(--db-text-color-important);
95
-
96
- &:not(:only-child) {
97
- @include make_triangle();
98
- }
99
- }
100
-
101
- > .c-navmenu__menu {
102
- display: flex;
103
- }
104
- }
105
- }
106
-
107
- }
108
-
109
- @mixin make_triangle() {
110
- position: relative;
111
-
112
- &::before {
113
- content: '';
114
- width: 0;
115
- height: 0;
116
- border-style: solid;
117
- border-width: 0 $triangle-size $triangle-size $triangle-size;
118
- border-color: transparent transparent var(--db-background-color) transparent;
119
- position: absolute;
120
- bottom: calc( ( ( var(--db-header-height) - 100% ) / -2 ) + 1px);
121
- z-index: 999;
122
- left: calc( 50% - #{$triangle-size} );
123
- }
124
-
125
- &::after {
126
- content: '';
127
- width: 0;
128
- height: 0;
129
- border-style: solid;
130
- border-width: 0 ($triangle-size + 1) ($triangle-size + 1) ($triangle-size + 1);
131
- border-color: transparent transparent var(--db-border-color) transparent;
132
- position: absolute;
133
- bottom: calc( ( ( var(--db-header-height) - 100% ) / -2 ) + 1px);
134
- z-index: 998;
135
- left: calc( 50% - #{$triangle-size} - 1px );
136
- }
137
-
138
- }
139
-
140
- @mixin make_rightangle() {
141
- position: relative;
142
- padding-right: 2rem;
143
-
144
- &::after {
145
- @include fontawesome-text;
146
- content: '\f105';
147
- position: absolute;
148
- right: 0;
149
- width: 2rem;
150
- text-align: center;
151
- }
152
-
153
- }
154
-
155
- .c-navmenu {
156
- list-style: none;
157
- padding: 0;
158
- position: relative;
159
- user-select: none;
160
- line-height: 32px;
161
-
162
- > .c-navmenu__menu {
163
- @include make_dropdown(false);
164
- > .c-navmenu__item {
165
- .c-navmenu__menu {
166
- .c-navmenu__item {
167
- > a {
168
- padding: 0 2rem;
169
- }
170
- .c-navmenu__menu {
171
- .c-navmenu__item {
172
- > a {
173
- padding: 0 3rem;
174
- }
175
- }
176
- }
177
- }
178
- }
179
- }
180
- }
181
-
182
- &:focus-within {
183
- > .c-navmenu__menu {
184
- display: flex;
185
- }
186
-
187
- > .c-navmenu__button {
188
- @include make_triangle();
189
- border-color: var(--db-border-color);
190
- }
191
- }
192
-
193
- @at-root div#{&}__text {
194
- color: var(--db-text-color-inactive);
195
- }
196
-
197
- &--responsive {
198
- left: 0;
199
-
200
- @media #{$large-screen} {
201
-
202
- .c-navmenu__button {
203
- display: none;
204
- }
205
-
206
- > .c-navmenu__menu {
207
- @include make_horizon();
208
- left: 0;
209
-
210
- > .c-navmenu__item {
211
-
212
- .c-navmenu__item {
213
- position: relative;
214
-
215
- &:hover{
216
- > .c-navmenu__menu {
217
- display: flex;
218
- }
219
- }
220
- }
221
-
222
- .c-navmenu__menu {
223
- @include make_dropdown(true);
224
-
225
- .c-navmenu__text:not(:only-child) {
226
- @include make_rightangle();
227
- }
228
-
229
- .c-navmenu__menu {
230
- @include make_dropdown_level2();
231
- a {
232
- padding: 0 1rem !important;
233
- }
234
- }
235
-
236
- }
237
- }
238
- }
239
- }
240
- }
241
-
242
- &__divider {
243
- border-top: 1px solid var(--db-border-color);
244
- margin: .25rem .5rem;
245
- }
246
-
247
- &--right &__menu {
248
- left: unset !important;
249
- right: -1rem;
250
- }
251
-
252
- &--right.c-navmenu--responsive &__menu {
253
- right: 0 !important;
254
- }
255
-
256
- &--right &__menu &__menu {
257
- @media #{$large-screen} {
258
- .c-navmenu__menu {
259
- right: calc(100% - #{$secondarymenu-overlay-size}) !important;
260
- }
261
- }
262
- }
263
-
264
- }
265
-
266
- .c-navbutton {
267
- border-radius: $border-radius-object;
268
- border: 1px solid transparent;
269
- text-align: center;
270
- align-items: center;
271
- padding: 0;
272
- width: $header-object-size;
273
- height: $header-object-size;
274
- line-height: $header-object-size;
275
- background-color: transparent;
276
- color: var(--db-text-color-inactive);
277
- outline: 0;
278
- margin-right: .25rem;
279
-
280
- &:hover {
281
- border-color: var(--db-border-color);
282
- color: var(--db-text-color-active);
283
- background-color: var(--db-background-hover-color);
284
- }
285
- &:active {
286
- background-image: var(--db-surface-overlay);
287
- }
288
- }
289
-
290
-
291
- .c-search {
292
- display: flex;
293
-
294
- &__textbox {
295
- width: 0px;
296
- outline: none;
297
- border-width: 0 0 1px 0;
298
- }
299
-
300
- &__expand {
301
- overflow: hidden;
302
- }
303
-
304
- &__go {
305
- display: none;
306
- }
307
-
308
- &:focus-within {
309
- > .c-search__textbox {
310
- width: 8rem;
311
- }
312
- > .c-search__expand {
313
- display: none;
314
- }
315
- > .c-search__go {
316
- display: initial;
317
- }
318
- }
319
-
320
- label {
321
- display: block;
322
- }
323
- }
1
+ // very ugly
2
+ // todo: rewrite
3
+
4
+ $triangle-size: 6px;
5
+ $secondarymenu-overlay-size: 1px;
6
+ $minimum-menu-width: 10rem;
7
+
8
+ @mixin make_dropdown($multilevel: false) {
9
+ display: none;
10
+ flex-direction: column;
11
+ background-color: var(--db-background-color);
12
+ background-image: var(--db-surface-overlay);
13
+ outline: 1px solid var(--db-border-color);
14
+ box-shadow:
15
+ -.1rem -.1rem .4rem var(--db-surface-shadow-color),
16
+ .2rem .2rem .4rem var(--db-surface-shadow-color);
17
+ border-radius: 1px 1px $border-radius-object $border-radius-object;
18
+ min-width: $minimum-menu-width;
19
+ position: absolute;
20
+ top: calc( var(--db-header-height) - ( ( var(--db-header-height) - 100% ) / 2 ) - 1px );
21
+ padding: .25rem 0;
22
+ font-weight: normal;
23
+ white-space: nowrap;
24
+
25
+ @if $multilevel {
26
+ left: 0;
27
+ right: unset;
28
+ } @else {
29
+ left: -1rem;
30
+ right: unset;
31
+ }
32
+
33
+ .c-navmenu__item {
34
+ line-height: 3rem;
35
+ font-weight: normal;
36
+ border-radius: 1px;
37
+ text-align: left;
38
+ color: var(--db-text-color-active);
39
+
40
+ .c-navmenu__text {
41
+ display: block;
42
+ padding: 0 1rem;
43
+ }
44
+
45
+ @if $multilevel {
46
+ &:hover > .c-navmenu__text {
47
+ background-color: var(--db-control-color);
48
+ color: var(--db-control-text-color);
49
+ }
50
+ } @else {
51
+ .c-navmenu__text:hover {
52
+ background-color: var(--db-control-color);
53
+ color: var(--db-control-text-color);
54
+ }
55
+ }
56
+ }
57
+
58
+ }
59
+
60
+ @mixin make_dropdown_level2() {
61
+ //border-top-width: 1px;
62
+ border-radius: $border-radius-object;
63
+ top: -.25rem;
64
+ position: absolute;
65
+
66
+ left: calc(100% - #{$secondarymenu-overlay-size});
67
+ }
68
+
69
+ @mixin make_horizon() {
70
+ display: flex;
71
+ flex-direction: row;
72
+ border: none;
73
+ outline: none;
74
+ background: none;
75
+ background-color: transparent;
76
+ font-size: inherit;
77
+ box-shadow: none;
78
+ position: initial;
79
+ padding: 0;
80
+ border-radius: 0;
81
+ text-align: center;
82
+
83
+ > .c-navmenu__item {
84
+ text-align: center;
85
+ //min-width: $minimum-menu-width * .618;
86
+ font-weight: bold;
87
+ line-height: var(--db-header-height);
88
+ color: var(--db-text-color-inactive);
89
+ position: relative;
90
+
91
+ &:hover {
92
+ > .c-navmenu__text {
93
+ background-color: unset;
94
+ color: var(--db-text-color-important);
95
+
96
+ &:not(:only-child) {
97
+ @include make_triangle();
98
+ }
99
+ }
100
+
101
+ > .c-navmenu__menu {
102
+ display: flex;
103
+ }
104
+ }
105
+ }
106
+
107
+ }
108
+
109
+ @mixin make_triangle() {
110
+ position: relative;
111
+
112
+ &::before {
113
+ content: '';
114
+ width: 0;
115
+ height: 0;
116
+ border-style: solid;
117
+ border-width: 0 $triangle-size $triangle-size $triangle-size;
118
+ border-color: transparent transparent var(--db-background-color) transparent;
119
+ position: absolute;
120
+ bottom: calc( ( ( var(--db-header-height) - 100% ) / -2 ) + 1px);
121
+ z-index: 999;
122
+ left: calc( 50% - #{$triangle-size} );
123
+ }
124
+
125
+ &::after {
126
+ content: '';
127
+ width: 0;
128
+ height: 0;
129
+ border-style: solid;
130
+ border-width: 0 ($triangle-size + 1) ($triangle-size + 1) ($triangle-size + 1);
131
+ border-color: transparent transparent var(--db-border-color) transparent;
132
+ position: absolute;
133
+ bottom: calc( ( ( var(--db-header-height) - 100% ) / -2 ) + 1px);
134
+ z-index: 998;
135
+ left: calc( 50% - #{$triangle-size} - 1px );
136
+ }
137
+
138
+ }
139
+
140
+ @mixin make_rightangle() {
141
+ position: relative;
142
+ padding-right: 2rem;
143
+
144
+ &::after {
145
+ @include fontawesome-text;
146
+ content: '\f105';
147
+ position: absolute;
148
+ right: 0;
149
+ width: 2rem;
150
+ text-align: center;
151
+ }
152
+
153
+ }
154
+
155
+ .c-navmenu {
156
+ list-style: none;
157
+ padding: 0;
158
+ position: relative;
159
+ user-select: none;
160
+ line-height: 32px;
161
+
162
+ > .c-navmenu__menu {
163
+ @include make_dropdown(false);
164
+ > .c-navmenu__item {
165
+ .c-navmenu__menu {
166
+ .c-navmenu__item {
167
+ > a {
168
+ padding: 0 2rem;
169
+ }
170
+ .c-navmenu__menu {
171
+ .c-navmenu__item {
172
+ > a {
173
+ padding: 0 3rem;
174
+ }
175
+ }
176
+ }
177
+ }
178
+ }
179
+ }
180
+ }
181
+
182
+ &:focus-within {
183
+ > .c-navmenu__menu {
184
+ display: flex;
185
+ }
186
+
187
+ > .c-navmenu__button {
188
+ @include make_triangle();
189
+ border-color: var(--db-border-color);
190
+ }
191
+ }
192
+
193
+ @at-root div#{&}__text {
194
+ color: var(--db-text-color-inactive);
195
+ }
196
+
197
+ &--responsive {
198
+ left: 0;
199
+
200
+ @media #{$large-screen} {
201
+
202
+ .c-navmenu__button {
203
+ display: none;
204
+ }
205
+
206
+ > .c-navmenu__menu {
207
+ @include make_horizon();
208
+ left: 0;
209
+
210
+ > .c-navmenu__item {
211
+
212
+ .c-navmenu__item {
213
+ position: relative;
214
+
215
+ &:hover{
216
+ > .c-navmenu__menu {
217
+ display: flex;
218
+ }
219
+ }
220
+ }
221
+
222
+ .c-navmenu__menu {
223
+ @include make_dropdown(true);
224
+
225
+ .c-navmenu__text:not(:only-child) {
226
+ @include make_rightangle();
227
+ }
228
+
229
+ .c-navmenu__menu {
230
+ @include make_dropdown_level2();
231
+ a {
232
+ padding: 0 1rem !important;
233
+ }
234
+ }
235
+
236
+ }
237
+ }
238
+ }
239
+ }
240
+ }
241
+
242
+ &__divider {
243
+ border-top: 1px solid var(--db-border-color);
244
+ margin: .25rem .5rem;
245
+ }
246
+
247
+ &--right &__menu {
248
+ left: unset !important;
249
+ right: -1rem;
250
+ }
251
+
252
+ &--right.c-navmenu--responsive &__menu {
253
+ right: 0 !important;
254
+ }
255
+
256
+ &--right &__menu &__menu {
257
+ @media #{$large-screen} {
258
+ .c-navmenu__menu {
259
+ right: calc(100% - #{$secondarymenu-overlay-size}) !important;
260
+ }
261
+ }
262
+ }
263
+
264
+ }
265
+
266
+ .c-navbutton {
267
+ border-radius: $border-radius-object;
268
+ border: 1px solid transparent;
269
+ text-align: center;
270
+ align-items: center;
271
+ padding: 0;
272
+ width: $header-object-size;
273
+ height: $header-object-size;
274
+ line-height: $header-object-size;
275
+ background-color: transparent;
276
+ color: var(--db-text-color-inactive);
277
+ outline: 0;
278
+ margin-right: .25rem;
279
+
280
+ &:hover {
281
+ border-color: var(--db-border-color);
282
+ color: var(--db-text-color-active);
283
+ background-color: var(--db-background-hover-color);
284
+ }
285
+ &:active {
286
+ background-image: var(--db-surface-overlay);
287
+ }
288
+ }
289
+
290
+
291
+ .c-search {
292
+ display: flex;
293
+
294
+ &__textbox {
295
+ width: 0px;
296
+ outline: none;
297
+ border-width: 0 0 1px 0;
298
+ }
299
+
300
+ &__expand {
301
+ overflow: hidden;
302
+ }
303
+
304
+ &__go {
305
+ display: none;
306
+ }
307
+
308
+ &:focus-within {
309
+ > .c-search__textbox {
310
+ width: 8rem;
311
+ }
312
+ > .c-search__expand {
313
+ display: none;
314
+ }
315
+ > .c-search__go {
316
+ display: initial;
317
+ }
318
+ }
319
+
320
+ label {
321
+ display: block;
322
+ }
323
+ }