Skip to content

Commit d83cdf8

Browse files
committed
feat: change font
1 parent 7590565 commit d83cdf8

File tree

6 files changed

+992
-51
lines changed

6 files changed

+992
-51
lines changed

assets/sass/layouts/common.scss

Lines changed: 226 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,226 @@
1+
@use "sass:math";
2+
3+
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:[email protected]&display=swap');
4+
@import "../vars";
5+
6+
// global
7+
* {
8+
box-sizing: border-box;
9+
margin: 0;
10+
padding: 0;
11+
font-family: "Fira Code" !important;
12+
}
13+
14+
body {
15+
background-color: var(--bg);
16+
color: var(--fg);
17+
}
18+
19+
a {
20+
text-decoration: none;
21+
22+
&:link {
23+
color: var(--blue);
24+
}
25+
26+
&:hover,
27+
&:visited {
28+
color: var(--blue-dim);
29+
}
30+
}
31+
32+
::selection {
33+
background-color: var(--blue);
34+
color: white;
35+
}
36+
37+
time {
38+
color: var(--fg4);
39+
margin-left: 1rem;
40+
min-width: 5rem;
41+
}
42+
43+
hr {
44+
background-color: var(--fg4);
45+
margin-top: $margin;
46+
margin-bottom: $margin;
47+
border: 0;
48+
height: $border;
49+
}
50+
51+
#wrapper {
52+
background-color: var(--bg);
53+
display: flex;
54+
flex-direction: column;
55+
min-height: 100vh;
56+
overflow-wrap: break-word;
57+
padding: 1rem $padding;
58+
59+
@media screen and (max-width: $mobile-breakpoint) {
60+
padding-left: math.div($padding, 3);
61+
padding-right: math.div($padding, 3);
62+
}
63+
}
64+
65+
.paginator {
66+
align-items: flex-end;
67+
display: flex;
68+
flex-direction: row;
69+
justify-content: space-between;
70+
margin-top: 2rem;
71+
}
72+
73+
::-webkit-scrollbar {
74+
background-color: var(--bg);
75+
height: 8px;
76+
width: 8px;
77+
}
78+
79+
::-webkit-scrollbar-thumb {
80+
background-color: var(--fg4);
81+
82+
&:hover {
83+
background-color: var(--fg1);
84+
}
85+
}
86+
87+
// header
88+
#header {
89+
align-items: center;
90+
display: flex;
91+
flex-direction: column;
92+
93+
&>h1 {
94+
text-align: center;
95+
96+
@media screen and (min-width: $mobile-breakpoint) {
97+
font-size: 2.8rem;
98+
}
99+
}
100+
101+
&>nav {
102+
display: flex;
103+
flex-direction: row;
104+
justify-content: space-around;
105+
flex-wrap: wrap;
106+
max-width: $mobile-breakpoint;
107+
margin-top: 10px;
108+
width: 100%;
109+
110+
&>span>a {
111+
font-size: 1.2rem;
112+
color: var(--fg1);
113+
text-decoration: none;
114+
display: inline-block;
115+
position: relative;
116+
117+
&:after {
118+
background-color: var(--fg1);
119+
content: "";
120+
position: absolute;
121+
width: 100%;
122+
transform: scaleX(0);
123+
height: $border;
124+
bottom: 0;
125+
left: 0;
126+
transform-origin: bottom right;
127+
transition: transform 0.25s ease-out;
128+
}
129+
130+
&:hover:after {
131+
transform: scaleX(1);
132+
transform-origin: bottom left;
133+
}
134+
}
135+
}
136+
137+
a,
138+
a:hover,
139+
a:visited {
140+
color: var(--fg1);
141+
}
142+
}
143+
144+
// main
145+
main {
146+
margin: 0 $margin;
147+
}
148+
149+
#main {
150+
align-self: center;
151+
display: flex;
152+
flex-direction: column;
153+
flex-grow: 1;
154+
max-width: 100%;
155+
padding: 0;
156+
width: calc(100% - 2rem); // TODO
157+
158+
@media screen and (max-width: $mobile-breakpoint) {
159+
width: 100%;
160+
}
161+
}
162+
163+
// footer
164+
#footer {
165+
color: var(--fg4);
166+
align-items: center;
167+
display: flex;
168+
font-size: 0.9rem;
169+
flex-direction: column;
170+
margin-top: $margin;
171+
172+
&>.footnote {
173+
text-align: center;
174+
}
175+
}
176+
177+
// misc
178+
#sharingbuttons {
179+
align-items: center;
180+
display: flex;
181+
flex-direction: row;
182+
justify-content: space-between;
183+
margin-top: 1rem;
184+
flex-wrap: wrap;
185+
}
186+
187+
.dark-mode-toggle {
188+
background-color: var(--bg);
189+
color: var(--fg);
190+
position: absolute;
191+
top: calc(((4px + $margin) / 2) + 12.55px);
192+
right: $padding;
193+
border: none;
194+
padding: 0.5rem;
195+
border-radius: $radius;
196+
cursor: pointer;
197+
transition: opacity 0.3s;
198+
199+
&:hover {
200+
color: var(--fg1);
201+
}
202+
203+
@media screen {
204+
@media screen and (max-width: $mobile-breakpoint) {
205+
right: calc((4px + $margin) / 2);
206+
}
207+
}
208+
}
209+
210+
.icon {
211+
svg {
212+
fill: var(--fg);
213+
margin-right: 0.3em;
214+
margin-left: 0.3em;
215+
}
216+
}
217+
218+
.taxonomy-svg {
219+
padding: 0;
220+
top: 0.125em;
221+
position: relative;
222+
}
223+
224+
.row {
225+
margin-left: 2rem;
226+
}

0 commit comments

Comments
 (0)