Skip to content

Commit

Permalink
fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
Reed Nelson committed Aug 13, 2023
1 parent 084fc75 commit 76c2eb6
Show file tree
Hide file tree
Showing 13 changed files with 60 additions and 19 deletions.
Binary file added public/fonts/cormorant/cormorant-500.woff2
Binary file not shown.
Binary file added public/fonts/cormorant/cormorant-700.woff2
Binary file not shown.
Binary file removed public/fonts/eb-garamond/eb-garamond-500.woff2
Binary file not shown.
Binary file removed public/fonts/eb-garamond/eb-garamond-700.woff2
Binary file not shown.
Binary file added public/fonts/open-sans/open-sans-400.woff2
Binary file not shown.
Binary file added public/fonts/open-sans/open-sans-600.woff2
Binary file not shown.
6 changes: 3 additions & 3 deletions src/config/theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
},
"fonts": {
"font_family": {
"primary": "Calibri:wght@400;600",
"primary": "Open Sans:wght@400;600",
"primary_type": "sans-serif",
"secondary": "EB Garamond:wght@500;700",
"secondary_type": "sans-serif"
"secondary": "Cormorant:wght@500;700",
"secondary_type": "serif"
},
"font_size": {
"base": "16",
Expand Down
23 changes: 19 additions & 4 deletions src/layouts/Base.astro
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,34 @@ const { title, meta_title, description, image, noindex, canonical } =
<meta name="generator" content={Astro.generator} />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<!-- fonts -->
<link
rel="preload"
href="/fonts/eb-garamond/eb-garamond-500.woff2"
href="/fonts/open-sans/open-sans-400.woff2"
as="font"
type="font/woff2"
crossorigin
crossorigin="anonymous"
/>
<link
rel="preload"
href="/fonts/open-sans/open-sans-600.woff2"
as="font"
type="font/woff2"
crossorigin="anonymous"
/>
<link
rel="preload"
href="/fonts/eb-garamond/eb-garamond-700.woff2"
href="/fonts/cormorant/cormorant-500.woff2"
as="font"
type="font/woff2"
crossorigin
crossorigin="anonymous"
/>
<link
rel="preload"
href="/fonts/cormorant/cormorant-700.woff2"
as="font"
type="font/woff2"
crossorigin="anonymous"
/>

<!-- responsive meta -->
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/components/Breadcrumbs.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const { className }: { className?: string } = Astro.props;
const paths = Astro.url.pathname.split("/").filter((x) => x);
let parts = [
{
label: "home",
label: "~",
href: "/",
"aria-label": Astro.url.pathname === "/" ? "page" : undefined,
},
Expand Down
8 changes: 6 additions & 2 deletions src/layouts/partials/BlogSidebar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ const { tags, categories, allCategories } = Astro.props;
<div class="lg:col-4">
<!-- categories -->
<div class="mb-8">
<h5 class="mb-6">Categories</h5>
<h4 class="mb-2 text-center">
<a href="/blog/categories">Categories</a>
</h4>
<div class="rounded bg-theme-light p-8 dark:bg-darkmode-theme-light">
<ul class="space-y-4">
{
Expand All @@ -32,7 +34,9 @@ const { tags, categories, allCategories } = Astro.props;
</div>
<!-- tags -->
<div class="mb-8">
<h5 class="mb-6">Tags</h5>
<h4 class="mb-2 text-center">
<a href="/blog/tags">Tags</a>
</h4>
<div class="rounded bg-theme-light p-6 dark:bg-darkmode-theme-light">
<ul>
{
Expand Down
8 changes: 6 additions & 2 deletions src/layouts/partials/DrinkSidebar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ const { tags, categories, allCategories } = Astro.props;
<div class="lg:col-4">
<!-- categories -->
<div class="mb-8">
<h5 class="mb-6">Categories</h5>
<h4 class="mb-2 text-center">
<a href="/drink/categories">Categories</a>
</h4>
<div class="rounded bg-theme-light p-8 dark:bg-darkmode-theme-light">
<ul class="space-y-4">
{
Expand All @@ -32,7 +34,9 @@ const { tags, categories, allCategories } = Astro.props;
</div>
<!-- tags -->
<div class="mb-8">
<h5 class="mb-6">Tags</h5>
<h4 class="mb-2 text-center">
<a href="/drink/tags">Tags</a>
</h4>
<div class="rounded bg-theme-light p-6 dark:bg-darkmode-theme-light">
<ul>
{
Expand Down
30 changes: 24 additions & 6 deletions src/styles/base.scss
Original file line number Diff line number Diff line change
@@ -1,19 +1,37 @@
/* eb-garamond-500 */
/* Open Sans 400 */
@font-face {
font-display: block;
font-family: 'EB Garamond';
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: url('/fonts/open-sans/open-sans-400.woff2') format('woff2');
}

/* Open Sans 600 */
@font-face {
font-display: block;
font-family: 'Open Sans';
font-style: normal;
font-weight: 600;
src: url('/fonts/open-sans/open-sans-600.woff2') format('woff2');
}

/* Cormorant 500 */
@font-face {
font-display: block;
font-family: 'Cormorant';
font-style: normal;
font-weight: 500;
src: url('/fonts/eb-garamond/eb-garamond-700.woff2') format('woff2');
src: url('/fonts/cormorant/cormorant-500.woff2') format('woff2');
}

/* eb-garamond-700 */
/* Cormorant 700 */
@font-face {
font-display: block;
font-family: 'EB Garamond';
font-family: 'Cormorant';
font-style: normal;
font-weight: 700;
src: url('/fonts/eb-garamond/eb-garamond-700.woff2') format('woff2');
src: url('/fonts/cormorant/cormorant-700.woff2') format('woff2');
}

html {
Expand Down
2 changes: 1 addition & 1 deletion src/styles/navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ input#nav-toggle:checked ~ #nav-menu {
}

.nav-link {
@apply block p-3 font-semibold text-dark transition hover:text-primary dark:text-darkmode-dark lg:px-2 lg:py-3;
@apply block p-3 font-primary font-semibold text-dark transition hover:text-primary dark:text-darkmode-dark lg:px-2 lg:py-3;
}

.nav-dropdown {
Expand Down

0 comments on commit 76c2eb6

Please sign in to comment.