code formatting

This commit is contained in:
Somrat 2022-01-30 11:10:45 +06:00
parent fa2d300c90
commit def0a392a5
9 changed files with 320 additions and 267 deletions

View file

@ -858,7 +858,7 @@ pre code::-webkit-scrollbar-thumb {
margin-bottom: 0; margin-bottom: 0;
} }
.code-tabs .tab-content .tab-pane{ .code-tabs .tab-content .tab-pane {
margin-bottom: 0; margin-bottom: 0;
} }

View file

@ -4,21 +4,21 @@
<body> <body>
{{ if .IsHome }} {{ if .IsHome }}
{{ "<!-- header -->" | safeHTML }} <!-- 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 }}"> <header
{{ partial "navigation.html" . }} class="banner {{if .Site.Params.banner.bg_image}}overlay bg-cover{{else}}bg-primary{{end}}"
{{ partialCached "banner.html" . }} data-background="{{ .Site.Params.banner.bg_image | absURL }}"
>
{{ partial "navigation.html" . }} {{ partialCached "banner.html" . }}
</header> </header>
{{ "<!-- /header -->" | safeHTML }} <!-- /header -->
{{ else }} {{ else }}
{{ "<!-- header -->" | safeHTML }} <!-- header -->
<header class="shadow-bottom sticky-top bg-white"> <header class="shadow-bottom sticky-top bg-white">
{{ partial "navigation.html" . }} {{ partial "navigation.html" . }}
</header> </header>
{{ "<!-- /header -->" | safeHTML }} <!-- /header -->
{{ end }} {{ end }} {{ block "main" . }}{{ end }}
{{ block "main" . }}{{ end }}
{{ partialCached "footer.html" . }} {{ partialCached "footer.html" . }}
</body> </body>
</html> </html>

View file

@ -1,25 +1,51 @@
{{ define "main" }} {{ define "main" }}
{{ "<!-- contact -->" | safeHTML }} <!-- contact -->
<section class="section"> <section class="section">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<h2 class="section-title text-primary">{{ .Title }}</h2> <h2 class="section-title text-primary">{{ .Title }}</h2>
{{ .Content }} {{ .Content }}
<form action="{{ .Site.Params.contact_form_action | safeURL }}" method="POST"> <form
<input type="text" id="name" name="name" placeholder="Name" class="form-control mb-4 shadow rounded-0"> action="{{ .Site.Params.contact_form_action | safeURL }}"
<input type="email" id="mail" name="mail" placeholder="Email" class="form-control mb-4 shadow rounded-0"> method="POST"
<input type="text" id="subject" name="subject" placeholder="Subject" >
class="form-control mb-4 shadow rounded-0"> <input
<textarea name="message" id="message" placeholder="Message" type="text"
class="form-control mb-4 shadow rounded-0"></textarea> id="name"
<button type="submit" value="send" class="btn btn-primary">{{ i18n "send" }}</button> 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> </form>
</div> </div>
</div> </div>
</div> </div>
</section> </section>
{{ "<!-- /contact -->" | safeHTML }} <!-- /contact -->
{{ end }} {{ end }}

View file

@ -1,20 +1,16 @@
{{ define "main" }} {{ define "main" }} {{ $data := index .Site.Data .Site.Language.Lang }}
<!-- faq -->
{{ $data := index .Site.Data .Site.Language.Lang }} <section class="section pb-0">
{{ "<!-- faq -->" | safeHTML }} <div class="container">
<section class="section pb-0"> <div class="row">
<div class="container"> <div class="col-12">
<div class="row">
<div class="col-12">
<h2 class="section-title text-primary">{{ .Title }}</h2> <h2 class="section-title text-primary">{{ .Title }}</h2>
{{ "<!-- accordion -->" | safeHTML }} <!-- accordion -->
<div id="accordion"> <div id="accordion">{{ .Content }}</div>
{{ .Content }}
</div>
</div>
</div> </div>
</div> </div>
</section> </div>
{{ "<!-- /faq -->" | safeHTML }} </section>
<!-- /faq -->
{{ end }} {{ end }}

