All changs i made

This commit is contained in:
Axel Thauvin 2022-03-30 16:03:55 +02:00
parent 363756ffee
commit ab522619b9
7 changed files with 268 additions and 49 deletions

BIN
Illustration-after.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

BIN
Illustration-before.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

View File

@ -1,5 +1,6 @@
{{- define "main" }}
<header class="page-header">
<h1>{{ .Title }}</h1>
{{- if .Description }}
@ -11,7 +12,7 @@
{{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
{{- if site.Params.ShowAllPagesInArchive }}
{{- if .Site.Params.ShowAllPagesInArchive }}
{{- $pages = site.RegularPages }}
{{- end }}
@ -27,16 +28,23 @@
<div class="archive-posts">
{{- range .Pages }}
{{- if eq .Kind "page" }}
<div class="archive-entry">
<h3 class="archive-entry-title">
{{- .Title | markdownify }}
{{- if .Draft }}<sup><span class="entry-isdraft">&nbsp;&nbsp;[draft]</span></sup>{{- end }}
</h3>
<div class="archive-meta">
{{- partial "post_meta.html" . -}}
<div style="display: flex; align-items: center;">
{{- $isHidden := .Params.cover.hidden | default .Site.Params.cover.hiddenInSingle | default .Site.Params.cover.hidden }}
{{- partial "cover.html" (dict "cxt" . "IsHome" false "isHidden" $isHidden "Isarchives" true) }}
<div class="archive-entry">
<h3 class="archive-entry-title">
{{- .Title | markdownify }}
{{- if .Draft }}<sup><span class="entry-isdraft">&nbsp;&nbsp;[draft]</span></sup>{{- end }}
</h3>
<div class="archive-meta">
{{- partial "post_meta.html" . -}}
</div>
<a class="entry-link" aria-label="post link to {{ .Title | plainify }}" href="{{ .Permalink }}"></a>
</div>
<a class="entry-link" aria-label="post link to {{ .Title | plainify }}" href="{{ .Permalink }}"></a>
</div>
{{- end }}
{{- end }}
</div>

View File

@ -1,10 +1,13 @@
{{- define "main" }}
{{- if (and site.Params.profileMode.enabled .IsHome) }}
{{- if (and .Site.Params.profileMode.enabled .IsHome) }}
{{- partial "index_profile.html" . }}
{{- else }} {{/* if not profileMode */}}
{{- if not .IsHome | and .Title }}
<header class="page-header">
{{- partial "breadcrumbs.html" . }}
<h1>{{ .Title }}</h1>
@ -16,12 +19,15 @@
</header>
{{- end }}
{{- if .Content }}
<div class="post-content">
{{- if not (.Param "disableAnchoredHeadings") }}
{{- partial "anchored_headings.html" .Content -}}
{{- else }}{{ .Content }}{{ end }}
</div>
{{- end }}
{{- $pages := union .RegularPages .Sections }}
@ -30,40 +36,86 @@
{{- $pages = where site.RegularPages "Type" "in" site.Params.mainSections }}
{{- end }}
{{- $paginator := .Paginate $pages }}
{{- if and .IsHome site.Params.homeInfoParams (eq $paginator.PageNumber 1) }}
{{- if and .IsHome .Site.Params.homeInfoParams (eq $paginator.PageNumber 1) }}
{{- partial "home_info.html" . }}
{{- end }}
{{- $term := .Data.Term }}
{{- range $index, $page := $paginator.Pages }}
{{- $class := "post-entry" }}
{{- $user_preferred := or site.Params.disableSpecial1stPost site.Params.homeInfoParams }}
{{- $user_preferred := or .Site.Params.disableSpecial1stPost .Site.Params.homeInfoParams }}
{{- if (and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0) (not $user_preferred)) }}
{{- $class = "first-entry" }}
{{- else if $term }}
{{- $class = "post-entry tag-entry" }}
{{- end }}
<style>
img {
min-width: 100px;
}
@media only screen and (hover: none) and (pointer: coarse){
.imagecontenaire {
margin-right: 10px;
}
figure {
width: 100%;
}
}
</style>
<article class="{{ $class }}">
{{- $isHidden := (site.Params.cover.hidden | default site.Params.cover.hiddenInList) }}
{{- partial "cover.html" (dict "cxt" . "IsHome" true "isHidden" $isHidden) }}
<header class="entry-header">
<h2>
{{- .Title }}
{{- if .Draft }}<sup><span class="entry-isdraft">&nbsp;&nbsp;[draft]</span></sup>{{- end }}
</h2>
</header>
<div style="display: flex; margin-bottom: 10px;">
<div style="vertical-align: middle;" class="imagecontenaire">
{{- $isHidden := (.Site.Params.cover.hidden | default .Site.Params.cover.hiddenInList) }}
{{- partial "cover.html" (dict "cxt" . "IsHome" true "isHidden" $isHidden) }}
</div>
<div style="display: inline; vertical-align: middle;">
<header class="entry-header">
<h2>
{{- .Title }}
{{- if .Draft }}<sup><span class="entry-isdraft">&nbsp;&nbsp;[draft]</span></sup>{{- end }}
</h2>
</header>
<section class="entry-content">
<p>{{- if .Description }}{{- .Description }}{{- end }}</p>
<p>{{ .Summary | plainify | htmlUnescape }}{{ if .Truncated }}...{{ end }}</p>
</section>
</div>
</div>
{{- if (ne (.Param "hideSummary") true) }}
<section class="entry-content">
<p>{{ .Summary | plainify | htmlUnescape }}{{ if .Truncated }}...{{ end }}</p>
</section>
{{- end }}
{{- if not (.Param "hideMeta") }}
<footer class="entry-footer">
{{- partial "post_meta.html" . -}}
</footer>
{{- end }}

View File

@ -1,28 +1,155 @@
{{- define "main" }}
<style>
@media only screen and (hover: none) and (pointer: coarse){
.contenaire {
flex-direction: column;
}
}
</style>
{{- if (.Param "isapage")}}
<article class="post-single">
<header class="post-header">
{{ partial "breadcrumbs.html" . }}
<h1 class="post-title">
{{ .Title }}
{{- if .Draft }}<sup><span class="entry-isdraft">&nbsp;&nbsp;[draft]</span></sup>{{- end }}
</h1>
{{- if .Description }}
<div class="post-description">
{{ .Description }}
</div>
<div style="display: flex; align-items: center; margin-bottom: 20px;" class="contenaire">
<header class="post-header">
{{ partial "breadcrumbs.html" . }}
<h1 class="post-title">
{{ .Title }}
{{- if .Draft }}<sup><span class="entry-isdraft">&nbsp;&nbsp;[draft]</span></sup>{{- end }}
</h1>
{{- if .Description }}
<div class="post-description">
{{ .Description }}
</div>
{{- end }}
{{- if not (.Param "hideMeta") }}
{{- if (.Param "ShowToc") }}
{{- partial "toc.html" . }}
{{- end }}
{{- if not (.Param "hideMeta") }}
<div class="post-meta">
{{- partial "post_meta.html" . -}}
{{- partial "translation_list.html" . -}}
{{- partial "edit_post.html" . -}}
{{- partial "post_canonical.html" . -}}
</div>
<div class="post-meta">
{{- partial "post_meta.html" . -}}
{{- partial "translation_list.html" . -}}
{{- partial "edit_post.html" . -}}
{{- partial "post_canonical.html" . -}}
</div>
{{- end }}
</header>
</div>
{{- if (.Param "ShowToc") }}
{{- partial "toc.html" . }}
{{- end }}
{{- if .Description }}
<div class="post-description">
{{ .Description }}
</div>
{{- end }}
{{- if (.Param "curriculum") }}
<style>
.main {
max-width: 90%;
}
@media only screen and (hover: none) and (pointer: coarse){
.main {
max-width: 100%;
padding: 0px;
}
}
</style>
{{- if not (.Param "english") }}
<iframe id="iFrame1" src="/cv-template" width="150%" onload='javascript:(function(o){o.style.height=o.contentWindow.document.body.scrollHeight+"px";}(this));' style="height:200px;width:100%;border:none;overflow:hidden;"></iframe>
{{- else }}
<iframe id="iFrame1" src="/en/cv-template/index.en.html" width="150%" onload='javascript:(function(o){o.style.height=o.contentWindow.document.body.scrollHeight+"px";}(this));' style="height:200px;width:100%;border:none;overflow:hidden;"></iframe>
{{- end }}
</header>
{{- $isHidden := .Params.cover.hidden | default site.Params.cover.hiddenInSingle | default site.Params.cover.hidden }}
{{- partial "cover.html" (dict "cxt" . "IsHome" false "isHidden" $isHidden) }}
{{- end }}
{{- if .Content }}
<div class="post-content">
{{- if not (.Param "disableAnchoredHeadings") }}
{{- partial "anchored_headings.html" .Content -}}
{{- else }}{{ .Content }}{{ end }}
</div>
{{- end }}
<footer class="post-footer">
{{- if .Params.tags }}
<ul class="post-tags">
{{- range ($.GetTerms "tags") }}
<li><a href="{{ .Permalink }}">{{ .LinkTitle }}</a></li>
{{- end }}
</ul>
{{- end }}
{{- if (.Param "ShowPostNavLinks") }}
{{- partial "post_nav_links.html" . }}
{{- end }}
{{- if (and .Site.Params.ShowShareButtons (ne .Params.disableShare true)) }}
{{- partial "share_icons.html" . -}}
{{- end }}
</footer>
{{- if (.Param "comments") }}
{{- partial "comments.html" . }}
{{- end }}
</article>
{{- end }}
{{- if not (.Param "isapage") }}
<article class="post-single">
<div style="display: flex; align-items: center; margin-bottom: 20px;" class="contenaire">
<div style="width: 30%;">
{{- $isHidden := .Params.cover.hidden | default .Site.Params.cover.hiddenInSingle | default .Site.Params.cover.hidden }}
{{- partial "cover.html" (dict "cxt" . "IsHome" false "isHidden" $isHidden) }}
</div>
<header class="post-header">
{{ partial "breadcrumbs.html" . }}
<h1 class="post-title">
{{ .Title | markdownify}}
{{- if .Draft }}<sup><span class="entry-isdraft">&nbsp;&nbsp;[draft]</span></sup>{{- end }}
</h1>
{{- if .Description }}
<div class="post-description">
{{ .Description }}
</div>
{{- end }}
{{- if not (.Param "hideMeta") }}
<div class="post-meta">
{{- partial "post_meta.html" . -}}
</div>
<div class="post-meta">
{{- partial "translation_list.html" . -}}
{{- partial "edit_post.html" . -}}
{{- partial "post_canonical.html" . -}}
</div>
{{- end }}
</header>
</div>
<script type="text/javascript" src="https://latest.cactus.chat/cactus.js"></script>
<link rel="stylesheet" href="https://latest.cactus.chat/style.css" type="text/css">
{{- if (.Param "ShowToc") }}
{{- partial "toc.html" . }}
{{- end }}
@ -46,7 +173,7 @@
{{- if (.Param "ShowPostNavLinks") }}
{{- partial "post_nav_links.html" . }}
{{- end }}
{{- if (and site.Params.ShowShareButtons (ne .Params.disableShare true)) }}
{{- if (and .Site.Params.ShowShareButtons (ne .Params.disableShare true)) }}
{{- partial "share_icons.html" . -}}
{{- end }}
</footer>
@ -55,5 +182,6 @@
{{- partial "comments.html" . }}
{{- end }}
</article>
{{- end }}
{{- end }}{{/* end main */}}

View File

@ -1,9 +1,23 @@
{{- with .cxt}} {{/* Apply proper context from dict */}}
{{- if (and .Params.cover.image (not $.isHidden)) }}
{{- $alt := (.Params.cover.alt | default .Params.cover.caption | plainify) }}
<figure class="entry-cover">
{{- $responsiveImages := (.Params.cover.responsiveImages | default site.Params.cover.responsiveImages) | default true }}
{{- $addLink := (and site.Params.cover.linkFullImages (not $.IsHome)) }}
{{- if $.Isarchives }}
<style>
.entry-cover img {
width: 100%;
}
figure {
width: 20%;
}
</style>
{{- end }}
<figure class="entry-cover" style="margin: 0px; margin-right: 20px; height: auto;">
{{- $responsiveImages := (.Params.cover.responsiveImages | default .Site.Params.cover.responsiveImages) | default true }}
{{- $addLink := (and .Site.Params.cover.linkFullImages (not $.IsHome)) }}
{{- $cover := (.Resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }}
{{- if $cover -}}{{/* i.e it is present in page bundle */}}
{{- if $addLink }}<a href="{{ (path.Join .RelPermalink .Params.cover.image) | absURL }}" target="_blank"
@ -13,7 +27,7 @@
{{- if hugo.IsExtended -}}
{{- $processableFormats = $processableFormats | append "webp" -}}
{{- end -}}
{{- $prod := (hugo.IsProduction | or (eq site.Params.env "production")) }}
{{- $prod := (hugo.IsProduction | or (eq .Site.Params.env "production")) }}
{{- if (and (in $processableFormats $cover.MediaType.SubType) ($responsiveImages) (eq $prod true)) }}
<img loading="lazy" srcset="{{- range $size := $sizes -}}
{{- if (ge $cover.Width $size) -}}

View File

@ -1,4 +1,21 @@
{{- with site.Params.homeInfoParams }}
<style>
img {
border-radius: 50%;
width: 8rem;
}
.lediv {
margin-bottom: 20px;
}
.buttons {
justify-content: flex-start;
margin: 0;
}
</style>
<article class="first-entry home-info">
<header class="entry-header">
<h1>{{ .Title | markdownify }}</h1>