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

github.com/themefisher/bigspring-hugo-startup-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsomratpro <abdulmonnafsomrat@gmail.com>2021-06-10 08:51:40 +0300
committersomratpro <abdulmonnafsomrat@gmail.com>2021-06-10 08:51:40 +0300
commitbed548da7e6a443a2c9280dd6db210a843d2c9c1 (patch)
tree9e352f584ce1f34160704fba49be1c1b09fc509a /layouts
parent7c79a29407b51428b11eee760cb016572208c5a5 (diff)
update bootstrap, jquery, fontawesome, baseof and readme file
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/baseof.html21
-rw-r--r--layouts/contact/list.html14
-rw-r--r--layouts/partials/head.html60
-rw-r--r--layouts/partials/script.html18
-rw-r--r--layouts/partials/style.html15
5 files changed, 87 insertions, 41 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index cf0d8fc..2fd065e 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -12,18 +12,35 @@ AUTHOR WEBSITE: https://gethugothemes.com
<head>
{{ partial "head.html" . }}
+
+ {{ if hugo.IsProduction }}
{{ partialCached "style.html" . }}
- <base href="{{ .Site.BaseURL }}">
+ {{ else }}
+ {{ partial "style.html" . }}
+ {{ end }}
</head>
<body>
+
+ {{ if hugo.IsProduction }}
{{ partialCached "preloader.html" . }}
+ {{ partialCached "header.html" . }}
+ {{ else }}
+ {{ partial "preloader.html" . }}
{{ partial "header.html" . }}
+ {{ end }}
+
<main>
{{ block "main" . }}{{ end }}
</main>
- {{ partial "footer.html" . }}
+
+ {{ if hugo.IsProduction }}
+ {{ partialCached "footer.html" . }}
{{ partialCached "script.html" . }}
+ {{ else }}
+ {{ partial "footer.html" . }}
+ {{ partial "script.html" . }}
+ {{ end }}
</body>
</html>
diff --git a/layouts/contact/list.html b/layouts/contact/list.html
index d3958d4..0eca497 100644
--- a/layouts/contact/list.html
+++ b/layouts/contact/list.html
@@ -6,11 +6,11 @@
<div class="row">
<div class="col-lg-7 mb-4 mb-lg-0">
<form action="{{ site.Params.contact_form_action | safeURL }}" method="POST">
- <input type="text" class="form-control mb-3" id="name" name="name" placeholder="{{ i18n "yourname" }}">
- <input type="email" class="form-control mb-3" id="mail" name="mail" placeholder="{{ i18n "youremail" }}">
- <input type="text" class="form-control mb-3" id="subject" name="subject" placeholder="{{ i18n "subject" }}">
- <textarea name="message" id="message" class="form-control mb-3" placeholder="{{ i18n "yourmessage" }}"></textarea>
- <button type="submit" value="send" class="btn btn-primary">{{ i18n "sendnow" }}</button>
+ <input type="text" class="form-control mb-3" id="name" name="name" placeholder="{{ i18n `yourname` }}">
+ <input type="email" class="form-control mb-3" id="mail" name="mail" placeholder="{{ i18n `youremail` }}">
+ <input type="text" class="form-control mb-3" id="subject" name="subject" placeholder="{{ i18n `subject` }}">
+ <textarea name="message" id="message" class="form-control mb-3" placeholder="{{ i18n `yourmessage` }}"></textarea>
+ <button type="submit" value="send" class="btn btn-primary">{{ i18n `sendnow` }}</button>
</form>
</div>
@@ -21,8 +21,4 @@
</div>
</section>
-<!-- call to action -->
-
-<!-- /call to action -->
-
{{ end }} \ No newline at end of file
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index b9204f8..fcf22d1 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -1,18 +1,60 @@
<meta charset="utf-8">
-<title>{{with .Title}}{{.}}{{else}}{{site.Title}}{{end}}</title>
+<title>{{.Title | default site.Title}}</title>
-<meta name="description" content="{{ with .Params.Description }}{{ . }}{{ else }}{{ with site.Params.description }}{{ . }}{{ end }}{{ end }}">
+<!-- base url -->
+{{ if or (eq site.BaseURL "/") (eq site.BaseURL "http://localhost:1313/") (eq site.BaseURL "http://examplesite.org/") (eq site.BaseURL "https://examplesite.org/") (eq site.BaseURL "http://examplesite.com/") (eq site.BaseURL "https://examplesite.com/")}}{{else}}
+<base href="{{ site.BaseURL }}">
+{{ end }}
<!-- multilingual SEO optimizations -->
{{ if .IsTranslated }}
-{{ range .Page.AllTranslations }}
-<link rel="alternate" title="{{.Title}}" hreflang="{{.Lang}}" href="{{.RelPermalink}}">
+{{ range .AllTranslations }}
+<link rel="alternate" hreflang="{{.Lang}}" href="{{ .RelPermalink | absLangURL }}">
{{ end }}
+<link rel="alternate" hreflang="x-default" href="{{ .RelPermalink | absLangURL }}">
{{ end }}
+{{ with site.Params.author }}
+<meta name="author" content="{{ . }}">{{ end }}
+{{ hugo.Generator }}
+
+<!--Favicon-->
+<link rel="shortcut icon" href="{{ site.Params.favicon | absURL }}" type="image/x-icon">
+<link rel="icon" href="{{ site.Params.favicon | absURL }}" type="image/x-icon">
+
+<!-- mobile responsive meta -->
+<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5">
+<meta name="msapplication-TileColor" content="{{site.Params.variables.primary_color | default `#da532c`}}">
+<meta name="theme-color" content="{{site.Params.variables.body_color | default `#ffffff` }}">
+
+
+{{ "<!-- Open Graph image and Twitter Card metadata -->" | safeHTML }}
+{{ $image_path := .Params.image | default site.Params.image -}}
+{{ $image_path_local := printf "static/%s" $image_path -}}
+{{ $image_ext := trim (path.Ext $image_path | lower) "." -}}
+{{ if fileExists $image_path_local -}}
+ <meta property="og:image" content="{{ $image_path | absURL }}" />
+ {{/* If not SVG, read image aspect ratio and define Twitter Card and Open Graph width and height */ -}}
+ {{ if ne $image_ext "svg" -}}
+ {{ with (imageConfig $image_path_local) -}}
+ {{ if (and (gt .Width 144) (gt .Height 144)) -}}
+ <meta name="twitter:image" content="{{ $image_path | absURL }}"/>
+ <meta name="twitter:card" content="summary{{ if (and (gt .Width 300) (gt .Height 157) (not (eq .Width .Height))) }}_large_image{{ end }}">
+ {{ end -}}
+ <meta property="og:image:width" content="{{ .Width }}">
+ <meta property="og:image:height" content="{{ .Height }}">
+ {{ end -}}
+ {{ end -}}
+ <meta property="og:image:type" content="image/{{ if eq $image_ext `svg` }}svg+xml{{ else }}{{ replaceRE `^jpg$` `jpeg` $image_ext }}{{ end }}">
+{{ end -}}
+<meta name="twitter:title" content="{{ with .Title }}{{ . }}{{ else }}{{ site.Title }}{{ end }}"/>
+<meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{ if .IsPage }}{{ .Summary }}{{ else }}{{ with site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}"/>
+{{ with site.Social.twitter -}}<meta name="twitter:site" content="@{{ . }}"/>{{ end -}}
+{{ range site.Authors }}
+ {{ with .twitter -}}<meta name="twitter:creator" content="@{{ . }}"/>{{ end -}}
+{{ end -}}
-{{ with .Params.image }}
-<meta property="og:image" content="{{ . | absURL }}" />
-{{ end }}
{{ template "_internal/opengraph.html" . }}
-{{ template "_internal/google_analytics_async.html" . }}
-{{ site.Params.custom_script | safeHTML }} \ No newline at end of file
+{{ template "_internal/twitter_cards.html" . }}
+
+<!-- google analytics -->
+{{ template "_internal/google_analytics.html" . }} \ No newline at end of file
diff --git a/layouts/partials/script.html b/layouts/partials/script.html
index 2f9d0d9..64c4dd5 100644
--- a/layouts/partials/script.html
+++ b/layouts/partials/script.html
@@ -2,11 +2,11 @@
<script src="https://cdn.jsdelivr.net/gh/theprojectsomething/webfontloader@feature/google-fonts-v2/webfontloader.js"></script>
{{$pf:= site.Params.variables.primary_font}}
{{$sf:= site.Params.variables.secondary_font}}
-<script>
+<script type="application/javascript">
WebFont.load({
google: {
api: 'https://fonts.googleapis.com/css2',
- families: ['{{$pf | default `Lato:wght@400`}}{{if not $sf}}&display=swap{{end}}'{{with $sf}},'{{.}}&display=swap'{{end}}],
+ families: ['{{$pf | default `Lato:wght@400`}}{{if not $sf}}&display=swap{{end}}'{{with $sf}},'{{. | default `Lato:wght@400`}}&display=swap'{{end}}],
version: 2
},
active: () => {
@@ -19,22 +19,23 @@
{{ $scripts := slice }}
{{ range site.Params.plugins.js}}
{{ if findRE "^http" .link }}
-<script src="{{ .link | absURL }}" type="application/javascript" {{.attributes | safeHTMLAttr}}></script>
+<script crossorigin="anonymous" defer="defer" src="{{ .link | relURL }}" type="application/javascript" {{.attributes | safeHTMLAttr}}></script>
{{ else }}
{{ $scripts = $scripts | append (resources.Get .link) }}
{{ end }}
{{ end }}
{{ $scripts := $scripts | append (resources.Get "js/script.js" | minify) }}
{{ $scripts := $scripts | resources.Concat "/js/script.js" | minify | fingerprint "sha512" }}
-<script crossorigin="anonymous" defer="defer" data-turbolinks-suppress-warning integrity="{{ $scripts.Data.Integrity }}" type="application/javascript">{{$scripts.Content | safeJS}}</script>
+<script crossorigin="anonymous" defer="defer" integrity="{{ $scripts.Data.Integrity }}" type="application/javascript">{{$scripts.Content | safeJS}}</script>
<!-- cookie -->
-{{ if site.Params.cookies.enable }}
+{{ with site.Params.cookies }}
+{{ if .enable }}
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-cookie/2.2.1/js.cookie.min.js"></script>
<div id="js-cookie-box" class="cookie-box cookie-box-hide">
- This site uses cookies. By continuing to use this website, you agree to their use. <span id="js-cookie-button" class="btn btn-sm btn-outline-primary ml-2">I Accept</span>
+ {{.content | markdownify}}<span id="js-cookie-button" class="btn btn-sm btn-primary ml-2">{{.button}}</span>
</div>
-<script>
+<script type="application/javascript">
(function ($) {
const cookieBox = document.getElementById('js-cookie-box');
const cookieButton = document.getElementById('js-cookie-button');
@@ -42,7 +43,7 @@
cookieBox.classList.remove('cookie-box-hide');
cookieButton.onclick = function () {
Cookies.set('cookie-box', true, {
- expires: {{ site.Params.cookies.expire_days }}
+ expires: {{ .expire_days }}
});
cookieBox.classList.add('cookie-box-hide');
};
@@ -69,4 +70,5 @@
display: none;
}
</style>
+{{ end }}
{{ end }} \ No newline at end of file
diff --git a/layouts/partials/style.html b/layouts/partials/style.html
index 47b0587..fff868e 100644
--- a/layouts/partials/style.html
+++ b/layouts/partials/style.html
@@ -1,14 +1,3 @@
-{{ with site.Params.author }}
-<meta name="author" content="{{ . }}">{{ end }}
-{{ hugo.Generator }}
-
-<!--Favicon-->
-<link rel="shortcut icon" href="{{ site.Params.favicon | absURL }}" type="image/x-icon">
-<link rel="icon" href="{{ site.Params.favicon | absURL }}" type="image/x-icon">
-
-<!-- mobile responsive meta -->
-<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5">
-
<!-- DNS preconnect -->
<meta http-equiv="x-dns-prefetch-control" content="on">
<link rel="preconnect" href="//ajax.googleapis.com">
@@ -41,11 +30,11 @@
{{ $styles := $styles | resources.Concat "/css/style.css" | minify | fingerprint "sha512"}}
<style crossorigin="anonymous" media="all" type="text/css" integrity="{{ $styles.Data.Integrity }}">{{$styles.Content | safeCSS}}</style>
-<style>
+<!-- <style>
.check-mark::before {
font-family: "{{ site.Params.variables.icon_font }}";
font-weight: 900;
content: "\f058";
display: none;
}
-</style> \ No newline at end of file
+</style> --> \ No newline at end of file