Skip to content
Snippets Groups Projects
Commit baf175ff authored by claraRigo's avatar claraRigo
Browse files

premier commit pour feedback :)

parent d8a09501
No related branches found
No related tags found
No related merge requests found
......@@ -12,8 +12,44 @@
&:hover
color: $color-accent
.programs-grid
@include grid(2, xl)
article
display: flex
flex-direction: column
justify-content: space-between
height: 100%
.title
@include h3
div
a
@include meta
@include btn
text-decoration-color: rgba($block-call-to-action-color, .3)
display: inline-block
background: $block-call-to-action-button-background
color: $block-call-to-action-button-color
transition: background .3s ease, color .3s ease
&:hover,
&:focus-visible,
&:focus
background: $block-call-to-action-button-hover-background
color: $block-call-to-action-button-hover-color
@include in-page-without-sidebar
.programs
li
a
@include h2
\ No newline at end of file
@include h2
@include media-breakpoint-up(desktop)
.programs-grid
@include grid(2, desktop)
@include grid(3, xl)
p
margin-top: $spacing3
@include media-breakpoint-up(desktop)
.programs-grid
article > div
a
margin-top: $spacing1
{{- $layout := "grid" -}}
{{- $layout := "whatever" -}}
{{- $block := .block -}}
{{- $block_class := partial "GetBlockClass" .block -}}
......@@ -9,18 +12,38 @@
"title" $block.title
"heading_level" $block.ranks.self
)}}
<ol class="programs">
{{- if eq $layout "grid" -}}
<div class="programs-grid">
{{- range .programs -}}
<li>
{{ $program := site.GetPage (printf "/programs%s" .path) }}
{{- $title := partial "PrepareHTML" $program.Title -}}
<a href="{{ $program.Permalink }}" title="{{ safeHTML (i18n "commons.more_aria" (dict "Title" $title)) }}">
{{- $title -}}
</a>
</li>
{{ $program := site.GetPage (printf "/programs%s" .path) }}
{{- $title := partial "PrepareHTML" $program.Title -}}
{{- $summary := partial "PrepareHTML" $program.Params.summary -}}
<article>
<p class="title">{{- $title -}}</p>
<div >
<p>
{{$summary}}
</p>
<a href="{{ $program.Permalink }}" title="{{ safeHTML (i18n "commons.more_aria" (dict "Title" $title)) }}">
{{ safeHTML (i18n "commons.more") }}
</a>
</div>
</article>
{{ end }}
</ol>
</div>
{{- else -}}
<ol class="programs">
{{- range .programs -}}
<li>
{{ $program := site.GetPage (printf "/programs%s" .path) }}
{{- $title := partial "PrepareHTML" $program.Title -}}
<a href="{{ $program.Permalink }}" title="{{ safeHTML (i18n "commons.more_aria" (dict "Title" $title)) }}">
{{- $title -}}
</a>
</li>
{{ end }}
</ol>
{{- end -}}
</div>
</div>
</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