2022-03-18 13:35:57 +01:00
|
|
|
{{ define "main" }}
|
|
|
|
|
|
|
|
<section class="section-sm">
|
|
|
|
<div class="container">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-12 mb-4">
|
2023-01-11 11:32:19 +01:00
|
|
|
{{ if .Params.Cantorpreisträger }}
|
|
|
|
<div class="col-12">
|
|
|
|
<h2 class="mb-3">{{ i18n "cantorpreisträger" }}</h2>
|
|
|
|
{{ range where (where .Site.RegularPages "Title" .Params.Title ) "Type" "=" "cantorpreis" }}
|
|
|
|
<div class="d-flex justify-content-between align-items-center flex-wrap">
|
2023-04-04 18:34:22 +02:00
|
|
|
<div class="d-flex mb-2 mb-sm-0 align-items-center">
|
|
|
|
<img class="me-4 img-fluid person-thumb-sm" src="{{ .Params.Image | relURL }}" alt="{{ .Title }}">
|
|
|
|
<div class="flex-grow-1">
|
2023-01-11 11:32:19 +01:00
|
|
|
<h4 class="mt-0"><a href="{{ .Permalink }}">{{ .Params.Name }}</a></h4>
|
|
|
|
{{ .Description }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
<div class="border-bottom border-primary mt-4"></div>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
2023-01-03 11:55:46 +00:00
|
|
|
{{ range .Params.topics }}
|
2023-04-03 21:45:44 +02:00
|
|
|
{{ partial "modal" . }}
|
2023-01-03 11:55:46 +00:00
|
|
|
{{ end }}
|
2023-02-09 19:58:09 +01:00
|
|
|
{{ if and .Params.pretext (ne .Params.pretext "\n\n\n") }}
|
2023-04-03 21:45:44 +02:00
|
|
|
{{ partial "modal" (dict "title" .Title "content" .Params.pretext) }}
|
2023-01-03 11:55:46 +00:00
|
|
|
{{ end }}
|
|
|
|
<div id="wc-canvas"></div>
|
2023-02-28 08:37:51 +01:00
|
|
|
{{ $topics := slice }}
|
|
|
|
{{ if .Params.pretext }}
|
2023-04-03 21:45:44 +02:00
|
|
|
{{ $topics = $topics | append (slice (slice .Params.Title 200 (md5 .Title))) }}
|
2023-02-28 08:37:51 +01:00
|
|
|
{{ else }}
|
|
|
|
{{ $topics = $topics | append (slice (slice .Params.Title 200)) }}
|
|
|
|
{{ end }}
|
2023-01-03 11:55:46 +00:00
|
|
|
{{ range .Params.topics }}
|
2023-02-28 09:33:57 +01:00
|
|
|
{{ if .superhaufen.enable }}
|
|
|
|
{{ $topics = $topics | append (slice (slice .title 30 (.superhaufen.link | urlize) "superhaufen" )) }}
|
2023-02-28 08:37:51 +01:00
|
|
|
{{ else }}
|
|
|
|
{{ $topics = $topics | append (slice (slice .title 30 (md5 .title) )) }}
|
|
|
|
{{ end }}
|
2023-01-03 11:55:46 +00:00
|
|
|
{{ end }}
|
|
|
|
{{ $topics = $topics | jsonify }}
|
|
|
|
<script>
|
|
|
|
WordCloud(
|
|
|
|
document.getElementById('wc-canvas'),
|
|
|
|
{
|
|
|
|
click: function (item) {
|
2023-04-03 21:45:44 +02:00
|
|
|
if (item[1] != 200 || (item[1] == 200 && item[2] == '{{ md5 .Title }}')) {
|
2023-02-28 08:37:51 +01:00
|
|
|
if( item[3] == "superhaufen" ) {
|
2023-02-28 09:33:57 +01:00
|
|
|
window.location.href = "{{ `/superhaufen/` | relLangURL }}" + item[2];
|
2023-02-28 08:37:51 +01:00
|
|
|
} else {
|
|
|
|
$('#' + item[2]).modal('show');
|
|
|
|
}
|
2023-01-03 11:55:46 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
color: function (word, weight) {
|
2023-02-28 08:37:51 +01:00
|
|
|
return (weight === 200) ? '#ffbc3b' : '#1a1a37';
|
|
|
|
},
|
2023-04-04 18:34:22 +02:00
|
|
|
/* hover: function(item, dimension, event) {
|
2023-02-28 08:37:51 +01:00
|
|
|
item && item[2] ? event.target.style.textDecorationLine = "underline" : null
|
2023-04-04 18:34:22 +02:00
|
|
|
},*/
|
2023-02-28 08:37:51 +01:00
|
|
|
fontFamily: 'Tilt Warp, serif',
|
2023-02-09 19:58:09 +01:00
|
|
|
fontWeight: 700,
|
|
|
|
list: JSON.parse("{{ $topics }}"),
|
2023-01-03 11:55:46 +00:00
|
|
|
shrinkToFit: true,
|
2023-02-28 08:37:51 +01:00
|
|
|
gridSize: 50,
|
2023-01-03 11:55:46 +00:00
|
|
|
rotateRatio: 0,
|
2023-02-28 08:37:51 +01:00
|
|
|
shuffle: false,
|
|
|
|
shape: "square",
|
|
|
|
ellipticity: 1,
|
|
|
|
clearCanvas: true
|
2023-01-03 11:55:46 +00:00
|
|
|
}
|
|
|
|
);
|
|
|
|
</script>
|
2022-03-18 13:35:57 +01:00
|
|
|
{{ .Content }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
{{ end }}
|