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

github.com/matcornic/hugo-theme-learn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatcornic <mathieu.cornic@gmail.com>2017-08-03 03:18:27 +0300
committermatcornic <mathieu.cornic@gmail.com>2017-08-21 00:43:48 +0300
commit7ca4b0c7ada64213c5418131299456f05b7082f9 (patch)
treec72160bcefe645b9fd7a10c3ea751f0eaa24ee43 /layouts/partials
parenteb60debba2121fb82c79306e56b0b2435f17df49 (diff)
feat: add theme variant system + add blue variant
Diffstat (limited to 'layouts/partials')
-rw-r--r--layouts/partials/header.html23
-rw-r--r--layouts/partials/menu.html4
2 files changed, 17 insertions, 10 deletions
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 4a0ef8a..d9d2468 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -8,16 +8,21 @@
{{ partial "favicon.html" . }}
<title>{{ .Title }} :: {{ .Site.Title }}</title>
- <link href="{{"css/nucleus.css" | relURL}}{{ if not .Site.Params.disableAssetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
- <link href="{{"css/font-awesome.min.css" | relURL}}{{ if not .Site.Params.disableAssetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
- <link href="{{"css/hybrid.css" | relURL}}{{ if not .Site.Params.disableAssetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
- <link href="{{"css/featherlight.min.css" | relURL}}{{ if not .Site.Params.disableAssetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
- <link href="{{"css/perfect-scrollbar.min.css" | relURL}}{{ if not .Site.Params.disableAssetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
- <link href="{{"css/horsey.css" | relURL}}{{ if not .Site.Params.disableAssetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
- <link href="{{"css/theme.css" | relURL}}{{ if not .Site.Params.disableAssetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
- <link href="{{"css/hugo-theme.css" | relURL}}{{ if not .Site.Params.disableAssetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
- <script src="{{"js/jquery-2.x.min.js"| relURL}}{{ if not .Site.Params.disableAssetBusting }}?{{ now.Unix }}{{ end }}"></script>
+ {{ $assetBusting := not .Site.Params.disableAssetBusting }}
+ <link href="{{"css/nucleus.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
+ <link href="{{"css/font-awesome.min.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
+ <link href="{{"css/hybrid.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
+ <link href="{{"css/featherlight.min.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
+ <link href="{{"css/perfect-scrollbar.min.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
+ <link href="{{"css/horsey.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
+ <link href="{{"css/theme.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
+ <link href="{{"css/hugo-theme.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
+ {{with .Site.Params.themeVariant}}
+ <link href="{{(printf "css/theme-%s.css" .) | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
+ {{end}}
+ <script src="{{"js/jquery-2.x.min.js"| relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}"></script>
+
<style type="text/css">
:root #header + #content > #left > #rlblock_left{
display:none !important;
diff --git a/layouts/partials/menu.html b/layouts/partials/menu.html
index 646594b..1978c3f 100644
--- a/layouts/partials/menu.html
+++ b/layouts/partials/menu.html
@@ -25,12 +25,14 @@
{{end}}
</ul>
+ {{ $enableShortcutsTitle := .Site.Params.EnableShortcutsTitle}}
{{with .Site.Menus.shortcuts}}
<section id="shortcuts">
+ <h3>{{ if $enableShortcutsTitle}}{{ T "Shortcuts-Title"}}{{ end }}</h3>
<ul>
{{ range sort . "Weight"}}
<li class="" role="">
- <a class="padding" href="{{.URL}}">{{.Pre}}{{safeHTML .Name}}{{.Post}}</a>
+ {{.Pre}}<a class="padding" href="{{.URL}}">{{safeHTML .Name}}</a>{{.Post}}
</li>
{{end}}
</ul>