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

github.com/cntrump/hugo-notepadium.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md1
-rw-r--r--assets/css/iconfont.css6
-rw-r--r--exampleSite/config.toml1
-rw-r--r--layouts/partials/style.html2
-rw-r--r--static/assets/font/iconfont.ttfbin0 -> 2800 bytes
5 files changed, 8 insertions, 2 deletions
diff --git a/README.md b/README.md
index 814e544..b521b52 100644
--- a/README.md
+++ b/README.md
@@ -73,6 +73,7 @@ dateFormat = "Monday, January 2, 2006" # if unset, default is "2006-01-02"
logo = "" # if you have a logo png
slogan = "100% JavaScript-free"
license = "" # CC License
+internalIconfont = true # load internal iconfont or from remote url
fullRss = false # Puts entire HTML post into rss 'description' tag. If unset, default is false.
[params.comments]
diff --git a/assets/css/iconfont.css b/assets/css/iconfont.css
index 6f4cbd2..ff541f0 100644
--- a/assets/css/iconfont.css
+++ b/assets/css/iconfont.css
@@ -1,6 +1,10 @@
@font-face {
font-family: "iconfont";
- src: url('https://fontbuf.com/assets/fonts/iconfont.ttf?t=1588390362269') format('truetype');
+ {{- $url := "https://fontbuf.com/assets/fonts/iconfont.ttf?t=1588390362269" -}}
+ {{- if site.Params.internalIconfont -}}
+ {{- $url = "/assets/font/iconfont.ttf?t=1588390362269" -}}
+ {{- end -}}
+ src: url('{{- $url -}}') format('truetype');
}
.iconfont {
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index d34b913..af2ddc9 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -29,6 +29,7 @@ dateFormat = "Jan 02, 2006" # if unset, default is "2006-01-02"
readingTime = false # show reading time after article date
logo = ""
slogan = "100% JavaScript-free"
+internalIconfont = false
#license = "<a rel=license href=http://creativecommons.org/licenses/by-nc-sa/4.0/><img alt=Creative Commons License style=border-width:0 src=https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png /></a><br />This work is licensed under a <a rel=license href=http://creativecommons.org/licenses/by-nc-sa/4.0/>Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>."
[params.assets]
diff --git a/layouts/partials/style.html b/layouts/partials/style.html
index a2b777d..71e0fae 100644
--- a/layouts/partials/style.html
+++ b/layouts/partials/style.html
@@ -66,7 +66,7 @@
{{- $coreCSS = slice $coreCSS $syntaxCSS | resources.Concat "css/tmp_core.css" -}}
{{- end -}}
-{{- $iconfontCSS := (resources.Get "css/iconfont.css") -}}
+{{- $iconfontCSS := (resources.Get "css/iconfont.css") | resources.ExecuteAsTemplate "css/tmp_iconfont.css" . -}}
{{- $coreCSS = slice $coreCSS $iconfontCSS | resources.Concat "css/tmp_iconfont_core.css" -}}
{{- with partial "custom-css.html" . -}}
diff --git a/static/assets/font/iconfont.ttf b/static/assets/font/iconfont.ttf
new file mode 100644
index 0000000..16e30ab
--- /dev/null
+++ b/static/assets/font/iconfont.ttf
Binary files differ