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

github.com/geschke/hugo-tikva.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalf Geschke <ralf@kuerbis.org>2018-11-13 18:36:47 +0300
committerRalf Geschke <ralf@kuerbis.org>2018-11-13 18:36:47 +0300
commit8ddb335af4c0f117ea8f5d7cac004bd8c7af259f (patch)
tree417199132fe2214eef4569ef508d0a8f948e7e17
parent658999e1fc9d95b38e36d103a1c06f98e2bfaa48 (diff)
Add screenshots, fix Yandex Metrica integration, add sidebar feature, minor fixes, README updated
-rw-r--r--README.md29
-rw-r--r--images/screenshot.pngbin0 -> 961594 bytes
-rw-r--r--images/screenshot01.pngbin0 -> 448733 bytes
-rw-r--r--images/screenshot02.pngbin0 -> 931816 bytes
-rw-r--r--images/screenshot03.pngbin0 -> 1096327 bytes
-rw-r--r--images/tn.pngbin0 -> 399756 bytes
-rw-r--r--layouts/_default/baseof.html22
-rw-r--r--layouts/_default/list.html23
-rw-r--r--layouts/_default/taxonomy.html12
-rw-r--r--layouts/partials/analytics/yandexmetrica.html4
-rw-r--r--layouts/partials/footer_container.html2
-rw-r--r--layouts/partials/head.html26
-rw-r--r--layouts/partials/header_default.html47
-rw-r--r--layouts/partials/navbar_items.html54
-rw-r--r--layouts/partials/sidebar_container.html8
-rw-r--r--layouts/partials/sidebar_item.html3
-rw-r--r--theme.toml9
17 files changed, 118 insertions, 121 deletions
diff --git a/README.md b/README.md
index e02a85a..6df196f 100644
--- a/README.md
+++ b/README.md
@@ -1,23 +1,42 @@
# Hugo Tikva Theme
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 the Grav CMS.
+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.
Tikva integrates multiple Bootstrap styles from the Bootswatch project and adds some customized styles.
It's also possible to edit some color options by config option.
## Demo
-### todo...
-
You can find a demo [here](https://themes.gohugo.io/theme/hugo-tikva/).
## Screenshots
-### todo...
+Some examples of different designs:
+
+ * "header" style, header image and "darkly" theme:
![preview](https://raw.githubusercontent.com/geschke/hugo-tikva/master/images/screenshot.png)
-![preview](https://raw.githubusercontent.com/geschke/hugo-tikva/master/images/screenshot2.png)
+
+* "fixed-top" style, with "flatly" theme:
+
+![preview](https://raw.githubusercontent.com/geschke/hugo-tikva/master/images/screenshot01.png)
+
+* "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
+
+![preview](https://raw.githubusercontent.com/geschke/hugo-tikva/master/images/screenshot03.png)
+
+
+## Installation
+
+```bash
+$ git clone https://github.com/geschke/hugo-tikva themes/hugo-tikva
+```
+
## Configuration
diff --git a/images/screenshot.png b/images/screenshot.png
new file mode 100644
index 0000000..a7a5647
--- /dev/null
+++ b/images/screenshot.png
Binary files differ
diff --git a/images/screenshot01.png b/images/screenshot01.png
new file mode 100644
index 0000000..ae63ea9
--- /dev/null
+++ b/images/screenshot01.png
Binary files differ
diff --git a/images/screenshot02.png b/images/screenshot02.png
new file mode 100644
index 0000000..5c95e95
--- /dev/null
+++ b/images/screenshot02.png
Binary files differ
diff --git a/images/screenshot03.png b/images/screenshot03.png
new file mode 100644
index 0000000..b11fdeb
--- /dev/null
+++ b/images/screenshot03.png
Binary files differ
diff --git a/images/tn.png b/images/tn.png
new file mode 100644
index 0000000..8baa7fb
--- /dev/null
+++ b/images/tn.png
Binary files differ
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 210f807..ab75eb4 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -3,10 +3,7 @@
{{- partial "head.html" . -}}
<body>
-{{- $navbarStyle := "fixed-top" -}}
-{{- if .Site.Params.Navbar.Style -}}
- {{- $navbarStyle = .Site.Params.Navbar.Style -}}
-{{- end -}}
+{{- $navbarStyle := default .Site.Params.Navbar.Style -}}
{{ if eq $navbarStyle "fixed-top" }}
{{- partial "header_fixed_top.html" . -}}
{{ else }}
@@ -16,28 +13,35 @@
<div id="main">
<div class="container">
<div class="row">
+
+ {{- if and (default false .Site.Params.Sidebar.Enabled) (eq "left" (default "right" .Site.Params.Sidebar.Style)) }}
+ {{ partial "sidebar_container.html" . }}
+ {{- end -}}
<div class="col-md" id="content">
{{- block "main" . }}{{- end }}
</div>
-
+ {{- if and (default false .Site.Params.Sidebar.Enabled) (eq "right" (default "right" .Site.Params.Sidebar.Style)) }}
+ {{ partial "sidebar_container.html" . }}
+ {{- end -}}
</div>
</div>
</div>
{{ block "footer" . }}
{{ partial "footer_container.html" . }}
+ {{ end }}
+ {{ block "subfooter" . }}
{{ partial "subfooter_container.html" . }}
{{ end }}
<div id="media-width-detection-element"></div>
{{- if .Site.Params.Analytics.Matomo.Enabled -}}
-{{ partial "analytics/matomo.html" . }}
-{{- end -}}
+ {{ partial "analytics/matomo.html" . }}
+ {{- end -}}
{{ template "_internal/google_analytics_async.html" . }}
{{- if .Site.Params.Analytics.Yandexmetrica.Enabled -}}
-{{ partial "analytics/yandexmetrica.html" . }}
-
+ {{ partial "analytics/yandexmetrica.html" . }}
{{- end -}}
{{- partial "bottom.html" . -}}
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index 0580b5d..d70b1fb 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -1,9 +1,20 @@
-{{ define "title" }}
- <!-- This will override the default value set in baseof.html; i.e., "{{.Site.Title}}" in the original example-->
- {{ .Title }} &ndash; {{ .Site.Title }}
-{{ end }}
{{ define "main" }}
- <h1>{{ .Title }}</h1>
- {{ .Content }}
+<main>
+ <article>
+ <header>
+ <h1>{{.Title}}</h1>
+ </header>
+ <!-- "{{.Content}}" pulls from the markdown content of the corresponding _index.md -->
+ {{.Content}}
+ </article>
+ <ul>
+ <!-- Ranges through content/post/*.md -->
+ {{ range .Pages }}
+ <li>
+ <a href="{{.Permalink}}">{{.Date.Format "2006-01-02"}} | {{.Title}}</a>
+ </li>
+ {{ end }}
+ </ul>
+</main>
{{ end }} \ No newline at end of file
diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html
new file mode 100644
index 0000000..d8f998f
--- /dev/null
+++ b/layouts/_default/taxonomy.html
@@ -0,0 +1,12 @@
+
+{{ define "main" }}
+<main>
+ <div>
+ <h1>{{ .Title }}</h1>
+ <!-- ranges through each of the content files associated with a particular taxonomy term and renders the summary.html content view -->
+ {{ range .Pages }}
+ {{ .Render "summary"}}
+ {{ end }}
+ </div>
+</main>
+{{ end }} \ No newline at end of file
diff --git a/layouts/partials/analytics/yandexmetrica.html b/layouts/partials/analytics/yandexmetrica.html
index 3e174b3..f7ea4d3 100644
--- a/layouts/partials/analytics/yandexmetrica.html
+++ b/layouts/partials/analytics/yandexmetrica.html
@@ -3,8 +3,8 @@
(function (d, w, c) {
(w[c] = w[c] || []).push(function() {
try {
- w.yaCounter{{ .Site.Params.Analytics.Yandexmetrica.TagNumber }} = new Ya.Metrika2({
- id:{{ int .Site.Params.Analytics.Yandexmetrica.TagNumber }},
+ w.yaCounter{{ safeJS .Site.Params.Analytics.Yandexmetrica.TagNumber }} = new Ya.Metrika2({
+ id: {{- safeJS .Site.Params.Analytics.Yandexmetrica.TagNumber -}},
clickmap:true,
trackLinks:true,
accurateTrackBounce:true,
diff --git a/layouts/partials/footer_container.html b/layouts/partials/footer_container.html
index 7b01548..a9a828c 100644
--- a/layouts/partials/footer_container.html
+++ b/layouts/partials/footer_container.html
@@ -9,7 +9,7 @@
{{- if .Site.Params.Theme.Footer.NumberColumns -}}
{{- $footerColumns = .Site.Params.Theme.Footer.NumberColumns -}}
{{- end -}}
- {{ range first .Site.Params.Theme.Footer.NumberColumns (where .Site.Pages "Section" "footer") }}
+ {{ range first .Site.Params.Theme.Footer.NumberColumns (where .Site.RegularPages "Type" "footer") | sort }}
{{ partial "footer_column.html" . }}
{{ end }}
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 83a8453..4ce0b04 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -48,12 +48,10 @@
{{- $overlayBackgroundColor := printf " rgba(%d,%d,%d,%s)" $rr $gg $bb $overlayBackgroundTranspHex -}}
<style>
-{{- $navbarStyle := "fixed-top" -}}
-{{- if .Site.Params.Navbar.Style -}}
- {{- $navbarStyle = .Site.Params.Navbar.Style -}}
-{{- end -}}
+{{- $navbarStyle := default "fixed-top" .Site.Params.Navbar.Style -}}
body {
+
{{- if eq $navbarStyle "fixed-top" -}}
/* Move down content because we have a fixed navbar that is 60px tall */
@@ -102,15 +100,6 @@ body {
{{- end -}}
</style>
-{{/*
-[params.fonts]
-
- headerTitle = '' # set font, use string, e.g. "Lucida, Verdana, sans-serif". You can use any font value. Please activate Google Font option if you want to include Google Fonts, see their names on https://fonts.google.com/
- headerTitleGoogleFont = true # If the font in the above variable is a Google font, set this option to true.
- headerTitleVariant = '' # font variant, if available, e.g. "regular", "bold" etc. Not every font is available in multiple variants.
- headerTitleSize = '' # set font size, empty for default settings. Valid values are '20px', '1.2em' and so on
-
-*/}}
{{/* Header Title Font Settings */}}
@@ -194,10 +183,10 @@ body {
{{- end -}}
{{- if .Site.Params.Fonts.NavbarSize -}}
nav#navbarMain {
- font-size: {{ .Site.Params.Fonts.NavbarSize }};
+ font-size: {{ safeCSS .Site.Params.Fonts.NavbarSize }};
}
nav#navbarMain ul.dropdown-menu {
- font-size: {{ .Site.Params.Fonts.NavbarSize }};
+ font-size: {{ safeCSS .Site.Params.Fonts.NavbarSize }};
}
{{- end -}}
</style>
@@ -297,9 +286,10 @@ body {
</style>
{{ end }}
{{ end }}
- <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
- <!--[if lt IE 9]>
+{{ "<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->" | safeHTML }}
+{{ "<!--[if lt IE 9]>" | safeHTML }}
<script src="//oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="//oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
- <![endif]-->
+{{ "<![endif]-->" | safeHTML }}
+
</head> \ No newline at end of file
diff --git a/layouts/partials/header_default.html b/layouts/partials/header_default.html
index 1054e17..b29758e 100644
--- a/layouts/partials/header_default.html
+++ b/layouts/partials/header_default.html
@@ -1,51 +1,4 @@
-{{/*
-$content['headerOptions']['header_color_bg'] = get_theme_mod('azbalac_setting_header_color_bg','#000000'); // default black
-$content['headerOptions']['header_background_transp'] = get_option('azbalac_setting_header_background_transp',70); // default 70%
-$content['headerOptions']['header_background_transp_hex'] = dechex(round(255 / 100 * $content['headerOptions']['header_background_transp']));
-$content['headerOptions']['header_alignment'] = get_option('azbalac_setting_header_alignment',1);
-switch (intval($content['headerOptions']['header_alignment'])) {
- case 2: // top, center
- $headerContainerClass = ' fixed-top ';
- $headerBoxClassTitle = ' d-flex justify-content-center ';
- $headerBoxClassSubtitle = ' d-flex justify-content-center ';
-
- break;
- case 3: // top, right
- $headerContainerClass = ' fixed-top ';
- $headerBoxClassTitle = ' d-flex justify-content-end ';
- $headerBoxClassSubtitle = ' d-flex justify-content-end ';
- break;
- case 4: // bottom, left
- $headerContainerClass = ' fixed-bottom ';
- $headerBoxClassTitle = ' d-flex justify-content-start ';
- $headerBoxClassSubtitle = ' d-flex justify-content-start ';
- break;
- case 5: // bottom, center
- $headerContainerClass = ' fixed-bottom ';
- $headerBoxClassTitle = ' d-flex justify-content-center ';
- $headerBoxClassSubtitle = ' d-flex justify-content-center';
- break;
- case 6: // bottom, right
- $headerContainerClass = ' fixed-bottom ';
- $headerBoxClassTitle = ' d-flex justify-content-end ';
- $headerBoxClassSubtitle = ' d-flex justify-content-end ';
- break;
- case 1: // top, left (default)
- default:
- $headerContainerClass = ' fixed-top ';
- $headerBoxClassTitle = ' d-flex justify-content-start ';
- $headerBoxClassSubtitle = ' d-flex justify-content-start ';
- break;
-}
-
-$content['headerOptions']['header_container'] = ['container_class' => $headerContainerClass,
-'box_class_title' => $headerBoxClassTitle,
-'box_class_subtitle' => $headerBoxClassSubtitle];
-
-
-*/}}
-
{{/* default lt, left/top */}}
{{- $headerContainerClass := " fixed-top " -}}
diff --git a/layouts/partials/navbar_items.html b/layouts/partials/navbar_items.html
index 7e2639a..6c4cd79 100644
--- a/layouts/partials/navbar_items.html
+++ b/layouts/partials/navbar_items.html
@@ -1,29 +1,29 @@
- {{ $currentPage := . }}
- {{ range .Site.Menus.main }}
- {{ if .HasChildren }}
- <li class="nav-item dropdown {{ if $currentPage.HasMenuCurrent "main" . }}active{{ end }}">
- <a class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true"
- aria-expanded="false">
- {{ .Pre }}
- {{ .Name }}
- </a>
- <div class="sub-menu dropdown-menu" aria-labelledby="navbarDropdown">
- {{ range .Children }}
-
- <a class="dropdown-item" href="{{ .URL }}">{{ .Name }}</a>
- {{ end }}
- </div>
- </li>
- <span class="mx-2"></span>
- {{ else }}
- <li class="nav-item {{ if eq $currentPage.URL .URL }}active{{ end }}">
- <a class="nav-link" href="{{ .URL }}">
- {{ .Pre }}
- {{ .Name }}
- </a>
- </li>
- <span class="mx-2"></span>
- {{ end }}
- {{ end }}
+{{ $currentPage := . }}
+{{ range .Site.Menus.main }}
+ {{ if .HasChildren }}
+ <li class="nav-item dropdown {{ if $currentPage.HasMenuCurrent "main" . }}active{{ end }}">
+ <a class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true"
+ aria-expanded="false">
+ {{ .Pre }}
+ {{ .Name }}
+ </a>
+ <div class="sub-menu dropdown-menu" aria-labelledby="navbarDropdown">
+ {{ range .Children }}
+
+ <a class="dropdown-item" href="{{ .URL }}">{{ .Name }}</a>
+ {{ end }}
+ </div>
+ </li>
+ <span class="mx-2"></span>
+ {{ else }}
+ <li class="nav-item {{ if eq $currentPage.URL .URL }}active{{ end }}">
+ <a class="nav-link" href="{{ .URL }}">
+ {{ .Pre }}
+ {{ .Name }}
+ </a>
+ </li>
+ <span class="mx-2"></span>
+ {{ end }}
+{{ end }}
diff --git a/layouts/partials/sidebar_container.html b/layouts/partials/sidebar_container.html
new file mode 100644
index 0000000..269d37c
--- /dev/null
+++ b/layouts/partials/sidebar_container.html
@@ -0,0 +1,8 @@
+<aside class="col-md-3 tikva-sidebar">
+
+ {{ range sort (where .Site.RegularPages "Type" "sidebar") }}
+ {{ partial "sidebar_item.html" . }}
+ {{ end }}
+
+
+</aside><!-- /.tikva-sidebar -->
diff --git a/layouts/partials/sidebar_item.html b/layouts/partials/sidebar_item.html
new file mode 100644
index 0000000..570d790
--- /dev/null
+++ b/layouts/partials/sidebar_item.html
@@ -0,0 +1,3 @@
+<div class="col">
+ {{ .Content }}
+</div> \ No newline at end of file
diff --git a/theme.toml b/theme.toml
index aa08033..dc1c7e9 100644
--- a/theme.toml
+++ b/theme.toml
@@ -1,13 +1,10 @@
-# theme.toml template for a Hugo theme
-# See https://github.com/gohugoio/hugoThemes#themetoml for an example
-
-name = "Hugo Tikva"
+name = "Tikva"
license = "MIT"
licenselink = "https://github.com/geschke/hugo-tikva/LICENSE"
description = "Tikva is a minimalistic Hugo theme, based on Bootstrap 4 framework"
homepage = "https://www.kuerbis.org/hugo-tikva/"
-tags = [tikva, theme, core, modern, responsive, bootstrap]
-features = []
+tags = ["theme", "core", "modern", "responsive", "bootstrap", "minimal, "font awesome", "white", "dark", "light" ]
+features = ["responsive"]
min_version = "0.41"
[author]