Skip to content

Commit 8fabf78

Browse files
committed
Reduce the size of the styles and remove Highlight.js
Exclude some unused Bulma styles from the build and remove Highligh.js as it's not used anywhere. Since the full commit id doesn't display properly on small screen devices(e.g. mobile), it has been shortened to 7 characters
1 parent 7befb34 commit 8fabf78

File tree

5 files changed

+25
-19
lines changed

5 files changed

+25
-19
lines changed

assets/sass/bulma.sass

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22
/*! bulma.io v0.9.1 | MIT License | github.com/jgthms/bulma */
33
@import "utilities/_all"
44
@import "base/_all"
5-
@import "elements/_all"
6-
@import "form/_all"
7-
@import "components/_all"
5+
@import "elements/button"
6+
@import "elements/box"
7+
@import "elements/content"
8+
@import "elements/container"
9+
@import "elements/other"
10+
@import "elements/title"
11+
@import "components/card"
12+
@import "components/navbar"
813
@import "grid/_all"
914
@import "helpers/_all"
1015
@import "layout/_all"

assets/sass/drs.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ $text-strong: darken($text, 5);
3636

3737
$link: $blue;
3838
$code: lighten($red, 8);
39+
$code-border-radius: 0.25em;
3940

4041
$pagination-background-color: $grey-lighter;
4142

@@ -202,3 +203,13 @@ h5 {
202203
h6 {
203204
font-size: 1.2rem;
204205
}
206+
207+
code {
208+
border-radius: $code-border-radius;
209+
}
210+
211+
.commit {
212+
code {
213+
background: darken($grey-darker, 4);
214+
}
215+
}

layouts/index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
{{ $sitetitle := .Site.Title }}
1515
{{ with .OutputFormats.Get "RSS" }}
1616
<link
17-
href="{{ .RelPermalink }}"
18-
rel="alternate"
19-
type="application/rss+xml"
20-
title="{{ $sitetitle }}"
21-
/>
17+
href="{{ .RelPermalink }}"
18+
rel="alternate"
19+
type="application/rss+xml"
20+
title="{{ $sitetitle }}"
21+
/>
2222
{{ end }}
2323
{{ partial "head_includes.html" . }}
2424
</head>
@@ -112,7 +112,7 @@ <h3>Nightly</h3>
112112

113113
const commEl = el.querySelector('.commit');
114114
if (commEl) {
115-
commEl.innerText = info.commit;
115+
commEl.innerHTML = "<code>" + info.commit.slice(0, 7) + "</code>";
116116
}
117117

118118
const linkEl = el.parentNode.querySelector('.link');

layouts/partials/head_includes.html

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,8 @@
33
{{ $style := $sass | resources.ToCSS $sassOpts }}
44
<link rel="stylesheet" href="{{ $style.Permalink }}" />
55

6-
<link
7-
href="https://cdn.jsdelivr.net/npm/highlightjs@9.12.0/styles/github-gist.css"
8-
rel="stylesheet"
9-
/>
10-
116
<link rel="shortcut icon" sizes="48x48" href="/img/favicon.ico">
127
<link rel="icon" type="image/png" sizes="16x16" href="/img/favicon/favicon-16x16.png">
138
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon/favicon-32x32.png">
149
<link rel="apple-touch-icon" sizes="180x180" href="/img/favicon/apple-touch-icon.png">
1510
<link rel="icon" type="image/png" sizes="192x192" href="/img/favicon/android-chrome-192x192.png">
16-
<link rel="manifest" href="/site.webmanifest">

layouts/partials/scripts.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.14.2/highlight.min.js"></script>
21

3-
<script>
4-
hljs.initHighlightingOnLoad();
5-
</script>

0 commit comments

Comments
 (0)