Merge feat/fachbereiche into dev #238

Merged
Denys Konovalov merged 16 commits from feat/fachbereiche into dev 2023-08-04 18:11:48 +02:00
3 changed files with 13 additions and 11 deletions
Showing only changes of commit 83b7c3884d - Show all commits

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

@ -42,15 +42,15 @@
<div id="wc-canvas"></div> <div id="wc-canvas"></div>
{{ $topics := slice }} {{ $topics := slice }}
{{ if .Params.pretext }} {{ 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 }} {{ else }}
{{ $topics = $topics | append (slice (slice .Params.Title 200)) }} {{ $topics = $topics | append (dict "Title" .Params.Title "Size" (int 200)) }}
{{ end }} {{ end }}
{{ range .Params.topics }} {{ range .Params.topics }}
{{ if .superhaufen.enable }} {{ 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 }} {{ else }}
{{ $topics = $topics | append (slice (slice .title 30 (md5 .title) )) }} {{ $topics = $topics | append (dict "Title" .title "Size" 30 "ID" (md5 .title)) }}
{{ end }} {{ end }}
{{ end }} {{ end }}
<script> <script>
@ -58,8 +58,8 @@
document.getElementById('wc-canvas'), document.getElementById('wc-canvas'),
{ {
click: function (item) { click: function (item) {
if (item[1] != 200 || (item[1] == 200 && item[2] == '{{ md5 .Title }}')) { if (item[2] != null) {
if( item[3] == "superhaufen" ) { if (item[3]) {
window.location.href = "{{ `/superhaufen/` | relURL }}" + item[2]; window.location.href = "{{ `/superhaufen/` | relURL }}" + item[2];
} else { } else {
$('#' + item[2]).modal('show'); $('#' + item[2]).modal('show');
@ -74,7 +74,9 @@
},*/ },*/
fontFamily: 'Ubuntu, sans-serif', fontFamily: 'Ubuntu, sans-serif',
fontWeight: 700, 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, shrinkToFit: true,
gridSize: 50, gridSize: 50,
rotateRatio: 0, rotateRatio: 0,

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