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="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({