Nice homepage

This commit is contained in:
zuma 2025-04-17 14:18:00 +02:00
parent 864a454e80
commit ec78892665
22 changed files with 278 additions and 157 deletions

View file

@ -3,7 +3,6 @@ body {
font-family: sans-serif;
line-height: 1.5;
margin: 1rem;
max-width: 768px;
}
header {

View file

@ -1,9 +1,7 @@
+++
title = 'Home'
date = 2023-01-01T08:00:00-07:00
draft = false
+++
---
title: Achille Toupin
date: 2018-02-09T10:17:00
draft: false
---
Laborum voluptate pariatur ex culpa magna nostrud est incididunt fugiat
pariatur do dolor ipsum enim. Consequat tempor do dolor eu. Non id id anim anim
excepteur excepteur pariatur nostrud qui irure ullamco.
Minions ipsum gelatooo uuuhhh para tú bappleees para tú tank yuuu! Gelatooo po kass. Bappleees poopayee tulaliloo pepete belloo! Wiiiii. Baboiii hana dul sae bappleees pepete hana dul sae po kass po kass baboiii. Belloo! hahaha baboiii poopayee hahaha belloo! La bodaaa bee do bee do bee do chasy. Pepete poopayee tank yuuu! Butt la bodaaa wiiiii aaaaaah ti aamoo! Poulet tikka masala. Tatata bala tu daa ti aamoo! Poulet tikka masala poopayee wiiiii bappleees hana dul sae ti aamoo! Jeje belloo!

View file

@ -0,0 +1,10 @@
+++
title = 'Post 1'
date = 2023-01-15T09:00:00-07:00
draft = false
tags = ['red']
+++
Tempor proident minim aliquip reprehenderit dolor et ad anim Lorem duis sint eiusmod. Labore ut ea duis dolor. Incididunt consectetur proident qui occaecat incididunt do nisi Lorem. Tempor do laborum elit laboris excepteur eiusmod do. Eiusmod nisi excepteur ut amet pariatur adipisicing Lorem.
Occaecat nulla excepteur dolore excepteur duis eiusmod ullamco officia anim in voluptate ea occaecat officia. Cillum sint esse velit ea officia minim fugiat. Elit ea esse id aliquip pariatur cupidatat id duis minim incididunt ea ea. Anim ut duis sunt nisi. Culpa cillum sit voluptate voluptate eiusmod dolor. Enim nisi Lorem ipsum irure est excepteur voluptate eu in enim nisi. Nostrud ipsum Lorem anim sint labore consequat do.

View file

@ -0,0 +1,10 @@
+++
title = 'Post 2'
date = 2023-02-15T10:00:00-07:00
draft = false
tags = ['red','green']
+++
Anim eiusmod irure incididunt sint cupidatat. Incididunt irure irure irure nisi ipsum do ut quis fugiat consectetur proident cupidatat incididunt cillum. Dolore voluptate occaecat qui mollit laborum ullamco et. Ipsum laboris officia anim laboris culpa eiusmod ex magna ex cupidatat anim ipsum aute. Mollit aliquip occaecat qui sunt velit ut cupidatat reprehenderit enim sunt laborum. Velit veniam in officia nulla adipisicing ut duis officia.
Exercitation voluptate irure in irure tempor mollit Lorem nostrud ad officia. Velit id fugiat occaecat do tempor. Sit officia Lorem aliquip eu deserunt consectetur. Aute proident deserunt in nulla aliquip dolore ipsum Lorem ut cupidatat consectetur sit sint laborum. Esse cupidatat sit sint sunt tempor exercitation deserunt. Labore dolor duis laborum est do nisi ut veniam dolor et nostrud nostrud.

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View file

@ -0,0 +1,12 @@
+++
title = 'Post 3'
date = 2023-03-15T11:00:00-07:00
draft = false
tags = ['red','green','blue']
+++
Occaecat aliqua consequat laborum ut ex aute aliqua culpa quis irure esse magna dolore quis. Proident fugiat labore eu laboris officia Lorem enim. Ipsum occaecat cillum ut tempor id sint aliqua incididunt nisi incididunt reprehenderit. Voluptate ad minim sint est aute aliquip esse occaecat tempor officia qui sunt. Aute ex ipsum id ut in est velit est laborum incididunt. Aliqua qui id do esse sunt eiusmod id deserunt eu nostrud aute sit ipsum. Deserunt esse cillum Lorem non magna adipisicing mollit amet consequat.
![Bryce Canyon National Park](bryce-canyon.jpg)
Sit excepteur do velit veniam mollit in nostrud laboris incididunt ea. Amet eu cillum ut reprehenderit culpa aliquip labore laborum amet sit sit duis. Laborum id proident nostrud dolore laborum reprehenderit quis mollit nulla amet veniam officia id id. Aliquip in deserunt qui magna duis qui pariatur officia sunt deserunt.

View file

@ -1,3 +0,0 @@
baseURL = 'https://example.org/'
languageCode = 'en-us'
title = 'My New Hugo Site'

52
hugo.yml Normal file
View file

@ -0,0 +1,52 @@
baseURL: 'https://achilletoupin.com/'
languageCode: 'fr-fr'
title: 'Achille Toupin'
#description: 'Blog personnel de moi'
theme: 'paperMod'
taxonomies:
- tag: tags
- category: categories
menu:
main:
- identifier: blog
name: Blog
url: /blog/
weight: 10
- identifier: tags
name: tags
url: /tags/
weight: 20
- identifier: a-propos
name: À propos
url: /a-propos/
weight: 30
params:
# defaultTheme: light
# defaultTheme: dark
defaultTheme: auto # to switch between dark or light according to browser theme
socialIcons: # optional
- name: "<platform>"
url: "<link>"
- name: "<platform 2>"
url: "<link2>"
fuseOpts: # pour la recherche
isCaseSensitive: false
shouldSort: true
location: 0
distance: 1000
threshold: 0.4
minMatchCharLength: 0
# limit: 10 # refer: https://www.fusejs.io/api/methods.html#search
keys: ["title", "permalink", "summary", "content"]
ShowReadingTime: true
ShowBreadCrumbs: true
ShowPostNavLinks: true
outputs:
home:
- HTML
- RSS
- JSON # necessary for search

View file

@ -1,17 +0,0 @@
<!DOCTYPE html>
<html lang="{{ site.Language.LanguageCode }}" dir="{{ or site.Language.LanguageDirection `ltr` }}">
<head>
{{ partial "head.html" . }}
</head>
<body>
<header>
{{ partial "header.html" . }}
</header>
<main>
{{ block "main" . }}{{ end }}
</main>
<footer>
{{ partial "footer.html" . }}
</footer>
</body>
</html>

View file

@ -1,7 +0,0 @@
{{ define "main" }}
{{ .Content }}
{{ range site.RegularPages }}
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
{{ .Summary }}
{{ end }}
{{ end }}

View file

@ -1,8 +0,0 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ range .Pages }}
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
{{ .Summary }}
{{ end }}
{{ end }}

