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

github.com/ertuil/erblog.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLutong Chen <ertuil98@foxmail.com>2020-05-10 06:15:43 +0300
committerLutong Chen <ertuil98@foxmail.com>2020-05-10 06:21:41 +0300
commitd7152007f9f4f893fe08a7433650eab1edebb50f (patch)
tree6c222232e65c69551a64040faa85214cc482041e
parentfbb9beba8d43dc9a961a743191b64f2aa54255df (diff)
now it is able to change the color of badge and quote
-rw-r--r--README.md6
-rw-r--r--exampleSite/config.toml2
-rw-r--r--layouts/_default/single.html4
-rw-r--r--layouts/gallery/single.html2
-rw-r--r--layouts/index.html2
-rw-r--r--layouts/partials/article.html2
-rw-r--r--layouts/partials/info.html7
-rw-r--r--static/self/css/default.css12
8 files changed, 26 insertions, 11 deletions
diff --git a/README.md b/README.md
index c1a26b3..9a9f4fe 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,9 @@
A personal blog theme powered by [Hugo](https://gohugo.io).
Erblog is written by Ertuil with [layui.js](https://www.layui.com), [font-awssome](https://fontawesome.com), github markdown css and [undraw](https://undraw.co).
-Erblog is also a responsive theme which means it is customed for your mobile platforms.
+Erblog is also a responsive theme which means it is customed for your mobile platforms.
+
+> Now it is possible to change the color of your themes. Use `Params.badge` and `Params.quote` to select one of your favourite color.
![images/tn.png](https://raw.githubusercontent.com/ertuil/erblog/master/images/tn.png)
@@ -45,6 +47,8 @@ There are some basic configuration options you may want to use:
| Params.bio | A Biography for your Blog | None |
| Params.logo | Your Blog's Logo | None |
| Params.favicon | The favicon file | /favicon.ico |
+| Params.badge | The color for badge ('red', 'cyan', 'orange', 'green', 'blue', 'black' and 'gray' is available) | 'red' |
+| Params.quote | The color for quota ('red', 'cyan', 'orange', 'green', 'blue', 'black' and 'gray' is available) | 'green' |
Add your own custom menus in the `config.toml` like this:
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 4867189..336d554 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -9,6 +9,8 @@ footnoteReturnLinkContents = "^"
[params]
author = "Steve Francia"
+ badge = "red"
+ quote = "green"
# logo = "//blog.ertuil.top/avater.png"
bio = """
<p> This is BIO. You can write something here. </p>
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 85ac458..cdc9aa1 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -6,7 +6,7 @@
<div class="{{ if not $related }}layui-col-md12{{else}}layui-col-md8{{end}} layui-col-sm12 layui-col-xs12">
<div class="layui-card single-card">
<br />
- <blockquote class="self-elem-quote markdown-body single-title" >
+ <blockquote class="self-elem-quote {{if isset $.Site.Params "quote"}}self-elem-quote-bg-{{index $.Site.Params.quote}}{{end}} markdown-body single-title" >
<h1>{{ .Title }}</h1>
{{partial "info" .}}
</blockquote>
@@ -24,7 +24,7 @@
{{ with $related }}
{{ range . }}
<div style="margin-left: 10px;">
- <blockquote class="self-elem-quote" style="background-color:#FFFFFF;margin-top: 10px;">
+ <blockquote class="self-elem-quote {{if isset $.Site.Params "quote"}}self-elem-quote-bg-{{index $.Site.Params.quote}}{{end}}" style="background-color:#FFFFFF;margin-top: 10px;">
<a href="{{.RelPermalink}}">
<h2 class="">{{.Title}}</h2>
</a>
diff --git a/layouts/gallery/single.html b/layouts/gallery/single.html
index 0e579ab..bf5aad1 100644
--- a/layouts/gallery/single.html
+++ b/layouts/gallery/single.html
@@ -5,7 +5,7 @@
<div class="layui-row">
<div class="layui-card single-card">
<br />
- <blockquote class="self-elem-quote markdown-body single-title" >
+ <blockquote class="self-elem-quote {{if isset $.Site.Params "quote"}}self-elem-quote-bg-{{index $.Site.Params.quote}}{{end}} markdown-body single-title" >
<h1>{{ .Title }}</h1>
</blockquote>
<div class="layui-card-body markdown-gallery single-content">
diff --git a/layouts/index.html b/layouts/index.html
index 5fce50e..ef6b77e 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -44,7 +44,7 @@
<h1><a href="{{ "/" | relLangURL}}{{ $taxonomyname | urlize }}">{{ $taxonomyname }}</a> </h1>
{{ range $key, $value := $taxonomy }}
<a href="{{ $taxonomyname | relLangURL }}/{{ $key | urlize | lower }}/">
- <span class="layui-badge layui-bg-cyan" style="margin: 5px">{{ $key }}</span>
+ <span class="layui-badge {{with $.Site.Params.badge}}layui-bg-{{.}}{{end}}" style="margin: 5px">{{ $key }}</span>
</a>
{{end}}
{{end}}
diff --git a/layouts/partials/article.html b/layouts/partials/article.html
index 86d96b8..af648e2 100644
--- a/layouts/partials/article.html
+++ b/layouts/partials/article.html
@@ -1,4 +1,4 @@
- <blockquote class="self-elem-quote" style="background-color:#FFFFFF;margin-top: 10px;">
+ <blockquote class="self-elem-quote {{if isset $.Site.Params "quote"}}self-elem-quote-bg-{{index $.Site.Params.quote}}{{end}}" style="background-color:#FFFFFF;margin-top: 10px;">
<a href="{{.RelPermalink}}">
<h2 class="">{{.Title}}</h2>
</a>
diff --git a/layouts/partials/info.html b/layouts/partials/info.html
index 6340dfd..af6f00c 100644
--- a/layouts/partials/info.html
+++ b/layouts/partials/info.html
@@ -7,9 +7,10 @@
<span style="vertical-align: px;">{{ .WordCount }} Words</span>
-->
<i class="layui-icon layui-icon-tabs" style="font-size: 22px; vertical-align: 0px;"></i>
- {{ range .Params.tags }}
- <a href="{{ "tags/" | relLangURL }}{{ . | urlize | lower }}/">
- <span class="layui-badge layui-bg-cyan" style="vertical-align: 2px;">{{ . }}</span>
+ {{ range $tag := .Params.tags }}
+ <a href="{{ "tags/" | relLangURL }}{{ $tag | urlize | lower }}/">
+ <span class="layui-badge {{with $.Site.Params.badge}}layui-bg-{{.}}{{end}}" style="vertical-align: 2px;">{{ $tag }}</span>
</a>
{{ end }}
+
</h3> \ No newline at end of file
diff --git a/static/self/css/default.css b/static/self/css/default.css
index 92cab1d..6837192 100644
--- a/static/self/css/default.css
+++ b/static/self/css/default.css
@@ -273,7 +273,15 @@ footer {
margin-bottom:10px;
padding:15px;
line-height:22px;
- border-left:4px solid #2F4056;
+ border-left:4px solid #009688;
border-radius:0 2px 2px 0;
/* background-color:#f2f2f2 */
-} \ No newline at end of file
+}
+
+.self-elem-quote-bg-red {border-left-color: #FF5722!important;}
+.self-elem-quote-bg-orange {border-left-color: #FFB800!important;}
+.self-elem-quote-bg-green {border-left-color: #009688!important;}
+.self-elem-quote-bg-cyan {border-left-color: #2F4056!important;}
+.self-elem-quote-bg-blue {border-left-color: #1E9FFF!important;}
+.self-elem-quote-bg-black {border-left-color: #393D49!important;}
+.self-elem-quote-bg-gray {border-left-color: #666!important;}