diff options
author | Somrat <themefisher.dev@gmail.com> | 2022-01-30 08:10:45 +0300 |
---|---|---|
committer | Somrat <themefisher.dev@gmail.com> | 2022-01-30 08:10:45 +0300 |
commit | def0a392a58187bab198c6a11e7f4b82d4fa4319 (patch) | |
tree | 3f9ad5d47d1df5cb1e509d5e4fbea250c9a457fa | |
parent | fa2d300c90ab4549f3bc09282e21cac9b0fa603e (diff) |
code formatting
-rw-r--r-- | assets/css/style.css | 2 | ||||
-rw-r--r-- | layouts/_default/baseof.html | 24 | ||||
-rw-r--r-- | layouts/contact/list.html | 46 | ||||
-rw-r--r-- | layouts/faq/list.html | 28 | ||||
-rw-r--r-- | layouts/index.html | 75 | ||||
-rw-r--r-- | layouts/partials/banner.html | 81 | ||||
-rw-r--r-- | layouts/partials/default.html | 154 | ||||
-rw-r--r-- | layouts/partials/footer.html | 19 | ||||
-rw-r--r-- | layouts/partials/head.html | 156 |
9 files changed, 319 insertions, 266 deletions
diff --git a/assets/css/style.css b/assets/css/style.css index 9665dcd..0be9b91 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -858,7 +858,7 @@ pre code::-webkit-scrollbar-thumb { margin-bottom: 0; } -.code-tabs .tab-content .tab-pane{ +.code-tabs .tab-content .tab-pane { margin-bottom: 0; } diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 9f0ebe7..a4e1633 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,24 +1,24 @@ <!DOCTYPE html>
<html lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en-us{{ end }}">
{{ partial "head.html" . }}
-
+
<body>
- {{ if .IsHome }}
- {{ "<!-- header -->" | safeHTML }}
- <header class="banner {{if .Site.Params.banner.bg_image}}overlay bg-cover{{else}}bg-primary{{end}}" data-background="{{ .Site.Params.banner.bg_image | absURL }}">
- {{ partial "navigation.html" . }}
- {{ partialCached "banner.html" . }}
+ {{ if .IsHome }}
+ <!-- header -->
+ <header
+ class="banner {{if .Site.Params.banner.bg_image}}overlay bg-cover{{else}}bg-primary{{end}}"
+ data-background="{{ .Site.Params.banner.bg_image | absURL }}"
+ >
+ {{ partial "navigation.html" . }} {{ partialCached "banner.html" . }}
</header>
- {{ "<!-- /header -->" | safeHTML }}
+ <!-- /header -->
{{ else }}
- {{ "<!-- header -->" | safeHTML }}
+ <!-- header -->
<header class="shadow-bottom sticky-top bg-white">
{{ partial "navigation.html" . }}
</header>
- {{ "<!-- /header -->" | safeHTML }}
- {{ end }}
- {{ block "main" . }}{{ end }}
+ <!-- /header -->
+ {{ end }} {{ block "main" . }}{{ end }}
{{ partialCached "footer.html" . }}
</body>
-
</html>
\ No newline at end of file diff --git a/layouts/contact/list.html b/layouts/contact/list.html index d2bfb61..33bb938 100644 --- a/layouts/contact/list.html +++ b/layouts/contact/list.html @@ -1,25 +1,51 @@ {{ define "main" }} -{{ "<!-- contact -->" | safeHTML }} +<!-- contact --> <section class="section"> <div class="container"> <div class="row"> <div class="col-12"> <h2 class="section-title text-primary">{{ .Title }}</h2> {{ .Content }} - <form action="{{ .Site.Params.contact_form_action | safeURL }}" method="POST"> - <input type="text" id="name" name="name" placeholder="Name" class="form-control mb-4 shadow rounded-0"> - <input type="email" id="mail" name="mail" placeholder="Email" class="form-control mb-4 shadow rounded-0"> - <input type="text" id="subject" name="subject" placeholder="Subject" - class="form-control mb-4 shadow rounded-0"> - <textarea name="message" id="message" placeholder="Message" - class="form-control mb-4 shadow rounded-0"></textarea> - <button type="submit" value="send" class="btn btn-primary">{{ i18n "send" }}</button> + <form + action="{{ .Site.Params.contact_form_action | safeURL }}" + method="POST" + > + <input + type="text" + id="name" + name="name" + placeholder="Name" + class="form-control mb-4 shadow rounded-0" + /> + <input + type="email" + id="mail" + name="mail" + placeholder="Email" + class="form-control mb-4 shadow rounded-0" + /> + <input + type="text" + id="subject" + name="subject" + placeholder="Subject" + class="form-control mb-4 shadow rounded-0" + /> + <textarea + name="message" + id="message" + placeholder="Message" + class="form-control mb-4 shadow rounded-0" + ></textarea> + <button type="submit" value="send" class="btn btn-primary"> + {{ i18n "send" }} + </button> </form> </div> </div> </div> </section> -{{ "<!-- /contact -->" | safeHTML }} +<!-- /contact --> {{ end }} diff --git a/layouts/faq/list.html b/layouts/faq/list.html index 0dc7e33..d11fff7 100644 --- a/layouts/faq/list.html +++ b/layouts/faq/list.html @@ -1,20 +1,16 @@ -{{ define "main" }}
-
- {{ $data := index .Site.Data .Site.Language.Lang }}
- {{ "<!-- faq -->" | safeHTML }}
- <section class="section pb-0">
- <div class="container">
- <div class="row">
- <div class="col-12">
+{{ define "main" }} {{ $data := index .Site.Data .Site.Language.Lang }}
+<!-- faq -->
+<section class="section pb-0">
+ <div class="container">
+ <div class="row">
+ <div class="col-12">
<h2 class="section-title text-primary">{{ .Title }}</h2>
- {{ "<!-- accordion -->" | safeHTML }}
- <div id="accordion">
- {{ .Content }}
- </div>
- </div>
+ <!-- accordion -->
+ <div id="accordion">{{ .Content }}</div>
</div>
</div>
- </section>
- {{ "<!-- /faq -->" | safeHTML }}
+ </div>
+</section>
+<!-- /faq -->
-{{ end }}
\ No newline at end of file +{{ end }}
diff --git a/layouts/index.html b/layouts/index.html index c8a399b..133d2aa 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,56 +1,61 @@ {{ define "main" }}
{{ if .Content }}
- <section class="section text-center pb-0">
- <div class="container">
- {{ .Content }}
- </div>
- </section>
+ <section class="section text-center pb-0">
+ <div class="container">
+ {{ .Content }}
+ </div>
+ </section>
{{ end }}
- {{ "<!-- topics -->" | safeHTML }}
+
+ <!-- topics -->
<section class="section">
<div class="container">
<div class="row justify-content-center">
<div class="col-12 text-center">
- <h2 class="section-title">{{ i18n "topics_title" | safeHTML }}</h2>
+ <h2 class="section-title">{{ i18n "topics_title" | markdownify }}</h2>
</div>
- {{ "<!-- topic-item -->" | safeHTML }}
+ <!-- topic-item -->
{{ range (where .Site.Pages "Type" "docs") }}
- <div class="col-lg-4 col-sm-6 mb-4">
- <a href="{{ .Permalink }}" class="px-4 py-5 bg-white shadow text-center d-block match-height">
- {{ with .Params.icon}}<i class="{{.}} icon text-primary d-block mb-4"></i>{{end}}
- <h3 class="mb-3 mt-0">{{ .Title }}</h3>
- {{with .Params.description}}<p class="mb-0">{{. | markdownify}}</p>{{end}}
- </a>
- </div>
+ <div class="col-lg-4 col-sm-6 mb-4">
+ <a href="{{ .Permalink }}" class="px-4 py-5 bg-white shadow text-center d-block match-height">
+ {{ with .Params.icon}}
+ <i class="{{.}} icon text-primary d-block mb-4"></i>
+ {{end}}
+ <h3 class="mb-3 mt-0">{{ .Title }}</h3>
+ {{with .Params.description}}
+ <p class="mb-0">{{. | markdownify}}</p>
+ {{end}}
+ </a>
+ </div>
{{ end }}
</div>
</div>
</section>
- {{ "<!-- /topics -->" | safeHTML }}
+ <!-- /topics -->
{{ if .Site.Params.cta.enable }}
- {{ with .Site.Params.cta }}
- {{ "<!-- call to action -->" | safeHTML }}
- <section>
- <div class="container">
- <div class="row">
- <div class="col-12">
- <div class="section px-3 bg-white shadow text-center">
- <h2 class="mb-4">{{ .title | markdownify }}</h2>
- <p class="mb-4">{{ .content | markdownify }}</p>
- {{ if .button.enable }}
- {{ with .button }}
- <a href="{{ .link | relLangURL }}" class="btn btn-primary">{{ .label }}</a>
- {{ end }}
- {{ end }}
+ {{ with .Site.Params.cta }}
+ <!-- call to action -->
+ <section>
+ <div class="container">
+ <div class="row">
+ <div class="col-12">
+ <div class="section px-3 bg-white shadow text-center">
+ <h2 class="mb-4">{{ .title | markdownify }}</h2>
+ <p class="mb-4">{{ .content | markdownify }}</p>
+ {{ if .button.enable }}
+ {{ with .button }}
+ <a href="{{ .link | relLangURL }}" class="btn btn-primary">{{ .label }}</a>
+ {{ end }}
+ {{ end }}
+ </div>
+ </div>
</div>
</div>
- </div>
- </div>
- </section>
- {{ "<!-- /call to action -->" | safeHTML }}
- {{ end }}
+ </section>
+ <!-- /call to action -->
+ {{ end }}
{{ end }}
{{ end }}
diff --git a/layouts/partials/banner.html b/layouts/partials/banner.html index ddf07dd..e6a620e 100644 --- a/layouts/partials/banner.html +++ b/layouts/partials/banner.html @@ -1,39 +1,46 @@ -{{ "<!-- banner -->" | safeHTML }}
+<!-- banner -->
<div class="container section">
- <div class="row">
- <div class="col-lg-8 text-center mx-auto">
- <h1 class="text-white mb-3">{{ .Site.Params.banner.title | markdownify }}</h1>
- <p class="text-white mb-4">{{ .Site.Params.banner.subtitle | markdownify }}</p>
- <div class="position-relative">
- <input id="search" class="form-control" placeholder="{{ .Site.Params.banner.placeholder }}">
- <i class="ti-search search-icon"></i>
- <!-- Javascript -->
- {{ $currentNode := . }}
- {{ $currentNode.Scratch.Set "pages" .Site.Pages }}
- {{ $pages := ($currentNode.Scratch.Get "pages") }}
- <script>
- $(function() {
- var projects = [
- {{ range $pages }}
- {
- value: "{{ .Title }}",
- label: "<p>{{.Plain}}</p>{{range.Params.Keywords}}<p>{{.}}</p>{{end}}",
- url:"{{ .Permalink }}"
- },
- {{ end }}
- ];
- $( "#search" ).autocomplete({
- source: projects
- })
- .data( "ui-autocomplete" )._renderItem = function( ul, item ) {
- return $( "<li>" )
- .append( "<a href=" + item.url + " + \" "\" + >" + item.value + "</a>" + item.label )
- .appendTo( ul );
- };
- });
- </script>
- </div>
- </div>
- </div>
+ <div class="row">
+ <div class="col-lg-8 text-center mx-auto">
+ <h1 class="text-white mb-3">
+ {{ .Site.Params.banner.title | markdownify }}
+ </h1>
+ <p class="text-white mb-4">
+ {{ .Site.Params.banner.subtitle | markdownify }}
+ </p>
+ <div class="position-relative">
+ <input
+ id="search"
+ class="form-control"
+ placeholder="{{ .Site.Params.banner.placeholder }}"
+ />
+ <i class="ti-search search-icon"></i>
+ <!-- Javascript -->
+ {{ $currentNode := . }} {{ $currentNode.Scratch.Set "pages" .Site.Pages
+ }} {{ $pages := ($currentNode.Scratch.Get "pages") }}
+ <script>
+ $(function() {
+ var projects = [
+ {{ range $pages }}
+ {
+ value: "{{ .Title }}",
+ label: "<p>{{.Plain}}</p>{{range.Params.Keywords}}<p>{{.}}</p>{{end}}",
+ url:"{{ .Permalink }}"
+ },
+ {{ end }}
+ ];
+ $( "#search" ).autocomplete({
+ source: projects
+ })
+ .data( "ui-autocomplete" )._renderItem = function( ul, item ) {
+ return $( "<li>" )
+ .append( "<a href=" + item.url + " + \" "\" + >" + item.value + "</a>" + item.label )
+ .appendTo( ul );
+ };
+ });
+ </script>
+ </div>
+ </div>
+ </div>
</div>
-{{ "<!-- /banner -->" | safeHTML }}
\ No newline at end of file +<!-- /banner -->
diff --git a/layouts/partials/default.html b/layouts/partials/default.html index 7614269..93bbd47 100644 --- a/layouts/partials/default.html +++ b/layouts/partials/default.html @@ -1,24 +1,26 @@ -{{ "<!-- details page -->" | safeHTML }} +<!-- details page --> <section class="single section-sm pb-0"> <div class="container"> <div class="row"> <div class="col-lg-3"> <div class="sidebar"> - <a class="back-btn" href="{{ .Site.BaseURL | relLangURL }}" aria-label="back"></a> + <a + class="back-btn" + href="{{ .Site.BaseURL | relLangURL }}" + aria-label="back" + ></a> <ul class="list-styled"> - {{ $currentNode := . }} - {{range .Site.Home.Sections.ByWeight}} - {{ if eq .FirstSection $currentNode.FirstSection }} - {{ template "section-tree-nav" dict "sect" . "currentnode" $currentNode}} - {{ end }} - {{ end }} - {{ if .Content }} - {{ if eq .Params.downloadBtn "true" }} - <div> - <button class="btn btn-primary btn-block" id="generatePDF" > Get Pdf </button> - </div> - {{ end }} - {{ end }} + {{ $currentNode := . }} {{range .Site.Home.Sections.ByWeight}} {{ if + eq .FirstSection $currentNode.FirstSection }} {{ template + "section-tree-nav" dict "sect" . "currentnode" $currentNode}} {{ end + }} {{ end }} {{ if .Content }} {{ if eq .Params.downloadBtn "true" + }} + <div> + <button class="btn btn-primary btn-block" id="generatePDF"> + Get Pdf + </button> + </div> + {{ end }} {{ end }} </ul> </div> </div> @@ -30,48 +32,49 @@ {{ else }} <div class="bg-light p-4"> <ul class="page-list"> - {{ template "section-tree-nav" dict "sect" . "currentnode" $currentNode }} + {{ template "section-tree-nav" dict "sect" . "currentnode" + $currentNode }} </ul> </div> {{ end }} - <p class="post-meta border-bottom pb-3 mb-0 mt-3">Updated on {{ .Lastmod.Format "02 Jan 2006" }}</p> + <p class="post-meta border-bottom pb-3 mb-0 mt-3"> + Updated on {{ .Lastmod.Format "02 Jan 2006" }} + </p> <nav class="pagination mt-3"> <!-- Next prev page --> - {{ $currentNode := . }} - {{ template "menu-nextprev" dict "menu" .Site.Home "currentnode" $currentNode }} - {{ define "menu-nextprev" }} - {{$currentNode := .currentnode }} - {{ if ne .menu.Params.hidden true}} - {{if hasPrefix $currentNode.Permalink .menu.Permalink }} - {{ $currentNode.Scratch.Set "NextPageOK" "OK" }} - {{ $currentNode.Scratch.Set "prevPage" ($currentNode.Scratch.Get "prevPageTmp") }} - {{else}} - {{if eq ($currentNode.Scratch.Get "NextPageOK") "OK"}} - {{ $currentNode.Scratch.Set "NextPageOK" nil }} - {{ $currentNode.Scratch.Set "nextPage" .menu }} - {{end}} - {{end}} - {{ $currentNode.Scratch.Set "prevPageTmp" .menu }} - - {{ $currentNode.Scratch.Set "pages" .menu.Pages }} - {{ if .menu.IsHome}} - {{ $currentNode.Scratch.Set "pages" .menu.Sections }} - {{ else if .menu.Sections}} - {{ $currentNode.Scratch.Set "pages" (.menu.Pages | union .menu.Sections) }} - {{end}} - {{ $pages := ($currentNode.Scratch.Get "pages") }} - - {{ range $pages.ByWeight }} - {{ template "menu-nextprev" dict "menu" . "currentnode" $currentNode }} - {{end}} - {{ end }} - {{ end }} - - {{with ($.Scratch.Get "prevPage")}} - <a class="nav nav-prev" href="{{.Permalink }}" aria-label="Previous page" ><i class="ti-arrow-left mr-2"></i> <span class="d-none d-md-block">{{.Title}}</span></a> - {{end}} - {{with ($.Scratch.Get "nextPage")}} - <a class="nav nav-next" href="{{.Permalink }}" aria-label="Previous page" > <span class="d-none d-md-block">{{.Title}}</span><i class="ti-arrow-right ml-2"></i></a> + {{ $currentNode := . }} {{ template "menu-nextprev" dict "menu" + .Site.Home "currentnode" $currentNode }} {{ define "menu-nextprev" + }} {{$currentNode := .currentnode }} {{ if ne .menu.Params.hidden + true}} {{if hasPrefix $currentNode.Permalink .menu.Permalink }} {{ + $currentNode.Scratch.Set "NextPageOK" "OK" }} {{ + $currentNode.Scratch.Set "prevPage" ($currentNode.Scratch.Get + "prevPageTmp") }} {{else}} {{if eq ($currentNode.Scratch.Get + "NextPageOK") "OK"}} {{ $currentNode.Scratch.Set "NextPageOK" nil }} + {{ $currentNode.Scratch.Set "nextPage" .menu }} {{end}} {{end}} {{ + $currentNode.Scratch.Set "prevPageTmp" .menu }} {{ + $currentNode.Scratch.Set "pages" .menu.Pages }} {{ if .menu.IsHome}} + {{ $currentNode.Scratch.Set "pages" .menu.Sections }} {{ else if + .menu.Sections}} {{ $currentNode.Scratch.Set "pages" (.menu.Pages | + union .menu.Sections) }} {{end}} {{ $pages := + ($currentNode.Scratch.Get "pages") }} {{ range $pages.ByWeight }} {{ + template "menu-nextprev" dict "menu" . "currentnode" $currentNode }} + {{end}} {{ end }} {{ end }} {{with ($.Scratch.Get "prevPage")}} + <a + class="nav nav-prev" + href="{{.Permalink }}" + aria-label="Previous page" + ><i class="ti-arrow-left mr-2"></i> + <span class="d-none d-md-block">{{.Title}}</span></a + > + {{end}} {{with ($.Scratch.Get "nextPage")}} + <a + class="nav nav-next" + href="{{.Permalink }}" + aria-label="Previous page" + > + <span class="d-none d-md-block">{{.Title}}</span + ><i class="ti-arrow-right ml-2"></i + ></a> {{end}} </nav> </div> @@ -79,34 +82,31 @@ </div> </div> </section> -{{ "<!-- /details page -->" | safeHTML }} +<!-- /details page --> <!-- templates --> -{{ define "section-tree-nav" }} -{{ $showvisitedlinks := .showvisitedlinks }} -{{ $currentNode := .currentnode }} -{{with .sect}} -{{safeHTML .Params.head}} -{{ $fileUniqueID := "" }} -{{ with .File }}{{ $fileUniqueID = .UniqueID }}{{ end }} -{{ $currentNodeFileUniqueID := "" }} -{{ with $currentNode.File }}{{ $currentNodeFileUniqueID = .UniqueID }}{{ end }} -<li data-nav-id="{{.Permalink}}" title="{{.Title}}" class="sidelist - {{if eq $fileUniqueID $currentNodeFileUniqueID}}active{{end}}"> +{{ define "section-tree-nav" }} {{ $showvisitedlinks := .showvisitedlinks }} {{ +$currentNode := .currentnode }} {{with .sect}} {{safeHTML .Params.head}} {{ +$fileUniqueID := "" }} {{ with .File }}{{ $fileUniqueID = .UniqueID }}{{ end }} +{{ $currentNodeFileUniqueID := "" }} {{ with $currentNode.File }}{{ +$currentNodeFileUniqueID = .UniqueID }}{{ end }} +<li + data-nav-id="{{.Permalink}}" + title="{{.Title}}" + class="sidelist + {{if eq $fileUniqueID $currentNodeFileUniqueID}}active{{end}}" +> <a href="{{.Permalink}}"> - {{safeHTML .Params.Pre}}{{or .Params.menuTitle .LinkTitle .Title}}{{safeHTML .Params.Post}} + {{safeHTML .Params.Pre}}{{or .Params.menuTitle .LinkTitle .Title}}{{safeHTML + .Params.Post}} </a> - {{ $numberOfPages := (add (len .Pages) (len .Sections)) }} - {{ if ne $numberOfPages 0 }} - <ul> - {{ range .Pages.ByWeight }} - {{ if and .Params.hidden (not $.showhidden) }} - {{else}} - {{ template "section-tree-nav" dict "sect" . "currentnode" $currentNode }} - {{end}} - {{end}} - </ul> + {{ $numberOfPages := (add (len .Pages) (len .Sections)) }} {{ if ne + $numberOfPages 0 }} + <ul> + {{ range .Pages.ByWeight }} {{ if and .Params.hidden (not $.showhidden) }} + {{else}} {{ template "section-tree-nav" dict "sect" . "currentnode" + $currentNode }} {{end}} {{end}} + </ul> {{ end }} </li> -{{ end }} -{{ end }}
\ No newline at end of file +{{ end }} {{ end }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 75f7e01..bf3e0e6 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,22 +1,29 @@ -{{ "<!-- footer -->" | safeHTML }}
+<!-- footer -->
<footer class="section pb-4">
<div class="container">
<div class="row align-items-center">
<div class="col-md-8 text-md-left text-center">
- <p class="mb-md-0 mb-4">{{ .Site.Params.copyright | markdownify }}</p>
+ <p class="mb-md-0 mb-4">{{ .Site.Params.copyright | markdownify }}</p>
</div>
<div class="col-md-4 text-md-right text-center">
<ul class="list-inline">
{{ range .Site.Params.social }}
- <li class="list-inline-item"><a class="text-color d-inline-block p-2" href="{{ .link | safeURL }}" aria-label="{{ .name }}"><i class="{{ .icon }}"></i></a></li>
+ <li class="list-inline-item">
+ <a
+ class="text-color d-inline-block p-2"
+ href="{{ .link | safeURL }}"
+ aria-label="{{ .name }}"
+ ><i class="{{ .icon }}"></i
+ ></a>
+ </li>
{{ end }}
</ul>
</div>
</div>
</div>
</footer>
-{{ "<!-- /footer -->" | safeHTML }}
+<!-- /footer -->
-{{ "<!-- Main Script -->" | safeHTML }}
+<!-- Main Script -->
{{ $script := resources.Get "js/script.js" | minify}}
-<script src="{{ $script.Permalink }}"></script>
\ No newline at end of file +<script src="{{ $script.Permalink }}"></script>
diff --git a/layouts/partials/head.html b/layouts/partials/head.html index b808548..29140ed 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -1,93 +1,105 @@ <head> - <meta charset="utf-8"> + <meta charset="utf-8" /> <title>{{ .Title }}</title> - <meta name="viewport" content="width=device-width, initial-scale=1"/> + <meta name="viewport" content="width=device-width, initial-scale=1" /> {{ hugo.Generator }} - <meta name="description" content="{{ .Title }} - {{ .Site.Title }} "> - - {{ "<!-- ** CSS Plugins Needed for the Project ** -->" | safeHTML }} - - {{ "<!-- Bootstrap -->" | safeHTML }} - <link rel="stylesheet" href="{{ `plugins/bootstrap/bootstrap.min.css` | absURL }}"> + <meta name="description" content="{{ .Title }} - {{ .Site.Title }} " /> - {{ "<!-- themefy-icon -->" | safeHTML }} - <link rel="stylesheet" href="{{ `plugins/themify-icons/themify-icons.css` | absURL }}"> + <!-- ** CSS Plugins Needed for the Project ** --> + <!-- Bootstrap --> + <link + rel="stylesheet" + href="{{ `plugins/bootstrap/bootstrap.min.css` | absURL }}" + /> - {{ "<!--Favicon-->" | safeHTML }} - <link rel="icon" href="{{ `images/favicon.png` | absURL }}" type="image/x-icon"> + <!-- themefy-icon --> + <link + rel="stylesheet" + href="{{ `plugins/themify-icons/themify-icons.css` | absURL }}" + /> - {{ "<!-- fonts -->" | safeHTML }} - <link href="https://fonts.googleapis.com/css?family={{replace .Site.Params.font_family ' ' '+' | title}}:300,400,700&display=swap" rel="stylesheet"> + <!--Favicon--> + <link + rel="icon" + href="{{ `images/favicon.png` | absURL }}" + type="image/x-icon" + /> - {{ "<!-- PDF.js -->" | safeHTML }} + <!-- fonts --> + <link + href="https://fonts.googleapis.com/css?family={{replace .Site.Params.font_family ' ' '+' | title}}:300,400,700&display=swap" + rel="stylesheet" + /> + + <!-- PDF.js --> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.9.359/pdf.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.9.3/html2pdf.bundle.js"></script> - + <style> - :root{ - --primary-color:{{ .Site.Params.primary_color }}; - --body-color:{{ .Site.Params.body_color }}; - --text-color:{{ .Site.Params.text_color }}; - --text-color-dark:{{ .Site.Params.text_color_dark }}; - --white-color:{{ .Site.Params.white_color }}; - --light-color:{{ .Site.Params.light_color }}; - --font-family:{{ replace .Site.Params.font_family ' ' '+' | title }}; - } + :root{ + --primary-color:{{ .Site.Params.primary_color }}; + --body-color:{{ .Site.Params.body_color }}; + --text-color:{{ .Site.Params.text_color }}; + --text-color-dark:{{ .Site.Params.text_color_dark }}; + --white-color:{{ .Site.Params.white_color }}; + --light-color:{{ .Site.Params.light_color }}; + --font-family:{{ replace .Site.Params.font_family ' ' '+' | title }}; + } </style> -{{ "<!-- Main Stylesheet -->" | safeHTML }} -{{ $css := resources.Get "css/style.css" | minify }} -<link href="{{ $css.Permalink }}" rel="stylesheet" media="screen"/> - -{{ "<!-- ** JS Plugins Needed for the Project ** -->" | safeHTML }} + <!-- Main Stylesheet --> + {{ $css := resources.Get "css/style.css" | minify }} + <link href="{{ $css.Permalink }}" rel="stylesheet" media="screen" /> -{{ "<!-- jquiry -->" | safeHTML }} -<script src="{{ `plugins/jquery/jquery-1.12.4.js` | absURL }}"></script> + <!-- ** JS Plugins Needed for the Project ** --> + <!-- jquiry --> + <script src="{{ `plugins/jquery/jquery-1.12.4.js` | absURL }}"></script> -{{ "<!-- jquary ui -->" | safeHTML }} -<script src="{{ `plugins/jquery/jquery-ui.js`| absURL }}"></script> + <!-- jquary ui --> + <script src="{{ `plugins/jquery/jquery-ui.js`| absURL }}"></script> -{{ "<!-- Bootstrap JS -->" | safeHTML }} -<script src="{{ `plugins/bootstrap/bootstrap.min.js` | absURL }}"></script> + <!-- Bootstrap JS --> + <script src="{{ `plugins/bootstrap/bootstrap.min.js` | absURL }}"></script> -{{ "<!-- match-height JS -->" | safeHTML }} -<script src="{{ `plugins/match-height/jquery.matchHeight-min.js` | absURL }}"></script> - -{{ template "_internal/google_analytics.html" . }} - -{{ if templates.Exists ( printf "partials/overrides/header.html" ) }} - {{ partial "partials/overrides/header.html" . }} -{{ else }} - {{ "<!-- create /layouts/partials/overrides/header.html in your own theme or root directory to add your custom content here -->" | safeHTML }} -{{ end }} + <!-- match-height JS --> + <script src="{{ `plugins/match-height/jquery.matchHeight-min.js` | absURL }}"></script> + {{ template "_internal/google_analytics.html" . }} {{ if templates.Exists ( + printf "partials/overrides/header.html" ) }} {{ partial + "partials/overrides/header.html" . }} {{ else }} + <!-- create /layouts/partials/overrides/header.html in your own theme or root directory to add your custom content here --> + {{ end }} -<!-- Open Graph image and Twitter Card metadata --> -{{ $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 }} + <!-- Open Graph image and Twitter Card metadata --> + {{ $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 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 }} + {{ 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:type" content="image/{{ if eq $image_ext `svg` }}svg+xml{{ else }}{{ replaceRE `^jpg$` `jpeg` $image_ext }}{{ end }}"> -{{ end }} -<meta name="twitter:title" content="{{ .Title }}"/> -<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 }} - -{{ template "_internal/opengraph.html" . }} -{{ template "_internal/twitter_cards.html" . }} - + <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="{{ .Title }}" /> + <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 }} {{ template "_internal/opengraph.html" . }} {{ template + "_internal/twitter_cards.html" . }} </head> |