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

github.com/edavidaja/docter.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml2
-rw-r--r--README.md6
-rw-r--r--assets/sass/template.scss (renamed from static/assets/css/main.css)14
-rw-r--r--exampleSite/config.toml3
-rw-r--r--exampleSite/resources/_gen/assets/scss/sass/template.scss_a4f67715571c07e60af265b7eb62fb3e.content1
-rw-r--r--exampleSite/resources/_gen/assets/scss/sass/template.scss_a4f67715571c07e60af265b7eb62fb3e.json1
-rw-r--r--layouts/partials/head.html4
-rw-r--r--theme.toml2
8 files changed, 25 insertions, 8 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4dd4bcc..bef33e6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,4 +1,4 @@
-image: registry.gitlab.com/pages/hugo:latest
+image: registry.gitlab.com/pages/hugo/hugo_extended:latest
variables:
GIT_SUBMODULE_STRATEGY: recursive
diff --git a/README.md b/README.md
index 5547368..b66e09f 100644
--- a/README.md
+++ b/README.md
@@ -4,6 +4,8 @@ Docter is a project documentation theme based on [CFPB's DOCter](https://github
## installation
+this theme requires Hugo Extended.
+
from the root of your hugo site, run:
```
@@ -20,3 +22,7 @@ The sidebar will be built automatically from the content in `page`. You can use
### posts
You can create blog posts in `post`. The most recent five by date will be displayed on the home page.
+
+## brand color
+
+You can set the color for the website using the `brand_color` option in `config.toml`.
diff --git a/static/assets/css/main.css b/assets/sass/template.scss
index dd55f90..32f5c42 100644
--- a/static/assets/css/main.css
+++ b/assets/sass/template.scss
@@ -1,3 +1,7 @@
+$brand_color: {{ .Site.Params.brand_color | default "#0039ac" }};
+
+// main
+
/*
Main.css
==================================
@@ -168,8 +172,8 @@ Navigation
.sidebar-nav a {
display: block;
padding: 10px;
- -webkit-transition: unset;
- transition: unset;
+ -webkit-transition: 0.4s;
+ transition: 0.4s;
}
.sidebar-nav a,
.sidebar-nav a:link,
@@ -177,12 +181,12 @@ Navigation
border-bottom: none;
color: #75787b;
}
-.sidebar-nav li:hover,
+.sidebar-nav a:hover,
.sidebar-nav a:focus,
.sidebar-nav li:active,
.sidebar-nav .sidebar-nav-active {
color: #75787b;
- border-left: 4px solid #0039ac;
+ border-left: 4px solid $brand_color;
background-color: transparent;
border-bottom: 1px solid #babbbd;
}
@@ -246,7 +250,7 @@ section:before {
header {
width: 100%;
- border-bottom: 4px solid #0039ac;
+ border-bottom: 4px solid $brand_color;
background-color: #fff;
padding: 2em 0;
}
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 508db86..bd0cc2b 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -28,3 +28,6 @@ theme = "docter"
# main sections
# change the main section to set the directory where the top articles are sourced
mainSections = ["post"]
+
+ # brand color
+ # brand_color = "#7300ac" \ No newline at end of file
diff --git a/exampleSite/resources/_gen/assets/scss/sass/template.scss_a4f67715571c07e60af265b7eb62fb3e.content b/exampleSite/resources/_gen/assets/scss/sass/template.scss_a4f67715571c07e60af265b7eb62fb3e.content
new file mode 100644
index 0000000..2fe9636
--- /dev/null
+++ b/exampleSite/resources/_gen/assets/scss/sass/template.scss_a4f67715571c07e60af265b7eb62fb3e.content
@@ -0,0 +1 @@
+*,*:before,*:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html,body{height:100%}body{font-family:open sans,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.466666667}h1,h3,h4,h5,strong{font-family:open sans,Arial,sans-serif;font-weight:600}.site-title{font-size:1.625em;font-family:open sans,Arial,sans-serif;font-weight:400;color:#919395;margin:0;line-height:1.2941176470588236;display:inline-block}h2{font-weight:400;font-style:normal;font-size:1.375em;margin:1.4em 0 0}h4{font-size:1em;text-transform:uppercase}.page-title{margin-top:.727272727em}.main-content ul{padding-left:1.1em}.main-content li{margin-bottom:1em}li h3,li h4{margin:0}li p{margin-top:0}a{-webkit-transition:.2s;-moz-transition:.2s;transition:.2s}a,a:link,a:visited{color:#0072ce;border-bottom:1px dotted #0072ce;text-decoration:none}a:hover{border-bottom:1px solid #7eb8dd;color:#7eb8dd;text-decoration:none}a:active{border-bottom:1px solid #002d72;color:#002d72;text-decoration:none}a:focus{border-bottom:1px solid #0072ce;color:#0072ce;outline:thin dotted;text-decoration:none}a.title-link{color:#75787b;border-bottom:none}a.title-link:hover,a.title-link:active,a.title-link:focus{color:#7eb8dd;border-bottom:none}a.skip-link{color:#0072ce;border-bottom:none;padding:.25em}a.skip-link:hover,a.skip-link:active,a.skip-link:focus{background-color:#0072ce;color:#fff;border-bottom:none}.sidebar-nav a{display:block;padding:10px;-webkit-transition:.4s;transition:.4s}.sidebar-nav a,.sidebar-nav a:link,.sidebar-nav a:visited{border-bottom:none;color:#75787b}.sidebar-nav a:hover,.sidebar-nav a:focus,.sidebar-nav li:active,.sidebar-nav .sidebar-nav-active{color:#75787b;border-left:4px solid #0039ac;background-color:transparent;border-bottom:1px solid #babbbd}.sidebar-nav li:hover,.sidebar-nav li:active,.sidebar-nav .sidebar-nav-active{padding-left:0}.sidebar-nav a:focus{padding-left:6px}.sidebar-nav li:hover a:focus,.sidebar-nav li:active a:focus{border-left:none;padding-left:10px}.sidebar-nav ul{margin:0;padding:0}.sidebar-nav li{list-style:none;border-bottom:1px solid #babbbd;font-size:1.125em;padding-left:4px}.sidebar-nav li:last-child{border-bottom:none}.logo{display:block}.content{padding-top:2em;padding-bottom:2em}section:before{display:block;content:"";height:60px;margin:-60px 0 0}.wrap{max-width:1200px;margin:0 auto;padding-left:20px;padding-right:20px}header{width:100%;border-bottom:4px solid #0039ac;background-color:#fff;padding:2em 0}.container{display:table;height:100%;width:100%}footer{display:table-row;height:1px;border-top:2px solid #babbbd;background:#f1f2f2;width:100%;font-size:.875em}footer .wrap{padding-top:2em;padding-bottom:2em}.hidden{display:none!important;visibility:hidden}.visuallyhidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.visuallyhidden.focusable:active,.visuallyhidden.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.invisible{visibility:hidden}.intro{color:#75787b}li h4{margin:0}.license{font-family:open sans,Arial,sans-serif;font-weight:400;font-style:normal}pre{max-width:100%;font-size:.875em;overflow-y:scroll;background-color:#f1f2f2;padding:10px}ul.posts{padding:0}.posts li{list-style:none}.post-date{color:#75787b}ul.repo-list{margin:.5em 0 1em;padding:0}.repo-list li{list-style:none}.repo-list p{margin:0;font-size:.875em}.repo-list h4{text-transform:none}.group:before,.group:after{content:" ";display:table}.group:after{clear:both}.group{*zoom:1}@media screen and (min-width:45em) and (min-height:32.5em){.logo{max-width:30%;padding-right:20px;float:right}aside{width:30%;float:left}.main-content{width:67%;float:right;margin-bottom:120px}.repo-list li{list-style:none;display:block;float:left;height:4.0625em;max-height:4.0625em;background-color:#e7e7e6;border-left:1px solid #babbbd;width:30%}.repo-list a:link,.repo-list a:visited{display:block;max-height:4.0625em;background-color:#e7e7e6;border-bottom:none;padding:.625em 1em 1em}.repo-list a:hover{color:#4d5f87;background-color:#cde3f1}.repo-list li:first-child{text-align:center;border-left:none;line-height:60px;padding:.625em 1em;width:10%}}@media screen and (max-width:54.375em) and (min-height:32.5em){.repo-list li{height:6em;max-height:6em}.repo-list a:link,.repo-list a:visited{max-height:6em}}@media screen and (max-width:40.5em){.main-content{margin-top:1.5em}} \ No newline at end of file
diff --git a/exampleSite/resources/_gen/assets/scss/sass/template.scss_a4f67715571c07e60af265b7eb62fb3e.json b/exampleSite/resources/_gen/assets/scss/sass/template.scss_a4f67715571c07e60af265b7eb62fb3e.json
new file mode 100644
index 0000000..14db343
--- /dev/null
+++ b/exampleSite/resources/_gen/assets/scss/sass/template.scss_a4f67715571c07e60af265b7eb62fb3e.json
@@ -0,0 +1 @@
+{"Target":"main.min.b9b4c1c0e8363069717b02cd96aca2e4569ccc720613240ed6fb04b9d0ddec3c.css","MediaType":"text/css","Data":{"Integrity":"sha256-ubTBwOg2MGlxewLNlqyi5FaczHIGEyQO1vsEudDd7Dw="}} \ No newline at end of file
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 1cdf055..9dab550 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -7,7 +7,9 @@
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="{{ .Site.BaseURL }}assets/css/normalize.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600&display=swap" rel="stylesheet">
- <link rel="stylesheet" href="{{ .Site.BaseURL }}assets/css/main.css">
+ {{ $sassTemplate := resources.Get "sass/template.scss" }}
+ {{ $style := $sassTemplate | resources.ExecuteAsTemplate "main.scss" . | toCSS | minify | fingerprint }}
+ <link rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}">
<link rel="stylesheet" href="{{ .Site.BaseURL }}assets/css/syntax.css">
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
diff --git a/theme.toml b/theme.toml
index 27f03c3..652dcd6 100644
--- a/theme.toml
+++ b/theme.toml
@@ -7,7 +7,7 @@ description = "docter for hugo"
homepage = "https://github.com/edavidaja/docter"
tags = ["documentation", "blog"]
features = ["blog"]
-min_version = "0.41"
+min_version = "0.69.2"
[author]
name = "edavidaja"