Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Hack Font #22

Merged
merged 1 commit into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion assets/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

@import "katex/dist/katex";

@import "assets/css/hack";
@import "assets/css/prose";

@import "assets/css/author";
Expand All @@ -13,7 +14,7 @@
@import "assets/css/highlight.css";
@import "assets/css/pagination.css";

@import "https://fonts.googleapis.com/css2?family=Source+Code+Pro:ital,wght@0,200..900;1,200..900&display=swap";
/* @import "https://fonts.googleapis.com/css2?family=Source+Code+Pro:ital,wght@0,200..900;1,200..900&display=swap"; */

::selection {
@apply bg-fuchsia-900 text-fuchsia-50;
Expand Down
38 changes: 38 additions & 0 deletions assets/css/hack.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*!
* Hack typeface https://github.com/source-foundry/Hack
* License: https://github.com/source-foundry/Hack/blob/master/LICENSE.md
*/

/* FONT PATHS
* -------------------------- */
@font-face {
font-family: Hack;
src: url("../fonts/hack-regular.woff2?sha=3114f1256") format("woff2"),
url("fonts/hack-regular.woff?sha=3114f1256") format("woff");
font-weight: 400;
font-style: normal;
}

@font-face {
font-family: Hack;
src: url("../fonts/hack-bold.woff2?sha=3114f1256") format("woff2"),
url("fonts/hack-bold.woff?sha=3114f1256") format("woff");
font-weight: 700;
font-style: normal;
}

@font-face {
font-family: Hack;
src: url("../fonts/hack-italic.woff2?sha=3114f1256") format("woff2"),
url("fonts/hack-italic.woff?sha=3114f1256") format("woff");
font-weight: 400;
font-style: italic;
}

@font-face {
font-family: Hack;
src: url("../fonts/hack-bolditalic.woff2?sha=3114f1256") format("woff2"),
url("fonts/hack-bolditalic.woff?sha=3114f1256") format("woff");
font-weight: 700;
font-style: italic;
}
3 changes: 1 addition & 2 deletions assets/css/pagefind.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ body {
--pagefind-ui-background: #000; /* black */
--pagefind-ui-border: rgb(217 70 239); /* fuchsia-500 */
--pagefind-ui-tag: rgb(74 4 78); /* fuchsia-900 */
--pagefind-ui-font: "Source Code Pro", monaco, "Ubuntu Mono", consolas,
monospace;
--pagefind-ui-font: "Hack", monaco, "Ubuntu Mono", consolas, monospace;
--pagefind-ui-border-radius: 0;
}

Expand Down
6 changes: 3 additions & 3 deletions layouts/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ <h1 class="post-title">
</h1>

<div class="post-content">
<a href="{{ "/" | absURL }}"
>{{ $.Site.Params.missingBackButtonLabel | default "Back to home page" }}&nbsp;→</a
>
<a href="{{ "/" | absURL }}">
{{ $.Site.Params.missingBackButtonLabel | default "Back to home page" }}&nbsp;→
</a>
</div>
</div>
{{ end }}
7 changes: 4 additions & 3 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@
{{ end }}

{{ $baseCSS := resources.Get "css/base.css" }}
{{ $baseOpts := (dict "noMap" (not hugo.IsDevelopment)) }}
{{ $baseOut := $baseCSS | postCSS $baseOpts }}
{{ $baseCSSOpts := (dict "noMap" (not hugo.IsDevelopment)) }}
{{ $baseOut := $baseCSS | postCSS $baseCSSOpts }}
{{ if not hugo.IsDevelopment }}
{{ $baseOut = $baseOut | minify | fingerprint }}
{{ end }}
Expand All @@ -150,7 +150,8 @@
{{ if hugo.IsDevelopment }}
{{ $baseSourceMap = "external" }}
{{ end }}
{{ $base := resources.Get "js/base.js" | js.Build (dict "sourceMap" $baseSourceMap) }}
{{ $baseJSOpts := (dict "sourceMap" $baseSourceMap) }}
{{ $base := resources.Get "js/base.js" | js.Build $baseJSOpts }}
{{ if not hugo.IsDevelopment }}
{{ $base = $base | minify | fingerprint }}
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/post-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
{{ partial "cover.html" . }}


<div class="post-content">
<div class="post-content text-neutral-300">
{{ if .Params.showFullContent }}
{{ .Content }}
{{ else if .Description }}
Expand Down
Binary file added static/fonts/hack-bold-subset.woff
Binary file not shown.
Binary file added static/fonts/hack-bold-subset.woff2
Binary file not shown.
Binary file added static/fonts/hack-bold.woff
Binary file not shown.
Binary file added static/fonts/hack-bold.woff2
Binary file not shown.
Binary file added static/fonts/hack-bolditalic-subset.woff
Binary file not shown.
Binary file added static/fonts/hack-bolditalic-subset.woff2
Binary file not shown.
Binary file added static/fonts/hack-bolditalic.woff
Binary file not shown.
Binary file added static/fonts/hack-bolditalic.woff2
Binary file not shown.
Binary file added static/fonts/hack-italic-subset.woff
Binary file not shown.
Binary file added static/fonts/hack-italic-subset.woff2
Binary file not shown.
Binary file added static/fonts/hack-italic.woff
Binary file not shown.
Binary file added static/fonts/hack-italic.woff2
Binary file not shown.
Binary file added static/fonts/hack-regular-subset.woff
Binary file not shown.
Binary file added static/fonts/hack-regular-subset.woff2
Binary file not shown.
Binary file added static/fonts/hack-regular.woff
Binary file not shown.
Binary file added static/fonts/hack-regular.woff2
Binary file not shown.
24 changes: 3 additions & 21 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,9 @@ module.exports = {
],
theme: {
fontFamily: {
sans: [
"Source Code Pro",
"Monaco",
"Ubuntu Mono",
"Consolas",
"monospace",
],
serif: [
"Source Code Pro",
"Monaco",
"Ubuntu Mono",
"Consolas",
"monospace",
],
mono: [
"Source Code Pro",
"Monaco",
"Ubuntu Mono",
"Consolas",
"monospace",
],
sans: ["Hack", "Monaco", "Ubuntu Mono", "Consolas", "monospace"],
serif: ["Hack", "Monaco", "Ubuntu Mono", "Consolas", "monospace"],
mono: ["Hack", "Monaco", "Ubuntu Mono", "Consolas", "monospace"],
},
extend: {
typography: ({ theme }) => ({
Expand Down
Loading