diff options
author | wd <wd@wdicc.com> | 2017-03-11 10:59:31 +0300 |
---|---|---|
committer | wd <wd@wdicc.com> | 2017-03-11 10:59:31 +0300 |
commit | 041293c8388c4dae4b83029ff1a3140b1274cebc (patch) | |
tree | be49e5a011661254ee8057a9c00514002514314a /layouts | |
parent | a0b32e0b6568b4dc6876773ec2e9cfe6a3f0858f (diff) |
Add highlight support and many others feature
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/terms.html | 2 | ||||
-rw-r--r-- | layouts/partials/head.html | 30 |
2 files changed, 10 insertions, 22 deletions
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html index 22ee845..7452a69 100644 --- a/layouts/_default/terms.html +++ b/layouts/_default/terms.html @@ -2,6 +2,6 @@ {{ $site := .Site }} {{ $data := .Data }} {{ range $key, $value := .Data.Terms.Alphabetical }} -<a href="{{ $site.LanguagePrefix }}/{{ $data.Plural }}/{{ $value.Name | urlize }}">{{ $value.Name }}</a>({{ $value.Count }}) +<a href="{{ $site.LanguagePrefix }}/{{ $data.Plural }}/{{ $value.Name | urlize }}">{{ $value.Name }}</a><sup class="tagcount">{{ $value.Count }}</sup> {{ end }} {{ end }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 36e3edb..3b23ff4 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -2,28 +2,13 @@ <html> <head> <meta charset="utf-8"> - <!-- - var title = page.title; - - if (is_archive()){ - title = 'Archives'; - - if (is_month()){ - title += ': ' + page.year + '/' + page.month; - } else if (is_year()){ - title += ': ' + page.year; - } - } else if (is_category()){ - title = 'Category: ' + page.category; - } else if (is_tag()){ - title = 'Tag: ' + page.tag; - } - --> {{ $.Scratch.Add "title" "" }} - {{ if eq .Type "Archives" }} - {{ $.Scratch.Set "title" "Archives" }} + {{ if eq .Type "archives" }} + {{ $.Scratch.Set "title" "Archives" }} + {{ else if ne .Title .Site.Title }} + {{ $.Scratch.Set "title" .Title }} {{ end }} - <title>{{ if $.Scratch.Get "title" }}{{ $.Scratch.Get "title" }} - {{ end }}{{ .Title }}</title> + <title>{{ if $.Scratch.Get "title" }}{{ $.Scratch.Get "title" }} - {{ end }}{{ .Site.Title }}</title> <meta name="author" content="{{ .Site.Params.author }}"> <meta name="description" content="{{ .Description }}"> <meta name="keywords" content="{{ range .Keywords }}{{ . }},{{ end }}"> @@ -33,7 +18,6 @@ <link href="/favicon.ico" rel="shortcut icon"> <link href="/css/screen.css" media="screen, projection" rel="stylesheet" type="text/css"> <link href="/css/custom.css" media="screen, projection" rel="stylesheet" type="text/css"> - <link href="/css/hljs.css" media="screen, projection" rel="stylesheet" type="text/css"> <link href='//fonts.googleapis.com/css?family=Slackey' rel='stylesheet' type='text/css'> <link href='//fonts.googleapis.com/css?family=Fjalla+One' rel='stylesheet' type='text/css'> @@ -44,4 +28,8 @@ <script type="text/javascript" src="/js/jquery-tapir.js"></script> {{ template "_internal/google_analytics_async.html" . }} + + <link rel="stylesheet" href="/css/hljs.css"> + <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.6.0/highlight.min.js"></script> + <script>hljs.initHighlightingOnLoad();</script> </head> |