Skip to content

Commit

Permalink
feat: update fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
doinkythederp committed Oct 28, 2023
1 parent 40c281f commit f9ac5fe
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 18 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"@divriots/jampack": "^0.21.1",
"astro": "^3.4.0",
"astro-seo": "^0.8.0",
"gotham-fonts": "github:SergioFloresG/gotham-fonts",
"modern-normalize": "^2.0.0",
"preact": "^10.6.5",
"vite-plugin-pwa": "^0.16.5"
Expand Down
9 changes: 0 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added public/fonts/URWGothic-Book.woff2
Binary file not shown.
Binary file added public/fonts/URWGothic-Demi.woff2
Binary file not shown.
6 changes: 2 additions & 4 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import { SEO } from "astro-seo";
import "modern-normalize/modern-normalize.css";
import "../main.css";
import { seoConfig, manifest } from "../../utils/seo.ts";
import gothamBook from "gotham-fonts/webfonts/Gotham-Book.woff2";
import gothamBold from "gotham-fonts/webfonts/Gotham-Bold.woff2";
export interface Props {
title?: string;
Expand Down Expand Up @@ -46,14 +44,14 @@ const ogTitle = Astro.props.ogTitle ?? title;
/>
<link
rel="preload"
href={gothamBook}
href="/fonts/URWGothic-Demi.woff2"
as="font"
type="font/woff2"
crossorigin
/>
<link
rel="preload"
href={gothamBold}
href="/fonts/URWGothic-Book.woff2"
as="font"
type="font/woff2"
crossorigin
Expand Down
24 changes: 21 additions & 3 deletions src/main.css
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
@import "./loading.css";
@import "gotham-fonts/css";

@font-face {
src: url("/fonts/URWGothic-Demi.woff2") format("woff2");
font-family: "URW Gothic";
font-weight: bold;
}

@font-face {
src: url("/fonts/URWGothic-Book.woff2") format("woff2");
font-family: "URW Gothic";
font-weight: normal;
}

html,
body {
height: 100%;
}

body {
font-family: "Gotham", system-ui, -apple-system, BlinkMacSystemFont,
font-family: "URW Gothic", system-ui, -apple-system, BlinkMacSystemFont,
"Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans",
"Helvetica Neue", sans-serif;
display: flex;
Expand All @@ -19,6 +30,12 @@ body {
padding: 5rem;
}

@media (max-width: 600px) {
body {
padding: 3rem 5rem;
}
}

a {
color: white;
font-weight: bold;
Expand All @@ -32,6 +49,7 @@ h2 {
font-size: 1.6rem;
}

.bottom {
.footer {
margin: auto 0 0 0;
text-align: center;
}
2 changes: 1 addition & 1 deletion src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import Layout from "../layouts/Layout.astro";
<p>(Are you a nerd? Check the developer console.)</p>
</div>
</div>
<p class="bottom">
<p class="footer">
Contact me:
<a href="mailto:[email protected]">[email protected]</a>
</p>
Expand Down

0 comments on commit f9ac5fe

Please sign in to comment.