work with risotto
This commit is contained in:
parent
e336313018
commit
8327ef14e6
27 changed files with 627 additions and 0 deletions
0
themes/risotto/layouts/404.html
Normal file
0
themes/risotto/layouts/404.html
Normal file
36
themes/risotto/layouts/_default/baseof.html
Normal file
36
themes/risotto/layouts/_default/baseof.html
Normal file
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{- site.Language.Lang -}}">
|
||||
|
||||
<head>
|
||||
{{- partial "head.html" . -}}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="page">
|
||||
|
||||
<header class="page__header">
|
||||
{{- partial "header.html" . -}}
|
||||
</header>
|
||||
|
||||
<section class="page__body">
|
||||
{{- block "main" . }}{{- end }}
|
||||
</section>
|
||||
|
||||
<section class="page__aside">
|
||||
<div class="aside__about">
|
||||
{{- partial "about.html" . -}}
|
||||
</div>
|
||||
<hr>
|
||||
<div class="aside__content">
|
||||
{{- block "aside" . }}{{- end }}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<footer class="page__footer">
|
||||
{{- partial "footer.html" . -}}
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
1
themes/risotto/layouts/_default/li.html
Normal file
1
themes/risotto/layouts/_default/li.html
Normal file
|
@ -0,0 +1 @@
|
|||
<li><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></li>
|
16
themes/risotto/layouts/_default/list.html
Normal file
16
themes/risotto/layouts/_default/list.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
{{ define "main" }}
|
||||
<h1 id="{{ .Title | urlize }}">{{ .Title | markdownify }}</h1>
|
||||
|
||||
{{ .Content }}
|
||||
|
||||
<ul>
|
||||
{{ range .Pages }}
|
||||
{{ .Render "li" }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
||||
{{ end }}
|
||||
|
||||
{{define "aside" }}
|
||||
{{ if .Params.description }}<p>{{ .Params.description }}</p>{{ end }}
|
||||
{{ end }}
|
25
themes/risotto/layouts/_default/single.html
Normal file
25
themes/risotto/layouts/_default/single.html
Normal file
|
@ -0,0 +1,25 @@
|
|||
{{ define "main" }}
|
||||
<header class="content__header">
|
||||
<h1>{{ .Title | markdownify }}</h1>
|
||||
</header>
|
||||
<div class="content__body">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
<footer class="content__footer"></footer>
|
||||
{{ end }}
|
||||
|
||||
{{define "aside" }}
|
||||
{{ if .Params.description }}<p>{{ .Params.description }}</p>{{ end }}
|
||||
{{ if or (.Params.author) (.Params.date) }}
|
||||
<p>
|
||||
{{ if .Params.author }}Par {{ .Params.author }}{{ if .Date }}, {{ end }}{{ end }}
|
||||
{{ if .Date }}{{ .Date.Format "02-01-2006" }}{{ end }}
|
||||
</p>
|
||||
{{ end }}
|
||||
|
||||
{{ if and (.Params.toc) (.TableOfContents) }}
|
||||
<hr>
|
||||
Sur cette page:
|
||||
{{ .TableOfContents }}
|
||||
{{ end }}
|
||||
{{ end }}
|
4
themes/risotto/layouts/index.html
Normal file
4
themes/risotto/layouts/index.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
{{ define "main" }}
|
||||
{{ .Content }}
|
||||
{{ end }}
|
||||
|
16
themes/risotto/layouts/partials/about.html
Normal file
16
themes/risotto/layouts/partials/about.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
{{ with .Site.Params.about }}
|
||||
<div class="aside__about">
|
||||
{{ with .logo }}<span class="about__logo" role="img">{{ . }}</span> {{ end }}
|
||||
{{ with .logo_image }}<img class="about__logo" src="{{ . | absURL }}" alt="Logo">{{ end }}
|
||||
<h1 class="about__title">{{ .title }}</h1>
|
||||
{{ with .description }}<p class="about__description">{{ . | markdownify }}</p>{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<ul class="aside__social-links">
|
||||
{{ range $item := .Site.Params.socialLinks }}
|
||||
<li>
|
||||
<a href="{{ $item.url }}" rel="me" aria-label="{{ $item.title }}" title="{{ $item.title }}"><i class="{{ $item.icon }}" aria-hidden="true"></i></a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
3
themes/risotto/layouts/partials/footer.html
Normal file
3
themes/risotto/layouts/partials/footer.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
|
||||
<p class="copyright">{{ .Site.Copyright | markdownify }}</p>
|
||||
<p class="advertisement">Réalisé avec ♥️ par un debianeu à poil dur.</p>
|
47
themes/risotto/layouts/partials/head.html
Normal file
47
themes/risotto/layouts/partials/head.html
Normal file
|
@ -0,0 +1,47 @@
|
|||
<title>{{ with .Title }}{{ . }} – {{end}}{{ .Site.Title }}</title>
|
||||
{{ with .Site.Params.about }}<meta name="description" content="{{ .description }}">{{ end }}
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta charset="UTF-8"/>
|
||||
{{ if .Site.Params.noindex }}<meta name="robots" content="noindex" /> {{ end }}
|
||||
|
||||
<!-- FontAwesome <https://fontawesome.com/> -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css" integrity="sha512-Kc323vGBEqzTmouAECnVceyQqyqdsSiqLQISBL29aUW4U/M7pSPA/gEUZQqv1cwx4OnYxTxve5UMg5GT6L4JJg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||
<a rel="me" href="https://gts.colmaris.fr/@colmaris"></a>
|
||||
<!-- Academicons <https://jpswalsh.github.io/academicons/> -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/academicons/1.9.4/css/academicons.min.css" integrity="sha512-IW0nhlW5MgNydsXJO40En2EoCkTTjZhI3yuODrZIc8cQ4h1XcF53PsqDHa09NqnkXuIe0Oiyyj171BqZFwISBw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||
|
||||
<!-- risotto theme -->
|
||||
<link rel="stylesheet" href="{{ printf "css/palettes/%s.css" (.Site.Params.theme.palette | default "base16-dark") | absURL }}">
|
||||
<link rel="stylesheet" href="{{ "css/risotto.css" | absURL }}">
|
||||
<link rel="stylesheet" href="{{ "css/custom.css" | absURL }}">
|
||||
|
||||
<!-- Matomo -->
|
||||
<script>
|
||||
var _paq = window._paq = window._paq || [];
|
||||
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
(function() {
|
||||
var u="//goaccess.colmaris.fr/";
|
||||
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
||||
_paq.push(['setSiteId', '1']);
|
||||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
||||
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
|
||||
})();
|
||||
</script>
|
||||
<!-- End Matomo Code -->
|
||||
|
||||
<!-- Mastodon-->
|
||||
<a rel="me" href="https://gts.colmaris.fr/@colmaris"></a>
|
||||
<!-- favicon -->
|
||||
{{ if os.FileExists "static/favicon.ico" }}<link rel="icon" href="{{ "favicon.ico" | absURL }}">{{ end }}
|
||||
{{ if os.FileExists "static/favicon-32x32.png" }}<link rel="icon" type="image/png" sizes="32x32" href="{{ "favicon-32x32.png" | absURL }}">{{ end }}
|
||||
{{ if os.FileExists "static/favicon-16x16.png" }}<link rel="icon" type="image/png" sizes="16x16" href="{{ "favicon-16x16.png" | absURL }}">{{ end }}
|
||||
{{ if os.FileExists "static/apple-touch-icon.png" }}<link rel="apple-touch-icon" href="{{ "apple-touch-icon.png" | absURL }}">{{ end }}
|
||||
{{ if os.FileExists "static/site.webmanifest" }}<link rel="manifest" href="{{ "site.webmanifest" | absURL }}">{{ end }}
|
||||
|
||||
<!-- RSS header-->
|
||||
{{ with .OutputFormats.Get "rss" -}}
|
||||
{{ printf `<link rel=%q type=%q href=%q title=%q>` .Rel .MediaType.Type .Permalink site.Title | safeHTML }}
|
||||
{{ end }}
|
10
themes/risotto/layouts/partials/header.html
Normal file
10
themes/risotto/layouts/partials/header.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
<nav class="page__nav main-nav">
|
||||
<ul>
|
||||
<li class="nomarker"><h1 class="page__logo"><a href="{{ .Site.BaseURL }}" class="page__logo-inner">{{ .Site.Title }}</a></h1></li>
|
||||
{{ $currentPage := . }}
|
||||
{{ range .Site.Menus.main }}
|
||||
<li class="main-nav__item"><a class="nav-main-item{{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) (eq ($currentPage.Permalink) (.URL | absLangURL)) }} active{{end}}" href="{{ .URL }}" title="{{ .Title }}">{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
||||
|
28
themes/risotto/layouts/partials/lang.html
Normal file
28
themes/risotto/layouts/partials/lang.html
Normal file
|
@ -0,0 +1,28 @@
|
|||
<p>
|
||||
{{ $siteLanguages := .Site.Languages }}
|
||||
{{ $pageLang := .Page.Lang }}
|
||||
|
||||
{{ $currentPage := . }}
|
||||
{{ $pageName := "" }}
|
||||
{{ range .Site.Menus.main }}
|
||||
{{ if eq ($currentPage.Permalink) (.URL | absLangURL) }}
|
||||
{{ $pageName = .Name }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ range .Page.AllTranslations }}
|
||||
{{ $translation := .}}
|
||||
{{ range $siteLanguages }}
|
||||
{{ if eq $translation.Lang .Lang }}
|
||||
{{ $selected := false }}
|
||||
{{ if eq $pageLang .Lang }}
|
||||
<br/><span class="active">$ echo $LANG<br/><b>{{ .LanguageName }}</b></span><br/>
|
||||
|
||||
{{ else }}
|
||||
<br/><a href="{{ $translation.Permalink }}">export LANG={{ .LanguageName }}; ./{{ $pageName }}</a><br/>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</p>
|
||||
<br /><br />
|
27
themes/risotto/layouts/post/list.html
Normal file
27
themes/risotto/layouts/post/list.html
Normal file
|
@ -0,0 +1,27 @@
|
|||
{{ define "main" }}
|
||||
<header class="content__header">
|
||||
<h1>{{ .Title | markdownify }}</h1>
|
||||
{{ .Content }}
|
||||
</header>
|
||||
|
||||
{{ range .Pages }}
|
||||
<article class="post">
|
||||
<header class="post__header">
|
||||
<h1><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
|
||||
<p class="post__meta">
|
||||
{{ .Params.author }},
|
||||
<span class="date">{{ $mymonths := index $.Site.Data.mois }}{{ .Date.Day }}
|
||||
{{ index $mymonths (printf "%d" .Date.Month) }} {{ .Date.Year }}</span>
|
||||
</p>
|
||||
</header>
|
||||
|
||||
<section class="post__summary">
|
||||
{{ .Summary }}
|
||||
</section>
|
||||
</article>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{define "aside" }}
|
||||
{{ if .Params.description }}<p>{{ .Params.description }}</p>{{ end }}
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue