From 429d0a88d8943e0e85bffbda57fa53c7ee6b2568 Mon Sep 17 00:00:00 2001 From: Carsten Gips Date: Mon, 14 Oct 2024 12:24:21 +0200 Subject: [PATCH] TEST - sry --- docker/install-relearn.sh | 2 +- .../layouts/assignment/views/article.html | 43 +++++++++++++++++ .../layouts/lecture-bc/views/article.html | 26 +++++++++++ .../layouts/lecture-cg/views/article.html | 46 +++++++++++++++++++ .../layouts/lecture-cy/views/article.html | 35 ++++++++++++++ 5 files changed, 151 insertions(+), 1 deletion(-) create mode 100644 hugo/hugo-lecture/layouts/assignment/views/article.html create mode 100644 hugo/hugo-lecture/layouts/lecture-bc/views/article.html create mode 100644 hugo/hugo-lecture/layouts/lecture-cg/views/article.html create mode 100644 hugo/hugo-lecture/layouts/lecture-cy/views/article.html diff --git a/docker/install-relearn.sh b/docker/install-relearn.sh index db4e27f..9254ded 100755 --- a/docker/install-relearn.sh +++ b/docker/install-relearn.sh @@ -1,7 +1,7 @@ #!/bin/sh ## Versions -export RELEARN="6.4.1" +export RELEARN="7.0.0" # set XDG_DATA_HOME externally ## Hugo Relearn Theme: https://github.com/McShelby/hugo-theme-relearn/releases/latest/ diff --git a/hugo/hugo-lecture/layouts/assignment/views/article.html b/hugo/hugo-lecture/layouts/assignment/views/article.html new file mode 100644 index 0000000..32517c6 --- /dev/null +++ b/hugo/hugo-lecture/layouts/assignment/views/article.html @@ -0,0 +1,43 @@ +{{- $page := .page }} +{{- $content := .content }} +{{- with $page }} +
+{{ partial "heading-pre.html" . }}

{{ .Title }}

{{ partial "heading-post.html" . }} + + +{{ $topic := .Page.File.TranslationBaseName }} + +{{ $schedule := .Site.Data.schedule }} + +{{ $due := "" }} +{{ range $schedule }} + {{ range index . "assignment" }} + {{ if eq ($topic) (index . "topic") }} + {{ with index . "due" }}{{ $due = . }}{{ end }} + {{ end }} + {{ end }} +{{ end }} +{{ $points := .Params.points }} + + +{{ if .Params.sketch }} + {{ partial "sketch.html" . }} +{{ else }} + {{ if and $points $due}} +

{{- printf "(%s; %s)" $points $due -}}

+ {{ else if $points }} +

{{- printf "(%s)" $points -}}

+ {{ else if $due }} +

{{- printf "(%s)" $due -}}

+ {{ else }} + {{ end }} + + {{ $content | safeHTML }} +{{ end }} + + +
+{{- partial "content-footer.html" . }} +
+
+{{- end }} diff --git a/hugo/hugo-lecture/layouts/lecture-bc/views/article.html b/hugo/hugo-lecture/layouts/lecture-bc/views/article.html new file mode 100644 index 0000000..7049688 --- /dev/null +++ b/hugo/hugo-lecture/layouts/lecture-bc/views/article.html @@ -0,0 +1,26 @@ +{{- $page := .page }} +{{- $content := .content }} +{{- with $page }} +
+{{ partial "heading-pre.html" . }}

{{ .Title }}

{{ partial "heading-post.html" . }} + + +{{ if .Params.sketch }} + {{ partial "sketch.html" . }} +{{ else }} + {{ .Scratch.Set "attachments_title" "Annotierte Folien" }} + {{ partial "attachments.html" . }} + + {{ $content | safeHTML }} + + {{ partial "bib.html" . }} + {{ partial "outcomes.html" . }} + {{ partial "assignments.html" . }} +{{ end }} + + +
+{{- partial "content-footer.html" . }} +
+
+{{- end }} diff --git a/hugo/hugo-lecture/layouts/lecture-cg/views/article.html b/hugo/hugo-lecture/layouts/lecture-cg/views/article.html new file mode 100644 index 0000000..f674dab --- /dev/null +++ b/hugo/hugo-lecture/layouts/lecture-cg/views/article.html @@ -0,0 +1,46 @@ +{{- $page := .page }} +{{- $content := .content }} +{{- with $page }} +
+{{ partial "heading-pre.html" . }}

{{ .Title }}

{{ partial "heading-post.html" . }} + + +{{ if .Params.sketch }} + {{ partial "sketch.html" . }} +{{ else }} + {{ partial "tldr.html" . }} + + {{ .Scratch.Set "videos_params" .Params.youtube }} + {{ .Scratch.Set "videos_title" "Videos (YouTube)" }} + {{ .Scratch.Set "videos_linktext" "Direkt-Link YouTube" }} + {{ partial "videos.html" . }} + + {{ .Scratch.Set "videos_params" .Params.fhmedia }} + {{ .Scratch.Set "videos_title" "Videos (HSBI-Medienportal)" }} + {{ .Scratch.Set "videos_linktext" "Direkt-Link HSBI-Medienportal" }} + {{ partial "videos.html" . }} + + {{ .Scratch.Set "videos_params" .Params.tibav }} + {{ .Scratch.Set "videos_title" "Videos (TIB AV-Portal)" }} + {{ .Scratch.Set "videos_linktext" "Direkt-Link TIB AV-Portal" }} + {{ partial "videos.html" . }} + + {{ .Scratch.Set "attachments_title" "Slides" }} + {{ partial "attachments.html" . }} + + {{ partial "outcomes.html" . }} + + {{ $content | safeHTML }} + + {{ partial "quizzes.html" . }} + {{ partial "challenges.html" . }} + {{ partial "assignments.html" . }} + {{ partial "bib.html" . }} +{{ end }} + + +
+{{- partial "content-footer.html" . }} +
+
+{{- end }} diff --git a/hugo/hugo-lecture/layouts/lecture-cy/views/article.html b/hugo/hugo-lecture/layouts/lecture-cy/views/article.html new file mode 100644 index 0000000..a7bf2a4 --- /dev/null +++ b/hugo/hugo-lecture/layouts/lecture-cy/views/article.html @@ -0,0 +1,35 @@ +{{- $page := .page }} +{{- $content := .content }} +{{- with $page }} +
+{{ partial "heading-pre.html" . }}

{{ .Title }}

{{ partial "heading-post.html" . }} + + +{{ if .Params.sketch }} + {{ partial "sketch.html" . }} +{{ else }} + {{ .Scratch.Set "videos_params" .Params.youtube }} + {{ .Scratch.Set "videos_title" "Videos" }} + {{ .Scratch.Set "videos_linktext" "Direkt-Link YouTube" }} + {{ partial "videos.html" . }} + + {{ .Scratch.Set "attachments_title" "Folien" }} + {{ partial "attachments.html" . }} + +
+ {{ $content | safeHTML }} +
+ + {{ partial "assignments.html" . }} + {{ partial "outcomes.html" . }} + {{ partial "quizzes.html" . }} + {{ partial "challenges.html" . }} + {{ partial "bib.html" . }} +{{ end }} + + + +
+{{- end }}