he
This commit is contained in:
parent
d615efd747
commit
5e2c82462e
4 changed files with 7 additions and 138 deletions
|
@ -1,53 +0,0 @@
|
|||
{{ define "main" }}
|
||||
<main class="page-container">
|
||||
{{ $listtitle := .Title }}
|
||||
{{ if or .Title .Content }}
|
||||
<div>
|
||||
{{ with .Title }}<h1>{{ . }}</h1>{{ end }}
|
||||
{{ with .Content }}<div>{{ . }}</div>{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<ul class="news-list">
|
||||
{{ range .Paginator.Pages }}
|
||||
<li class="news-item">
|
||||
<a href="{{ .RelPermalink }}" class="news-item__image">
|
||||
{{ $featuredImage := (resources.Get (printf "%s" ("cover/cover.png" | safeURL))) }}
|
||||
|
||||
{{ if .Params.featured_image }}
|
||||
{{ $featuredImage = .Resources.GetMatch (.Params.featured_image.src | safeURL) }}
|
||||
{{ end }}
|
||||
{{ $featuredImage := $featuredImage.Resize "450x" }}
|
||||
<figure>
|
||||
<img alt="" src="{{ $featuredImage.RelPermalink }}" />
|
||||
{{ with .Params.featured_image.caption }}
|
||||
<figcaption>{{ . }}</figcaption>
|
||||
{{ end }}
|
||||
</figure>
|
||||
</a>
|
||||
<div class="news-item__content">
|
||||
<h2
|
||||
class="news-item__title"
|
||||
>
|
||||
<a
|
||||
href="{{ .RelPermalink }}"
|
||||
>
|
||||
{{.Title }}
|
||||
</a>
|
||||
</h2>
|
||||
<p class="news-item__date">
|
||||
{{ $date := .Date.Format "2006-01-02" }}
|
||||
<time datetime="{{ $date }}">
|
||||
{{ time.Format "2 January 2006" $date }}
|
||||
</time>
|
||||
</p>
|
||||
<div class="news-item__summary">
|
||||
{{ .Summary }}...
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ partial "pagination.html" . }}
|
||||
</main>
|
||||
{{ end }}
|
|
@ -1,36 +0,0 @@
|
|||
{{ define "main" }}
|
||||
<main class="page-container">
|
||||
<article class="article">
|
||||
<h1>{{ .Title }}</h1>
|
||||
|
||||
{{ if .Date }}
|
||||
<div class="article__date">
|
||||
Publié le
|
||||
{{ $date := .Date.Format "2006-01-02" }}
|
||||
<time date="{{ $date }}">{{ time.Format "2 January 2006" $date }}</time>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ if .Params.featured_image }}
|
||||
{{ $featuredImage := .Resources.GetMatch (.Params.featured_image.src | safeURL) }}
|
||||
{{ if $featuredImage }}
|
||||
{{ $featuredImage = $featuredImage.Resize "600x" }}
|
||||
<figure class="article__featured-image">
|
||||
<img alt="" src="{{ $featuredImage.RelPermalink }}" />
|
||||
{{ with .Params.featured_image.caption }}
|
||||
<figcaption>{{ . }}</figcaption>
|
||||
{{ end }}
|
||||
</figure>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ range .Params.tags }}
|
||||
<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>
|
||||
{{ end }}
|
||||
<div>
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</article>
|
||||
</main>
|
||||
{{ end }}
|
|
@ -1,5 +1,4 @@
|
|||
{{ define "main" }}
|
||||
{{ $showDatesList := false }}
|
||||
<div>
|
||||
<div class="cover">
|
||||
<div class="cover-back"></div>
|
||||
|
@ -13,54 +12,11 @@
|
|||
</div>
|
||||
<div class="content">
|
||||
<div class="container mx-auto">
|
||||
{{ if $showDatesList }}
|
||||
<div
|
||||
class="sort-by-dates-container"
|
||||
>
|
||||
<h3 class="ml-2">{{ (index site.Params.articles "sort-by-years").title }}</h3>
|
||||
<ul class="dates-mosaic">
|
||||
<li>
|
||||
<a
|
||||
class="link link-primary"
|
||||
@click="filterYear(null)">{{ site.Params.articles.all }}</a>
|
||||
</li>
|
||||
|
||||
{{ range (.Pages.GroupByDate "2006") }}
|
||||
<li>
|
||||
<a
|
||||
class="link link-primary"
|
||||
href="/blog/{{ .Key }}">{{ .Key }}</a> : {{(len .Pages)}} {{ (index site.Params.articles "sort-by-years").posts }}
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
||||
<div class="blog-title-container py-2">
|
||||
<h2 class="index-icon-title blog-title">
|
||||
<i class="fa fas fa-newspaper"></i>
|
||||
{{ site.Params.articles.all }}
|
||||
</h2>
|
||||
<div class="sort">
|
||||
<div
|
||||
class="link button button-primary"
|
||||
@click="fetchDates">
|
||||
<div class="button-icon">
|
||||
{{ if $showDatesList }}
|
||||
<i
|
||||
class="fa fas fa-calendar"></i>
|
||||
{{ else }}
|
||||
<i class="fa fas fa-times"></i>
|
||||
{{end}}
|
||||
</div>
|
||||
{{ if not $showDatesList }}
|
||||
<div
|
||||
class="button-text">{{ (index site.Params.articles "sort-by-years").title }}</div>
|
||||
{{ else }}
|
||||
<div
|
||||
class="button-text">{{ (index site.Params.articles "sort-by-years").close }}</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-4">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue