From 83b7c3884da8153bb30528e9d44d16819f6c5db7 Mon Sep 17 00:00:00 2001 From: Denys Konovalov Date: Tue, 1 Aug 2023 21:44:43 +0200 Subject: [PATCH 001/102] fix build --- layouts/partials/termin.html | 4 ++-- layouts/schulchronik/single.html | 16 +++++++++------- .../previews/page-previews/event-preview.js | 4 ++-- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/layouts/partials/termin.html b/layouts/partials/termin.html index 9bb6751b..d0fcf207 100644 --- a/layouts/partials/termin.html +++ b/layouts/partials/termin.html @@ -1,8 +1,8 @@
- {{ time.Format "2" .date}} - {{ time.Format "Jan 2006" .date}} +
{{ time.Format "2" .date}}
+
{{ time.Format "Jan 2006" .date}}
{{ with .enddate }}
bis {{ time.Format "2 Jan 2006" . }}{{ end }}
diff --git a/layouts/schulchronik/single.html b/layouts/schulchronik/single.html index 59bc9930..630a1272 100644 --- a/layouts/schulchronik/single.html +++ b/layouts/schulchronik/single.html @@ -42,15 +42,15 @@
{{ $topics := slice }} {{ if .Params.pretext }} - {{ $topics = $topics | append (slice (slice .Params.Title 200 (md5 .Title))) }} + {{ $topics = $topics | append (dict "Title" .Params.Title "Size" (int 200) "ID" (md5 .Title)) }} {{ else }} - {{ $topics = $topics | append (slice (slice .Params.Title 200)) }} + {{ $topics = $topics | append (dict "Title" .Params.Title "Size" (int 200)) }} {{ end }} {{ range .Params.topics }} {{ if .superhaufen.enable }} - {{ $topics = $topics | append (slice (slice .title 30 (.superhaufen.link | urlize) "superhaufen" )) }} + {{ $topics = $topics | append (dict "Title" .title "Size" 30 "ID" (.superhaufen.link | urlize) "Superhaufen" true ) }} {{ else }} - {{ $topics = $topics | append (slice (slice .title 30 (md5 .title) )) }} + {{ $topics = $topics | append (dict "Title" .title "Size" 30 "ID" (md5 .title)) }} {{ end }} {{ end }} + + + + + + + +
@@ -61,5 +62,6 @@ });
+
{{ end }} diff --git a/layouts/pages/single.html b/layouts/pages/single.html index 289b95ab..34d44ad5 100644 --- a/layouts/pages/single.html +++ b/layouts/pages/single.html @@ -1,6 +1,6 @@ {{ define "main" }} -
+
{{ .Content }} diff --git a/layouts/partials/pagefind.html b/layouts/partials/pagefind.html new file mode 100644 index 00000000..e69de29b diff --git a/layouts/projektwoche/single.html b/layouts/projektwoche/single.html index a50442c2..8399c557 100644 --- a/layouts/projektwoche/single.html +++ b/layouts/projektwoche/single.html @@ -1,5 +1,7 @@ {{ define "main" }} +
{{ partial "tile-modals" . }} +
{{ end }} \ No newline at end of file diff --git a/layouts/schulchronik/single.html b/layouts/schulchronik/single.html index 630a1272..71f243bf 100644 --- a/layouts/schulchronik/single.html +++ b/layouts/schulchronik/single.html @@ -1,6 +1,6 @@ {{ define "main" }} -
+
{{ if or .Params.cantorpreisträger (where (where .Site.RegularPages "Title" (print "Abiturienten " .Params.Title ) ) "Type" "=" "abiturienten") }} diff --git a/layouts/superhaufen/single.html b/layouts/superhaufen/single.html index a50442c2..8399c557 100644 --- a/layouts/superhaufen/single.html +++ b/layouts/superhaufen/single.html @@ -1,5 +1,7 @@ {{ define "main" }} +
{{ partial "tile-modals" . }} +
{{ end }} \ No newline at end of file diff --git a/layouts/termine/list.html b/layouts/termine/list.html index 9595ee37..dabb22eb 100644 --- a/layouts/termine/list.html +++ b/layouts/termine/list.html @@ -1,6 +1,6 @@ {{ define "main" }} -
+
  • Alle
  • diff --git a/layouts/wettbewerbe/single.html b/layouts/wettbewerbe/single.html index 99dd44af..7ccc0967 100644 --- a/layouts/wettbewerbe/single.html +++ b/layouts/wettbewerbe/single.html @@ -1,5 +1,6 @@ {{ define "main" }} +
    {{ partial "header-contest" . }}
    @@ -14,5 +15,6 @@
+ {{ end }} From 0572ac25c6f29012b048ce33872de27aba911bef Mon Sep 17 00:00:00 2001 From: Denys Konovalov Date: Sat, 23 Sep 2023 22:41:00 +0200 Subject: [PATCH 100/102] remove useless pagefind.html --- layouts/partials/pagefind.html | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 layouts/partials/pagefind.html diff --git a/layouts/partials/pagefind.html b/layouts/partials/pagefind.html deleted file mode 100644 index e69de29b..00000000 From 1e9bc42517c38c02fb18ed917032af590612c738 Mon Sep 17 00:00:00 2001 From: Denys Konovalov Date: Sat, 23 Sep 2023 22:49:52 +0200 Subject: [PATCH 101/102] autoclean old build results --- .gitea/workflows/prod.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitea/workflows/prod.yaml b/.gitea/workflows/prod.yaml index e3eb27d9..8b302f96 100644 --- a/.gitea/workflows/prod.yaml +++ b/.gitea/workflows/prod.yaml @@ -27,6 +27,7 @@ jobs: - name: build run: | cd /opt/data/actions/gcg-website-master + rm -rf public hugo --minify --gc --baseURL "https://cantorgymnasium.de/" - name: deploy run: | @@ -53,6 +54,7 @@ jobs: - name: build run: | cd /opt/data/actions/gcg-website-master + rm -rf test hugo --minify --gc --baseURL "https://test.cantorgymnasium.de/" --buildDrafts --buildFuture -d test - name: deploy run: | @@ -71,6 +73,7 @@ jobs: - name: build run: | cd /opt/data/actions/gcg-website-master + rm -rf public hugo --minify --gc --baseURL "https://cantorgymnasium.de/" - name: deploy run: | From 07ca691f129569dd883ad04dffdb08672eb4cc6e Mon Sep 17 00:00:00 2001 From: Denys Konovalov Date: Sat, 23 Sep 2023 23:05:25 +0200 Subject: [PATCH 102/102] switch dev to git pull --- .gitea/workflows/dev.yaml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/dev.yaml b/.gitea/workflows/dev.yaml index f655f7e5..93e5d3bd 100644 --- a/.gitea/workflows/dev.yaml +++ b/.gitea/workflows/dev.yaml @@ -15,13 +15,19 @@ jobs: runs-on: act-runner-user timeout-minutes: 5 steps: - - name: clone - uses: actions/checkout@v3 + - name: pull + run: | + cd /opt/data/actions/gcg-website-dev + git pull + git reset --hard origin/dev - name: build - run: hugo --minify --gc --baseURL "https://dev.cantorgymnasium.de/" --buildDrafts --buildFuture -d dev + run: | + cd /opt/data/actions/gcg-website-dev + rm -rf dev + hugo --minify --gc --baseURL "https://dev.cantorgymnasium.de/" --buildDrafts --buildFuture -d dev - name: deploy run: | - cd dev + cd /opt/data/actions/gcg-website-dev/dev pagefind_extended --site=. rsync -azr --delete ./ /opt/data/webdata/gcg-website-dev/ - name: notification