Skip to content

Commit 48cbd13

Browse files
authored
Merge pull request #30 from moiSentineL/css-edits
better css loading
2 parents 39e0f16 + 4a9ba52 commit 48cbd13

File tree

4 files changed

+13
-185
lines changed

4 files changed

+13
-185
lines changed

src/_layouts/base.njk

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,8 @@
3939
{# <link
4040
rel="stylesheet"
4141
href="https://unpkg.com/littlefoot/dist/littlefoot.css"
42-
/> #}
42+
/> #}
4343
<link rel="stylesheet" href="/css/css.css">
44-
{# <link rel="preload" href="/css/IBMPlexMono-Regular.ttf" as="font" crossorigin> #}
45-
46-
<link rel="preconnect" href="https://fonts.googleapis.com">
47-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
48-
{# <link href="https://fonts.googleapis.com/css2?family=Recursive:wght,[email protected],0.5&display=swap" rel="stylesheet"> #}
49-
<link href="https://fonts.googleapis.com/css2?family=Manrope:[email protected]&display=swap" rel="stylesheet">
50-
<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap" rel="stylesheet">
5144

5245
<link rel="dns-prefetch" href="https://www.googletagmanager.com">
5346
<link rel="dns-prefetch" href="https://www.google-analytics.com">

src/_layouts/homebase.njk

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,9 @@
1010
{% if site.description %}
1111
<meta name="description" content="{{ site.description }}">
1212
{% endif %}
13+
1314
<title>{{ title or site.title }}</title>
1415

15-
{% if page.url == '/' %}
16-
<script>
17-
if(location.hash) window.location = `/admin/#${location.href.split("#").pop()}`
18-
</script>
19-
{% endif %}
20-
21-
2216
<link rel="alternate" type="application/atom+xml" href="https://nibirsan.org/feed.xml" title="Nibir's Brain Dump"/>
2317
<link rel="apple-touch-icon" sizes="180x180" href="/media/meta/apple-touch-icon.png">
2418
<link rel="icon" type="image/png" sizes="32x32" href="/media/meta/favicon-32x32.png">
@@ -29,13 +23,10 @@
2923
<meta name="msapplication-TileColor" content="#2b5797">
3024
<meta name="msapplication-config" content="/media/meta/browserconfig.xml">
3125
<meta name="theme-color" content="#000000">
32-
26+
3327
<link rel="stylesheet" href="/css/home.css">
34-
{# <link rel="preload" href="/css/IBMPlexMono-Regular.ttf" as="font" crossorigin> #}
35-
36-
<link rel="preconnect" href="https://fonts.googleapis.com">
37-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
38-
28+
<link rel="stylesheet" href="/css/css.css">
29+
3930
<link rel="dns-prefetch" href="https://www.googletagmanager.com">
4031
<link rel="dns-prefetch" href="https://www.google-analytics.com">
4132
</head>

src/styles/css.scss

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
1-
@font-face {
2-
font-family: IBM Plex Mono;
3-
src: url("IBMPlexMono-Regular.ttf");
4-
font-display: swap;
5-
}
1+
// css go brr
62

7-
// @import url('https://fonts.googleapis.com/css2?family=Recursive:CRSV,MONO@1,0.75&display=swap');
8-
93
@import url('https://fonts.googleapis.com/css2?family=Inconsolata:wdth,wght@90,200..900;100,200..900&display=swap');
104

11-
12-
135
$transwhite: #e0e0e0;
146
$pale-azure: #70d6ffff;
157
$cyclamen: #ff70a6ff;
@@ -41,7 +33,7 @@ html {
4133
margin: auto;
4234
line-height: 1.5;
4335
font-size: 1.2em;
44-
font-family: Inconsolata, monospace;
36+
font-family: "Inconsolata", monospace;
4537
}
4638

4739
.excerpt {
@@ -180,7 +172,6 @@ h3,
180172
h4,
181173
h5,
182174
h6 {
183-
font-family: Inconsolata;
184175
font-variation-settings: "wdth" 90;
185176
margin: 1em 0 0.5em;
186177
}
@@ -433,6 +424,7 @@ footer {
433424
}
434425

435426
div {
427+
436428
}
437429

438430
.tag {
@@ -449,6 +441,7 @@ div {
449441
}
450442

451443
span {
444+
452445
}
453446

454447
.reading {

src/styles/home.scss

Lines changed: 4 additions & 153 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
1-
@font-face {
2-
font-family: IBM Plex Mono;
3-
src: url("IBMPlexMono-Regular.ttf");
4-
font-display: swap;
5-
}
6-
7-
8-
@font-face {
9-
font-family: Recursive;
10-
src: url('https://fonts.googleapis.com/css2?family=Recursive:wght,[email protected],0.5&display=swap')
11-
}
1+
// for homepage
2+
// reduced workload to css.scss
123

134
html {
145
display: flex;
@@ -31,7 +22,7 @@ html {
3122
padding-bottom: 0rem;
3223
line-height: 0.5;
3324
font-size: 300%;
34-
margin-top: 2em;
25+
margin-top: 1rem;
3526
margin-bottom:0.6em;
3627
}
3728
.whothis{
@@ -72,88 +63,6 @@ html {
7263
}
7364

7465
}
75-
76-
77-
@media screen and (prefers-color-scheme: light) {
78-
html{
79-
color: black;
80-
}
81-
::selection {
82-
background: #C8FFFD;
83-
}
84-
pre, code {
85-
background: #e0e0e0;
86-
}
87-
blockquote{
88-
border: thin solid black;
89-
}
90-
table, th, td{
91-
border: thin solid black;
92-
}
93-
a {
94-
color: black
95-
}
96-
h4.excerpt {
97-
color: #909090;
98-
}
99-
}
100-
101-
@media screen and (prefers-color-scheme: dark) {
102-
html{
103-
color: #e0e0e0;
104-
background-color: #121212;
105-
}
106-
::selection {
107-
background: #C8FFFD;
108-
color: black;
109-
}
110-
pre, code {
111-
background: rgb(48, 48, 48);
112-
}
113-
blockquote{
114-
border: thin solid #e0e0e0;
115-
}
116-
table, th, td{
117-
border: thin solid #e0e0e0;
118-
}
119-
tag {
120-
color: #000000 !important;
121-
}
122-
a {
123-
color:#e0e0e0;
124-
}
125-
126-
h4.excerpt {
127-
color: #b5b5b5;
128-
}
129-
}
130-
131-
h1,h2,h3,h4,h5,h6 {
132-
margin: 1em 0 0.5em;
133-
}
134-
.title {
135-
margin: 1em 0 0.2em;
136-
}
137-
138-
139-
p,ul,ol {
140-
margin-bottom: 1em;
141-
}
142-
143-
.postlist{
144-
padding: unset;
145-
list-style-type: none;
146-
}
147-
148-
.post{
149-
margin: 0 0 1em;
150-
display: list-item;
151-
list-style-type: none;
152-
}
153-
154-
.post-meta {
155-
text-align: right;
156-
}
15766

15867
img {
15968
max-width: 100%;
@@ -177,62 +86,4 @@ img {
17786
border-radius: 50%;
17887
height: auto;
17988
}
180-
}
181-
182-
blockquote {
183-
font-style: italic;
184-
margin: 0 0.3rem 0 0.3rem
185-
}
186-
187-
blockquote p {
188-
margin: 0 0.3rem 0 0.3rem;
189-
}
190-
191-
pre {
192-
font-size: 14px;
193-
max-height: 300px;
194-
overflow: scroll;
195-
padding: 1rem;
196-
border-radius: 15px;
197-
white-space: pre-wrap;
198-
word-break: break-all;
199-
}
200-
201-
table { width: 100%; }
202-
203-
table, th, td {
204-
border-collapse: collapse;
205-
padding: 0.4rem;
206-
207-
}
208-
209-
.table-wrapper {
210-
overflow-x: auto;
211-
}
212-
213-
a {
214-
text-decoration: underline;
215-
text-decoration-thickness: .3ex;
216-
text-decoration-color: #5B84B1FF;
217-
}
218-
219-
a:hover {
220-
font-weight: bold;
221-
text-decoration-color: #FC766AFF;
222-
}
223-
224-
225-
nav {
226-
text-align: center;
227-
margin-top: 25px;
228-
margin-bottom: 25px;
229-
}
230-
231-
footer{
232-
font-size: small;
233-
text-align: center;
234-
padding: 25px;
235-
padding-top: 0.5em;
236-
}
237-
238-
89+
}

0 commit comments

Comments
 (0)