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 <contact@angelostavrow.com>2019-09-01 02:54:05 +0300
committerGitHub <noreply@github.com>2019-09-01 02:54:05 +0300
commitd5ef318f3068ec946a4ff95c0e82eff168e1994e (patch)
tree36563bc64a5edbc81a0ea6abebe3c004d6a66c4a
parentdae2c352ea4b11847f5d56181fd45235dcea234e (diff)
parent37946bb40f82d3b9a964472d93575626f299382c (diff)
Merge pull request #58 from AngeloStavrow/development
Development
-rw-r--r--CHANGELOG.md2
-rw-r--r--README.md4
-rw-r--r--layouts/partials/fonts.css72
-rw-r--r--layouts/partials/head.html7
-rw-r--r--static/css/fonts.css72
5 files changed, 83 insertions, 74 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9076b49..c6e7243 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,8 @@ 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
+- You can now import custom CSS from `<YOUR_HUGO_SITE>/static/css/custom.css` per [#48](https://github.com/AngeloStavrow/indigo/issues/48)
## [1.1.0]
### Changed
diff --git a/README.md b/README.md
index 1de7cb8..8907618 100644
--- a/README.md
+++ b/README.md
@@ -32,6 +32,10 @@ Set up the parameters in the config file, especially those in the social and `pa
You can configure the theme to show info about the author; by default, this information is shown; if you'd prefer to leave it out, set `ShowBio` to `false`.
+### Customization
+
+Indigo will look for custom CSS in `<YOUR_HUGO_SITE>/static/css/custom.css`. This will let you add/override styling to your heart's content, while making it easy to keep Indigo up-to-date. See it in action on [angelostavrow.com](https://angelostavrow.com).
+
## Deployment
You can add a line to your `config.toml` file to set this theme as the default:
diff --git a/layouts/partials/fonts.css b/layouts/partials/fonts.css
deleted file mode 100644
index a3d857c..0000000
--- a/layouts/partials/fonts.css
+++ /dev/null
@@ -1,72 +0,0 @@
-@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: fallback;
-}
-
-@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: fallback;
-}
-
-@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: fallback;
-}
-
-@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: fallback;
-}
-
-@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: fallback;
-}
-
-@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: fallback;
-}
-
-@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: fallback;
-}
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index b4061f9..b6aab03 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -20,7 +20,10 @@
<!-- 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" />
+ <link rel="stylesheet" href="/css/fonts.css" />
+ <link rel="stylesheet" href="/css/style.css" />
+ {{ if (fileExists "/static/css/custom.css") -}}
+ <link rel="stylesheet" href="/css/custom.css" />
+ {{- end }}
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
diff --git a/static/css/fonts.css b/static/css/fonts.css
new file mode 100644
index 0000000..44776e3
--- /dev/null
+++ b/static/css/fonts.css
@@ -0,0 +1,72 @@
+@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: fallback;
+}
+
+@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: fallback;
+}
+
+@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: fallback;
+}
+
+@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: fallback;
+}
+
+@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: fallback;
+}
+
+@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: fallback;
+}
+
+@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: fallback;
+}