First commit of the theme

This commit is contained in:
Gregory Trolliet 2020-04-27 16:49:21 +02:00
commit 360f7ecd96
24 changed files with 525 additions and 0 deletions

5
layouts/404.html Normal file
View file

@ -0,0 +1,5 @@
{{ define "main" }}
<main class="notfound">
<h1 class="notfound__title">404</h1>
</main>
{{ end }}

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="fr">
{{- partial "head.html" . -}}
<body>
{{- partial "header.html" . -}}
{{- block "main" . }}{{- end }}
{{- partial "footer.html" . -}}
</body>
</html>

View file

View file

@ -0,0 +1,14 @@
{{ define "main" }}
<article class="post">
<header class="post_header">
<h1 class="post_title">{{ .Title }}</h1>
{{ if .Description }}
<p class="post_subtitle">{{ .Description }}</p>
{{ end }}
</header>
<main class="post_body">
{{ .Content }}
</main>
</article>
{{ end }}

4
layouts/index.html Normal file
View file

@ -0,0 +1,4 @@
{{ define "main" }}
{{ partial "front.html" . }}
{{ partial "sections.html" . }}
{{ end }}

View file

@ -0,0 +1,33 @@
<footer class="footer">
<address class="footer_contact">
{{ if $.Site.Params.contact.email }}
<p class="footer_item">
<img class="page-icon" src="/svg/envelope.svg"/>
<a href="mailto:{{ $.Site.Params.contact.email}}" class="footer_link" alt="Email">
{{ $.Site.Params.contact.email }}
</a>
</p>
{{ end }}
{{ if $.Site.Params.contact.phone }}
<p class="footer_item">
<img class="page-icon" src="/svg/phone.svg"/>
<a href="tel:{{ $.Site.Params.contact.phone}}" class="footer_link" alt="Phone">
{{ $.Site.Params.contact.phone }}
</a>
</p>
{{ end }}
{{ if $.Site.Params.contact.address }}
<p class="footer_item">
<img class="page-icon" src="/svg/map-marker.svg"/>
{{ $.Site.Params.contact.address }}
</p>
{{ end }}
<p class="footer_item">
<img class="page-icon" src="/svg/copyright.svg"/>
{{ now.Format "2006" }} - {{ $.Site.Title }}
</p>
</address>
</footer>

View file

@ -0,0 +1,6 @@
<main class="front-screen" {{ if $.Params.background }}
style="background-image: url('{{ $.Site.BaseURL }}{{ print (index $.Params.background 0) }}');" {{ end }}>
<div class="front-screen_caption">
{{ .Content }}
</div>
</main>

View file

@ -0,0 +1,18 @@
<head>
<meta charset="UTF-8" />
<title>{{ $.Site.Title }} - {{ .Title }}</title>
<link rel="icon" href="{{ $.Site.BaseURL }}{{ $.Site.Params.favicon }}" />
<meta name="description" content="{{ $.Site.Params.description }}" />
{{ hugo.Generator }}
{{ template "_internal/twitter_cards.html" . }}
{{ template "_internal/opengraph.html" . }}
<link rel="stylesheet" type="text/css" href="/css/base.css"/>
<link rel="stylesheet" type="text/css" href="/css/media-queries.css"/>
{{ range .Site.Params.custom_css }}
<link rel="stylesheet" type="text/css" href="{{ . | relURL }}"/>
{{ end }}
</head>

View file

@ -0,0 +1,28 @@
<header class="navbar">
<nav id="navigation">
<section class="navigation-container">
<a id="navigation-title" href="/">
{{ if $.Site.Params.logo }}
<img src="{{ $.Site.BaseURL }}{{ $.Site.Params.logo }}" class="navbar_title_logo" alt="{{ $.Site.Title }}">
{{ else }}
{{ $.Site.Title }}
{{ end }}
</a>
<input type="checkbox" id="menu-toggle" />
<label class="menu-button" for="menu-toggle">
<div class="menu-button-inner">
<div class="menu-button-image"></div>
</div>
</label>
<ul id="navigation-list">
{{ $current := . }}
{{ range .Site.Menus.main }}
<li class="navigation-item {{ if $current.IsMenuCurrent "main" . }}active{{ end }}">
<a href="{{ .URL }}">{{ .Name }}</a>
</li>
{{ end }}
</ul>
</section>
</nav>
</header>

View file

@ -0,0 +1,6 @@
<section class="section">
<h1>{{ .Title }}</h1>
<div class="content">
{{ .Content }}
</div>
</section>

View file

@ -0,0 +1,14 @@
{{ $items := (where $.Site.RegularPages "Type" "sections") }}
{{ $len := (len $items) }}
{{ range $i, $e := $items }}
{{ partial "section.html" .}}
{{ if ne (add $i 1) $len }}
<div class="separator">
<img src="/svg/circle.svg"/>
</div>
{{ end }}
{{ end}}