Commit 7735aec3 authored by Christian Engwer's avatar Christian Engwer

create tag lists for nes entries

- content -> tag
- per tag news page
- add links from side-panel boxes to tags lists
- add tag cloud for news page
parent 9040c5a0
......@@ -20,6 +20,16 @@ newsitemsonhome = 5
# parent = "<parent_identifier>"
#
[taxonomies]
tag = "tags"
[tags]
Name = "Tags"
URL = "/tags"
[Data.Formats]
date = "Jan 2, 2006"
# Now, define. the main menu!
[[menu.main]]
name = "Home"
......
+++
date = "2017-04-05"
title = "Proceedings of the third DUNE User Meeting published"
content = ["publication"]
tags = [ "publications" ]
+++
We are happy to announce that the proceedings of the
......
+++
date="2018-01-11"
title = "DUNE/PDELab Course at Heidelberg University (February 26 - March 2, 2018)"
content = "event"
tags = [ "events", "core", "dune-pdelab" ]
+++
The Interdisciplinary Center for Scientific Computing at Heidelberg University will host its annual
......
+++
date = "2018-02-10"
title = "Dune 2.6.0rc2 Released"
content = "release"
tags = [ "releases" ]
+++
The second release candidate for the upcoming 2.6 release is now available.
......
+++
date = "2018-03-28"
title = "Dune 2.6.0 Released"
content = "corerelease"
tags = [ "releases", "core" ]
+++
<span style="font-variant: small-caps">Dune</span> 2.6.0 has finally been
......
+++
date = "2018-04-04"
title = "DUNE 2.5.2rc1 Released"
content = "release"
tags = [ "releases", "core" ]
+++
The first release candidate for the upcoming 2.5.2 release is now
......
+++
date = "2018-04-04"
title = "dune-uggrid 2.6.0 released"
content = "release"
tags = [ "releases" ]
+++
A new version of _dune-uggrid_, the grid manager from the UG finite
......
+++
date = "2018-04-25"
title = "DUNE 2.5.2 Released"
content = "corerelease"
tags = [ "releases", "core" ]
+++
The <span style="font-variant: small-caps">Dune</span> 2.5.2 maintenance
......
+++
date = "2018-06-28"
title = "dune-functions 2.6.0"
content = "release"
tags = [ "releases", "dune-functions" ]
+++
A new version of the [dune-functions][] module has been released.
......
+++
date = "2018-06-28"
title = "dune-functions paper"
content = "publication"
tags = [ "publications", "dune-functions" ]
+++
The [function space bases in the dune-functions module][bases paper]
......
+++
date = "2018-06-28"
title = "dune-typetree 2.6.0 released"
content = "release"
tags = [ "releases", "dune-typetree" ]
+++
A new version of the [dune-typetree][] module has been released.
......
+++
date = "2018-07-17"
title = "dune-python 2.6.0 released"
content = "release"
tags = [ "releases", "python" ]
+++
The first release of the new [dune-python][] has finally
......
+++
date = "2018-07-17"
title = "dune-python 2.6.0 paper"
content = "publication"
tags = [ "publications", "python" ]
+++
The release of the [dune-python] dune-python module is accompanied by a recently finished
......
+++
date = "2018-09-23T22:14:00+01:00"
title = "Invitation to the Dune User and Developer Meeting 2018"
content = "event"
tags = [ "events", "core", "users" ]
+++
We are going to organize a user meeting in Stuttgart, at the
......
+++
date = "2018-11-05"
title = "hp-DG for two-phase flow in porous media"
content = "publication"
tags = [ "publications", "dune-fem" ]
+++
The [Python framework for hp-adaptive discontinuous Galerkin methods for two-phase flow in porous media][hpdg-paper]
......
......@@ -21,5 +21,13 @@
</div>
<div class="news-footer">
&mdash;&nbsp;{{ .Date.Format "Jan 2, 2006" }}
{{ if isset .Params "tags"}}
<i class="fa fa-tags"></i>
{{ range .Params.tags }}
<a href="{{ "tags/" | absLangURL }}{{ . | urlize }}">{{ . }}</a>
{{ end }}
{{ end }}
&mdash;&nbsp;
<i class="fa fa-calendar"></i>
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "Jan 2, 2006" }}</time>
</div>
......@@ -35,7 +35,7 @@
<header class="panel-heading"
style="border-bottom: 1px solid #eeeeee;
padding-bottom: 0px;">
<h1 class="mainheading">{{ .Scratch.Get "title" }}{{ if .Scratch.Get "FeedIcon" }}
<h1 class="mainheading">{{ .Scratch.Get "title" | safeHTML }}{{ if .Scratch.Get "FeedIcon" }}
<a href="{{ .Scratch.Get "Feed" }}">
<img src="/img/Feed-icon.svg" width="28" height="28"
alt="Feed">
......
......@@ -3,11 +3,11 @@
{{ $.Scratch.Set "counter" 0 }}
{{ range (where .Data.Pages "Type" "news") }}
{{ if lt ($.Scratch.Get "counter") 3 }}
{{ if eq .Params.content "event" }}
{{ if in .Params.tags "events" }}
{{ .Render "summary"}}
{{ $.Scratch.Set "counter" (add ($.Scratch.Get "counter") 1) }}
{{ end }}
{{ end }}
{{ end }}
... more
<a href="/tags/events">... more</a>
</div>
......@@ -3,11 +3,11 @@
{{ $.Scratch.Set "counter" 0 }}
{{ range (where .Data.Pages "Type" "news") }}
{{ if lt ($.Scratch.Get "counter") 3 }}
{{ if eq .Params.content "publication" }}
{{ if in .Params.tags "publications" }}
{{ .Render "summary"}}
{{ $.Scratch.Set "counter" (add ($.Scratch.Get "counter") 1) }}
{{ end }}
{{ end }}
{{ end }}
... more
<a href="/tags/publications">... more</a>
</div>
<div class="well">
<h4>Tags</h4>
{{ partial "tagcloud.html" . }}
</div>
{{ if not (eq (len $.Site.Taxonomies.tags) 0) }}
{{ $fontUnit := "rem" }}
{{ $largestFontSize := 2.0 }}
{{ $smallestFontSize := 0.7 }}
{{ $fontSpread := sub $largestFontSize $smallestFontSize }}
{{ $max := add (len (index $.Site.Taxonomies.tags.ByCount 0).Pages) 1 }}
{{ $min := len (index $.Site.Taxonomies.tags.ByCount.Reverse 0).Pages }}
{{ $spread := sub $max $min }}
{{ $fontStep := div $fontSpread $spread }}
<div id="tag-cloud">
{{ range $name, $taxonomy := $.Site.Taxonomies.tags }}
{{ $currentTagCount := len $taxonomy.Pages }}
{{ $currentFontSize := (add $smallestFontSize (mul (sub $currentTagCount $min) $fontStep) ) }}
{{ $count := len $taxonomy.Pages }}
{{ $weigth := div (sub (math.Log $count) (math.Log $min)) (sub (math.Log $max) (math.Log $min)) }}
{{ $currentFontSize := (mul 100 (add $smallestFontSize (mul (sub $largestFontSize $smallestFontSize) $weigth) )) }}
<!--Current font size: {{$currentFontSize}}-->
<a href="{{ "/tags/" | relLangURL }}{{ $name | urlize }}" style="font-size:{{$currentFontSize}}%">{{ $name }}</a>
{{ end }}
</div>
{{ end }}
{{ .Scratch.Set "Feed" "index.xml" }}
{{ .Scratch.Set "FeedIcon" 1 }}
{{ partial "header.html" . }}
{{ partial "rightpanel/tagcloud.html" . | .Scratch.Add "right-panel" }}
{{ range (where .Data.Pages "Type" "news") }}
{{ .Render }}
......
{{ .Scratch.Set "Feed" "index.xml" }}
{{ .Scratch.Set "FeedIcon" 1 }}
{{ partial "header.html" . }}
{{ range (where .Data.Pages "Type" "news") }}
{{ .Render }}
{{ end }}
{{ partial "footer.html" . }}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment