diff options
author | Ralf Geschke <ralf@kuerbis.org> | 2018-11-14 01:45:25 +0300 |
---|---|---|
committer | Ralf Geschke <ralf@kuerbis.org> | 2018-11-14 01:45:25 +0300 |
commit | b9f171b6fb694af225a87691965400a2021e07ae (patch) | |
tree | 98e5977934519f843fc27e105a5202fe816fd14c | |
parent | 8ddb335af4c0f117ea8f5d7cac004bd8c7af259f (diff) |
Minor fixes; debug output removed from JavaScript, header image handling
-rw-r--r-- | README.md | 19 | ||||
-rw-r--r-- | layouts/_default/baseof.html | 4 | ||||
-rw-r--r-- | layouts/partials/header_default.html | 6 | ||||
-rw-r--r-- | static/js/functions.js | 10 |
4 files changed, 22 insertions, 17 deletions
@@ -1,4 +1,4 @@ -# Hugo Tikva Theme +# Tikva Theme for Hugo Tikva is a minimalistic Hugo theme, based on [Bootstrap v4](https://getbootstrap.com/) CSS framework. It is a port of the Tikva theme which I developed a while ago for Grav CMS and WordPress, but there are also some features added from the (currently unpublished) Azbalac Theme for WordPress. @@ -18,19 +18,30 @@ Some examples of different designs: ![preview](https://raw.githubusercontent.com/geschke/hugo-tikva/master/images/screenshot.png) -* "fixed-top" style, with "flatly" theme: +* "fixed-top" style, with "flatly" theme and customized footer colors: ![preview](https://raw.githubusercontent.com/geschke/hugo-tikva/master/images/screenshot01.png) -* "header" style, header image, title above header image, "signa" theme +* "header" style, header image, title above header image, "signa" theme: ![preview](https://raw.githubusercontent.com/geschke/hugo-tikva/master/images/screenshot02.png) -* "header" style, header image, title and subtitle as overlay, "materia" theme +* "header" style, header image, title and subtitle as overlay, "materia" theme: ![preview](https://raw.githubusercontent.com/geschke/hugo-tikva/master/images/screenshot03.png) +## Features + + * Responsive design, using the Bootstrap framework + * More than 30 thenes included, half of them newly created, the other half taken from the Bootswatch project + * Customizable font settings (size, font type and variant), support of Google Fonts included + * Support of Google Analytics (with the internal async template), Matomo and Yandex Metrica + * Flexible footer handling with multiple columns + * Support of subfooter, i.e. a place below the footer to add some content like "Powered by..." as seen in the screenshots + + + ## Installation ```bash diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index ab75eb4..c0cccf5 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,6 +1,6 @@ <!DOCTYPE html> -<html> -{{- partial "head.html" . -}} +<html lang="{{- default "" .Site.LanguageCode -}}"> +{{ partial "head.html" . }} <body> {{- $navbarStyle := default .Site.Params.Navbar.Style -}} diff --git a/layouts/partials/header_default.html b/layouts/partials/header_default.html index b29758e..2b6ffbb 100644 --- a/layouts/partials/header_default.html +++ b/layouts/partials/header_default.html @@ -35,7 +35,7 @@ <header class="masthead"> <div> <div id="site-header-container-above" class="row align-items-center"> - {{ if not .Site.Params.Theme.Header.TitleOnImage }} + {{ if or (not .Site.Params.Theme.Header.TitleOnImage) (not .Site.Params.Theme.Header.Image) }} <div class="col"> {{ if .Site.Params.Theme.Header.DisplayHeaderText }} <h1 id="site-header-text"><a class="header-url" style="{{ if .Site.Params.Theme.Header.FontColorTitle }}color: {{ .Site.Params.Theme.Header.FontColorTitle }};{{ end }}" href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a></h1> @@ -53,8 +53,8 @@ <div id="site-header-above"> - <a href="{{ .Site.BaseURL }}" rel="home"><img id="site-header-image" src="{{ .Site.BaseURL }}{{ .Site.Params.Theme.Header.Image }}" width="1" height="1" data-width="{{ .Site.Params.Theme.Header.Width }}" data-height="{{ .Site.Params.Theme.Header.Height }}" alt="{{ .Site.Params.Theme.Header.AltText }}"> - </a> + {{- if .Site.Params.Theme.Header.Image -}}<a href="{{ .Site.BaseURL }}" rel="home"><img id="site-header-image" src="{{ .Site.BaseURL }}{{ .Site.Params.Theme.Header.Image }}" width="1" height="1" data-width="{{ .Site.Params.Theme.Header.Width }}" data-height="{{ .Site.Params.Theme.Header.Height }}" alt="{{ .Site.Params.Theme.Header.AltText }}"> + </a>{{- end -}} {{ if and .Site.Params.Theme.Header.TitleOnImage .Site.Params.Theme.Header.DisplayHeaderText }} diff --git a/static/js/functions.js b/static/js/functions.js index 906c3e6..6d5c800 100644 --- a/static/js/functions.js +++ b/static/js/functions.js @@ -156,8 +156,6 @@ } else { // >= 1200 mediaDetectSize = 'xl'; } - console.log(mediaSize); - console.log(mediaDetectSize); if (mediaDetectSize != mediaSize || mediaDetectSize == 'xs') { mediaSize = mediaDetectSize; $.headerImageResize(mediaSize); @@ -194,7 +192,7 @@ } ); $(window).on('load', function() { - console.log(azbalacHeaderImage); + if (!$('#site-header-image').length) { return; } @@ -241,9 +239,7 @@ $( '.dropdown-menu a.dropdown-toggle' ).on( 'click', function ( e ) { $(window).on('load', function() { -var foobar = $('#main').width(); -console.log(foobar); -var elementSize = foobar; +var elementSize = $('#main').width(); if (elementSize < 540) { mediaDetectSize = 'xs'; } else if (elementSize >= 540 && elementSize < 720) { @@ -255,8 +251,6 @@ if (elementSize < 540) { } else { // >= 1200 mediaDetectSize = 'xl'; } -console.log(mediaSize); -console.log(mediaDetectSize); }); |