chore: update site layout and styles
This commit is contained in:
51
assets/css/scss/components/_author-card.scss
Normal file
51
assets/css/scss/components/_author-card.scss
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
.author-card-item {
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
border: 1px solid #eee;
|
||||||
|
padding: 1rem;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.author-card-image {
|
||||||
|
flex: 0 0 33.333333%;
|
||||||
|
max-width: 33.333333%;
|
||||||
|
padding-right: 1rem;
|
||||||
|
|
||||||
|
img {
|
||||||
|
border-radius: 50%;
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.author-card-info {
|
||||||
|
flex: 0 0 66.666667%;
|
||||||
|
max-width: 66.666667%;
|
||||||
|
padding-left: 1rem;
|
||||||
|
|
||||||
|
.author-card-name {
|
||||||
|
font-size: 1.25rem;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.author-card-title {
|
||||||
|
font-size: 0.9rem;
|
||||||
|
color: #666;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.author-card-buttons {
|
||||||
|
.author-button-link {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
color: #007bff;
|
||||||
|
text-decoration: none;
|
||||||
|
|
||||||
|
svg {
|
||||||
|
margin-left: 0.5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -57,6 +57,7 @@
|
|||||||
@import "components/preloader";
|
@import "components/preloader";
|
||||||
@import "components/section";
|
@import "components/section";
|
||||||
@import "components/_ez-toc";
|
@import "components/_ez-toc";
|
||||||
|
@import "components/author-card";
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
{{ $defaultCategory := "General" }}
|
|
||||||
{{ if .Site.Params.defaultCategory }}{{ $defaultCategory = .Site.Params.defaultCategory }}{{ end }}
|
|
||||||
|
|
||||||
<div class="section-sm bg-gray-lighter">
|
<div class="section-sm bg-gray-lighter">
|
||||||
<div class="container text-center">
|
<div class="container text-center">
|
||||||
<h3 class="font-family-playfair">{{ .Title }}</h3>
|
<h1 class="font-family-playfair">{{ .Site.Title }}</h1>
|
||||||
|
<p class="mt-3">{{ .Site.Params.seo.description }}</p>
|
||||||
</div><!-- end container -->
|
</div><!-- end container -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -39,15 +38,9 @@
|
|||||||
{{ else if and (eq (printf "%T" $category) "map") }}
|
{{ else if and (eq (printf "%T" $category) "map") }}
|
||||||
{{ if $category.name }}
|
{{ if $category.name }}
|
||||||
<a class="font-family-poppins font-small fw-medium uppercase" href="/categories/{{ $category.name | urlize }}">{{ $category.name }}</a>
|
<a class="font-family-poppins font-small fw-medium uppercase" href="/categories/{{ $category.name | urlize }}">{{ $category.name }}</a>
|
||||||
{{ else }}
|
|
||||||
<a class="font-family-poppins font-small fw-medium uppercase" href="#">{{ $defaultCategory }}</a>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ else }}
|
|
||||||
<a class="font-family-poppins font-small fw-medium uppercase" href="#">{{ $defaultCategory }}</a>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ else }}
|
|
||||||
<a class="font-family-poppins font-small fw-medium uppercase" href="#">{{ $defaultCategory }}</a>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
<div class="d-inline-flex">
|
<div class="d-inline-flex">
|
||||||
@@ -78,3 +71,4 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- end Blog section -->
|
<!-- end Blog section -->
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|||||||
@@ -44,6 +44,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- end Post Content -->
|
<!-- end Post Content -->
|
||||||
|
|
||||||
|
{{/*
|
||||||
<!-- Tags and Share -->
|
<!-- Tags and Share -->
|
||||||
<div class="section-xs border-top">
|
<div class="section-xs border-top">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
@@ -69,6 +70,7 @@
|
|||||||
</div><!-- end row -->
|
</div><!-- end row -->
|
||||||
</div><!-- end container -->
|
</div><!-- end container -->
|
||||||
</div>
|
</div>
|
||||||
|
*/}}
|
||||||
|
|
||||||
<!-- Comments section -->
|
<!-- Comments section -->
|
||||||
{{ if .Site.Params.comments.enable }}
|
{{ if .Site.Params.comments.enable }}
|
||||||
|
|||||||
@@ -1,84 +1,49 @@
|
|||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
{{ $authorName := .Params.author }}
|
{{ $authors := site.Data.wordpress.authors }}
|
||||||
{{ $authorSlug := .Params.author_slug }}
|
|
||||||
{{ $authorPosts := where .Site.RegularPages "Params.author" $authorName }}
|
|
||||||
|
|
||||||
<div class="section-sm bg-gray-lighter">
|
<div class="section-sm bg-gray-lighter">
|
||||||
<div class="container text-center">
|
<div class="container text-center">
|
||||||
<h3 class="font-family-playfair">{{ .Title }}</h3>
|
<h3 class="font-family-playfair">{{ .Title }}</h3>
|
||||||
<p class="mt-2">Tous les articles écrits par {{ $authorName }}</p>
|
<p class="mt-2">Liste de tous les auteurs</p>
|
||||||
</div><!-- end container -->
|
</div><!-- end container -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Blog section -->
|
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row g-4">
|
<div class="author-list">
|
||||||
<div class="col-12 col-sm-10 offset-sm-1 col-md-8 offset-md-2">
|
<div class="row">
|
||||||
{{ $paginationLimit := 10 }}
|
{{ range $author := $authors }}
|
||||||
{{ if .Site.Params.paginationLimit }}{{ $paginationLimit = .Site.Params.paginationLimit }}{{ end }}
|
<div class="col-md-6 mb-4">
|
||||||
{{ $paginator := .Paginate $authorPosts $paginationLimit }}
|
<article class="author-card-item h-100 card" data-author-name="{{ $author.name }}">
|
||||||
|
<div class="row g-0 align-items-center">
|
||||||
{{ if gt (len $authorPosts) 0 }}
|
<div class="author-card-image col-md-4 p-2">
|
||||||
{{ range $paginator.Pages }}
|
{{ with index $author.avatar_urls "96" }}
|
||||||
<!-- Blog Post box -->
|
<img decoding="async" src="{{ . }}" alt="{{ $author.name }}" class="author-image img-fluid" loading="lazy">
|
||||||
<div class="mb-5">
|
|
||||||
<div class="img-link-box">
|
|
||||||
<a href="{{ .RelPermalink }}">
|
|
||||||
{{ if .Params.featured_image }}
|
|
||||||
<img src="{{ .Params.featured_image }}" alt="{{ .Title }}">
|
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<img src="/assets/images/col-1.jpg" alt="{{ .Title }}">
|
<img decoding="async" src="/assets/images/img-avatar-md@2x.jpg" alt="{{ $author.name }}" class="author-image img-fluid" loading="lazy">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</a>
|
</div>
|
||||||
</div>
|
<div class="author-card-info col-md-8">
|
||||||
<div class="mt-4">
|
<div class="card-body">
|
||||||
<div class="d-flex justify-content-between mb-2">
|
<h5 class="card-title author-card-name">{{ $author.name }}</h5>
|
||||||
<div class="d-inline-flex">
|
{{ with $author.description }}
|
||||||
{{ if .Params.categories }}
|
<p class="card-text author-card-title">
|
||||||
{{ range $index, $category := .Params.categories }}
|
<small class="text-muted author-card-title-text">{{ . }}</small>
|
||||||
{{ if $index }}, {{ end }}
|
</p>
|
||||||
{{ if and (eq (printf "%T" $category) "string") }}
|
|
||||||
<a class="font-family-poppins font-small fw-medium uppercase" href="/categories/{{ $category | urlize }}">{{ $category }}</a>
|
|
||||||
{{ else if and (eq (printf "%T" $category) "map") }}
|
|
||||||
{{ if $category.name }}
|
|
||||||
<a class="font-family-poppins font-small fw-medium uppercase" href="/categories/{{ $category.name | urlize }}">{{ $category.name }}</a>
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
<div class="author-card-buttons mt-3">
|
||||||
|
<div class="author-card-button">
|
||||||
|
<a href="/author/{{ $author.slug | urlize }}" class="author-button-link" aria-label="Voir les articles de {{ $author.name }}">Voir les articles<svg class="uikit-icon" style="width: 1em;" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path fill="var(--c-svg, currentColor)" d="M7.5 4.5V6h9.442L4.5 18.442 5.558 19.5 18 7.058V16.5h1.5v-12z"></path></svg></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="d-inline-flex">
|
|
||||||
<span class="font-small">{{ .Date.Format "02/07/2006" }}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<h4><a class="text-link-1" href="{{ .RelPermalink }}">{{ .Title }}</a></h4>
|
|
||||||
{{ if .Params.excerpt }}
|
|
||||||
<p>{{ .Params.excerpt }}</p>
|
|
||||||
{{ else if .Summary }}
|
|
||||||
<p>{{ .Summary }}</p>
|
|
||||||
{{ else }}
|
|
||||||
<p>{{ truncate 200 .Content }}</p>
|
|
||||||
{{ end }}
|
|
||||||
<div class="mt-3">
|
|
||||||
<a class="button-text-1" href="{{ .RelPermalink }}">Lire la suite</a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</article>
|
||||||
<!-- End Blog Post box -->
|
</div>
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
<!-- Pagination -->
|
|
||||||
{{ partial "pagination.html" (dict "Paginator" .Paginator "Page" .) }}
|
|
||||||
{{ else }}
|
|
||||||
<div class="text-center py-5">
|
|
||||||
<h4>Aucun article trouvé</h4>
|
|
||||||
<p>Aucun article n'a été trouvé pour cet auteur.</p>
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
</div><!-- end row -->
|
</div>
|
||||||
</div><!-- end container -->
|
</div><!-- end container -->
|
||||||
</div>
|
</div>
|
||||||
<!-- end Blog section -->
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|||||||
@@ -35,6 +35,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{/*
|
||||||
<div class="col-6 col-sm-6 col-lg-3">
|
<div class="col-6 col-sm-6 col-lg-3">
|
||||||
<h6 class="font-small fw-medium uppercase">Contact Info</h6>
|
<h6 class="font-small fw-medium uppercase">Contact Info</h6>
|
||||||
<ul class="list-unstyled">
|
<ul class="list-unstyled">
|
||||||
@@ -43,6 +44,8 @@
|
|||||||
<li>+(123) 456 789 01</li>
|
<li>+(123) 456 789 01</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
*/}}
|
||||||
|
|
||||||
</div><!-- end row -->
|
</div><!-- end row -->
|
||||||
</div><!-- end container -->
|
</div><!-- end container -->
|
||||||
</div>
|
</div>
|
||||||
@@ -54,10 +57,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-md-6 text-center text-md-end">
|
<div class="col-12 col-md-6 text-center text-md-end">
|
||||||
<ul class="list-inline-sm">
|
<ul class="list-inline-sm">
|
||||||
<li><a class="button-circle button-circle-sm button-circle-social-facebook" href="#"><i class="bi bi-facebook"></i></a></li>
|
<li><a class="button-circle button-circle-sm button-circle-social-facebook" href="https://www.facebook.com/mistergeekfrance"><i class="bi bi-facebook"></i></a></li>
|
||||||
<li><a class="button-circle button-circle-sm button-circle-social-twitter" href="#"><i class="bi bi-twitter-x"></i></a></li>
|
<!-- <li><a class="button-circle button-circle-sm button-circle-social-twitter" href="#"><i class="bi bi-twitter-x"></i></a></li> -->
|
||||||
<li><a class="button-circle button-circle-sm button-circle-social-pinterest" href="#"><i class="bi bi-pinterest"></i></a></li>
|
<!-- <li><a class="button-circle button-circle-sm button-circle-social-pinterest" href="#"><i class="bi bi-pinterest"></i></a></li> -->
|
||||||
<li><a class="button-circle button-circle-sm button-circle-social-instagram" href="#"><i class="bi bi-instagram"></i></a></li>
|
<!-- <li><a class="button-circle button-circle-sm button-circle-social-instagram" href="#"><i class="bi bi-instagram"></i></a></li> -->
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div><!-- end row -->
|
</div><!-- end row -->
|
||||||
|
|||||||
@@ -8494,6 +8494,49 @@ body.loaded:after {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.author-card-item {
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
border: 1px solid #eee;
|
||||||
|
padding: 1rem;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.author-card-item .author-card-image {
|
||||||
|
flex: 0 0 33.333333%;
|
||||||
|
max-width: 33.333333%;
|
||||||
|
padding-right: 1rem;
|
||||||
|
}
|
||||||
|
.author-card-item .author-card-image img {
|
||||||
|
border-radius: 50%;
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.author-card-item .author-card-info {
|
||||||
|
flex: 0 0 66.666667%;
|
||||||
|
max-width: 66.666667%;
|
||||||
|
padding-left: 1rem;
|
||||||
|
}
|
||||||
|
.author-card-item .author-card-info .author-card-name {
|
||||||
|
font-size: 1.25rem;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
.author-card-item .author-card-info .author-card-title {
|
||||||
|
font-size: 0.9rem;
|
||||||
|
color: #666;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
.author-card-item .author-card-info .author-card-buttons .author-button-link {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
color: #007bff;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.author-card-item .author-card-info .author-card-buttons .author-button-link svg {
|
||||||
|
margin-left: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--bs-dark-rgb: 24, 28, 32;
|
--bs-dark-rgb: 24, 28, 32;
|
||||||
--bs-border-color: get-color("dark", 0.1);
|
--bs-border-color: get-color("dark", 0.1);
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user