Add highlightColor option ()

This commit is contained in:
cdyson37 2019-06-12 22:09:05 +01:00 committed by Vimux
parent c77d32ad45
commit 19b9b83441
3 changed files with 26 additions and 22 deletions
README.md
assets/css
layouts/_default

View file

@ -12,7 +12,7 @@
+ Responsive menu
+ Secondary menus
+ SVG icons
+ Theme options (Sidebar position, Author Box, Post Navigation) available through config.toml file parameters
+ Theme options (Sidebar position, Author Box, Post Navigation, highlight color) available through config.toml file parameters
+ Table of Contents
+ MathJax
@ -73,6 +73,7 @@ googleAnalytics = "" # Enable Google Analytics by entering your tracking id
#mathjax = true # Enable MathJax
#mathjaxPath = "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" # Specify MathJax path
#mathjaxConfig = "TeX-AMS-MML_HTMLorMML" # Specify MathJax config
#highlightColor = "#e22d30" # Override highlight color
customCSS = ["css/custom.css"] # Include custom CSS files
[Params.sidebar]

View file

@ -1,3 +1,5 @@
{{- $highlightColor := .Site.Params.highlightColor | default "#e22d30" -}}
*,
*::before,
*::after {
@ -134,7 +136,7 @@ textarea {
.btn:hover {
color: #fff;
background: #e22d30;
background: {{ $highlightColor }};
}
/* Animation */
@ -193,7 +195,7 @@ a {
}
a:hover {
color: #e22d30;
color: {{ $highlightColor }};
}
hr {
@ -299,7 +301,7 @@ blockquote {
margin: 0 0 20px;
margin: 0 0 1.25rem;
line-height: 1.6;
border-left: 5px solid #e22d30;
border-left: 5px solid {{ $highlightColor }};
}
blockquote p:last-child {
@ -406,14 +408,14 @@ select {
font-size: .875rem;
font-weight: 700;
line-height: 1;
color: #e22d30;
color: {{ $highlightColor }};
border-top: 1px solid #ebebeb;
}
.divider {
height: 5px;
margin: 0;
background: #e22d30;
background: {{ $highlightColor }};
border: 0;
}
@ -450,7 +452,7 @@ select {
}
:focus > .menu__btn-title {
box-shadow: inset 0 0 1px 3px #e22d30;
box-shadow: inset 0 0 1px 3px {{ $highlightColor }};
}
button:not(:-moz-focusring):focus > .menu__btn-title {
@ -463,7 +465,7 @@ button:not(:-moz-focusring):focus > .menu__btn-title {
}
.js .menu__btn--active {
color: #e22d30;
color: {{ $highlightColor }};
}
.menu__list {
@ -472,7 +474,7 @@ button:not(:-moz-focusring):focus > .menu__btn-title {
}
.menu__item:hover {
background: #e22d30;
background: {{ $highlightColor }};
}
.menu__item:first-child {
@ -480,7 +482,7 @@ button:not(:-moz-focusring):focus > .menu__btn-title {
}
.menu__item--active {
background: #e22d30;
background: {{ $highlightColor }};
}
.menu__link {
@ -521,7 +523,7 @@ button:not(:-moz-focusring):focus > .menu__btn-title {
@media screen and (min-width: 767px) {
.menu {
border-bottom: 5px solid #e22d30;
border-bottom: 5px solid {{ $highlightColor }};
}
.menu__btn {
@ -575,7 +577,7 @@ button:not(:-moz-focusring):focus > .menu__btn-title {
}
.meta a:hover {
color: #e22d30;
color: {{ $highlightColor }};
}
.meta__item {
@ -631,12 +633,12 @@ button:not(:-moz-focusring):focus > .menu__btn-title {
.content a,
.warning a {
font-weight: 700;
color: #e22d30;
color: {{ $highlightColor }};
}
.content a:hover,
.warning a:hover {
color: #e22d30;
color: {{ $highlightColor }};
text-decoration: underline;
}
@ -710,7 +712,7 @@ button:not(:-moz-focusring):focus > .menu__btn-title {
}
.tags__item:hover {
background: #e22d30;
background: {{ $highlightColor }};
}
.tags__link,
@ -725,7 +727,7 @@ button:not(:-moz-focusring):focus > .menu__btn-title {
height: 32px;
padding: 8px;
margin-right: 6px;
background: #e22d30;
background: {{ $highlightColor }};
fill: #fff;
}
@ -783,7 +785,7 @@ button:not(:-moz-focusring):focus > .menu__btn-title {
.toc__menu a {
display: block;
padding: 5px 10px;
color: #e22d30;
color: {{ $highlightColor }};
border-bottom: 1px solid #ebebeb;
}
@ -866,7 +868,7 @@ button:not(:-moz-focusring):focus > .menu__btn-title {
.pagination__item:hover,
.pagination__item--current {
color: #fff;
background: #e22d30;
background: {{ $highlightColor }};
}
/* Post Navigation */
@ -988,7 +990,7 @@ input[type=reset] {
input[type=submit]:hover,
input[type=reset]:hover {
background: #e22d30;
background: {{ $highlightColor }};
}
textarea {
@ -1017,7 +1019,7 @@ textarea {
font-size: 16px;
font-size: 1rem;
text-transform: uppercase;
border-bottom: 3px solid #e22d30;
border-bottom: 3px solid {{ $highlightColor }};
}
.widget__item {
@ -1096,7 +1098,7 @@ textarea {
.widget-languages__link:hover .widget-languages__link-btn {
color: #fff;
background: #e22d30;
background: {{ $highlightColor }};
}
.widget-languages__link-btn {

View file

@ -15,7 +15,8 @@
{{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
{{ end -}}
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:400,400i,700">
<link rel="stylesheet" href="{{ "css/style.css" | relURL }}">
{{ $style := resources.Get "css/style.css" | resources.ExecuteAsTemplate "css/style.css" . }}
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
{{ range .Site.Params.customCSS -}}
<link rel="stylesheet" href="{{ . | relURL }}">
{{- end }}