Denys Konovalov
9fe572f814
- Standartisierung der Karten-/Template-Elemente (schließt #224) - Verbesserung einiger Ansichten - "schrumpfung" - Code-Cleanups - Trabsliteration Kategorien u. v. m.
87 lines
3.2 KiB
HTML
87 lines
3.2 KiB
HTML
{{ define "main" }}
|
|
|
|
<section class="section-sm">
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-12 mb-4">
|
|
{{ 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">
|
|
<div class="media mb-2 mb-sm-0 align-items-center">
|
|
<img class="mr-4 img-fluid person-thumb-sm" src="{{ .Params.Image | relURL }}" alt="{{ .Title }}">
|
|
<div class="media-body">
|
|
<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 }}
|
|
{{ range .Params.topics }}
|
|
{{ partial "modal" . }}
|
|
{{ end }}
|
|
{{ if and .Params.pretext (ne .Params.pretext "\n\n\n") }}
|
|
{{ partial "modal" (dict "title" .Title "content" .Params.pretext) }}
|
|
{{ end }}
|
|
<div id="wc-canvas"></div>
|
|
{{ $topics := slice }}
|
|
{{ if .Params.pretext }}
|
|
{{ $topics = $topics | append (slice (slice .Params.Title 200 (md5 .Title))) }}
|
|
{{ else }}
|
|
{{ $topics = $topics | append (slice (slice .Params.Title 200)) }}
|
|
{{ end }}
|
|
{{ range .Params.topics }}
|
|
{{ if .superhaufen.enable }}
|
|
{{ $topics = $topics | append (slice (slice .title 30 (.superhaufen.link | urlize) "superhaufen" )) }}
|
|
{{ else }}
|
|
{{ $topics = $topics | append (slice (slice .title 30 (md5 .title) )) }}
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ $topics = $topics | jsonify }}
|
|
<script>
|
|
WordCloud(
|
|
document.getElementById('wc-canvas'),
|
|
{
|
|
click: function (item) {
|
|
if (item[1] != 200 || (item[1] == 200 && item[2] == '{{ md5 .Title }}')) {
|
|
if( item[3] == "superhaufen" ) {
|
|
window.location.href = "{{ `/superhaufen/` | relLangURL }}" + item[2];
|
|
} else {
|
|
$('#' + item[2]).modal('show');
|
|
}
|
|
}
|
|
},
|
|
color: function (word, weight) {
|
|
return (weight === 200) ? '#ffbc3b' : '#1a1a37';
|
|
},
|
|
hover: function(item, dimension, event) {
|
|
console.log("item:", item);
|
|
console.log("dimension:", dimension);
|
|
console.log("event:", event);
|
|
item && item[2] ? event.target.style.textDecorationLine = "underline" : null
|
|
},
|
|
fontFamily: 'Tilt Warp, serif',
|
|
fontWeight: 700,
|
|
list: JSON.parse("{{ $topics }}"),
|
|
shrinkToFit: true,
|
|
gridSize: 50,
|
|
rotateRatio: 0,
|
|
shuffle: false,
|
|
shape: "square",
|
|
ellipticity: 1,
|
|
clearCanvas: true
|
|
}
|
|
);
|
|
</script>
|
|
{{ .Content }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
{{ end }}
|