View file

@ -1,56 +1,61 @@
{{ define "main" }} {{ define "main" }}
{{ if .Content }} {{ if .Content }}
<section class="section text-center pb-0"> <section class="section text-center pb-0">
<div class="container"> <div class="container">
{{ .Content }} {{ .Content }}
</div> </div>
</section> </section>
{{ end }} {{ end }}
{{ "<!-- topics -->" | safeHTML }}
<!-- topics -->
<section class="section"> <section class="section">
<div class="container"> <div class="container">
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col-12 text-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> </div>
{{ "<!-- topic-item -->" | safeHTML }} <!-- topic-item -->
{{ range (where .Site.Pages "Type" "docs") }} {{ range (where .Site.Pages "Type" "docs") }}
<div class="col-lg-4 col-sm-6 mb-4"> <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"> <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}} {{ with .Params.icon}}
<h3 class="mb-3 mt-0">{{ .Title }}</h3> <i class="{{.}} icon text-primary d-block mb-4"></i>
{{with .Params.description}}<p class="mb-0">{{. | markdownify}}</p>{{end}} {{end}}
</a> <h3 class="mb-3 mt-0">{{ .Title }}</h3>
</div> {{with .Params.description}}
<p class="mb-0">{{. | markdownify}}</p>
{{end}}
</a>
</div>
{{ end }} {{ end }}
</div> </div>
</div> </div>
</section> </section>
{{ "<!-- /topics -->" | safeHTML }} <!-- /topics -->
{{ if .Site.Params.cta.enable }} {{ if .Site.Params.cta.enable }}
{{ with .Site.Params.cta }} {{ with .Site.Params.cta }}
{{ "<!-- call to action -->" | safeHTML }} <!-- call to action -->
<section> <section>
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<div class="section px-3 bg-white shadow text-center"> <div class="section px-3 bg-white shadow text-center">
<h2 class="mb-4">{{ .title | markdownify }}</h2> <h2 class="mb-4">{{ .title | markdownify }}</h2>
<p class="mb-4">{{ .content | markdownify }}</p> <p class="mb-4">{{ .content | markdownify }}</p>
{{ if .button.enable }} {{ if .button.enable }}
{{ with .button }} {{ with .button }}
<a href="{{ .link | relLangURL }}" class="btn btn-primary">{{ .label }}</a> <a href="{{ .link | relLangURL }}" class="btn btn-primary">{{ .label }}</a>
{{ end }} {{ end }}
{{ end }} {{ end }}
</div>
</div>
</div> </div>
</div> </div>
</div> </section>
</div> <!-- /call to action -->
</section> {{ end }}
{{ "<!-- /call to action -->" | safeHTML }}
{{ end }}
{{ end }} {{ end }}
{{ end }} {{ end }}

View file

