Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/AngeloStavrow/indigo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngelo Stavrow <angelo@fogcreek.com>2018-10-20 21:58:28 +0300
committerAngelo Stavrow <angelo@fogcreek.com>2018-10-20 21:58:28 +0300
commit5bf5047cdd06b38311c68cb89a7ad4b653d6e84d (patch)
tree43bfd6b4b5039446f0a5436769b3bb2f0fd53ec7
parent7730aa096f94e45a402f612c5fb492b05b2fb62e (diff)
Move @font-face declarations to partial file (#27)
-rw-r--r--CHANGELOG.md4
-rw-r--r--layouts/partials/fonts.css72
-rw-r--r--layouts/partials/head.html1
-rw-r--r--static/css/style.css73
4 files changed, 76 insertions, 74 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a7eb680..bede6d4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,10 +5,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
+### Added
+- Users can now add their Reddit account as a social network, thanks to [@sauerj](https://github.com/sauerj)!
+
### Fixed
- The 404.html page now properly links back to the homepage, thanks to [@sauerj](https://github.com/sauerj)!
- Custom fonts are now loaded correctly, hopefully speeding up rendering ([#23](https://github.com/AngeloStavrow/indigo/issues/23))
-- Users can now add their Reddit account as a social network, thanks to [@sauerj](https://github.com/sauerj)!
## [1.0.2]
### Fixed
diff --git a/layouts/partials/fonts.css b/layouts/partials/fonts.css
new file mode 100644
index 0000000..4e9aecd
--- /dev/null
+++ b/layouts/partials/fonts.css
@@ -0,0 +1,72 @@
+@font-face{
+ font-family: 'Fira Code';
+ src: url('{{ .Site.BaseURL }}fonts/FiraCode-Regular.eot');
+ src: url('{{ .Site.BaseURL }}fonts/FiraCode-Regular.eot?#iefix') format('embedded-opentype'),
+ url('{{ .Site.BaseURL }}fonts/FiraCode-Regular.woff2') format('woff2'),
+ url('{{ .Site.BaseURL }}fonts/FiraCode-Regular.woff') format('woff'),
+ url('{{ .Site.BaseURL }}fonts/FiraCode-Regular.ttf') format('truetype');
+ font-weight: 400;
+ font-style: normal;
+ font-display: optional;
+}
+
+@font-face {
+ font-family: 'Charter';
+ src: url('{{ .Site.BaseURL }}fonts/charter_regular-webfont.eot');
+ src: url('{{ .Site.BaseURL }}fonts/charter_regular-webfont.eot?#iefix') format('embedded-opentype'),
+ url('{{ .Site.BaseURL }}fonts/charter_regular-webfont.woff') format('woff'),
+ url('{{ .Site.BaseURL }}fonts/charter_regular-webfont.ttf') format('truetype');
+ font-display: optional;
+}
+
+@font-face {
+ font-family: 'Charter';
+ src: url('{{ .Site.BaseURL }}fonts/charter_bold-webfont.eot');
+ src: url('{{ .Site.BaseURL }}fonts/charter_bold-webfont.eot?#iefix') format('embedded-opentype'),
+ url('{{ .Site.BaseURL }}fonts/charter_bold-webfont.woff') format('woff'),
+ url('{{ .Site.BaseURL }}fonts/charter_bold-webfont.ttf') format('truetype');
+ font-weight: bold;
+ font-display: optional;
+}
+
+@font-face {
+ font-family: 'Charter';
+ src: url('{{ .Site.BaseURL }}fonts/charter_italic-webfont.eot');
+ src: url('{{ .Site.BaseURL }}fonts/charter_italic-webfont.eot?#iefix') format('embedded-opentype'),
+ url('{{ .Site.BaseURL }}fonts/charter_italic-webfont.woff') format('woff'),
+ url('{{ .Site.BaseURL }}fonts/charter_italic-webfont.ttf') format('truetype');
+ font-style: italic;
+ font-display: optional;
+}
+
+@font-face {
+ font-family: 'Charter';
+ src: url('{{ .Site.BaseURL }}fonts/charter_bold_italic-webfont.eot');
+ src: url('{{ .Site.BaseURL }}fonts/charter_bold_italic-webfont.eot?#iefix') format('embedded-opentype'),
+ url('{{ .Site.BaseURL }}fonts/charter_bold_italic-webfont.woff') format('woff'),
+ url('{{ .Site.BaseURL }}fonts/charter_bold_italic-webfont.ttf') format('truetype');
+ font-style: italic;
+ font-weight: bold;
+ font-display: optional;
+}
+
+@font-face {
+ font-family: 'Fira Sans';
+ src: url('{{ .Site.BaseURL }}fonts/FiraSans-Book.eot');
+ src: url('{{ .Site.BaseURL }}fonts/FiraSans-Book.eot?#iefix') format('embedded-opentype'),
+ url('{{ .Site.BaseURL }}fonts/FiraSans-Book.woff2') format('woff2'),
+ url('{{ .Site.BaseURL }}fonts/FiraSans-Book.woff') format('woff'),
+ url('{{ .Site.BaseURL }}fonts/FiraSans-Book.ttf') format('truetype');
+ font-display: optional;
+}
+
+@font-face {
+ font-family: 'Fira Sans';
+ src: url('{{ .Site.BaseURL }}fonts/FiraSans-Bold.eot');
+ src: url('{{ .Site.BaseURL }}fonts/FiraSans-Bold.eot?#iefix') format('embedded-opentype'),
+ url('{{ .Site.BaseURL }}fonts/FiraSans-Bold.woff2') format('woff2'),
+ url('{{ .Site.BaseURL }}fonts/FiraSans-Bold.woff') format('woff'),
+ url('{{ .Site.BaseURL }}fonts/FiraSans-Bold.ttf') format('truetype');
+ font-weight: bold;
+ font-display: optional;
+}
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 2f534bd..b02bdf6 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -20,6 +20,7 @@
<!-- IndieAuth endpoint -->
<link rel="authorization_endpoint" href="https://indieauth.com/auth">
<!-- Other stuff to make the site work -->
+ <style type="text/css">{{ partial "fonts.css" . | safeCSS }}</style>
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/style.css" />
<meta name="viewport" content="width=device-width, initial-scale=1">
</head> \ No newline at end of file
diff --git a/static/css/style.css b/static/css/style.css
index 13ba7fc..569d557 100644
--- a/static/css/style.css
+++ b/static/css/style.css
@@ -1,76 +1,3 @@
-@font-face{
- font-family: 'Fira Code';
- src: url('/fonts/FiraCode-Regular.eot');
- src: url('/fonts/FiraCode-Regular.eot?#iefix') format('embedded-opentype'),
- url('/fonts/FiraCode-Regular.woff2') format('woff2'),
- url('/fonts/FiraCode-Regular.woff') format('woff'),
- url('/fonts/FiraCode-Regular.ttf') format('truetype');
- font-weight: 400;
- font-style: normal;
- font-display: optional;
-}
-
-@font-face {
- font-family: 'Charter';
- src: url('/fonts/charter_regular-webfont.eot');
- src: url('/fonts/charter_regular-webfont.eot?#iefix') format('embedded-opentype'),
- url('/fonts/charter_regular-webfont.woff') format('woff'),
- url('/fonts/charter_regular-webfont.ttf') format('truetype');
- font-display: optional;
-}
-
-@font-face {
- font-family: 'Charter';
- src: url('/fonts/charter_bold-webfont.eot');
- src: url('/fonts/charter_bold-webfont.eot?#iefix') format('embedded-opentype'),
- url('/fonts/charter_bold-webfont.woff') format('woff'),
- url('/fonts/charter_bold-webfont.ttf') format('truetype');
- font-weight: bold;
- font-display: optional;
-}
-
-@font-face {
- font-family: 'Charter';
- src: url('/fonts/charter_italic-webfont.eot');
- src: url('/fonts/charter_italic-webfont.eot?#iefix') format('embedded-opentype'),
- url('/fonts/charter_italic-webfont.woff') format('woff'),
- url('/fonts/charter_italic-webfont.ttf') format('truetype');
- font-style: italic;
- font-display: optional;
-}
-
-@font-face {
- font-family: 'Charter';
- src: url('/fonts/charter_bold_italic-webfont.eot');
- src: url('/fonts/charter_bold_italic-webfont.eot?#iefix') format('embedded-opentype'),
- url('/fonts/charter_bold_italic-webfont.woff') format('woff'),
- url('/fonts/charter_bold_italic-webfont.ttf') format('truetype');
- font-style: italic;
- font-weight: bold;
- font-display: optional;
-}
-
-@font-face {
- font-family: 'Fira Sans';
- src: url('/fonts/FiraSans-Book.eot');
- src: url('/fonts/FiraSans-Book.eot?#iefix') format('embedded-opentype'),
- url('/fonts/FiraSans-Book.woff2') format('woff2'),
- url('/fonts/FiraSans-Book.woff') format('woff'),
- url('/fonts/FiraSans-Book.ttf') format('truetype');
- font-display: optional;
-}
-
-@font-face {
- font-family: 'Fira Sans';
- src: url('/fonts/FiraSans-Bold.eot');
- src: url('/fonts/FiraSans-Bold.eot?#iefix') format('embedded-opentype'),
- url('/fonts/FiraSans-Bold.woff2') format('woff2'),
- url('/fonts/FiraSans-Bold.woff') format('woff'),
- url('/fonts/FiraSans-Bold.ttf') format('truetype');
- font-weight: bold;
- font-display: optional;
-}
-
* {
box-sizing: border-box;
}