From 3702f4631ceb20969078da69ae0b7f1321176763 Mon Sep 17 00:00:00 2001 From: Christian Wolf Date: Thu, 19 Jan 2023 21:05:28 +0100 Subject: [PATCH] Create person templates --- assets/main.scss | 35 +++++++++++++++++++ content/page/club/vorstand/_index.md | 5 +++ .../layouts/partials/tsc/end-person.html | 1 + .../layouts/partials/tsc/start-person.html | 8 +++++ .../layouts/shortcodes/tsc/person-list.html | 3 ++ .../layouts/shortcodes/tsc/vorstand.html | 11 ++++++ 6 files changed, 63 insertions(+) create mode 100644 themes/tsc_vfl/layouts/partials/tsc/end-person.html create mode 100644 themes/tsc_vfl/layouts/partials/tsc/start-person.html create mode 100644 themes/tsc_vfl/layouts/shortcodes/tsc/person-list.html create mode 100644 themes/tsc_vfl/layouts/shortcodes/tsc/vorstand.html diff --git a/assets/main.scss b/assets/main.scss index 9a61b15..47b2c88 100644 --- a/assets/main.scss +++ b/assets/main.scss @@ -142,6 +142,41 @@ body { } } +.person-list { + display: flex; + flex-wrap: wrap; + gap: 20px; +} + +.person { + width: calc(50% - 10px); + height: 80px; + // margin: 10px 25px 10px 0; + display: flex; + + > .image { + flex: 60px 0 0; + } + > .content { + flex: 1px 1 0; + margin-left: 10px; + } + > .content-vorstand { + display: flex; + flex-direction: column; + justify-content: space-evenly; + + > .role { + font-weight: bold; + } + > .name { + img { + margin: 0 10px 0 0; + } + } + } +} + @font-face{ font-family: 'Open Sans Condensed'; font-style: normal; diff --git a/content/page/club/vorstand/_index.md b/content/page/club/vorstand/_index.md index 63d0da5..f633fd5 100644 --- a/content/page/club/vorstand/_index.md +++ b/content/page/club/vorstand/_index.md @@ -10,3 +10,8 @@ menu: Ein jeder Club benötigt einen Vorstand, der die Vereinsführung übernimmt und der als Ansprechpartner zu erreichen ist. +{{< tsc/person-list >}} + {{< tsc/vorstand name="Anja" role="Abteilungsleiter" img="foo" mail="foo" >}} + {{< tsc/vorstand name="Frank" img="foo2" role="abc" >}} + {{< tsc/vorstand name="Frank" img="foo2" role="abc" >}} +{{< /tsc/person-list >}} diff --git a/themes/tsc_vfl/layouts/partials/tsc/end-person.html b/themes/tsc_vfl/layouts/partials/tsc/end-person.html new file mode 100644 index 0000000..04f5b84 --- /dev/null +++ b/themes/tsc_vfl/layouts/partials/tsc/end-person.html @@ -0,0 +1 @@ + diff --git a/themes/tsc_vfl/layouts/partials/tsc/start-person.html b/themes/tsc_vfl/layouts/partials/tsc/start-person.html new file mode 100644 index 0000000..df32704 --- /dev/null +++ b/themes/tsc_vfl/layouts/partials/tsc/start-person.html @@ -0,0 +1,8 @@ +
+
+ {{- $person := . -}} + {{- with .Get "img" -}} + + {{- end -}} +
+ diff --git a/themes/tsc_vfl/layouts/shortcodes/tsc/person-list.html b/themes/tsc_vfl/layouts/shortcodes/tsc/person-list.html new file mode 100644 index 0000000..a109723 --- /dev/null +++ b/themes/tsc_vfl/layouts/shortcodes/tsc/person-list.html @@ -0,0 +1,3 @@ +
+ {{- .Inner -}} +
diff --git a/themes/tsc_vfl/layouts/shortcodes/tsc/vorstand.html b/themes/tsc_vfl/layouts/shortcodes/tsc/vorstand.html new file mode 100644 index 0000000..4e21a2b --- /dev/null +++ b/themes/tsc_vfl/layouts/shortcodes/tsc/vorstand.html @@ -0,0 +1,11 @@ +{{ partial "tsc/start-person" . }} +
+
{{ .Get "role" }}
+
+ {{ with .Get "mail" }} + + {{ end }} + {{ .Get "name" }} +
+
+{{ partial "tsc/end-person" . }}