@ -1,39 +1,46 @@
{{ "<!-- banner -->" | safeHTML }} <!-- banner -->
<div class="container section"> <div class="container section">
<div class="row"> <div class="row">
<div class="col-lg-8 text-center mx-auto"> <div class="col-lg-8 text-center mx-auto">
<h1 class="text-white mb-3">{{ .Site.Params.banner.title | markdownify }}</h1> <h1 class="text-white mb-3">
<p class="text-white mb-4">{{ .Site.Params.banner.subtitle | markdownify }}</p> {{ .Site.Params.banner.title | markdownify }}
<div class="position-relative"> </h1>
<input id="search" class="form-control" placeholder="{{ .Site.Params.banner.placeholder }}"> <p class="text-white mb-4">
<i class="ti-search search-icon"></i> {{ .Site.Params.banner.subtitle | markdownify }}
<!-- Javascript --> </p>
{{ $currentNode := . }} <div class="position-relative">
{{ $currentNode.Scratch.Set "pages" .Site.Pages }} <input
{{ $pages := ($currentNode.Scratch.Get "pages") }} id="search"
<script> class="form-control"
$(function() { placeholder="{{ .Site.Params.banner.placeholder }}"
var projects = [ />
{{ range $pages }} <i class="ti-search search-icon"></i>
{ <!-- Javascript -->
value: "{{ .Title }}", {{ $currentNode := . }} {{ $currentNode.Scratch.Set "pages" .Site.Pages
label: "<p>{{.Plain}}</p>{{range.Params.Keywords}}<p>{{.}}</p>{{end}}", }} {{ $pages := ($currentNode.Scratch.Get "pages") }}
url:"{{ .Permalink }}" <script>
}, $(function() {
{{ end }} var projects = [
]; {{ range $pages }}
$( "#search" ).autocomplete({ {
source: projects value: "{{ .Title }}",
}) label: "<p>{{.Plain}}</p>{{range.Params.Keywords}}<p>{{.}}</p>{{end}}",
.data( "ui-autocomplete" )._renderItem = function( ul, item ) { url:"{{ .Permalink }}"
return $( "<li>" ) },
.append( "<a href=" + item.url + " + \" &quot;\" + >" + item.value + "</a>" + item.label ) {{ end }}
.appendTo( ul ); ];
}; $( "#search" ).autocomplete({
}); source: projects
</script> })
</div> .data( "ui-autocomplete" )._renderItem = function( ul, item ) {
</div> return $( "<li>" )
</div> .append( "<a href=" + item.url + " + \" &quot;\" + >" + item.value + "</a>" + item.label )
.appendTo( ul );
};
});
</script>
</div>
</div>
</div>
</div> </div>
{{ "<!-- /banner -->" | safeHTML }} <!-- /banner -->

View file

@ -1,24 +1,26 @@
{{ "<!-- details page -->" | safeHTML }} <!-- details page -->
<section class="single section-sm pb-0"> <section class="single section-sm pb-0">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-lg-3"> <div class="col-lg-3">
<div class="sidebar"> <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"> <ul class="list-styled">
{{ $currentNode := . }} {{ $currentNode := . }} {{range .Site.Home.Sections.ByWeight}} {{ if
{{range .Site.Home.Sections.ByWeight}} eq .FirstSection $currentNode.FirstSection }} {{ template
{{ if eq .FirstSection $currentNode.FirstSection }} "section-tree-nav" dict "sect" . "currentnode" $currentNode}} {{ end
{{ template "section-tree-nav" dict "sect" . "currentnode" $currentNode}} }} {{ end }} {{ if .Content }} {{ if eq .Params.downloadBtn "true"
{{ end }} }}
{{ end }} <div>
{{ if .Content }} <button class="btn btn-primary btn-block" id="generatePDF">
{{ if eq .Params.downloadBtn "true" }} Get Pdf
<div> </button>
<button class="btn btn-primary btn-block" id="generatePDF" > Get Pdf </button> </div>
</div> {{ end }} {{ end }}
{{ end }}
{{ end }}
</ul> </ul>
</div> </div>
</div> </div>
@ -30,48 +32,49 @@
{{ else }} {{ else }}
<div class="bg-light p-4"> <div class="bg-light p-4">
<ul class="page-list"> <ul class="page-list">
{{ template "section-tree-nav" dict "sect" . "currentnode" $currentNode }} {{ template "section-tree-nav" dict "sect" . "currentnode"
$currentNode }}
</ul> </ul>
</div> </div>
{{ end }} {{ 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"> <nav class="pagination mt-3">
<!-- Next prev page --> <!-- Next prev page -->
{{ $currentNode := . }} {{ $currentNode := . }} {{ template "menu-nextprev" dict "menu"
{{ template "menu-nextprev" dict "menu" .Site.Home "currentnode" $currentNode }} .Site.Home "currentnode" $currentNode }} {{ define "menu-nextprev"
{{ define "menu-nextprev" }} }} {{$currentNode := .currentnode }} {{ if ne .menu.Params.hidden
{{$currentNode := .currentnode }} true}} {{if hasPrefix $currentNode.Permalink .menu.Permalink }} {{
{{ if ne .menu.Params.hidden true}} $currentNode.Scratch.Set "NextPageOK" "OK" }} {{
{{if hasPrefix $currentNode.Permalink .menu.Permalink }} $currentNode.Scratch.Set "prevPage" ($currentNode.Scratch.Get
{{ $currentNode.Scratch.Set "NextPageOK" "OK" }} "prevPageTmp") }} {{else}} {{if eq ($currentNode.Scratch.Get
{{ $currentNode.Scratch.Set "prevPage" ($currentNode.Scratch.Get "prevPageTmp") }} "NextPageOK") "OK"}} {{ $currentNode.Scratch.Set "NextPageOK" nil }}
{{else}} {{ $currentNode.Scratch.Set "nextPage" .menu }} {{end}} {{end}} {{
{{if eq ($currentNode.Scratch.Get "NextPageOK") "OK"}} $currentNode.Scratch.Set "prevPageTmp" .menu }} {{
{{ $currentNode.Scratch.Set "NextPageOK" nil }} $currentNode.Scratch.Set "pages" .menu.Pages }} {{ if .menu.IsHome}}
{{ $currentNode.Scratch.Set "nextPage" .menu }} {{ $currentNode.Scratch.Set "pages" .menu.Sections }} {{ else if
{{end}} .menu.Sections}} {{ $currentNode.Scratch.Set "pages" (.menu.Pages |
{{end}} union .menu.Sections) }} {{end}} {{ $pages :=
{{ $currentNode.Scratch.Set "prevPageTmp" .menu }} ($currentNode.Scratch.Get "pages") }} {{ range $pages.ByWeight }} {{
template "menu-nextprev" dict "menu" . "currentnode" $currentNode }}
{{ $currentNode.Scratch.Set "pages" .menu.Pages }} {{end}} {{ end }} {{ end }} {{with ($.Scratch.Get "prevPage")}}
{{ if .menu.IsHome}} <a
{{ $currentNode.Scratch.Set "pages" .menu.Sections }} class="nav nav-prev"
{{ else if .menu.Sections}} href="{{.Permalink }}"
{{ $currentNode.Scratch.Set "pages" (.menu.Pages | union .menu.Sections) }} aria-label="Previous page"
{{end}} ><i class="ti-arrow-left mr-2"></i>
{{ $pages := ($currentNode.Scratch.Get "pages") }} <span class="d-none d-md-block">{{.Title}}</span></a
>
{{ range $pages.ByWeight }} {{end}} {{with ($.Scratch.Get "nextPage")}}
{{ template "menu-nextprev" dict "menu" . "currentnode" $currentNode }} <a
{{end}} class="nav nav-next"
{{ end }} href="{{.Permalink }}"
{{ end }} aria-label="Previous page"
>
{{with ($.Scratch.Get "prevPage")}} <span class="d-none d-md-block">{{.Title}}</span
<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> ><i class="ti-arrow-right ml-2"></i
{{end}} ></a>
{{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}} {{end}}
</nav> </nav>
</div> </div>
@ -79,34 +82,31 @@
</div> </div>
</div> </div>
</section> </section>
{{ "<!-- /details page -->" | safeHTML }} <!-- /details page -->
<!-- templates --> <!-- templates -->
{{ define "section-tree-nav" }} {{ define "section-tree-nav" }} {{ $showvisitedlinks := .showvisitedlinks }} {{
{{ $showvisitedlinks := .showvisitedlinks }} $currentNode := .currentnode }} {{with .sect}} {{safeHTML .Params.head}} {{
{{ $currentNode := .currentnode }} $fileUniqueID := "" }} {{ with .File }}{{ $fileUniqueID = .UniqueID }}{{ end }}
{{with .sect}} {{ $currentNodeFileUniqueID := "" }} {{ with $currentNode.File }}{{
{{safeHTML .Params.head}} $currentNodeFileUniqueID = .UniqueID }}{{ end }}
{{ $fileUniqueID := "" }} <li
{{ with .File }}{{ $fileUniqueID = .UniqueID }}{{ end }} data-nav-id="{{.Permalink}}"
{{ $currentNodeFileUniqueID := "" }} title="{{.Title}}"
{{ with $currentNode.File }}{{ $currentNodeFileUniqueID = .UniqueID }}{{ end }} class="sidelist
<li data-nav-id="{{.Permalink}}" title="{{.Title}}" class="sidelist {{if eq $fileUniqueID $currentNodeFileUniqueID}}active{{end}}"
{{if eq $fileUniqueID $currentNodeFileUniqueID}}active{{end}}"> >
<a href="{{.Permalink}}"> <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> </a>
{{ $numberOfPages := (add (len .Pages) (len .Sections)) }} {{ $numberOfPages := (add (len .Pages) (len .Sections)) }} {{ if ne
{{ if ne $numberOfPages 0 }} $numberOfPages 0 }}
<ul> <ul>
{{ range .Pages.ByWeight }} {{ range .Pages.ByWeight }} {{ if and .Params.hidden (not $.showhidden) }}
{{ if and .Params.hidden (not $.showhidden) }} {{else}} {{ template "section-tree-nav" dict "sect" . "currentnode"
{{else}} $currentNode }} {{end}} {{end}}
{{ template "section-tree-nav" dict "sect" . "currentnode" $currentNode }} </ul>
{{end}}
{{end}}
</ul>
{{ end }} {{ end }}
</li> </li>
{{ end }} {{ end }} {{ end }}
{{ end }}

View file

@ -1,22 +1,29 @@
{{ "<!-- footer -->" | safeHTML }} <!-- footer -->
<footer class="section pb-4"> <footer class="section pb-4">
<div class="container"> <div class="container">
<div class="row align-items-center"> <div class="row align-items-center">
<div class="col-md-8 text-md-left text-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>
<div class="col-md-4 text-md-right text-center"> <div class="col-md-4 text-md-right text-center">
<ul class="list-inline"> <ul class="list-inline">
{{ range .Site.Params.social }} {{ 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 }} {{ end }}
</ul> </ul>
</div> </div>
</div> </div>
</div> </div>
</footer> </footer>
{{ "<!-- /footer -->" | safeHTML }} <!-- /footer -->
{{ "<!-- Main Script -->" | safeHTML }} <!-- Main Script -->
{{ $script := resources.Get "js/script.js" | minify}} {{ $script := resources.Get "js/script.js" | minify}}
<script src="{{ $script.Permalink }}"></script> <script src="{{ $script.Permalink }}"></script>

View file

@ -1,93 +1,105 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8" />
<title>{{ .Title }}</title> <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 }} {{ hugo.Generator }}
<meta name="description" content="{{ .Title }} - {{ .Site.Title }} "> <meta name="description" content="{{ .Title }} - {{ .Site.Title }} " />
{{ "<!-- ** CSS Plugins Needed for the Project ** -->" | safeHTML }} <!-- ** CSS Plugins Needed for the Project ** -->
<!-- Bootstrap -->
<link
rel="stylesheet"
href="{{ `plugins/bootstrap/bootstrap.min.css` | absURL }}"
/>
{{ "<!-- Bootstrap -->" | safeHTML }} <!-- themefy-icon -->
<link rel="stylesheet" href="{{ `plugins/bootstrap/bootstrap.min.css` | absURL }}"> <link
rel="stylesheet"
href="{{ `plugins/themify-icons/themify-icons.css` | absURL }}"
/>
{{ "<!-- themefy-icon -->" | safeHTML }} <!--Favicon-->
<link rel="stylesheet" href="{{ `plugins/themify-icons/themify-icons.css` | absURL }}"> <link
rel="icon"
href="{{ `images/favicon.png` | absURL }}"
type="image/x-icon"
/>
{{ "<!--Favicon-->" | safeHTML }} <!-- fonts -->
<link rel="icon" href="{{ `images/favicon.png` | absURL }}" type="image/x-icon"> <link
href="https://fonts.googleapis.com/css?family={{replace .Site.Params.font_family ' ' '+' | title}}:300,400,700&display=swap"
rel="stylesheet"
/>
{{ "<!-- fonts -->" | safeHTML }} <!-- PDF.js -->
<link href="https://fonts.googleapis.com/css?family={{replace .Site.Params.font_family ' ' '+' | title}}:300,400,700&display=swap" rel="stylesheet">
{{ "<!-- PDF.js -->" | safeHTML }}
<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/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> <script src="https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.9.3/html2pdf.bundle.js"></script>
<style> <style>
:root{ :root{
--primary-color:{{ .Site.Params.primary_color }}; --primary-color:{{ .Site.Params.primary_color }};
--body-color:{{ .Site.Params.body_color }}; --body-color:{{ .Site.Params.body_color }};
--text-color:{{ .Site.Params.text_color }}; --text-color:{{ .Site.Params.text_color }};
--text-color-dark:{{ .Site.Params.text_color_dark }}; --text-color-dark:{{ .Site.Params.text_color_dark }};
--white-color:{{ .Site.Params.white_color }}; --white-color:{{ .Site.Params.white_color }};
--light-color:{{ .Site.Params.light_color }}; --light-color:{{ .Site.Params.light_color }};
--font-family:{{ replace .Site.Params.font_family ' ' '+' | title }}; --font-family:{{ replace .Site.Params.font_family ' ' '+' | title }};
} }
</style> </style>
{{ "<!-- Main Stylesheet -->" | safeHTML }} <!-- Main Stylesheet -->
{{ $css := resources.Get "css/style.css" | minify }} {{ $css := resources.Get "css/style.css" | minify }}
<link href="{{ $css.Permalink }}" rel="stylesheet" media="screen"/> <link href="{{ $css.Permalink }}" rel="stylesheet" media="screen" />
{{ "<!-- ** JS Plugins Needed for the Project ** -->" | safeHTML }} <!-- ** JS Plugins Needed for the Project ** -->
<!-- jquiry -->
<script src="{{ `plugins/jquery/jquery-1.12.4.js` | absURL }}"></script>
{{ "<!-- jquiry -->" | safeHTML }} <!-- jquary ui -->
<script src="{{ `plugins/jquery/jquery-1.12.4.js` | absURL }}"></script> <script src="{{ `plugins/jquery/jquery-ui.js`| absURL }}"></script>
{{ "<!-- jquary ui -->" | safeHTML }} <!-- Bootstrap JS -->
<script src="{{ `plugins/jquery/jquery-ui.js`| absURL }}"></script> <script src="{{ `plugins/bootstrap/bootstrap.min.js` | absURL }}"></script>
{{ "<!-- Bootstrap JS -->" | safeHTML }} <!-- match-height JS -->
<script src="{{ `plugins/bootstrap/bootstrap.min.js` | absURL }}"></script> <script src="{{ `plugins/match-height/jquery.matchHeight-min.js` | absURL }}"></script>
{{ "<!-- match-height JS -->" | safeHTML }} {{ template "_internal/google_analytics.html" . }} {{ if templates.Exists (
<script src="{{ `plugins/match-height/jquery.matchHeight-min.js` | absURL }}"></script> printf "partials/overrides/header.html" ) }} {{ partial
"partials/overrides/header.html" . }} {{ else }}
{{ template "_internal/google_analytics.html" . }} <!-- create /layouts/partials/overrides/header.html in your own theme or root directory to add your custom content here -->
{{ 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 }}
<!-- 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 }}
{{ 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" . }}
<!-- 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 }} {{ 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> </head>