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

github.com/vjeantet/hugo-theme-docport.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvjeantet <valere.jeantet@gmail.com>2020-07-18 14:24:15 +0300
committervjeantet <valere.jeantet@gmail.com>2020-07-18 14:24:15 +0300
commit55ed6b898bb2adbee30027b00149b37ddbf3b71b (patch)
treed40f830734b8fd022e8db4afe40e59da94ff9cb5 /layouts/partials
parent414d3caaebfcee5a35a3aa53ad64cf9a268612b0 (diff)
init
Diffstat (limited to 'layouts/partials')
-rw-r--r--layouts/partials/_common/content.html78
-rw-r--r--layouts/partials/_common/menu.html79
-rw-r--r--layouts/partials/_common/next-prev-page.html57
-rw-r--r--layouts/partials/_common/pagination.html9
-rw-r--r--layouts/partials/body-aftercontent.html55
-rw-r--r--layouts/partials/body-beforecontent.html66
-rw-r--r--layouts/partials/body-header.html10
-rw-r--r--layouts/partials/custom-footer.html0
-rw-r--r--layouts/partials/custom-menu-footer.html0
-rw-r--r--layouts/partials/html-head.html62
10 files changed, 416 insertions, 0 deletions
diff --git a/layouts/partials/_common/content.html b/layouts/partials/_common/content.html
new file mode 100644
index 0000000..437888f
--- /dev/null
+++ b/layouts/partials/_common/content.html
@@ -0,0 +1,78 @@
+ <section class="page {{.Params.layout }}">
+{{if not .IsHome}}
+ <!-- FIL D'ARIANE -->
+ {{if not .Params.layout }}
+ <nav id="breadcrumb" aria-label="breadcrumb">
+ <ol class="breadcrumb">
+ {{ template "breadcrumbnav" (dict "p1" . "p2" .) }}
+ </ol>
+ </nav>
+ {{end}}
+ <!-- FIN FIL D'ARIANE -->
+
+ {{if not .Params.layout }}
+ <h1>{{.CurrentSection.Title}}
+ {{if ne .CurrentSection.Title .Title}}<span>{{.Title}}</span>{{end}}
+ </h1>
+ {{ if gt (len .CurrentSection.Pages) 0}}
+ {{- $cPage := . }}
+ <nav class="subpages">
+ {{- range .CurrentSection.Pages.ByWeight }}
+ {{- if not .Params.hidden }}
+ {{- if eq .Kind "page" }}
+ <li {{if eq . $cPage}}class="active"{{- end}}>
+ <a title="{{.Title}}" href="{{ .RelPermalink}}">{{safeHTML .Params.Pre}}{{.Title}}{{safeHTML .Params.Post}}</a>
+ </li>
+ {{- end}}
+ {{- end}}
+ {{- end}}
+ </nav>
+ {{end}}
+ {{else}}
+ <h1>{{.Title}}</h1>
+ {{end}}
+{{end}}
+ <div class="content">
+ {{- with .Content -}}
+ {{ . | replaceRE "(<h[1-9]) id=\"([^\"]+)\"(.+)(</h[1-9]+>)" `${1}${3}${4}<a class="anchor" id="${2}"></a>` | safeHTML }}
+ {{- end -}}
+ </div>
+
+
+ <div class="chevrons {{.Params.layout}}">
+ {{ partial "_common/next-prev-page.html" .CurrentSection }}
+ </div>
+
+ </section>
+
+ <!-- NAVIGATION DROITE TOC -->
+ <section class="right-menu {{.Params.layout }}">
+
+ <div class="actions">
+
+ </div>
+
+ <div class="TableOfContents">
+ <label>Table of contents</label>
+ <nav>
+ <ul >
+ <li><a href="{{ .RelPermalink }}">{{.Title}}</a></li>
+ </ul>
+ </nav>
+ {{ .TableOfContents }}
+ </div>
+ </section>
+ <!-- FIN NAVIGATION DROITE TOC -->
+
+{{ define "breadcrumbnav" }}
+ {{ if .p1.Parent }}
+ {{ template "breadcrumbnav" (dict "p1" .p1.Parent "p2" .p2 ) }}
+ {{ else if not .p1.IsHome }}
+ {{ template "breadcrumbnav" (dict "p1" .p1.Site.Home "p2" .p2 ) }}
+ {{ end }}
+ <li class="breadcrumb-item {{ if eq .p1 .p2 }}active{{ end }}">
+ {{ if ne .p1 .p2 }}<a class="text-link" href="{{ .p1.RelPermalink }}">{{ end }}
+ {{ .p1.Title }}
+ {{ if ne .p1 .p2 }}</a>{{ end }}
+ </li>
+{{ end }} \ No newline at end of file
diff --git a/layouts/partials/_common/menu.html b/layouts/partials/_common/menu.html
new file mode 100644
index 0000000..1ffb499
--- /dev/null
+++ b/layouts/partials/_common/menu.html
@@ -0,0 +1,79 @@
+{{- $currentNode := . }}
+
+{{- if eq .Site.Params.ordersectionsby "title"}}
+ {{- range .Site.Home.Sections.ByTitle}}
+ {{- template "section-tree-nav" dict "sect" . "currentnode" $currentNode "level" 0}}
+ {{- end}}
+{{- else}}
+ {{- range .Site.Home.Sections.ByWeight}}
+ {{- template "section-tree-nav" dict "sect" . "currentnode" $currentNode "level" 0}}
+ {{- end}}
+{{- end}}
+
+<!-- templates -->
+{{- define "section-tree-nav" }}
+{{- $currentNode := .currentnode }}
+{{- $level := .level }}
+ {{- with .sect}}
+ {{- if and .IsSection (or (not .Params.hidden) $.showhidden)}}
+ {{- $numberOfPages := (len .Sections) }}
+ {{- safeHTML .Params.head}}
+ <li data-nav-id="{{.Permalink}}" class="dd-item
+ {{- if .IsAncestor $currentNode}} parent{{end}}
+ {{- if eq .CurrentSection $currentNode.CurrentSection}} active{{end}}
+ {{- if .Params.alwaysopen}} alwaysopen{{end -}}
+ {{- if ne $numberOfPages 0 }} haschildren{{end}}
+ item_level_$level
+ ">
+
+ {{if gt $level 0 }}
+ <a href="{{ .RelPermalink}}">{{safeHTML .Params.Pre}}{{.Title}}{{safeHTML .Params.Post}}</a>
+ {{end}}
+
+ {{- if ne $numberOfPages 0 }}
+ {{- if or (.IsAncestor $currentNode) (.Params.alwaysopen) }}
+ <i class="material-icons ddexp keyboard_arrow_down"></i>
+ {{- else -}}
+ <i class="material-icons ddexp keyboard_arrow_right"></i>
+ {{- end}}
+ {{- end}}
+
+ {{if eq $level 0 }}
+ <a href="{{ .RelPermalink}}">{{safeHTML .Params.Pre}}{{.Title}}{{safeHTML .Params.Post}}</a>
+ {{end}}
+
+
+
+ {{- if ne $numberOfPages 0 }}
+ <ul>
+ {{- .Scratch.Set "pages" .Pages }}
+ {{- if .Sections}}
+ {{- .Scratch.Set "pages" (.Pages | union .Sections) }}
+ {{- end}}
+ {{- $pages := (.Scratch.Get "pages") }}
+
+ {{- if eq .Site.Params.ordersectionsby "title"}}
+ {{- range $pages.ByTitle }}
+ {{- if and .Params.hidden (not $.showhidden) }}
+ {{- else}}
+ {{ if eq .Kind "section"}}
+ {{- template "section-tree-nav" dict "sect" . "currentnode" $currentNode "level" (add $level 1)}}
+ {{- end}}
+ {{- end}}
+ {{- end}}
+ {{- else}}
+ {{- range $pages.ByWeight }}
+ {{- if and .Params.hidden (not $.showhidden) }}
+ {{- else}}
+ {{ if eq .Kind "section"}}
+ {{- template "section-tree-nav" dict "sect" . "currentnode" $currentNode "level" (add $level 1)}}
+ {{- end}}
+ {{- end}}
+ {{- end}}
+ {{- end}}
+ </ul>
+ {{- end}}
+ </li>
+ {{- end}}
+ {{- end}}
+{{- end}}
diff --git a/layouts/partials/_common/next-prev-page.html b/layouts/partials/_common/next-prev-page.html
new file mode 100644
index 0000000..f7ec44e
--- /dev/null
+++ b/layouts/partials/_common/next-prev-page.html
@@ -0,0 +1,57 @@
+<!-- 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.Sections -}}
+ {{- if .menu.IsHome -}}
+ {{- $currentNode.Scratch.Set "pages" .menu.Sections -}}
+ {{- else if .menu.Sections -}}
+ {{- $currentNode.Scratch.Set "pages" .menu.Sections -}}
+ {{- end -}}
+ {{- $pages := ($currentNode.Scratch.Get "pages") -}}
+
+ {{- range $pages.ByWeight -}}
+ {{- template "menu-nextprev" dict "menu" . "currentnode" $currentNode -}}
+ {{- end -}}
+ {{- end -}}
+{{- end -}}
+
+
+{{- if not $.Site.Params.disableNavChevron -}}
+ {{- with ($.Scratch.Get "prevPage") -}}
+ <a class="prev" href="{{.RelPermalink}}" title="{{.Title}}">
+ <i class="material-icons">arrow_back</i>
+ <div>
+ <p>Previous page :</p>
+ <label>{{.Title}}</label>
+ </div>
+
+ </a>
+
+ {{ end -}}
+ {{- with ($.Scratch.Get "nextPage") -}}
+ <a class="next" href="{{.RelPermalink}}" title="{{.Title}}" style="margin-right: 0px;">
+ <div>
+ <p>Next page :</p>
+ <label>{{.Title}}</label>
+ </div>
+ <i class="material-icons">arrow_forward</i></a>
+ {{- end }}
+{{- end -}}
+
+
diff --git a/layouts/partials/_common/pagination.html b/layouts/partials/_common/pagination.html
new file mode 100644
index 0000000..cfa538a
--- /dev/null
+++ b/layouts/partials/_common/pagination.html
@@ -0,0 +1,9 @@
+<nav class="pagination" role="navigation">
+ {{if .HasPrev}}
+ <a class="newer-posts" href="{{ .Prev.RelPermalink }}">&larr; {{T "Previous-Pages"}}</a>
+ {{end}}
+ <span class="page-number">{{T "Page"}} {{ .PageNumber }} {{T "pagination-on"}} {{.TotalPages}}</span>
+ {{if .HasNext}}
+ <a class="older-posts" href="{{ .Next.RelPermalink }}">{{T "Next-Pages"}} &rarr;</a>
+ {{end}}
+</nav>
diff --git a/layouts/partials/body-aftercontent.html b/layouts/partials/body-aftercontent.html
new file mode 100644
index 0000000..ced269a
--- /dev/null
+++ b/layouts/partials/body-aftercontent.html
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+
+</article>
+
+<footer>
+
+ <div class="footline" style="display:none">
+ {{if .Params.tags }}
+ <div class="tags">
+ {{ range $index, $tag := .Params.tags }}
+ <a class="label label-default" href="{{$.Site.BaseURL}}tags/{{ $tag | urlize }}">{{ $tag }}</a>
+ {{ end }}
+ </div>
+ {{end}}
+
+ {{with .Params.LastModifierDisplayName}}
+ <div class="author">
+ <i class='fa fa-user'></i> <a href="mailto:{{ $.Params.LastModifierEmail }}">{{ . }}</a>
+ </div>
+ {{end}}
+
+ {{ if not .Page.Lastmod.IsZero }}
+ <div class="date">
+ <i class='fa fa-calendar'></i> {{T "last-update-on"}} {{ .Page.Lastmod.Format "02/01/2006" }}
+ </div>
+ {{end}}
+
+ {{ if .Site.Params.editURL }}
+ <div class="github-link">
+ <a href="{{ .Site.Params.editURL }}{{with .File}}{{ replace .Dir "\\" "/" }}{{ .File.LogicalName }}{{end}}" target="blank"><i class="fa fa-code-fork"></i>
+ {{T "Edit-this-page"}}</a>
+ </div>
+ {{end}}
+ </div>
+
+
+{{ $footer := print "_footer." .Lang }}
+{{ range where .Site.Pages "File.BaseFileName" $footer }}
+ {{ .Content }}
+{{else}}
+ {{ if .Site.GetPage "page" "_footer.md" }}
+ {{(.Site.GetPage "page" "_footer.md").Content}}
+ {{else}}
+ {{ T "create-footer-md" }}
+ {{end}}
+{{end}}
+
+</footer>
+
+
diff --git a/layouts/partials/body-beforecontent.html b/layouts/partials/body-beforecontent.html
new file mode 100644
index 0000000..9f934a7
--- /dev/null
+++ b/layouts/partials/body-beforecontent.html
@@ -0,0 +1,66 @@
+<header>
+
+
+ <div class="logo">
+ <div class="burger {{.Params.layout }}"><a href="javascript:void(0);" style="font-size:15px;" onclick="$('article > aside').toggleClass('responsive')">&#9776;</a>
+ </div>
+
+ <div>
+ {{ partial "body-header.html" . }}
+ </div>
+
+ {{- with .Site.Menus.shortcuts}}
+ <nav class="shortcuts">
+ {{- range sort . "Weight"}}
+ <li class="" role="">
+ <a href="{{.URL}}" {{if eq $.Site.Params.menushortcutsnewtab true}}target="_blank"{{end}} rel="noopener">
+ {{safeHTML .Name}}
+ </a>
+ </li>
+ {{- end}}
+ </nav>
+ {{- end}}
+
+ </div>
+
+ {{- if not .Site.Params.disableSearch}}
+ <div class="search">
+ <div class="searchbox">
+ <input data-search-input id="search-by" type="text" placeholder="{{T "Search-placeholder"}}">
+ </div>
+ <script type="text/javascript" src="{{"vendor/lunr/lunr.min.js" | relURL}}"></script>
+ <script type="text/javascript" src="{{"vendor/auto-complete/auto-complete.js" | relURL}}"></script>
+ <link href="{{"vendor/auto-complete/auto-complete.css" | relURL}}" rel="stylesheet">
+ <script type="text/javascript">
+ {{ if .Site.IsMultiLingual }}
+ var baseurl = "{{.Site.BaseURL}}{{.Site.LanguagePrefix}}";
+ {{ else }}
+ var baseurl = "{{.Site.BaseURL}}";
+ {{ end }}
+ </script>
+ <script type="text/javascript" src="{{"js/search.js" | relURL}}"></script>
+ </div>
+ {{- end}}
+
+
+</header>
+
+<article>
+ <aside class="{{.Params.layout }}">
+ <div id="close_menu">
+ <a href="javascript:void(0);" style="font-size:15px;" onclick="$('article > aside').toggleClass('responsive')">
+ <i class="fa fa-lg fa-times"></i>
+ </a>
+ </div>
+ <ul class="menu">
+ {{- partial "_common/menu.html" . }}
+ </ul>
+
+
+ <section>
+ {{- partial "menu-footer.html" . }}
+ </section>
+ </aside>
+
+
+
diff --git a/layouts/partials/body-header.html b/layouts/partials/body-header.html
new file mode 100644
index 0000000..77034e3
--- /dev/null
+++ b/layouts/partials/body-header.html
@@ -0,0 +1,10 @@
+{{ $header := print "_header." .Lang }}
+ {{ range where .Site.Pages "File.BaseFileName" $header }}
+ {{ .Content }}
+ {{else}}
+ {{ if .Site.GetPage "page" "_header.md" }}
+ {{(.Site.GetPage "page" "_header.md").Content}}
+ {{else}}
+ <a class="baselink" href="{{.Site.BaseURL}}">{{.Site.Title}}</a>
+ {{end}}
+{{end}}
diff --git a/layouts/partials/custom-footer.html b/layouts/partials/custom-footer.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/layouts/partials/custom-footer.html
diff --git a/layouts/partials/custom-menu-footer.html b/layouts/partials/custom-menu-footer.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/layouts/partials/custom-menu-footer.html
diff --git a/layouts/partials/html-head.html b/layouts/partials/html-head.html
new file mode 100644
index 0000000..dc4fd9b
--- /dev/null
+++ b/layouts/partials/html-head.html
@@ -0,0 +1,62 @@
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
+<meta name="revised" content="{{ now.Format "2006-01-02T15:04:05 MST" }}">
+<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}">
+{{ with .Site.Params.author }}
+<meta name="author" content="{{ . }}">
+{{ end }}
+
+
+<title>{{ .Title }} :: {{ .Site.Title }}</title>
+
+<link rel="shortcut icon" href='{{"images/favicon.png" | relURL}}' type="image/x-icon" />
+
+<link rel="preload" as="style" href='{{"/fonts/Montserrat/Montserrat.css" | relURL}}'>
+<link rel="stylesheet" href='{{ (resources.Get "sass/layout.scss" | toCSS).Permalink }}'>
+<link rel="stylesheet" href='{{ (resources.Get "sass/colors.scss" | toCSS).Permalink }}'>
+<link rel="stylesheet" href='{{ (resources.Get "sass/main.scss" | toCSS).Permalink }}'>
+<link rel="stylesheet" href='{{ (resources.Get "sass/menu.scss" | toCSS).Permalink }}'>
+
+
+<!-- <link rel="stylesheet" href='{{"vendor/bootstrap/bootstrap-4.5.0-dist/css/bootstrap.min.css" | relURL}}' crossorigin="anonymous"> -->
+
+<!-- <link href='{{"vendor/FontAwesome/fontawesome-free-5.13.1-web/css/all.css" | relURL}}' rel="stylesheet"> -->
+<!--load all styles -->
+
+<link rel="stylesheet" href="{{"/vendor/materialize/material-icons.css"|relURL}}" type="text/css">
+
+
+<style type="text/css">
+
+.ddexp{
+cursor: pointer;
+}
+
+i.keyboard_arrow_right:before {
+ content: "keyboard_arrow_right"
+}
+
+i.keyboard_arrow_down:before {
+ content: "keyboard_arrow_down"
+}
+
+i.chevron_right:before {
+ content: "chevron_right"
+}
+
+i.expand_more:before {
+ content: "expand_more"
+}
+
+</style>
+
+
+<script src='{{"vendor/jquery/jquery-3.5.1.min.js" | relURL}}'></script>
+<script src='{{"js/docport.js" | relURL}}'></script>
+
+<script type="text/javascript">
+ var baseurl = "{{.Site.BaseURL}}";
+</script>
+
+
+