View file

@ -1,10 +0,0 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
{{ $dateHuman := .Date | time.Format ":date_long" }}
<time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
{{ .Content }}
{{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
{{ end }}

95
layouts/home.html Normal file
View file

@ -0,0 +1,95 @@
<!DOCTYPE html>
<html lang="{{ site.Language }}" dir="{{ .Language.LanguageDirection | default "auto" }}">
<head>
<style>
.main-screen {
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
display: flex;
flex-direction: row;
justify-content: space-between;
position: absolute;
top: 0px;
left: 0px;
width: 100%;
max-width: 100%;
padding: 0px 10px;
gap: 2rem;
}
.side-screen {
height: 100vh;
overflow-y: hidden;
width: 400px;
min-width: 400px;
}
.main-content {
position: relative;
flex-grow: 2;
max-width: 750px;
}
.site-title {
width: 100%;
text-align: center;
}
.icon-row {
display: flex;
flex-direction: row;
justify-content: center;
width: 100%;
gap: 2rem;
}
.icon-item {
display: flex;
flex-direction: column;
align-items: center;
gap: 1rem;
}
@media (max-width: 1380px) {
.side-screen {
display: none;
}
.main-screen {
justify-content: center;
}
}
</style>
</head>
<body>
<div class="main-screen">
<div class="side-screen">
{{ partial "posts-defile.html" (dict "context" . "direction" "up") }}
</div>
<div class="main-content">
<h1 class="site-title">{{ .Title }}</h1>
{{ .Content }}
<div class="icon-row">
<a class="icon-item" href="/posts">
<img src="/icon_work.webp" alt="Work icon by Shar"></img>
<span>Blog</span>
</a>
<a class="icon-item" href="/recettes">
<img src="/icon_work.webp" alt="Work icon by Shar"></img>
<span>Recettes</span>
</a>
<a class="icon-item" href="/livres">
<img src="/icon_work.webp" alt="Work icon by Shar"></img>
<span>Livres</span>
</a>
</div>
</div>
<div class="side-screen">
{{ partial "posts-defile.html" (dict "context" . "direction" "down") }}
</div>
</div>
</body>
</html>

View file

@ -1 +0,0 @@
<p>Copyright {{ now.Year }}. All rights reserved.</p>

View file

@ -1,5 +0,0 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }}</title>
{{ partialCached "head/css.html" . }}
{{ partialCached "head/js.html" . }}

View file

@ -1,9 +0,0 @@
{{- with resources.Get "css/main.css" }}
{{- if eq hugo.Environment "development" }}
<link rel="stylesheet" href="{{ .RelPermalink }}">
{{- else }}
{{- with . | minify | fingerprint }}
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
{{- end }}
{{- end }}
{{- end }}

View file

