Skip to content
Snippets Groups Projects
Commit 5acb4bfb authored by sebousan's avatar sebousan
Browse files

diplomas + programs wip

parent ff91ce87
No related branches found
No related tags found
No related merge requests found
ul.diplomas
@include list-reset
> li
margin-bottom: $spacing3
> a
@extend .h3
.programs
li
display: block
.program
div
@include media-breakpoint-up(md)
display: flex
> p
width: col(6)
.title
@extend .h4
// .programs__section
//.programs__section
// .page-with-blocks
// .hero
// margin-bottom: 3rem
......@@ -46,6 +46,34 @@
// margin-top: -2rem
// @include grid(2, lg)
.program
@include widget
section.programs
@include grid(2, md)
@include grid(3, xl)
ol.programs
@include list-reset
> li
border-bottom: 1px solid $main-border-color
padding-bottom: $spacing1
padding-top: $spacing1
> .title
@extend .h3
@include media-breakpoint-up(md)
align-items: baseline
display: flex
> a,
> p
width: col(6)
> .title
& + a
text-align: right
.programs__section
.lead
padding-top: $spacing4
......
......@@ -2,12 +2,14 @@
{{ partial "diplomas/hero-list.html" . }}
<div class="container">
{{ partial "programs/image.html" .Params.image }}
{{ partial "diplomas/image.html" .Params.image }}
{{ partial "diplomas/chapo.html" .Params.description_short }}
</div>
{{ partial "blocks/list.html" .Params.blocks }}
<div class="container">
{{ .Scratch.Set "show_programs" true }}
{{ partial "diplomas/diplomas.html" . }}
{{ .Scratch.Delete "show_programs" }}
</div>
{{ end }}
......@@ -3,6 +3,6 @@
{{ partial "blocks/list.html" .Params.blocks }}
<div class="container">
{{ partial "programs/programs.html" .Pages }}
{{ partial "programs/programs-list.html" .Pages }}
</div>
{{ end }}
{{ $show_programs := false }}
{{- if .Scratch.Get "show_programs" }}
{{ $show_programs = true }}
{{ end -}}
<ul class="diplomas">
{{ range .Paginator.Pages }}
<li>
......@@ -7,6 +11,15 @@
({{ partial "PrepareHTML" . }})
{{ end }}
</a>
{{- if $show_programs }}
<ol class="programs">
{{- range .Pages -}}
<li>
{{ partial "programs/program.html" . }}
</li>
{{- end -}}
</ol>
{{ end -}}
</li>
{{ end }}
</ul>
......@@ -2,24 +2,10 @@
{{ partial "programs/image.html" .Params.image }}
{{ partial "programs/chapo.html" .Params.description_short }}
</div>
{{ partial "blocks/list.html" .Params.blocks }}
{{ $len := (len .Pages) }}
{{ range $index, $programs := sort .Pages ".Params.position" }}
<div class="container">
<div class="programs">
<div class="highlighted">
{{ partial "programs/program.html" . }}
</div>
{{ range sort .Pages ".Params.position" }}
<div>
{{ .Scratch.Set "with_image" true }}
{{ partial "programs/program.html" . }}
{{ .Scratch.Delete "with_image" }}
</div>
{{ end }}
</div>
{{ if ne (add $index 1) $len }}<hr>{{ end }}
</div>
{{ end }}
<div class="container">
{{ partial "diplomas/diplomas-select.html" . }}
{{ $programs := where .Site.Pages "Section" "programs" }}
{{ $programs = where $programs "Permalink" "!=" .FirstSection.Permalink }}
{{ partial "programs/programs-list.html" $programs }}
</div>
......@@ -11,7 +11,7 @@
</a>
</p>
{{ if (partial "GetTextFromHTML" .Params.presentation) }}
{{- partial "PrepareHTML" .Params.presentation -}}
<p>{{- partial "PrepareHTML" .Params.presentation -}}</p>
{{ end }}
</div>
{{- if $with_image }}
......
......@@ -3,7 +3,7 @@
{{- range . -}}
<li>
{{- $title := partial "PrepareHTML" .Title -}}
<a href="{{ .Permalink }}" title="{{ safeHTML (i18n "commons.more_aria" (dict "Title" $title)) }}">
<a href="{{ .Permalink }}" class="title" title="{{ safeHTML (i18n "commons.more_aria" (dict "Title" $title)) }}">
{{- $title -}}
</a>
{{- with .Params.diplomas -}}
......
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