WIP
This commit is contained in:
@ -16,6 +16,8 @@
|
||||
|
||||
<link rel="shortcut icon" href="{{ `media/favicon.png` | absURL }}" type="image/x-icon">
|
||||
<link rel="icon" href="{{ `media/favicon.png` | absURL }}" type="image/x-icon">
|
||||
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Tilt+Warp">
|
||||
|
||||
<script src="{{ `plugins/wordcloud/wordcloud2.min.js` | absURL }}"></script>
|
||||
|
||||
|
@ -28,9 +28,18 @@
|
||||
{{ partial "chronik-modal" (dict "id" "pretext" "title" .Title "content" .Params.pretext) }}
|
||||
{{ end }}
|
||||
<div id="wc-canvas"></div>
|
||||
{{ $topics := slice (slice .Params.Title 100 "pretext") }}
|
||||
{{ $topics := slice }}
|
||||
{{ if .Params.pretext }}
|
||||
{{ $topics = $topics | append (slice (slice .Params.Title 200 "pretext")) }}
|
||||
{{ else }}
|
||||
{{ $topics = $topics | append (slice (slice .Params.Title 200)) }}
|
||||
{{ end }}
|
||||
{{ range .Params.topics }}
|
||||
{{ $topics = $topics | append (slice (slice .title 40 (md5 .title) )) }}
|
||||
{{ if .superhaufen }}
|
||||
{{ $topics = $topics | append (slice (slice .title 30 .superlink "superhaufen" )) }}
|
||||
{{ else }}
|
||||
{{ $topics = $topics | append (slice (slice .title 30 (md5 .title) )) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ $topics = $topics | jsonify }}
|
||||
<script>
|
||||
@ -38,19 +47,33 @@
|
||||
document.getElementById('wc-canvas'),
|
||||
{
|
||||
click: function (item) {
|
||||
if (item[1] != 100 || (item[1] == 100 && item[2] == "pretext")) {
|
||||
$('#' + item[2]).modal('show');
|
||||
if (item[1] != 200 || (item[1] == 200 && item[2] == "pretext")) {
|
||||
if( item[3] == "superhaufen" ) {
|
||||
window.location.href = "/superhaufen/" + item[2];
|
||||
} else {
|
||||
$('#' + item[2]).modal('show');
|
||||
}
|
||||
}
|
||||
},
|
||||
color: function (word, weight) {
|
||||
return (weight === 100) ? '#ffbc3b' : '#1a1a37';
|
||||
return (weight === 200) ? '#ffbc3b' : '#1a1a37';
|
||||
},
|
||||
fontFamily: 'Fira Sans, serif',
|
||||
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: 25,
|
||||
gridSize: 50,
|
||||
rotateRatio: 0,
|
||||
shuffle: false,
|
||||
shape: "square",
|
||||
ellipticity: 1,
|
||||
clearCanvas: true
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
15
layouts/superhaufen/list.html
Normal file
15
layouts/superhaufen/list.html
Normal file
@ -0,0 +1,15 @@
|
||||
{{ define "main" }}
|
||||
|
||||
<section class="section-sm pb-0">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
{{ range .Data.Pages }}
|
||||
<div class="col-lg-4 col-sm-6">
|
||||
{{ .Render "fach" }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{{ end }}
|
48
layouts/superhaufen/single.html
Normal file
48
layouts/superhaufen/single.html
Normal file
@ -0,0 +1,48 @@
|
||||
{{ define "main" }}
|
||||
|
||||
<section class="section-sm pb-0">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12 mb-4 content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
{{ range .Params.tiles }}
|
||||
<div id="{{ md5 .title }}" class="modal">
|
||||
<div class="modal-dialog modal-lg modal-dialog-centered modal-dialog-scrollable" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">{{ .title }}</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="content">
|
||||
{{ .content | markdownify }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4 col-sm-6">
|
||||
<div class="card border-primary rounded-0 hover-shadow mb-5">
|
||||
<div class="container fb-tile-color" style="background-color:{{ .bg_color }};">
|
||||
<i class="{{ .icon }} fb-tile-icon" style="color: {{ .font_color }};"></i>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<h4 class="card-title">{{ .title | truncate 55 }}</h4>
|
||||
<button type="button" class="btn btn-primary btn-sm" onclick="$('#{{ md5 .title }}').modal('show');">{{
|
||||
i18n "show_more"}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{{ end }}
|
Reference in New Issue
Block a user