Skip to content
Snippets Groups Projects
Commit 696e3f7a authored by alexisben's avatar alexisben
Browse files

refacto papers

parent 65c6ed97
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,7 @@
transition: color 0.3s ease
.papers
@include list-reset
article
@include media-breakpoint-up(desktop)
@include grid
......
......@@ -96,4 +96,6 @@
dt
@include meta
&:not(:first-of-type)
margin-top: $spacing2
\ No newline at end of file
margin-top: $spacing2
.paper
display: block
\ No newline at end of file
......@@ -7,7 +7,13 @@
) -}}
<div class="document-content">
<div class="container">
{{ partial "papers/papers.html" . }}
<ul class="papers">
{{ range .Paginator.Pages }}
<li>
{{ partial "papers/paper.html" (dict "paper" . ) }}
</li>
{{ end }}
</ul>
{{ partial "commons/pagination.html" . }}
</div>
......
<article class="paper" itemscope itemtype="https://schema.org/ScholarlyArticle">
<div>
<h3>
<a href="{{ .Permalink }}" itemprop="url">
<span itemprop="name">{{ partial "PrepareHTML" .Title }}</span>
</a>
</h3>
{{- range $index, $authors := .Params.Researchers -}}
{{- $author := site.GetPage (printf "/persons/%s" .) -}}
{{- if ne $index 0 -}},{{ end }}
<span itemprop="author" itemscope itemtype="https://schema.org/Person"><a href="{{ $author.Permalink }}" itemprop="url"><span itemprop="name">{{ trim $author.Title "\n" }}</span></a></span>
{{- end -}}
<p class="paper-volume">
<span>Article</span>
{{ range .Params.Volumes }}
{{ $volume := site.GetPage (printf "/volumes/%s" .) }}
{{ if $volume }}
{{ i18n "commons.in" }} “<a href="{{ $volume.Permalink }}">{{ $volume.Title }}</a>
{{ end }}
{{ end }}
</p>
</div>
<div role="group">
<button type="button" data-bs-toggle="modal">Résumé</button>
<a href="#" download>PDF (435 ko)</a>
{{/* <button type="button" data-bs-toggle="modal" data-bs-target="#{{ $modalId }}">{{ i18n "volumes.abstract" }}</button>
{{ if .Params.pdf }}
{{- $pdf := partial "GetMedia" .Params.pdf -}}
{{- $pdf_size := partial "GetHumanSize" $pdf.size -}}
<a href="{{ $pdf.url }}" download>
{{- i18n "commons.pdf_with_size" (dict "Size" $pdf_size) }}
{{ $inside_volume := .inside_volume | default false }}
{{ with .paper }}
<article class="paper" itemscope itemtype="https://schema.org/ScholarlyArticle" {{- if $inside_volume }} itemProp="hasPart" {{- end -}}>
<div>
<h3>
<a href="{{ .Permalink }}" itemprop="url">
<span itemprop="name">{{ partial "PrepareHTML" .Title }}</span>
</a>
{{ end }}
</h3>
{{- range $index, $authors := .Params.Researchers -}}
{{- $author := site.GetPage (printf "/persons/%s" .) -}}
{{- if ne $index 0 -}},{{ end }}
<span itemprop="author" itemscope itemtype="https://schema.org/Person"><a href="{{ $author.Permalink }}" itemprop="url"><span itemprop="name">{{ trim $author.Title "\n" }}</span></a></span>
{{- end -}}
<p class="paper-volume">
<span>Article</span>
{{ if not $inside_volume }}
{{ range .Params.Volumes }}
{{ $volume := site.GetPage (printf "/volumes/%s" .) }}
{{ if $volume }}
{{ i18n "commons.in" }} “<a href="{{ $volume.Permalink }}">{{ $volume.Title }}</a>
{{ end }}
{{ end }}
{{ end }}
</p>
</div>
<div role="group">
<button type="button" data-bs-toggle="modal">Résumé</button>
<a href="#" download>PDF (435 ko)</a>
{{/* <button type="button" data-bs-toggle="modal" data-bs-target="#{{ $modalId }}">{{ i18n "volumes.abstract" }}</button>
{{ if .Params.pdf }}
{{- $pdf := partial "GetMedia" .Params.pdf -}}
{{- $pdf_size := partial "GetHumanSize" $pdf.size -}}
<a href="{{ $pdf.url }}" download>
{{- i18n "commons.pdf_with_size" (dict "Size" $pdf_size) }}
</a>
{{ end }}
</div>
{{ partial "papers/modal.html"
(dict
"modalId" $modalId
"title" .Title
"abstract" .Params.abstract
) }} */}}
</div>
{{ partial "papers/modal.html"
(dict
"modalId" $modalId
"title" .Title
"abstract" .Params.abstract
) }} */}}
</div>
</article>
</article>
{{ end }}
\ No newline at end of file
<div class="papers">
{{ range .Paginator.Pages }}
{{ partial "papers/paper.html" . }}
{{ end }}
</div>
......@@ -3,9 +3,11 @@
<div class="top">
<h2><a href="{{ $researchers.Permalink }}">{{ i18n "persons.papers" }}</a></h2>
</div>
<div class="papers">
<ul class="papers">
{{ range first 3 .papers }}
{{ partial "papers/paper.html" . }}
<li>
{{ partial "papers/paper.html" (dict "paper" . ) }}
</li>
{{ end }}
</div>
</ul>
</section>
......@@ -2,8 +2,14 @@
<div class="top">
<h2>{{ i18n "volumes.table_contents" }}</h2>
</div>
<div class="papers">
{{ partial "papers/papers.html" (dict
"paper" .) }}
</div>
<ul class="papers">
{{ range .Paginator.Pages }}
<li>
{{ partial "papers/paper.html" (dict
"paper" .
"inside_volume" true
) }}
</li>
{{ end }}
</ul>
</section>
......@@ -5,7 +5,13 @@
"context" .
) -}}
<div class="document-content container">
{{ partial "papers/papers.html" . }}
<ul class="papers">
{{ range .Paginator.Pages }}
<li>
{{ partial "papers/paper.html" (dict "paper" . ) }}
</li>
{{ end }}
</ul>
{{ partial "commons/pagination.html" . }}
</div>
{{ end }}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment