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

github.com/devcows/hugo-universal-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillermo Guerrero Ibarra <guillermo.guerrero@deliveroo.co.uk>2021-08-05 00:23:57 +0300
committerGuillermo Guerrero Ibarra <guillermo.guerrero@deliveroo.co.uk>2021-08-05 00:23:57 +0300
commit4b7d1358342159fbdb003c5ef445c22e6126d20e (patch)
treeb2b457bd622bbc99bbe044dd6420133e2e826a6b /layouts
parent759e6598fe563dc0511e570fd62c48d61770a7f2 (diff)
parentcb2d782ffa3f198469c54070a7a3c5eb0e5b0849 (diff)
Merge branch 'master' into menu-sections
Conflicts: README.md exampleSite/config.toml layouts/partials/nav.html
Diffstat (limited to 'layouts')
-rw-r--r--layouts/404.html18
-rw-r--r--layouts/_default/list.html26
-rw-r--r--layouts/_default/single.html16
-rw-r--r--layouts/index.html8
-rw-r--r--layouts/page/single.html6
-rw-r--r--layouts/partials/carousel.html9
-rw-r--r--layouts/partials/clients.html10
-rw-r--r--layouts/partials/contact.html8
-rw-r--r--layouts/partials/features.html30
-rw-r--r--layouts/partials/footer.html14
-rw-r--r--layouts/partials/head.html102
-rw-r--r--layouts/partials/map.html28
-rw-r--r--layouts/partials/nav.html31
-rw-r--r--layouts/partials/recent_posts.html17
-rw-r--r--layouts/partials/scripts.html11
-rw-r--r--layouts/partials/see_more.html15
-rw-r--r--layouts/partials/testimonials.html8
-rw-r--r--layouts/partials/top.html26
-rw-r--r--layouts/partials/widgets/categories.html7
-rw-r--r--layouts/partials/widgets/search.html6
-rw-r--r--layouts/partials/widgets/tags.html8
21 files changed, 228 insertions, 176 deletions
diff --git a/layouts/404.html b/layouts/404.html
index 8ca20b2..dffac47 100644
--- a/layouts/404.html
+++ b/layouts/404.html
@@ -7,11 +7,7 @@
<div id="all">
- <header>
-
- {{ partial "nav.html" . }}
-
- </header>
+ {{ partial "nav.html" . }}
<div id="content">
<div class="container">
@@ -20,16 +16,10 @@
<div class="box">
- <p class="text-center">
- <a href="index.html">
- <img src="img/logo.png" alt="Obaju template">
- </a>
- </p>
-
- <h3>We are sorry - this page is not here anymore</h3>
- <h4 class="text-muted">Error 404 - Page not found</h4>
+ <h3>{{ i18n "404Message" | markdownify }}</h3>
+ <h4 class="text-muted">{{ i18n "404Error" | markdownify }}</h4>
- <p class="buttons"><a href="index.html" class="btn btn-template-main"><i class="fa fa-home"></i> Go to Homepage</a>
+ <p class="buttons"><a href="{{ "/" | relURL }}" class="btn btn-template-main"><i class="fas fa-home"></i> {{ i18n "404NavHome" | markdownify }}</a>
</p>
</div>
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index 55dfb8e..ba95831 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -7,11 +7,7 @@
<div id="all">
- <header>
-
- {{ partial "nav.html" . }}
-
- </header>
+ {{ partial "nav.html" . }}
{{ partial "breadcrumbs.html" . }}
@@ -30,9 +26,9 @@
<div class="image">
<a href="{{ .Permalink }}">
{{ if .Params.banner }}
- <img src="{{ .Site.BaseURL}}{{ .Params.banner }}" class="img-responsive" alt="">
+ <img src="{{ .Params.banner | relURL }}" class="img-responsive" alt="">
{{ else }}
- <img src="{{ .Site.BaseURL}}img/placeholder.png" class="img-responsive" alt="">
+ <img src="{{ "img/placeholder.png" | relURL }}" class="img-responsive" alt="">
{{ end }}
</a>
</div>
@@ -41,19 +37,23 @@
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
<div class="clearfix">
<p class="author-category">
- {{ if isset .Params "author" }}
- {{ i18n "authorBy" }} <a href="#">{{ .Params.author }}</a>
+ {{ if isset .Params "authors" }}
+ {{ i18n "authorBy" }} {{ range $index, $author := .Params.authors }}{{ if $index }}, {{ end }}<a href="{{ (printf "%s/%s" ("authors" | relURL) ($author | urlize)) }}">{{ $author }}</a>{{ end }}
{{ end }}
{{ if isset .Params "categories" }}
{{ if gt (len .Params.categories) 0 }}
- in <a href="{{ $.Site.BaseURL }}categories/{{ index .Params.categories 0 | urlize | lower }}">{{ index .Params.categories 0 }}</a>
+ in
+ {{ range $index, $category := .Params.categories }}{{ if $index }}, {{ end }}
+ <a href="{{ "categories/" | relURL }}{{ . | urlize | lower }}">{{ $category }}</a>{{ end }}
{{ end }}
{{ end }}
</p>
+ {{ if isset .Params "date" }}
<p class="date-comments">
- <a href="{{ .Permalink }}"><i class="fa fa-calendar-o"></i> {{ .Date.Format .Site.Params.date_format }}</a>
+ <a href="{{ .Permalink }}"><i class="far fa-calendar"></i> {{ .Date.Format .Site.Params.date_format }}</a>
</p>
+ {{ end }}
</div>
<p class="intro">{{ .Summary }}</p>
<p class="read-more"><a href="{{ .Permalink }}" class="btn btn-template-main">{{ i18n "continueReading" }}</a>
@@ -65,13 +65,13 @@
<ul class="pager">
{{ if .Paginator.HasPrev }}
- <li class="previous"><a href="{{ .Site.BaseURL }}{{ .Paginator.Prev.URL }}">&larr; {{ i18n "newer" }}</a></li>
+ <li class="previous"><a href="{{ .Paginator.Prev.URL | relURL }}">&larr; {{ i18n "newer" }}</a></li>
{{ else }}
<li class="previous disabled"><a href="#">&larr; {{ i18n "newer" }}</a></li>
{{ end }}
{{ if .Paginator.HasNext }}
- <li class="next"><a href="{{ .Site.BaseURL }}{{ .Paginator.Next.URL }}">{{ i18n "older" }} &rarr;</a></li>
+ <li class="next"><a href="{{ .Paginator.Next.URL | relURL }}">{{ i18n "older" }} &rarr;</a></li>
{{ else }}
<li class="next disabled"><a href="#">{{ i18n "older" }} &rarr;</a></li>
{{ end }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 49ea68b..a04e456 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -7,11 +7,7 @@
<div id="all">
- <header>
-
- {{ partial "nav.html" . }}
-
- </header>
+ {{ partial "nav.html" . }}
{{ partial "breadcrumbs.html" . }}
@@ -24,7 +20,15 @@
<div class="col-md-9" id="blog-post">
- <p class="text-muted text-uppercase mb-small text-right">{{ if .Params.author }}{{ i18n "authorBy" }} <a href="#">{{ .Params.author }}</a> | {{ end }}{{ .Date.Format .Site.Params.date_format }}</p>
+ {{ if or .Params.author .Params.date }}
+ <p class="text-muted text-uppercase mb-small text-right">
+ {{ if isset .Params "authors" }}
+ {{ i18n "authorBy" }} {{ range $index, $author := .Params.authors }}{{ if $index }}, {{ end }}<a href="{{ (printf "%s/%s" ("authors" | relURL) ($author | urlize)) }}">{{ $author }}</a>{{ end }}
+ {{ end }}
+ {{ if and .Params.author .Params.date }} | {{ end }}
+ {{ if .Params.date }}{{ .Date.Format .Site.Params.date_format }}{{ end }}
+ </p>
+ {{ end }}
<div id="post-content">
{{ .Content }}
diff --git a/layouts/index.html b/layouts/index.html
index fac2cb5..43151ff 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -7,13 +7,9 @@
<div id="all">
- <header>
+ {{ partial "top.html" . }}
- {{ partial "top.html" . }}
-
- {{ partial "nav.html" . }}
-
- </header>
+ {{ partial "nav.html" . }}
{{ partial "carousel.html" . }}
diff --git a/layouts/page/single.html b/layouts/page/single.html
index 4121d0b..28b4426 100644
--- a/layouts/page/single.html
+++ b/layouts/page/single.html
@@ -7,11 +7,7 @@
<div id="all">
- <header>
-
- {{ partial "nav.html" . }}
-
- </header>
+ {{ partial "nav.html" . }}
{{ partial "breadcrumbs.html" . }}
diff --git a/layouts/partials/carousel.html b/layouts/partials/carousel.html
index e614773..be6c6f0 100644
--- a/layouts/partials/carousel.html
+++ b/layouts/partials/carousel.html
@@ -1,11 +1,13 @@
-{{ if isset .Site.Params "carousel" }}
-{{ if .Site.Params.carousel.enable }}
+{{ if default true .Site.Params.CarouselHomepage.enable }}
{{ if gt (len .Site.Data.carousel) 0 }}
<section>
<div class="home-carousel">
<div class="dark-mask"></div>
<div class="container">
- <div class="homepage owl-carousel">
+ <div class="homepage owl-carousel"
+ data-autoplay="{{ default true .Site.Params.CarouselHomepage.auto_play }}"
+ data-slide-speed="{{ default 2000 .Site.Params.CarouselHomepage.slide_speed }}"
+ data-pagination-speed="{{ default 1000 .Site.Params.CarouselHomepage.pagination_speed }}">
{{ range sort .Site.Data.carousel "weight" }}
<div class="item">
<div class="row">
@@ -26,4 +28,3 @@
</section>
{{ end }}
{{ end }}
-{{ end }}
diff --git a/layouts/partials/clients.html b/layouts/partials/clients.html
index a012367..00583f3 100644
--- a/layouts/partials/clients.html
+++ b/layouts/partials/clients.html
@@ -6,14 +6,18 @@
<div class="row">
<div class="col-md-12">
<div class="heading text-center">
- <h2>{{ .Site.Params.clients.title }}</h2>
+ <h2>{{ .Site.Params.clients.title | markdownify }}</h2>
</div>
<p class="lead">
- {{ .Site.Params.clients.subtitle }}
+ {{ .Site.Params.clients.subtitle | markdownify }}
</p>
- <ul class="owl-carousel customers">
+ <ul class="owl-carousel customers"
+ data-items="{{ default 6 .Site.Params.CarouselCustomers.items }}"
+ data-autoplay="{{ default false .Site.Params.CarouselCustomers.auto_play }}"
+ data-slide-speed="{{ default 2000 .Site.Params.CarouselCustomers.slide_speed }}"
+ data-pagination-speed="{{ default 1000 .Site.Params.CarouselCustomers.pagination_speed }}">
{{ range .Site.Data.clients }}
<li class="item" title="{{ .name }}">
{{ if .url }}
diff --git a/layouts/partials/contact.html b/layouts/partials/contact.html
index af97f15..82304f6 100644
--- a/layouts/partials/contact.html
+++ b/layouts/partials/contact.html
@@ -7,7 +7,7 @@
{{ .Content }}
- {{ if isset .Site.Params "email" }}
+ {{ if isset .Site.Params "formspree_action" }}
<div class="heading">
<h3>{{ i18n "contactForm" }}</h3>
@@ -15,7 +15,7 @@
<div id="contact-message"></div>
- <form class="contact-form" method="post" action="https://formspree.io/{{ .Site.Params.email }}">
+ <form {{ with .Site.Params.contact_form_ajax }}class="contact-form-ajax"{{ else }}{{ end }} method="post" action="{{ .Site.Params.formspree_action }}">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
@@ -26,7 +26,7 @@
<div class="col-sm-6">
<div class="form-group">
<label for="email">{{ i18n "contactMail" }}</label>
- <input type="text" class="form-control" name="email" id="email" required>
+ <input type="email" autocomplete="email" class="form-control" name="email" id="email" required>
</div>
</div>
<div class="col-sm-12">
@@ -37,7 +37,7 @@
</div>
<div class="col-sm-12 text-center">
- <button type="submit" class="btn btn-template-main"><i class="fa fa-envelope-o"></i>{{ i18n "contactSend" }}</button>
+ <button type="submit" class="btn btn-template-main"><i class="far fa-envelope"></i>{{ i18n "contactSend" }}</button>
</div>
</div>
diff --git a/layouts/partials/features.html b/layouts/partials/features.html
index 9260d3f..f41f2a1 100644
--- a/layouts/partials/features.html
+++ b/layouts/partials/features.html
@@ -4,23 +4,29 @@
<section class="bar background-white">
<div class="container">
{{ range $index, $element := sort .Site.Data.features "weight" }}
- {{ if eq (mod $index 3) 0 }}
- <div class="col-md-12">
+ {{ if eq (mod $index 3) 0 }}
+ <div class="col-md-12">
<div class="row">
- {{ end }}
- <div class="col-md-4">
+ {{ end }}
+ <div class="col-md-4">
<div class="box-simple">
- <div class="icon">
- <i class="{{ .icon }}"></i>
- </div>
- <h3>{{ $element.name }}</h3>
+ {{ with $element.url }}
+ <a href="{{ $element.url }}">
+ {{ end }}
+ <div class="icon">
+ <i class="{{ .icon }}"></i>
+ </div>
+ {{ with $element.url }}
+ </a>
+ {{ end }}
+ <h3>{{ $element.name | markdownify }}</h3>
<p>{{ $element.description | markdownify }}</p>
</div>
</div>
- {{ if or (eq (mod $index 3) 2) (eq $index (sub (len $.Site.Data.features) 1 )) }}
- </div>
- </div>
- {{ end }}
+ {{ if or (eq (mod $index 3) 2) (eq $index (sub (len $.Site.Data.features) 1 )) }}
+ </div>
+ </div>
+ {{ end }}
{{ end }}
</div>
</section>
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 06cd6b2..b1ffb80 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -5,7 +5,7 @@
<div class="col-md-4 col-sm-6">
<h4>{{ i18n "aboutUs" }}</h4>
- {{ .Site.Params.about_us | markdownify }}
+ {{ .Site.Params.about_us | safeHTML }}
<hr class="hidden-md hidden-lg hidden-sm">
@@ -19,14 +19,14 @@
<h4>{{ i18n "recentPosts" }}</h4>
<div class="blog-entries">
- {{ range first 3 (where .Site.Pages "Type" "blog") }}
+ {{ range first 3 (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }}
<div class="item same-height-row clearfix">
<div class="image same-height-always">
<a href="{{ .Permalink }}">
{{ if isset .Params "banner" }}
- <img src="{{ .Site.BaseURL}}{{ .Params.banner }}" class="img-responsive" alt="">
+ <img src="{{ .Params.banner | relURL }}" class="img-responsive" alt="{{ .Title }}">
{{ else }}
- <img src="{{ .Site.BaseURL}}img/placeholder.png" class="img-responsive" alt="">
+ <img src="{{ "img/placeholder.png" | relURL }}" class="img-responsive" alt="{{ .Title }}">
{{ end }}
</a>
</div>
@@ -48,7 +48,7 @@
<h4>{{ i18n "contactTitle" }}</h4>
- {{ .Site.Params.address | markdownify }}
+ {{ .Site.Params.address | safeHTML }}
<a href="/contact" class="btn btn-small btn-template-main">{{ i18n "contactGoTo" }}</a>
@@ -76,10 +76,10 @@ _________________________________________________________ -->
<p class="pull-left">{{ .Site.Params.copyright | safeHTML }}</p>
{{ end }}
<p class="pull-right">
- {{ i18n "templateBy" }} <a href="http://bootstrapious.com/free-templates">Bootstrapious</a>.
+ {{ i18n "templateBy" | markdownify }} <a href="https://bootstrapious.com/p/universal-business-e-commerce-template">Bootstrapious</a>.
<!-- Not removing this link is part of the licence conditions of the template. Thanks for understanding :) -->
- {{ i18n "portedBy" }} <a href="https://github.com/devcows/hugo-universal-theme">DevCows</a>
+ {{ i18n "portedBy" | markdownify }} <a href="https://github.com/devcows/hugo-universal-theme">DevCows</a>.
</p>
</div>
</div>
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 2651fc9..a368d16 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -3,42 +3,39 @@
<meta name="robots" content="all,follow">
<meta name="googlebot" content="index,follow,snippet,archive">
<meta name="viewport" content="width=device-width, initial-scale=1">
- <title>{{ .Title }}</title>
- <meta name="author" content="{{ .Site.Author.name }}" />
-
- {{ if .Keywords }}
- <meta name="keywords" content="{{ delimit .Keywords ", " }}">
- {{ else if .Site.Params.DefaultKeywords }}
- <meta name="keywords" content="{{ delimit .Site.Params.DefaultKeywords ", " }}">
- {{ end }}
-
- {{ if .Description }}
- <meta name="description" content="{{ .Description }}">
- {{ else if .Site.Params.DefaultDescription }}
- <meta name="description" content="{{ .Site.Params.DefaultDescription }}">
+ {{ $title_plain := .Title | markdownify | plainify }}
+ <title>{{ $title_plain }}</title>
+ <meta name="author" content="{{ .Param "author" }}" />
+ {{ $keywords := .Site.Params.defaultKeywords | default (slice "" | first 0) }}
+ {{ if isset .Params "tags" }}{{ range .Params.tags }}{{ $keywords = $keywords | append . }}{{ end }}{{ end }}
+ {{ if isset .Params "keywords" }}{{ range .Params.keywords }}{{ $keywords = $keywords | append . }}{{ end }}{{ end }}
+ {{ if gt (len $keywords) 0 }}
+ <meta name="keywords" content="{{ delimit (uniq $keywords) ", " }}">
{{ end }}
+ {{ $description_plain := default .Site.Params.defaultDescription .Description | markdownify | plainify }}
+ <meta name="description" content="{{ $description_plain }}">
- {{ .Hugo.Generator }}
+ {{ hugo.Generator }}
+ <!-- Font -->
<link href='//fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,500,700,800' rel='stylesheet' type='text/css'>
- <!-- Bootstrap and Font Awesome css -->
- <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
+ <!-- Bootstrap and Font Awesome CSS -->
+ <link rel="stylesheet" href="//use.fontawesome.com/releases/v5.11.2/css/all.css">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
- <!-- Css animations -->
- <link href="{{ .Site.BaseURL }}css/animate.css" rel="stylesheet">
+ <!-- CSS animations -->
+ <link href="{{ "css/animate.css" | relURL}}" rel="stylesheet">
<!-- Theme stylesheet, if possible do not edit this stylesheet -->
- {{ if and (isset .Site.Params "style") .Site.Params.style }}
- <link href="{{ .Site.BaseURL }}css/style.{{ .Site.Params.style }}.css" rel="stylesheet" id="theme-stylesheet">
+ {{ with .Site.Params.style }}
+ <link href="{{ "css/style" | relURL}}.{{ . }}.css" rel="stylesheet" id="theme-stylesheet">
{{ else }}
- <link href="{{ .Site.BaseURL }}css/style.default.css" rel="stylesheet" id="theme-stylesheet">
+ <link href="{{ "css/style.default.css" | relURL}}" rel="stylesheet" id="theme-stylesheet">
{{ end }}
-
<!-- Custom stylesheet - for your changes -->
- <link href="{{ .Site.BaseURL }}css/custom.css" rel="stylesheet">
+ <link href="{{ "css/custom.css" | relURL}}" rel="stylesheet">
<!-- Responsivity for older IE -->
{{ `
@@ -48,20 +45,59 @@
<![endif]-->
` | safeHTML }}
- <!-- Favicon and apple touch icons-->
- <link rel="shortcut icon" href="{{ .Site.BaseURL }}img/favicon.ico" type="image/x-icon" />
- <link rel="apple-touch-icon" href="{{ .Site.BaseURL }}img/apple-touch-icon.png" />
- <!-- owl carousel css -->
+ <!-- Favicon and Apple touch icons-->
+ <link rel="shortcut icon" href="{{ "img/favicon.ico" | relURL }}" type="image/x-icon" />
+ <link rel="apple-touch-icon" href="{{ "img/apple-touch-icon.png" | relURL }}" />
- <link href="{{ .Site.BaseURL }}css/owl.carousel.css" rel="stylesheet">
- <link href="{{ .Site.BaseURL }}css/owl.theme.css" rel="stylesheet">
+ <!-- owl carousel CSS -->
+ <link href="{{ "css/owl.carousel.css" | relURL}}" rel="stylesheet">
+ <link href="{{ "css/owl.theme.css" | relURL}}" rel="stylesheet">
+ <!-- RSS feed -->
<link rel="alternate" href="{{ "/index.xml" | absURL }}" type="application/rss+xml" title="{{ .Site.Title }}">
<!-- Facebook OpenGraph tags -->
- <meta property="og:title" content="{{ .Title }}" />
- <meta property="og:type" content="website" />
- <meta property="og:url" content="{{ .URL }}/" />
- <meta property="og:image" content="{{ .Site.Params.logo }}" />
+ {{ $is_blog := and (eq .Type "blog") (eq .Kind "page") }}
+ {{ $has_image := isset .Params "banner" }}
+ {{ $image := cond $has_image .Params.banner (.Site.Params.default_sharing_image | default "img/sharing-default.png") }}
+ {{ $is_valid_image := print "static/" $image | fileExists }}
+ {{ if $is_valid_image }}
+ {{ $image_ext := path.Ext $image }}
+ <meta property="og:locale" content="{{ replace .Site.LanguageCode "-" "_" }}">
+ <meta property="og:site_name" content="{{ .Site.Title }}">
+ <meta property="og:title" content="{{ $title_plain }}">
+ <meta property="og:type" content="{{ cond $is_blog "article" "website" }}">
+ <meta property="og:url" content="{{ .Permalink }}" />
+ <meta property="og:description" content="{{ $description_plain }}">
+ <meta property="og:image" content="{{ $image | absURL }}">
+ <meta property="og:image:type" content="image/{{ if eq $image_ext ".svg" }}svg+xml{{ else }}{{ trim $image_ext "." }}{{ end }}">
+ {{ with .Params.banner_alt }}<meta property="og:image:alt" content="{{ . | markdownify | plainify }}">{{ end }}
+ {{ $image_local := printf "/static/%s" $image}}
+ {{ with (imageConfig $image_local) }}
+ <meta property="og:image:width" content="{{ .Width }}">
+ <meta property="og:image:height" content="{{ .Height }}">
+ {{ end }}
+ {{ end }}
+ {{ with .Lastmod }}<meta property="og:updated_time" content="{{ .Format "2006-01-02T15:04:05Z0700" }}">{{ end }}
+ {{ if $is_blog }}
+ {{ with .Param "facebook_site" }}<meta property="article:publisher" content="https://www.facebook.com/{{ . }}/">{{ end }}
+ {{ with .Param "facebook_author" }}<meta property="article:author" content="https://www.facebook.com/{{ . }}/">{{ end }}
+ {{ with .Params.categories }}<meta property="article:section" content="{{ index . 0 }}">{{ end }}
+ {{ range .Params.tags }}<meta property="article:tag" content="{{ . }}">
+ {{ end }}
+ {{ if gt .ExpiryDate .PublishDate }}<meta property="article:expiration_time" content="{{ .ExpiryDate.Format "2006-01-02T15:04:05Z0700" }}">{{ end }}
+ {{ with .PublishDate }}<meta property="article:published_time" content="{{ .Format "2006-01-02T15:04:05Z0700" }}">{{ end }}
+ {{ with .Lastmod }}<meta property="article:modified_time" content="{{ .Format "2006-01-02T15:04:05Z0700" }}">{{ end }}
+ {{ end }}
+
+ <!-- Twitter Card meta tags -->
+ <meta name="twitter:card" content="summary{{ if (and $is_blog (and $has_image $is_valid_image)) }}_large_image{{ end }}">
+ {{ with .Param "twitter_site" }}<meta name="twitter:site" content="@{{ . }}">{{ end }}
+ <meta name="twitter:title" content="{{ $title_plain | truncate 70 }}">
+ {{ if $is_valid_image }}
+ <meta name="twitter:image" content="{{ $image | absURL }}">
+ {{ end }}
+ <meta name="twitter:description" content="{{ $description_plain | truncate 200 }}">
+ {{ with .Param "twitter_author" }}<meta name="twitter:creator" content="@{{ . }}">{{ end }}
</head>
diff --git a/layouts/partials/map.html b/layouts/partials/map.html
index 4b1499e..540546c 100644
--- a/layouts/partials/map.html
+++ b/layouts/partials/map.html
@@ -1,15 +1,17 @@
-{{ if isset .Site.Params "latitude" }}
- {{ if isset .Site.Params "longitude" }}
- <div class="hidden">
- <input id="gmap-lat" value="{{ .Site.Params.latitude }}" />
- <input id="gmap-lng" value="{{ .Site.Params.longitude }}" />
- <input id="gmap-marker" value="{{ .Site.BaseURL }}img/marker.png" />
- {{ if isset .Site.Params "direction" }}
- <input id="gmap-dir" value="{{ .Site.Params.direction }}" />
- {{ else }}
- <input id="gmap-dir" value="{{ .Site.Params.latitude }},{{ .Site.Params.longitude }}" />
- {{ end }}
- </div>
- <div id="map" />
+{{ if .Site.Params.enableGoogleMaps }}
+ {{ if isset .Site.Params "latitude" }}
+ {{ if isset .Site.Params "longitude" }}
+ <div class="hidden">
+ <input id="gmap-lat" value="{{ .Site.Params.latitude }}" />
+ <input id="gmap-lng" value="{{ .Site.Params.longitude }}" />
+ <input id="gmap-marker" value="{{ "img/marker.png" | relURL }}" />
+ {{ if isset .Site.Params "direction" }}
+ <input id="gmap-dir" value="{{ .Site.Params.direction }}" />
+ {{ else }}
+ <input id="gmap-dir" value="{{ .Site.Params.latitude }},{{ .Site.Params.longitude }}" />
+ {{ end }}
+ </div>
+ <div id="map" />
+ {{ end }}
{{ end }}
{{ end }}
diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html
index 8d0a343..325f72b 100644
--- a/layouts/partials/nav.html
+++ b/layouts/partials/nav.html
@@ -1,18 +1,16 @@
-<div class="navbar-affixed-top" data-spy="affix" data-offset-top="200">
-
- <div class="navbar navbar-default yamm" role="navigation" id="navbar">
-
+<header class="navbar-affixed-top" data-spy="affix" data-offset-top="62">
+ <div class="navbar navbar-default yamm" role="navigation" id="navbar">
<div class="container">
<div class="navbar-header">
- <a class="navbar-brand home" href="{{ .Site.BaseURL }}">
- <img src="{{ .Site.BaseURL }}img/logo.png" alt="{{ .Title }} logo" class="hidden-xs hidden-sm">
- <img src="{{ .Site.BaseURL }}img/logo-small.png" alt="{{ .Title }} logo" class="visible-xs visible-sm">
+ <a class="navbar-brand home" href="{{ "/" | relURL }}">
+ <img src="{{ .Site.Params.logo | relURL }}" alt="{{ .Title }} logo" class="hidden-xs hidden-sm">
+ <img src="{{ .Site.Params.logo_small | relURL }}" alt="{{ .Title }} logo" class="visible-xs visible-sm">
<span class="sr-only">{{ .Title }} - {{ i18n "navHome" }}</span>
</a>
<div class="navbar-buttons">
<button type="button" class="navbar-toggle btn-template-main" data-toggle="collapse" data-target="#navigation">
<span class="sr-only">{{ i18n "navToggle" }}</span>
- <i class="fa fa-align-justify"></i>
+ <i class="fas fa-align-justify"></i>
</button>
</div>
</div>
@@ -20,11 +18,13 @@
<div class="navbar-collapse collapse" id="navigation">
<ul class="nav navbar-nav navbar-right">
+ {{ $current := . }}
+ {{ $topLevel := replace .URL "/" "" }}
{{ range .Site.Menus.main.ByWeight }}
{{ if .HasChildren }}
<!-- Check if the first child marks a menu section identifier -->
{{ $hasSections := (hasPrefix (index .Children 0).Identifier "section.") }}
- <li class="dropdown{{ if $hasSections }} use-yamm yamm-fw{{end}}">
+ <li class="dropdown{{ if $hasSections }} use-yamm yamm-fw{{end}} {{ if eq $current.RelPermalink .URL | or (eq $current.Type $topLevel) | or (and (eq (default (trim .URL "/") .Identifier) "blog") (in (slice "taxonomy" "taxonomyTerm") $current.Kind)) }} active{{ end }}">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{{ .Name }} <span class="caret"></span></a>
{{ if $hasSections }}
<ul class="dropdown-menu">
@@ -120,26 +120,19 @@
</div>
<!--/.nav-collapse -->
- <div class="collapse clearfix" id="search">
-
+ <div class="collapse clearfix" id="search">
<form class="navbar-form" role="search">
<div class="input-group">
<input type="text" class="form-control" placeholder="Search">
<span class="input-group-btn">
-
- <button type="submit" class="btn btn-template-main"><i class="fa fa-search"></i></button>
-
+ <button type="submit" class="btn btn-template-main"><i class="fas fa-search"></i></button>
</span>
</div>
</form>
-
</div>
<!--/.nav-collapse -->
-
</div>
</div>
- <!-- /#navbar -->
-
-</div>
+</header>
<!-- *** NAVBAR END ***-->
diff --git a/layouts/partials/recent_posts.html b/layouts/partials/recent_posts.html
index 660d61f..d60fb8c 100644
--- a/layouts/partials/recent_posts.html
+++ b/layouts/partials/recent_posts.html
@@ -5,7 +5,7 @@
<div class="col-md-12">
<div class="heading text-center">
- <h2>{{ .Site.Params.recent_posts.title }}</h2>
+ <h2>{{ .Site.Params.recent_posts.title | markdownify }}</h2>
</div>
<p class="lead">
@@ -15,23 +15,22 @@
<!-- *** BLOG HOMEPAGE *** -->
<div class="row">
-
- {{ $posts := .Paginate (where .Data.Pages "Type" "blog") }}
+ {{ $posts := .Paginate (where site.RegularPages "Type" "in" site.Params.mainSections) }}
{{ range first 4 $posts.Pages }}
<div class="col-md-3 col-sm-6">
<div class="box-image-text blog">
<div class="top">
<div class="image" style="overflow:hidden">
{{ if isset .Params "banner" }}
- <img src="{{ .Site.BaseURL}}{{ .Params.banner }}" class="img-responsive" alt="" >
+ <img src="{{ .Params.banner | relURL }}" class="img-responsive" alt="" >
{{ else }}
- <img src="{{ .Site.BaseURL}}img/placeholder.png" class="img-responsive" alt="">
+ <img src="{{ "img/placeholder.png" | relURL }}" class="img-responsive" alt="">
{{ end }}
</div>
<div class="bg"></div>
<div class="text">
<p class="buttons">
- <a href="{{ .Permalink }}" class="btn btn-template-transparent-primary"><i class="fa fa-link"></i> {{ i18n "readMore" }}</a>
+ <a href="{{ .Permalink }}" class="btn btn-template-transparent-primary"><i class="fas fa-link"></i> {{ i18n "readMore" }}</a>
</p>
</div>
</div>
@@ -39,15 +38,17 @@
<div class="content">
<h4><a href="{{ .Permalink }}">{{ .Title }}</a></h4>
<p class="author-category">
- {{ with .Params.author }}
- {{ i18n "authorBy" }} <a href="#">{{ . }}</a>
+ {{ if isset .Params "authors" }}
+ {{ i18n "authorBy" }} {{ range $index, $author := .Params.authors }}{{ if $index }}, {{ end }}<a href="{{ (printf "%s/%s" ("authors" | relURL) ($author | urlize)) }}">{{ $author }}</a>{{ end }}
{{ end }}
{{ i18n "publishedOn" }} {{ .Date.Format .Site.Params.date_format }}
</p>
+ {{ if not .Site.Params.recent_posts.hide_summary }}
<p class="intro">{{ .Summary }}</p>
<p class="read-more">
<a href="{{ .Permalink }}" class="btn btn-template-main">{{ i18n "continueReading" }}</a>
</p>
+ {{ end }}
</div>
</div>
<!-- /.box-image-text -->
diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html
index 33d9762..2b8ca63 100644
--- a/layouts/partials/scripts.html
+++ b/layouts/partials/scripts.html
@@ -6,14 +6,17 @@
<script src="//cdnjs.cloudflare.com/ajax/libs/waypoints/4.0.1/jquery.waypoints.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/Counter-Up/1.0/jquery.counterup.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-parallax/1.1.3/jquery-parallax.js"></script>
+{{ if .Site.Params.enableGoogleMaps }}
{{ if .Site.Params.googleMapsApiKey }}
<script src="//maps.googleapis.com/maps/api/js?key={{.Site.Params.googleMapsApiKey}}&v=3.exp"></script>
{{ else }}
<script src="//maps.googleapis.com/maps/api/js?v=3.exp"></script>
{{ end }}
-<script src="{{ .Site.BaseURL }}js/hpneo.gmaps.js"></script>
-<script src="{{ .Site.BaseURL }}js/gmaps.init.js"></script>
-<script src="{{ .Site.BaseURL }}js/front.js"></script>
+<script src="{{ "js/hpneo.gmaps.js" | relURL }}"></script>
+<script src="{{ "js/gmaps.init.js" | relURL }}"></script>
+{{ end }}
+<script src="{{ "js/front.js" | relURL }}"></script>
<!-- owl carousel -->
-<script src="{{ .Site.BaseURL }}js/owl.carousel.min.js"></script>
+<script src="{{ "js/owl.carousel.min.js" | relURL }}"></script>
+
diff --git a/layouts/partials/see_more.html b/layouts/partials/see_more.html
index 08301c1..437d9d8 100644
--- a/layouts/partials/see_more.html
+++ b/layouts/partials/see_more.html
@@ -7,13 +7,20 @@
<div class="col-md-12">
<div class="icon icon-lg"><i class="{{ .Site.Params.see_more.icon }}"></i>
</div>
- <h3 class="text-uppercase">{{ .Site.Params.see_more.title }}</h3>
- <p class="lead">{{ .Site.Params.see_more.subtitle }}</p>
+ <h3 class="text-uppercase">{{ .Site.Params.see_more.title | markdownify }}</h3>
+ <p class="lead">{{ .Site.Params.see_more.subtitle | markdownify }}</p>
<p class="text-center">
- <a href="{{ .Site.Params.see_more.link_url }}" class="btn btn-template-transparent-black btn-lg">{{ .Site.Params.see_more.link_text }}</a>
+ {{ with .Site.Params.see_more.link_url }}
+ <a href="{{ . }}" class="btn btn-template-transparent-black btn-lg">
+ {{ end }}
+ {{ with .Site.Params.see_more.link_text }}
+ {{ . | markdownify }}
+ {{ end }}
+ {{ with .Site.Params.see_more.link_url }}
+ </a>
+ {{ end }}
</p>
</div>
-
</div>
</div>
</section>
diff --git a/layouts/partials/testimonials.html b/layouts/partials/testimonials.html
index ec25984..e206217 100644
--- a/layouts/partials/testimonials.html
+++ b/layouts/partials/testimonials.html
@@ -15,7 +15,11 @@
<!-- *** TESTIMONIALS CAROUSEL *** -->
- <ul class="owl-carousel testimonials same-height-row">
+ <ul class="owl-carousel testimonials same-height-row"
+ data-items="{{ default 4 .Site.Params.CarouselTestimonals.items }}"
+ data-autoplay="{{ default false .Site.Params.CarouselTestimonals.auto_play }}"
+ data-slide-speed="{{ default 2000 .Site.Params.CarouselTestimonals.slide_speed }}"
+ data-pagination-speed="{{ default 1000 .Site.Params.CarouselTestimonals.pagination_speed }}">
{{ range .Site.Data.testimonials }}
<li class="item">
<div class="testimonial same-height-always">
@@ -23,7 +27,7 @@
<p>{{ .text | markdownify }}</p>
</div>
<div class="bottom">
- <div class="icon"><i class="fa fa-quote-left"></i>
+ <div class="icon"><i class="fas fa-quote-left"></i>
</div>
<div class="name-picture">
<img class="" alt="" src="{{ .avatar | absURL }}">
diff --git a/layouts/partials/top.html b/layouts/partials/top.html
index 441944b..fd4b7a9 100644
--- a/layouts/partials/top.html
+++ b/layouts/partials/top.html
@@ -1,18 +1,20 @@
{{ if .Site.Params.topbar.enable }}
-<div id="top">
- <div class="container">
- <div class="row">
- <div class="col-xs-5">
- {{ .Site.Params.topbar.text | safeHTML }}
- </div>
- <div class="col-xs-7">
- <div class="social">
- {{ range .Site.Menus.topbar.ByWeight }}
- <a href="{{ .URL }}" target="_blank" style="opacity: 1;">{{ .Pre }}</a>
- {{ end }}
+<header>
+ <div id="top">
+ <div class="container">
+ <div class="row">
+ <div class="col-xs-5">
+ {{ .Site.Params.topbar.text | safeHTML }}
+ </div>
+ <div class="col-xs-7">
+ <div class="social">
+ {{ range .Site.Menus.topbar.ByWeight }}
+ <a href="{{ .URL }}" target="_blank" style="opacity: 1;">{{ .Pre }}</a>
+ {{ end }}
+ </div>
</div>
</div>
</div>
</div>
-</div>
+</header>
{{ end }}
diff --git a/layouts/partials/widgets/categories.html b/layouts/partials/widgets/categories.html
index 2242bab..d40c134 100644
--- a/layouts/partials/widgets/categories.html
+++ b/layouts/partials/widgets/categories.html
@@ -4,17 +4,20 @@
<div class="panel panel-default sidebar-menu">
<div class="panel-heading">
- <h3 class="panel-title">{{ i18n "categoriesTitle" }}</h3>
+ <h3 class="panel-title">{{ i18n "categoriesTitle" }}</h3>
</div>
<div class="panel-body">
<ul class="nav nav-pills nav-stacked">
+ {{ $current := . }}
{{ range $name, $items := .Site.Taxonomies.categories }}
- <li><a href="{{ $.Site.BaseURL }}categories/{{ $name | urlize | lower }}">{{ $name }} ({{ len $items }})</a>
+ <li{{ if eq $current.RelPermalink ($name | urlize | lower | printf "/categories/%s/") }} class="active"{{ end }}>
+ <a href="{{ "categories/" | relURL }}{{ $name | urlize | lower }}">{{ $name | upper }} ({{ len $items }})</a>
</li>
{{ end }}
</ul>
</div>
+
</div>
{{ end }}
{{ end }}
diff --git a/layouts/partials/widgets/search.html b/layouts/partials/widgets/search.html
index 0ac72ce..9a4fde1 100644
--- a/layouts/partials/widgets/search.html
+++ b/layouts/partials/widgets/search.html
@@ -9,10 +9,10 @@
<div class="panel-body">
<form action="//google.com/search" method="get" accept-charset="UTF-8" role="search">
<div class="input-group">
- <input type="search" name="q" results="0" class="form-control" placeholder="{{ i18n "searchTitle" }}">
- <input type="hidden" name="q" value="site:{{ .Site.BaseURL }}">
+ <input type="search" name="q" class="form-control" placeholder="{{ i18n "searchTitle" }}">
+ <input type="hidden" name="sitesearch" value="{{ "/" | absURL }}">
<span class="input-group-btn">
- <button type="submit" class="btn btn-template-main"><i class="fa fa-search"></i></button>
+ <button type="submit" class="btn btn-template-main"><i class="fas fa-search"></i></button>
</span>
</div>
</form>
diff --git a/layouts/partials/widgets/tags.html b/layouts/partials/widgets/tags.html
index 9fa5614..d6aa383 100644
--- a/layouts/partials/widgets/tags.html
+++ b/layouts/partials/widgets/tags.html
@@ -2,18 +2,22 @@
{{ if isset .Site.Taxonomies "tags" }}
{{ if not (eq (len .Site.Taxonomies.tags) 0) }}
<div class="panel sidebar-menu">
+
<div class="panel-heading">
- <h3 class="panel-title">{{ i18n "tagsTitle" }}</h3>
+ <h3 class="panel-title">{{ i18n "tagsTitle" }}</h3>
</div>
<div class="panel-body">
<ul class="tag-cloud">
+ {{ $current := . }}
{{ range $name, $items := .Site.Taxonomies.tags }}
- <li><a href="{{ $.Site.BaseURL }}tags/{{ $name | urlize | lower }}"><i class="fa fa-tags"></i> {{ $name }}</a>
+ <li{{ if eq $current.RelPermalink ($name | urlize | lower | printf "/tags/%s/") }} class="active"{{ end }}>
+ <a href="{{ "tags/" | relURL }}{{ $name | urlize | lower }}"><i class="fas fa-tags"></i> {{ $name }}</a>
</li>
{{ end }}
</ul>
</div>
+
</div>
{{ end }}
{{ end }}