fix build
All checks were successful
website-main / prod-build (push) Successful in 1m9s
website-main / test-build (push) Successful in 47s
website-main / auto-rebuild (push) Has been skipped

This commit is contained in:
Denys Konovalov 2023-08-01 21:44:43 +02:00
parent 5d7b32d3c9
commit 83b7c3884d
Signed by: Denys Konovalov
GPG Key ID: 50F02F239C099532
3 changed files with 13 additions and 11 deletions

@ -1,8 +1,8 @@
<div class="card hover-shadow border-primary mb-4 p-0">
<div class="row g-0">
<div class="col-md-3 text-center p-4 bg-primary text-white rounded">
<span class="h2">{{ time.Format "2" .date}}</span>
<span>{{ time.Format "Jan 2006" .date}}</span>
<div class="h2">{{ time.Format "2" .date}}</div>
<div>{{ time.Format "Jan 2006" .date}}</div>
{{ with .enddate }}<br>bis {{ time.Format "2 Jan 2006" . }}{{ end }}
</div>
<div class="col-md-9">

@ -42,15 +42,15 @@
<div id="wc-canvas"></div>
{{ $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 }}
<script>
@ -58,8 +58,8 @@
document.getElementById('wc-canvas'),
{
click: function (item) {
if (item[1] != 200 || (item[1] == 200 && item[2] == '{{ md5 .Title }}')) {
if( item[3] == "superhaufen" ) {
if (item[2] != null) {
if (item[3]) {
window.location.href = "{{ `/superhaufen/` | relURL }}" + item[2];
} else {
$('#' + item[2]).modal('show');
@ -74,7 +74,9 @@
},*/
fontFamily: 'Ubuntu, sans-serif',
fontWeight: 700,
list: JSON.parse("{{ $topics | jsonify }}"),
list: JSON.parse("{{ $topics | jsonify }}").map(obj => {
return [obj.Title, obj.Size, obj.ID ? obj.ID : null, obj.Superhaufen ? true : false]
}),
shrinkToFit: true,
gridSize: 50,
rotateRatio: 0,

@ -51,7 +51,7 @@ const EventPreview = ({ widgetsFor, entry }) => {
"col-md-3 text-center p-4 bg-primary text-white rounded",
},
h(
"span",
"div",
{ className: "h2" },
event.data.date != null && event.data.date != ""
? DateFormat({
@ -61,7 +61,7 @@ const EventPreview = ({ widgetsFor, entry }) => {
: null
),
h(
"span",
"div",
{},
event.data.date != null && event.data.date != ""
? DateFormat({