-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_related-page-list.scss
375 lines (322 loc) · 13.8 KB
/
_related-page-list.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
//
// 関連ページリストの設定
//
/* ページ情報を常時表示する */
/* & 関連ページリストを右側に持ってくる */
@media (min-width: 768px) and (min-height: 500px) {
.app {
/* # ページ情報を常時表示する */
> .row-flex {
/* ページの上端とページ情報の上端を合わせる */
padding-top: var(--page-padding-top);
}
.page:is(div, main) {
/* 最大幅を設定しないと、中の文章が外枠を突き破れてしまう */
max-width: var(--page-max-width);
/* 下に余白を作ってスクロール可能な幅を増やす */
margin-bottom: calc(100vh - var(--navbar-max-height) - 4em - 32px);
}
div.page-menu {
/* メニューボタンをグリッド状にする */
display: grid;
grid-auto-flow: row;
top: calc(var(--navbar-min-height) + 5px);
width: var(--page-info-width);
max-height: var(--page-menu-height);
grid-template-columns: repeat(var(--page-menu-columns), 1fr);
border-radius: var(--page-menu-border-radius);
background-color: var(--page-menu-bg);
// backdrop-filter: blur(1.5px);
box-shadow: 0px 0px 9px 0px black;
}
.page-menu {
& > .dropdown {
/* ページメニューのボタン配置を中央揃えに */
align-self: center;
justify-self: center;
}
& > .random-jump-button {
/* ランダムボタンは個別に中央揃えにしないといけない */
margin: auto;
}
}
div.row-flex {
/* ページを左寄せにする */
margin: 0 auto;
padding: 0 8px;
max-width: 1200px;
justify-content: flex-start;
}
div.col-page {
/* ページ領域の幅 */
width: calc(100% - 20px - var(--page-info-width));
}
/* # 関連ページリストを右側に */
.page-wrapper {
/* ページとリンクをまとめているやつ */
display: flex;
flex-direction: row;
}
div.drag-and-drop-enter {
/* ページ本体が入っている要素 */
flex-basis: 100%;
}
.related-page-list:is(div, section) {
/* 関連ページリスト */
position: relative;
margin-top: calc(var(--page-menu-height) + .5em);
margin-right: -100%;
margin-left: 10px;
width: var(--page-info-width);
.links-container {
gap: 0;
}
ul.grid {
/* marginに負の値を設定されるのを防止する */
margin: calc(var(--relation-label-font-size) * .5) 0;
}
}
// 関連ページリスト
.related-page-list {
div.toolbar {
/* 関連ページリストのツールバー */
margin-top: 3px;
flex-direction: column;
height: auto;
.related-page-sort-menu {
/* ソートメニューを中央揃えに */
display: flex;
justify-content: center;
.tool-btn {
padding: 3px 10px 3px;
}
}
.related-page-list-search {
/* 関連ページリストの検索ボックス */
line-height: 2em;
border-radius: var(--page-menu-border-radius);
background-color: var(--search-form-bg);
i.fa {
/* 検索ボックスのアイコンの位置調整 */
margin-left: 3px;
margin-right: 2px;
width: var(--relation-label-icon-size);
height: var(--relation-label-icon-size);
line-height: var(--relation-label-icon-size);
text-align: center;
}
input {
/* 検索ボックスの入力文字の表示幅をギリギリまで伸ばす */
width: calc(var(--page-info-width) - var(--relation-label-icon-size) - 3px - 2px);
}
}
}
.grid {
gap: 0;
li.relation-label {
/* 関連ページリストのラベル領域 */
margin: 0 0 10px;
width: 100%;
height: auto;
aspect-ratio: unset;
.arrow {
/* 吹き出しの矢印は不要なので消す */
display: none;
}
a {
/* 関連ページリストのラベルリンク */
padding: 0 calc((var(--relation-label-margin-left) * 2) + var(--relation-label-icon-size));
border-bottom: solid 1px var(--relation-label-text);
display: flex;
width: 100%;
border-radius: 0;
flex-direction: row-reverse;
justify-content: center;
color: var(--relation-label-text);
background-color: transparent;
}
a .title {
/* ラベル文字 */
font-family: var(--label-fonts);
font-size: var(--relation-label-font-size);
line-height: 1.5em;
}
a .icon-lg {
/* ラベルの鎖アイコン */
position: absolute;
left: 3px;
margin: 0;
font-size: var(--relation-label-icon-size);
width: 1em;
height: 1.5em;
line-height: 1.5em;
vertical-align: middle;
}
}
& > :not(.relation-label) {
/* 関連ページリストのラベル以外の要素 */
margin: 0;
margin-bottom: .5em;
padding: 0 .5em;
width: var(--page-info-width);
height: 6em;
}
.page-list-item {
/* 関連ページリストのページリンク領域 */
height: 6em;
a {
/* 関連ページリストのページリンク本体 */
width: auto;
background-color: var(--relation-page-bg);
border-radius: 0 0 3px 3px;
box-shadow: none;
}
.header {
/* ページリンクのタイトル領域 */
padding-bottom: 3px;
border-top: none;
border-bottom: 1.5px solid var(--relation-page-border-color);
z-index: 1;
/* アイコンより上にする */
}
.description {
/* ページリンクの書き出し文 */
padding-top: 3px;
}
.icon {
/* ページリンクのアイコン */
position: absolute;
padding: 1px;
margin-left: 25%;
width: 75%; // ここ変数化しても良い気がする
height: 100%;
display: flex;
flex-direction: row;
justify-content: flex-end;
align-items: center;
opacity: .5;
}
.icon::before {
/* アイコン画像をグラデーションで透過(風に)しようかと思ったけれどやめた */
position: absolute;
top: 0;
left: 0;
display: block;
width: 100%;
height: 100%;
/* content: ""; */
background: linear-gradient(273deg, transparent 0 15%, var(--body-bg) 75% 100%);
}
.icon > img {
/* ページリンクのアイコン画像 */
margin: 0;
width: 100%;
height: fit-content;
vertical-align: middle;
}
}
.ellipsis {
/* 関連ページリストの3点ボタン */
margin: 0;
margin-bottom: .5em;
padding: 0 .5em;
width: var(--page-info-width);
height: 3em;
a {
padding: 0;
}
}
.expand-stack {
/* 関連ページスタック */
height: 4em;
background-color: transparent;
a {
background-color: var(--relation-page-bg);
border-radius: 0 0 3px 3px;
}
}
.splitter.splitter {
/* 底に沈んでいる区切り線 */
/* プロパティのいじり方でどうとでもなるので消す */
display: none;
}
}
// グループホバー時の設定
& > div .grid:hover {
.page-list-item a {
&,
&:hover {
box-shadow: var(--card-box-hover-shadow);
}
}
}
// 1 hop linkの個別設定
& > .links-1-hop {
.grid:hover {
.relation-label a > span {
color: var(--relation-label-text-1);
transition: background-color var(--animation-time);
}
:is(.page-list-item, .expand-stack) a {
/* 1 hop linkのページリンクの背景色 */
background-color: var(--relation-page-bg-1);
transition: background-color var(--animation-time);
}
}
}
// External linksの個別設定
& > .project-links-1-hop {
.grid:hover {
.relation-label a > span {
color: var(--relation-label-text-p1);
transition: background-color var(--animation-time);
}
:is(.page-list-item, .expand-stack) a {
/* External linksのページリンクの背景色 */
background-color: var(--relation-page-bg-p1);
transition: background-color var(--animation-time);
}
}
}
// 2 hop linkの個別設定
& > .links-2-hop {
.grid:hover {
.relation-label.relation-label a {
/* 元々あった設定を打ち消す */
color: var(--relation-label-text);
background-color: transparent;
transition: background-color var(--animation-time);
}
.relation-label a > span {
color: var(--relation-label-text-2);
transition: background-color var(--animation-time);
}
:is(.page-list-item, .expand-stack) a {
/* 2 hop linkのページリンクの背景色 */
background-color: var(--relation-page-bg-2);
transition: background-color var(--animation-time);
}
}
}
// New Linksの個別設定
& > .empy-links,
& > .empty-links {
.grid:hover {
.relation-label a > span {
color: var(--relation-label-text-empty);
transition: background-color var(--animation-time);
}
:is(.page-list-item, .expand-stack) a {
/* New Linksのページリンクの背景色 */
background-color: var(--relation-page-bg-empty);
transition: background-color var(--animation-time);
}
}
}
}
// ページカードごとのホバー時の影設定は不要なので消す
.related-page-list .grid:not(:hover) li.page-list-item a:hover {
box-shadow: none;
}
}
}