Skip to content
Snippets Groups Projects
Commit 5331e7e5 authored by alexisben's avatar alexisben
Browse files

alternate page

parent 7d705060
No related branches found
No related tags found
No related merge requests found
......@@ -183,9 +183,29 @@
margin-top: $spacing0
&--alternate
.cards
.grid
article .media img
aspect-ratio: unset
@include in-page-with-sidebar
.cards
@include grid(2)
@include media-breakpoint-up(desktop)
article
width: col(4, 8)
&:not(:first-child)
margin-top: -5%
&:nth-child(even)
margin-left: auto
&.image-portrait
+ .image-portrait
margin-top: -30%
+ .image-square,
+ .image-landscape
margin-top: -15%
@include in-page-without-sidebar
.top
.description
@include body-text
.grid
width: col(10)
margin-left: auto
margin-right: auto
article
width: col(4, 10)
\ No newline at end of file
{{ $show_descriptions := .show_descriptions }}
{{ $show_images := .show_images }}
{{ $image_class := "" }}
<div class="cards">
<div class="grid">
{{ range .pages }}
{{- $page := partial "GetPageByUrl" .page -}}
{{ with $page }}
<article class="card">
{{ if .Params.image }}
{{ $image_class = printf "image-%s" (partial "GetImageDirection" .Params.image) }}
{{ else }}
{{ $image_class = "" }}
{{ end }}
<article class="{{ $image_class }}">
<h3>
<a href="{{- .Permalink -}}">
{{- partial "PrepareHTML" .Title -}}
......@@ -23,8 +29,6 @@
{{ end }}
{{ end }}
<p class="more meta" aria-hidden="true">{{- i18n "commons.more" -}}</p>
{{ if $show_images }}
{{- partial "pages/page-media.html" . -}}
{{ end }}
......
......@@ -3,7 +3,9 @@
<h2 class="h5">{{ i18n "publications.downloads" }}</h2>
<nav>
{{ range .Params.links }}
<a href="{{ .url }}" target="_blank" rel="noopener" class="link-btn">{{ .label }}</a>
{{ if .url }}
<a href="{{ .url }}" target="_blank" rel="noopener" class="link-btn">{{ .label }}</a>
{{ end }}
{{ end }}
</nav>
</div>
......
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