forked from ppoffice/hexo-theme-icarus
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathforgetfulengineer.styl
More file actions
254 lines (214 loc) · 4.93 KB
/
forgetfulengineer.styl
File metadata and controls
254 lines (214 loc) · 4.93 KB
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
/* ---------------------------------
* 自訂義樣式
* --------------------------------- */
::selection {
background: $body-background-color; /* 反白背景色 */
color: $primary; /* 反白文字色 */
}
// 優化網站布局
// widescreen 以上的三欄佈局 (調整欄位寬度)
+widescreen()
.column.is-3-widescreen
width 22%
.column.is-6-widescreen
width 56%
+from($screen-onek)
.container
max-width: 1500px
// 手機佈局隱藏
+until($phone)
html
font-size: 13px
.is-hidden-phone
display: none !important;
// 跳轉錨點上方留空
html
scroll-padding-top: 150px
+widescreen()
html
scroll-padding-top: 95px
// 動畫
moving_line($size_y)
background-image: linear-gradient(transparent calc(100% - 1px), $primary 1px)
background-repeat: no-repeat
background-size: 0 $size_y
transition: all .25s ease-in-out
&:hover
background-size: 100% 100%
// Nav bar
.navbar
z-index: 100
position: sticky
top: 0
.navbar-menu
.navbar-item
&.is-active
font-weight: bold
.navbar-link
&.is-active
font-weight: bold
&:not(.is-arrowless)::after
transition: transform 0.5s;
// 有次選單的category icon 旋轉 (箭頭)
.dropdown-icon-rotate::after
transform: rotate(-225deg) !important
.navbar-burger
height: unset
margin-left: 0
// navbar 正常狀態 (寬螢幕)
+from($navbar-breakpoint)
.navbar-menu
.navbar-item
moving_line(85%)
&.has-dropdown
padding: 1.25rem 0rem
.navbar-dropdown
left: auto
min-width: auto
position: fixed
// navbar 伸縮選單狀態 (觸控裝置)
+until($navbar-breakpoint)
.navbar-main
.navbar-item
padding: 0.5rem 0.75rem
.navbar-item.has-dropdown
padding: 0
.navbar-dropdown
display: none
.navbar-item
margin-left: 1rem
border-left: 1px solid #dbdbdb
// navbar 伸縮選單狀態 (觸控小螢幕裝置)
+until($phone)
.navbar-brand
.navbar-item
padding: 0.5rem 0.45rem
// 連結、按鈕
a
transition: all .3s;
.button.is-primary, .button.is-link
&:hover
background-color: $primary-light
// 繼續閱讀
.article-more
border-radius: 7px !important
// 文章 (article)
article
.gallery-item img
border-radius: 15px
.content
text-align: justify
.no_justify, h1, h2, h3
text-align: left
.article-licensing
border-radius: 15px
// 文章列表 (article.media)
article.media
.title a
moving_line(100%)
// 移除強制大寫
.categories
text-transform: none !important;
// 螢光標記
mark
background-color: #fff1a7;
border-radius: 3px;
padding: 2px;
// 健忘筆記
.message
margin-top: 1rem
a:not(.button):not(.tag):not(.dropdown-item)
moving_line(100%)
color: $primary
text-decoration: none;
// 表格
.table-scroll
max-height: 65vh
overflow-y: auto
// 表格首行首列釘選
td:first-child, th:first-child
position: sticky
z-index: 1
left: 0
background-color: rgb(255, 255, 255)
thead tr th
position: sticky
top: 0
background-color: rgb(255, 255, 255)
th:first-child
z-index: 2
// 程式區塊、iframe
figure.highlight, iframe
border-radius: 10px
// 圖片light box
.lg-image
max-width: 60vw !important
border-radius: 15px
// 目錄
.menu-list a
&.is-active
font-weight: bold
.menu-label
text-transform: none !important;
// 頁數
.pagination-link
border-radius: 7px
// 側邊欄
+desktop()
.column-main.is-sticky,
.column-left.is-sticky,
.column-right.is-sticky,
.column-right-shadow.is-sticky
top: 6rem;
align-self: flex-start;
+tablet-only()
.column-main.is-sticky,
.column-left.is-sticky,
.column-right.is-sticky,
.column-right-shadow.is-sticky
top: 4.5rem;
align-self: flex-start;
// card
.card
&:hover
box-shadow: 0 10px 15px rgba(0,0,0,0.15), 0 0 10px rgba(0,0,0,0.1)
.card-image
margin-bottom: 1rem
border-radius: 0.8rem
// footer
+mobile()
footer.footer
padding: 1.5rem
.level-end .field
margin-top: 0rem
// 卷軸
+desktop()
::-webkit-scrollbar
width: 12px
::-webkit-scrollbar-thumb
border-radius: 5px
// icon
i
margin-right: 5px
#back-to-top
z-index: 100
i
margin-right: 0px
// 複製完成提示
.notification
position: fixed
bottom: -15%
left: 50%
transform: translateX(-50%);
color: $white
// related-posts
.related-posts-img
border-radius: 12px
+from($phone)
.related-posts-img
border-radius: 8px
// 其他
.level-item
align-items: baseline;
.article-tags
align-items: baseline;