@ -1,12 +0,0 @@
{{- with resources.Get "js/main.js" }}
{{- if eq hugo.Environment "development" }}
{{- with . | js.Build }}
<script src="{{ .RelPermalink }}"></script>
{{- end }}
{{- else }}
{{- $opts := dict "minify" true }}
{{- with . | js.Build $opts | fingerprint }}
<script src="{{ .RelPermalink }}" integrity="{{- .Data.Integrity }}" crossorigin="anonymous"></script>
{{- end }}
{{- end }}
{{- end }}

View file

@ -1,2 +0,0 @@
<h1>{{ site.Title }}</h1>
{{ partial "menu.html" (dict "menuID" "main" "page" .) }}

View file

@ -1,51 +0,0 @@
{{- /*
Renders a menu for the given menu ID.
@context {page} page The current page.
@context {string} menuID The menu ID.
@example: {{ partial "menu.html" (dict "menuID" "main" "page" .) }}
*/}}
{{- $page := .page }}
{{- $menuID := .menuID }}
{{- with index site.Menus $menuID }}
<nav>
<ul>
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
</ul>
</nav>
{{- end }}
{{- define "partials/inline/menu/walk.html" }}
{{- $page := .page }}
{{- range .menuEntries }}
{{- $attrs := dict "href" .URL }}
{{- if $page.IsMenuCurrent .Menu . }}
{{- $attrs = merge $attrs (dict "class" "active" "aria-current" "page") }}
{{- else if $page.HasMenuCurrent .Menu .}}
{{- $attrs = merge $attrs (dict "class" "ancestor" "aria-current" "true") }}
{{- end }}
{{- $name := .Name }}
{{- with .Identifier }}
{{- with T . }}
{{- $name = . }}
{{- end }}
{{- end }}
<li>
<a
{{- range $k, $v := $attrs }}
{{- with $v }}
{{- printf " %s=%q" $k $v | safeHTMLAttr }}
{{- end }}
{{- end -}}
>{{ $name }}</a>
{{- with .Children }}
<ul>
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
</ul>
{{- end }}
</li>
{{- end }}
{{- end }}

View file

@ -0,0 +1,93 @@
{{ $direction := .direction | default "up" }}
{{ $context := .context }}
<div class="scrolling-posts-container">
<div class="scrolling-posts-inner">
<div class="scrolling-posts {{ $direction }}-scroll">
{{- $pages := where $context.Site.RegularPages "Section" "ne" "" -}}
{{- range (sort $pages "Date" "desc") -}}
<a href="{{ .RelPermalink }}" class="scrolling-posts-item">
<span class="section-badge">{{ .Section }}</span>
<span>{{ .Title }} ({{ .Date.Format "2006-01-02" }})</span>
</a>
{{- end -}}
</div>
<div class="scrolling-posts {{ $direction }}-scroll">
{{- $pages := where $context.Site.RegularPages "Section" "ne" "" -}}
{{- range (sort $pages "Date" "desc") -}}
<a href="{{ .RelPermalink }}" class="scrolling-posts-item">
<span class="section-badge">{{ .Section }}</span>
<span>{{ .Title }} ({{ .Date.Format "2006-01-02" }})</span>
</a>
{{- end -}}
</div>
</div>
</div>
<style>
.scrolling-posts-container {
width: 100%;
border: none;
overflow: hidden;
height: 100%;
}
.scrolling-posts-inner {
display: flex;
flex-direction: column;
white-space: nowrap;
padding: 0;
margin: 0;
}
.scrolling-posts {
display: flex;
flex-direction: column;
gap: 1rem;
}
.scrolling-posts > a:nth-child(1) {
margin-top: 1rem;
}
.scrolling-posts-item {
padding: 10px;
border: solid 1px #ccc;
}
.section-badge {
display: inline-block;
font-size: 0.8em;
padding: 2px 6px;
margin-right: 5px;
background-color: #f0f0f0;
border-radius: 3px;
color: #666;
}
.up-scroll {
animation: scrollUp 10s linear infinite;
}
.down-scroll {
animation: scrollDown 10s linear infinite;
}
@keyframes scrollUp {
0% {
transform: translateY(0%);
}
100% {
transform: translateY(-100%);
}
}
@keyframes scrollDown {
0% {
transform: translateY(-100%);
}
100% {
transform: translateY(0);
}
}
</style>

View file

@ -1,23 +0,0 @@
{{- /*
For a given taxonomy, renders a list of terms assigned to the page.
@context {page} page The current page.
@context {string} taxonomy The taxonomy.
@example: {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
*/}}
{{- $page := .page }}
{{- $taxonomy := .taxonomy }}
{{- with $page.GetTerms $taxonomy }}
{{- $label := (index . 0).Parent.LinkTitle }}
<div>
<div>{{ $label }}:</div>
<ul>
{{- range . }}
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
{{- end }}
</ul>
</div>
{{- end }}

BIN
static/icon_work.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB