Skip to content
Permalink
Browse files

Add highlightColor option (#133)

  • Loading branch information...
cdyson37 authored and Vimux committed Jun 12, 2019
1 parent c77d32a commit 19b9b83441a655ed3ddfe135564b561df60b7c6a
Showing with 26 additions and 22 deletions.
  1. +2 −1 README.md
  2. +22 −20 {static → assets}/css/style.css
  3. +2 −1 layouts/_default/baseof.html
@@ -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]
@@ -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,15 +474,15 @@ button:not(:-moz-focusring):focus > .menu__btn-title {
}

.menu__item:hover {
background: #e22d30;
background: {{ $highlightColor }};
}

.menu__item:first-child {
border: 0;
}

.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 {
@@ -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 }}

0 comments on commit 19b9b83

Please sign in to comment.
You can’t perform that action at this time.