Merge feat/fachbereiche into dev #237

Merged
Denys Konovalov merged 14 commits from feat/fachbereiche into master 2023-08-04 18:09:22 +02:00
26 changed files with 11 additions and 60 deletions
Showing only changes of commit 5fa69ddc23 - Show all commits

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

@ -1,67 +1,20 @@
{{ define "main" }} {{ define "main" }}
<section class="section-sm pb-0"> {{ partial "tile-modals" . }}
<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>
<section class="section pt-0 pb-0"> <section class="section pt-0">
<div class="container"> <div class="container">
<div class="row"> <h2 class="section-title mb-4">Aktuelles aus dem Fach {{ .Title }}</h3>
<div class="col-12">
<h2 class="section-title">Aktuelles aus dem Fach {{ .Title }}</h3>
</div>
</div>
<div class="row"> <div class="row">
{{ $news := (where .Site.RegularPages "Type" "post") | intersect (where .Site.RegularPages ".Params.subjects" {{ $news := (where .Site.RegularPages "Type" "post") | intersect (where .Site.RegularPages ".Params.subjects"
"intersect" (slice .Title) ) }} "intersect" (slice .Title) ) }}
{{ range first 3 $news }} {{ range first 3 $news }}
<div class="col-lg-4 col-sm-6 mb-5"> <div class="col-lg-4 col-sm-6 mb-2">
{{ .Render "post"}} {{ partial "card-article" .}}
</div> </div>
{{ end }} {{ end }}
{{ if eq (len $news) 0 }} {{ 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 }} {{ end }}
</div> </div>
</div> </div>

@ -9,13 +9,13 @@
{{ range .Params.tiles }} {{ range .Params.tiles }}
{{ partial "modal" . }} {{ partial "modal" . }}
<div class="col-lg-4 col-sm-6"> <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 }};"> <div class="container fb-tile-color" style="background-color:{{ .bg_color }};">
<i class="{{ .icon }} fb-tile-icon" style="color: {{ .font_color }}"></i> <i class="{{ .icon }} fb-tile-icon" style="color: {{ .font_color }}"></i>
</div> </div>
<div class="card-body"> <div class="card-body d-flex flex-column">
<h4 class="card-title text-truncate">{{ .title }}</h4> <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> </div>
</div> </div>