diff options
author | vjeantet <valere.jeantet@gmail.com> | 2020-07-26 01:53:19 +0300 |
---|---|---|
committer | vjeantet <valere.jeantet@gmail.com> | 2020-07-26 01:53:19 +0300 |
commit | 6307decc2eb8caeb25641dc5a485f9931abcdeb7 (patch) | |
tree | 6295b32985702f429471773b2bb87fa22bb03f7c /layouts/partials | |
parent | 55ed6b898bb2adbee30027b00149b37ddbf3b71b (diff) |
init
Diffstat (limited to 'layouts/partials')
-rw-r--r-- | layouts/partials/_mdinclude.html | 13 | ||||
-rw-r--r-- | layouts/partials/_menu.html (renamed from layouts/partials/_common/menu.html) | 0 | ||||
-rw-r--r-- | layouts/partials/_next-prev-page.html (renamed from layouts/partials/_common/next-prev-page.html) | 0 | ||||
-rw-r--r-- | layouts/partials/_pagination.html (renamed from layouts/partials/_common/pagination.html) | 0 | ||||
-rw-r--r-- | layouts/partials/body-aftercontent.html | 55 | ||||
-rw-r--r-- | layouts/partials/body-article-content.html (renamed from layouts/partials/_common/content.html) | 24 | ||||
-rw-r--r-- | layouts/partials/body-article-sidepage.html | 13 | ||||
-rw-r--r-- | layouts/partials/body-beforecontent.html | 66 | ||||
-rw-r--r-- | layouts/partials/body-footer.html | 38 | ||||
-rw-r--r-- | layouts/partials/body-header.html | 53 | ||||
-rw-r--r-- | layouts/partials/body-sidebar.html | 13 | ||||
-rw-r--r-- | layouts/partials/custom-menu-footer.html | 0 | ||||
-rw-r--r-- | layouts/partials/head.html (renamed from layouts/partials/custom-footer.html) | 0 | ||||
-rw-r--r-- | layouts/partials/html-head.html | 12 |
14 files changed, 130 insertions, 157 deletions
diff --git a/layouts/partials/_mdinclude.html b/layouts/partials/_mdinclude.html new file mode 100644 index 0000000..820a5e3 --- /dev/null +++ b/layouts/partials/_mdinclude.html @@ -0,0 +1,13 @@ +{{- template "extrapage" dict "name" .name "page" .context "tip" .tip -}} +{{- define "extrapage" -}} + {{ $header := print .name "." .page.Lang }} + {{ range where .page.Site.Pages "File.BaseFileName" $header }} + {{ .Content }} + {{else}} + {{ if .page.Site.GetPage "page" (print .name ".md") }} + {{(.page.Site.GetPage "page" (print .name ".md")).Content}} + {{else}} + {{safeHTML .tip}} + {{end}} + {{end}} +{{- end -}} diff --git a/layouts/partials/_common/menu.html b/layouts/partials/_menu.html index 1ffb499..1ffb499 100644 --- a/layouts/partials/_common/menu.html +++ b/layouts/partials/_menu.html diff --git a/layouts/partials/_common/next-prev-page.html b/layouts/partials/_next-prev-page.html index f7ec44e..f7ec44e 100644 --- a/layouts/partials/_common/next-prev-page.html +++ b/layouts/partials/_next-prev-page.html diff --git a/layouts/partials/_common/pagination.html b/layouts/partials/_pagination.html index cfa538a..cfa538a 100644 --- a/layouts/partials/_common/pagination.html +++ b/layouts/partials/_pagination.html diff --git a/layouts/partials/body-aftercontent.html b/layouts/partials/body-aftercontent.html deleted file mode 100644 index ced269a..0000000 --- a/layouts/partials/body-aftercontent.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - -</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/_common/content.html b/layouts/partials/body-article-content.html index 437888f..eb05e5f 100644 --- a/layouts/partials/_common/content.html +++ b/layouts/partials/body-article-content.html @@ -1,4 +1,3 @@ - <section class="page {{.Params.layout }}">
{{if not .IsHome}}
<!-- FIL D'ARIANE -->
{{if not .Params.layout }}
@@ -40,29 +39,12 @@ <div class="chevrons {{.Params.layout}}">
- {{ partial "_common/next-prev-page.html" .CurrentSection }}
+ {{ partial "_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 }}
diff --git a/layouts/partials/body-article-sidepage.html b/layouts/partials/body-article-sidepage.html new file mode 100644 index 0000000..b27afef --- /dev/null +++ b/layouts/partials/body-article-sidepage.html @@ -0,0 +1,13 @@ +{{- partial "_mdinclude.html" (dict "name" "_article-sidepage-before" "context" .) -}} +<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> +{{- partial "_mdinclude.html" (dict "name" "_article-sidepage-after" "context" .) -}}
\ No newline at end of file diff --git a/layouts/partials/body-beforecontent.html b/layouts/partials/body-beforecontent.html deleted file mode 100644 index 9f934a7..0000000 --- a/layouts/partials/body-beforecontent.html +++ /dev/null @@ -1,66 +0,0 @@ -<header> - - - <div class="logo"> - <div class="burger {{.Params.layout }}"><a href="javascript:void(0);" style="font-size:15px;" onclick="$('article > aside').toggleClass('responsive')">☰</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-footer.html b/layouts/partials/body-footer.html new file mode 100644 index 0000000..82c9cda --- /dev/null +++ b/layouts/partials/body-footer.html @@ -0,0 +1,38 @@ + + <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 "\\" "/" }}{{ .LogicalName }}{{end}}" target="blank"><i class="fa fa-code-fork"></i> + {{T "Edit-this-page"}}</a> + </div> + {{end}} + </div> + + +{{- partial "_mdinclude.html" (dict "name" "_footer" "context" . "tip" (T "create-footer-md") ) -}} + + diff --git a/layouts/partials/body-header.html b/layouts/partials/body-header.html index 77034e3..8c0d2ad 100644 --- a/layouts/partials/body-header.html +++ b/layouts/partials/body-header.html @@ -1,10 +1,43 @@ -{{ $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}} + <div class="logo"> + <div class="burger {{.Params.layout }}"> + <a href="javascript:void(0);" style="font-size:15px;" onclick="$('article > aside').toggleClass('responsive')">☰</a> + </div> + + <div> + {{- $defaultheader := printf "<a class='baselink' href='%s'>%s</a>" .Site.BaseURL .Site.Title -}} + {{- partial "_mdinclude.html" (dict "name" "_header" "context" . "tip" $defaultheader ) -}} + </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}} + diff --git a/layouts/partials/body-sidebar.html b/layouts/partials/body-sidebar.html new file mode 100644 index 0000000..45f1b5f --- /dev/null +++ b/layouts/partials/body-sidebar.html @@ -0,0 +1,13 @@ +{{- partial "_mdinclude.html" (dict "name" "_sidebar-before" "context" .) -}} + +<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 "_menu.html" . }} +</ul> + +{{- partial "_mdinclude.html" (dict "name" "_sidebar-after" "context" .) -}}
\ No newline at end of file diff --git a/layouts/partials/custom-menu-footer.html b/layouts/partials/custom-menu-footer.html deleted file mode 100644 index e69de29..0000000 --- a/layouts/partials/custom-menu-footer.html +++ /dev/null diff --git a/layouts/partials/custom-footer.html b/layouts/partials/head.html index e69de29..e69de29 100644 --- a/layouts/partials/custom-footer.html +++ b/layouts/partials/head.html diff --git a/layouts/partials/html-head.html b/layouts/partials/html-head.html index dc4fd9b..bc370e6 100644 --- a/layouts/partials/html-head.html +++ b/layouts/partials/html-head.html @@ -2,20 +2,21 @@ <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='{{ (resources.Get "sass/main.scss" | resources.ExecuteAsTemplate "style.main.scss" . | toCSS).Permalink }}'> +<link rel="stylesheet" href='{{ (resources.Get "sass/menu.scss" | resources.ExecuteAsTemplate "style.menu.scss" . | toCSS).Permalink }}'> <!-- <link rel="stylesheet" href='{{"vendor/bootstrap/bootstrap-4.5.0-dist/css/bootstrap.min.css" | relURL}}' crossorigin="anonymous"> --> @@ -26,6 +27,7 @@ <link rel="stylesheet" href="{{"/vendor/materialize/material-icons.css"|relURL}}" type="text/css"> +<link rel="stylesheet" href='{{"/css/docport.css" | relURL}}'> <style type="text/css"> .ddexp{ @@ -58,5 +60,5 @@ i.expand_more:before { var baseurl = "{{.Site.BaseURL}}"; </script> - +{{- partial "head.html" . }} |