Skip to content

Commit

Permalink
Merge pull request #45 from OpenRailAssociation/offline-fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
mxmehl authored Nov 7, 2024
2 parents 9ad1d96 + e5ab143 commit 7109c87
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 3 deletions.
48 changes: 48 additions & 0 deletions themes/openrail/assets/sass/custom/fonts.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/* source-sans-3-300 - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Source Sans 3';
font-style: normal;
font-weight: 300;
src: url('../webfonts/source-sans-3-v15-latin-300.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* source-sans-3-300italic - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Source Sans 3';
font-style: italic;
font-weight: 300;
src: url('../webfonts/source-sans-3-v15-latin-300italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* source-sans-3-regular - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Source Sans 3';
font-style: normal;
font-weight: 400;
src: url('../webfonts/source-sans-3-v15-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* source-sans-3-italic - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Source Sans 3';
font-style: italic;
font-weight: 400;
src: url('../webfonts/source-sans-3-v15-latin-italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* source-sans-3-700 - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Source Sans 3';
font-style: normal;
font-weight: 700;
src: url('../webfonts/source-sans-3-v15-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* source-sans-3-700italic - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Source Sans 3';
font-style: italic;
font-weight: 700;
src: url('../webfonts/source-sans-3-v15-latin-700italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
4 changes: 2 additions & 2 deletions themes/openrail/assets/sass/libs/_vars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

// Font.
$font: (
family: ('Source Sans Pro', Helvetica, sans-serif),
family: ('Source Sans 3', Helvetica, sans-serif),
family-fixed: ('Courier New', monospace),
weight: 300,
weight-bold: 400,
Expand Down Expand Up @@ -77,4 +77,4 @@
border-bg: rgba(255,255,255,0.125),
accent: #837164
),
);
);
2 changes: 1 addition & 1 deletion themes/openrail/assets/sass/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@import 'libs/breakpoints';
@import 'libs/html-grid';
@import 'fontawesome-all.min.css';
@import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,300i,400,400i');
@import 'custom/fonts.scss'; // Custom offline fonts

/*
Hugo Story by CaressOfSteel
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 7109c87

Please sign in to comment.