adapt fachbereiche to new layout

This commit is contained in:
Denys Konovalov 2023-08-04 18:05:35 +02:00
parent fee57ceffd
commit 5fa69ddc23
26 changed files with 11 additions and 60 deletions

@ -1,12 +1,10 @@
{{ define "main" }}
<section class="section-sm pb-0">
<section class="section pb-0">
<div class="container">
<div class="row">
{{ range .Data.Pages }}
<div class="col-lg-4 col-sm-6">
{{ .Render "fach" }}
</div>
{{ partial "card-btn" . }}
{{ end }}
</div>
</div>

@ -1,67 +1,20 @@
{{ define "main" }}
<section class="section-sm pb-0">
<div class="container">
<div class="row">
<div class="col-12 mb-4 content">
{{ .Content }}
</div>
</div>
</div>
<div class="container">
<div class="row">
{{ range .Params.tiles }}
<div id="{{ md5 .title }}" class="modal">
<div class="modal-dialog modal-lg modal-dialog-centered modal-dialog-scrollable" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">{{ .title }}</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div class="content">
{{ .content | markdownify }}
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-4 col-sm-6">
<div class="card border-primary rounded-0 hover-shadow mb-5">
<div class="container fb-tile-color" style="background-color:{{ .bg_color }};">
<i class="{{ .icon }} fb-tile-icon" style="color: {{ .font_color }};"></i>
</div>
<div class="card-body">
<h4 class="card-title">{{ .title | truncate 32 }}</h4>
<button type="button" class="btn btn-primary btn-sm" onclick="$('#{{ md5 .title }}').modal('show');">{{
i18n "show_more"}}</button>
</div>
</div>
</div>
{{ end }}
</div>
</div>
</section>
{{ partial "tile-modals" . }}
<section class="section pt-0 pb-0">
<section class="section pt-0">
<div class="container">
<div class="row">
<div class="col-12">
<h2 class="section-title">Aktuelles aus dem Fach {{ .Title }}</h3>
</div>
</div>
<h2 class="section-title mb-4">Aktuelles aus dem Fach {{ .Title }}</h3>
<div class="row">
{{ $news := (where .Site.RegularPages "Type" "post") | intersect (where .Site.RegularPages ".Params.subjects"
"intersect" (slice .Title) ) }}
{{ range first 3 $news }}
<div class="col-lg-4 col-sm-6 mb-5">
{{ .Render "post"}}
<div class="col-lg-4 col-sm-6 mb-2">
{{ partial "card-article" .}}
</div>
{{ end }}
{{ if eq (len $news) 0 }}
<p class="col-12">Leider wurden noch keine Artikel zu diesem Fach veröffentlicht. Folgen Sie dem Georg-Cantor-Gymnasium über eines der Informationskanäle, um stets auf dem neusten Stand zu bleiben!</p>
<p>Leider wurden noch keine Artikel zu diesem Fach veröffentlicht. Folgen Sie dem Georg-Cantor-Gymnasium über eines der Informationskanäle, um stets auf dem neusten Stand zu bleiben!</p>
{{ end }}
</div>
</div>

@ -9,13 +9,13 @@
{{ range .Params.tiles }}
{{ partial "modal" . }}
<div class="col-lg-4 col-sm-6">
<div class="card border-primary rounded-0 hover-shadow mb-4">
<div class="card border-primary rounded-0 hover-shadow mb-2">
<div class="container fb-tile-color" style="background-color:{{ .bg_color }};">
<i class="{{ .icon }} fb-tile-icon" style="color: {{ .font_color }}"></i>
</div>
<div class="card-body">
<div class="card-body d-flex flex-column">
<h4 class="card-title text-truncate">{{ .title }}</h4>
<button type="button" class="btn btn-primary btn-sm" onclick="$('#{{ md5 .title }}').modal('show');" data-pagefind-ignore>Mehr anzeigen</button>
<button type="button" class="btn btn-primary btn-sm mt-auto align-self-start" onclick="$('#{{ md5 .title }}').modal('show');" data-pagefind-ignore>Mehr anzeigen</button>
</div>
</div>
</div>