Commit 0f4da215 authored by Thomas Fragner's avatar Thomas Fragner
Browse files

Initial commit

parents
{{ if .Params.widgets }}
{{ partial "widget_page.html" . }}
{{ else }}
{{ partial "header.html" . }}
{{ partial "navbar.html" . }}
{{ partial "header_image.html" . }}
<div class="container body-content docs">
<div class="article-container">
{{ with .Title }}<h1>{{ . }}</h1>{{ end }}
{{ with .Content }}
<div class="article-style" itemprop="articleBody">{{ . }}</div>
{{ end }}
{{ $paginator := .Paginate .Data.Pages }}
{{ range $paginator.Pages }}
<div>
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
<div class="article-style">
{{ if .Params.summary }}
{{ .Params.summary | plainify | emojify }}
{{ else if .Params.abstract }}
{{ .Params.abstract | plainify | emojify | truncate 250 }}
{{ else if .Summary }}
{{ .Summary | plainify | emojify }}
{{ end }}
</div>
</div>
{{ end }}
{{ partial "pagination" . }}
</div>
</div>
{{ partial "footer_container.html" . }}
{{ partial "footer.html" . }}
{{ end }}
{{ partial "header.html" . }}
{{ partial "navbar.html" . }}
{{ partial "header_image.html" . }}
{{ $letters := split "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "" }}
<div class="container body-content docs">
<h1>{{ .Title }}</h1>
<article style="-webkit-columns: 4 300px;
-moz-columns: 4 300px;
columns: 4 300px;">
{{ $start := false }}
{{ range $key, $value := .Data.Terms }}
{{ $firstChar := substr $key 0 1 | upper }}
{{ if $firstChar | in $letters }}
{{ $curLetter := $.Scratch.Get "curLetter" }}
{{ if ne $firstChar $curLetter }}
{{ $.Scratch.Set "curLetter" $firstChar }}
<h4>{{ $firstChar }}</h4>
{{ end }}
{{ end }}
<li style="list-style: none">
<a href='{{ (print "/" $.Data.Plural "/" (lower $key)) | relURL }}'>
{{ $key }}
</a>
({{ len $value }})
</li>
{{ end }}
</article>
</div>
{{ partial "footer.html" . }}
\ No newline at end of file
{{ if .Params.widgets }}
{{ partial "widget_page.html" . }}
{{ else }}
{{ partial "header.html" . }}
{{ partial "navbar.html" . }}
{{ partial "breadcrumb.html" . }}
{{ partial "header_image.html" . }}
<div class="container">
{{ with .Title }}<h2 style="text-align: center">{{ . }}</h2>{{ end }}
</div>
<div class="container">
{{ with .Content }}
<div class="article-style" itemprop="articleBody">{{ . }}</div>
{{ end }}
{{ $p := . }}
{{ if .Params.url_pdf }}
<a class="btn btn-primary btn-outline" href="/{{ $p.Dir }}{{ $p.Params.url_pdf }}" target="_blank" rel="noopener">
{{ i18n "btn_pdf" }}
</a>
{{ end }}
{{ if .Params.url_handout }}
<a class="btn btn-primary btn-outline" href="/{{ $p.Dir }}{{ $p.Params.url_handout }}" target="_blank" rel="noopener">
Handout
</a>
{{ end }}
{{ $paginator := .Paginate .Data.Pages }}
{{ range $paginator.Pages.ByWeight -}}
<div>
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
<div class="article-style">
{{ if .Params.summary }}
{{ printf "%s" .Params.summary | markdownify }}
{{ else if .Truncated }}
{{ printf "%s" .Summary | markdownify }}
{{ end }}
</div>
</div>
{{ end }}
{{ partial "pagination" . }}
</div>
<hr>
<div class="container">
<div class="row featurette">
{{ range .Sections }}
{{ $pack := or .Params.icon_pack "fa" }}
<div class="col-sm-4">
{{ $p := . }}
{{ with .Params.icon }}<div class="featurette-icon"><a href="{{ $p.Permalink }}"><i class="{{ $pack }} {{ $pack }}-{{ . }}"></i></a></div>{{ end }}
<a href="{{ .Permalink }}"><h3>{{ .Params.name | markdownify | emojify }}</h3></a>
{{ with .Params.description }}<p>{{ . | markdownify | emojify }}</p>{{ end }}
{{ if .Params.url_pdf }}
<a class="btn btn-primary btn-outline" href="/{{ $p.Dir }}{{ $p.Params.url_pdf }}" target="_blank" rel="noopener">
{{ i18n "btn_pdf" }}
</a>
{{ end }}
{{ if .Params.url_handout }}
<a class="btn btn-primary btn-outline" href="/{{ $p.Dir }}{{ $p.Params.url_handout }}" target="_blank" rel="noopener">
Handout
</a>
{{ end }}
<hr>
</div>
{{ end }}
</div>
{{ partial "footer_container.html" . }}
{{ partial "footer.html" . }}
{{ end }}
{{ partial "header.html" . }}
{{ partial "navbar.html" . }}
{{ partial "breadcrumb.html" . }}
{{ $current_page := . }}
<div class="container body-content docs">
<div class="row">
<div class="col-sm-12 col-md-12 body">
<article class="article" itemscope itemtype="http://schema.org/Article">
{{ partial "header_image.html" . }}
<div class="article-container">
<div class="article-inner">
<h1 itemprop="name">{{ .Title }}</h1>
{{ partial "article_metadata" (dict "content" . "is_list" 0) }}
<div class="visible-xs space-below"></div>
<div class="article-style" itemprop="articleBody">
{{ .Content }}
</div>
<div class="space-below"></div>
{{ partial "publication_links" (dict "content" . "is_list" 0) }}
<div class="space-below"></div>
{{ partial "tags.html" . }}
<div class="space-below"></div>
{{ $related := .Site.RegularPages.Related . | first 5 }}
{{ with $related }}
<div class="article-widget">
<div class="hr-light"></div>
<h3>{{ i18n "related" }}</h3>
<ul>
{{ range . }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>
</div>
{{ end }}
{{ if .Site.Params.section_pager }}
<div class="article-widget">
{{ partial "section_pager.html" . }}
</div>
{{ end }}
{{ partial "comments.html" . }}
</div>
</div>
</article>
<div class="body-footer">
{{ i18n "last_updated" }} {{ $.Lastmod.Format $.Site.Params.date_format }}
</div>
</div>
</div>
</div>
{{ partial "footer_container.html" . }}
{{ partial "footer.html" . }}
{{ if .Params.widgets }}
{{ partial "widget_page.html" . }}
{{ else }}
{{ partial "header.html" . }}
{{ partial "navbar.html" . }}
{{ partial "header_image.html" . }}
<div class="container body-content docs">
<div class="row">
<div class="col-sm-12 col-md-12 body">
<article class="article" itemscope itemtype="http://schema.org/Article">
<div class="article-container">
{{ with .Title }}<h1>{{ . }}</h1>{{ end }}
{{ with .Content }}
<div class="article-style" itemprop="articleBody">{{ . }}</div>
{{ end }}
{{ $paginator := .Paginate .Data.Pages }}
<div>
<table>
<tr>
<th>&nbsp;</th>
<th>Name</th>
<th>Telefon</th>
<th>Handy</th>
<th>Eintritt</th>
</tr>
{{ range $paginator.Pages }}
<tr>
<td style="vertical-align: middle;">
<img src="/employee/{{ .Params.user }}/{{ .Params.image }}" alt="{{ .Title }}" style="width: 100px;">
</td>
<td style="vertical-align: middle;">{{.Title }}</td>
<td style="vertical-align: middle;"><a href="tel:{{ .Params.telcall }}">{{ .Params.telhuman }}</a></td>
<td style="vertical-align: middle;"><a href="tel:{{ .Params.handycall }}">{{ .Params.handyhuman }}</a></td>
<td style="vertical-align: middle;">{{ .Params.startdate }}</td>
</tr>
{{ end }}
</table>
</div>
{{ partial "pagination" . }}
</div>
</article>
</div>
</div>
</div>
{{ partial "footer_container.html" . }}
{{ partial "footer.html" . }}
{{ end }}
{{ partial "header.html" . }}
{{ partial "navbar.html" . }}
<div class="container body-content docs">
<div class="row">
<div class="col-sm-12 col-md-12 body">
<article class="article" itemscope itemtype="http://schema.org/Article">
{{ partial "header_image.html" . }}
<div class="article-container">
<div class="row" itemprop="author" itemscope itemtype="http://schema.org/Person" itemref="{{ if $.Site.Params.email }}person-email{{ end }}{{ if $.Site.Params.phone }} person-telephone{{ end }}{{ if $.Site.Params.address}} person-address{{ end }}">
<div class="col-xs-12 col-md-4">
<div id="profile">
{{ if .Params.image }}
<div class="portrait" style="background-image: url('{{ .Params.image }}');"></div>
<meta itemprop="image" content="{{ .Params.image }}">
{{ else if $.Site.Params.avatar }}
<div class="portrait" style="background-image: url('{{ (printf "img/%s" $.Site.Params.avatar) | relURL }}');"></div>
<meta itemprop="image" content="{{ (printf "img/%s" $.Site.Params.avatar) | absURL }}">
{{ end }}
<div class="portrait-title">
<h2 itemprop="name">{{ .Title }}</h2>
<ul class="fa-ul" itemscope>
{{ with .Params.telhuman }}
<li>
<i class="fa-li fa fa-phone" aria-hidden="true"></i>
<span id="person-telephone" itemprop="telephone">
<a href="tel:{{ $.Params.telcall }}">{{ . }}</a>
</span>
</li>
{{ end }}
{{ with .Params.handyhuman }}
<li>
<i class="fa-li fa fa-phone" aria-hidden="true"></i>
<span id="person-telephone" itemprop="telephone">
<a href="tel:{{ $.Params.handycall }}">{{ . }}</a>
</span>
</li>
{{ end }}
{{ with .Params.email }}
<li>
<i class="fa-li fa fa-envelope" aria-hidden="true"></i>
<span id="person-email" itemprop="email">
<a href="mailto:{{ . }}">{{ . }}</a>
</span>
</li>
{{ end }}
{{ with .Params.startdate }}
<li>
<i class="fa-li fa fa-calendar" aria-hidden="true"></i>
<span>
{{ . }}
</span>
</li>
{{ end }}
</ul>
</div>
</div>
</div>
</div>
{{ if .Site.Params.section_pager }}
<div class="article-widget">
{{ partial "section_pager.html" . }}
</div>
{{ end }}
{{ partial "comments.html" . }}
</div>
</article>
</div>
</div>
</div>
{{ partial "footer_container.html" . }}
{{ partial "footer.html" . }}
<div class="container" style="padding-top: 5px">
<span class="links">
{{ template "breadcrumb" dict "page" . "value" .Title }}
</span>
</div>
<hr style="margin-top: 5px; margin-bottom: 5px">
{{define "breadcrumb"}}
{{$parent := .page.Parent }}
{{ if $parent }}
{{ $value := (printf "<a href='%s'>%s</a> > %s" $parent.URL $parent.Title .value) }}
{{ template "breadcrumb" dict "page" $parent "value" $value }}
{{else}}
{{.value|safeHTML}}
{{end}}
{{end}}
\ No newline at end of file
<link rel="stylesheet" href="/css/custom.css" />
{{ if .Params.header.image }}
<div class="article-header">
{{ $img_src := urls.Parse .Params.header.image }}
{{ if $img_src.Scheme }}
<img src="{{ .Params.header.image }}" class="article-banner" itemprop="image">
{{ else }}
<img src="{{ (printf "%s%s" .Dir .Params.header.image) | relURL }}" class="article-banner" itemprop="image">
{{ end }}
{{ with .Params.header.caption }}<span class="article-header-caption">{{ . | markdownify | emojify }}</span>{{ end }}
</div>
{{end}}
{{ $post := .post }}
<div class="card-simple" itemscope itemprop="blogPost" itemtype="http://schema.org/BlogPosting">
{{ partial "article_metadata" (dict "content" $post "is_list" 1) }}
{{ $preview := $post.Params.header.preview | default true }}
{{ if and $post.Params.header.image $preview }}
<a href="{{ $post.Permalink }}">
{{ $img_src := urls.Parse $post.Params.header.image }}
{{ if $img_src.Scheme }}
<img src="{{ $post.Params.header.image }}" class="article-banner" itemprop="image">
{{ else }}
<img src="{{ $post.Dir | relURL }}{{ $post.Params.header.image }}" class="article-banner" itemprop="image">
{{ end }}
</a>
{{end}}
<h3 class="article-title" itemprop="headline">
<a href="{{ $post.Permalink }}" itemprop="url">{{ $post.Title }}</a>
</h3>
<div class="article-style" itemprop="articleBody">
{{ if $post.Params.summary }}
<p>{{ printf "%s" $post.Params.summary | markdownify }}</p>
{{ else if $post.Truncated }}
{{ $post.Summary }}
{{ else }}
{{ $post.Content }}
{{ end }}
</div>
<p class="read-more" itemprop="mainEntityOfPage">
<a href="{{ $post.Permalink }}" class="btn btn-primary btn-outline">
{{ i18n "continue_reading" }}
</a>
</p>
</div>
{{ $is_list := .is_list }}
{{ $ := .content }}
{{ with $.Params.url_preprint }}
<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="/{{ $.Dir }}{{ . }}" target="_blank" rel="noopener">
{{ i18n "btn_preprint" }}
</a>
{{ end }}
{{ range $.Params.url_bsp }}
<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="/{{ $.Dir }}{{ . }}" target="_blank" rel="noopener">
{{ . }}
</a>
{{ end }}
{{ with $.Params.url_pdf }}
<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="/{{ $.Dir }}{{ $.File }}.pdf" target="_blank" rel="noopener">
{{ i18n "btn_pdf" }}
</a>
{{ end }}
{{ $directory := "static/files/citations/" }}
{{ $filename := printf "%s%s.bib" $directory $.File.TranslationBaseName }}
{{ if fileExists $filename }}
<button type="button" class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}} js-cite-modal"
data-filename="{{ printf "files/citations/%s.bib" $.File.TranslationBaseName | relURL }}">
{{ i18n "btn_cite" }}
</button>
{{ end }}
{{ with $.Params.url_code }}
<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="{{ . | absURL }}" target="_blank" rel="noopener">
{{ i18n "btn_code" }}
</a>
{{ end }}
{{ with $.Params.url_dataset }}
<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="{{ . | absURL }}" target="_blank" rel="noopener">
{{ i18n "btn_dataset" }}
</a>
{{ end }}
{{ if $.Params.projects }}
{{ range $.Params.projects }}
{{ with ($.Site.GetPage (printf "project/%s" .)) }}
<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="{{ .Permalink }}">
{{ i18n "btn_project" }}
</a>
{{ else }}
{{ errorf "The `projects` parameter in `content/%s` references a project file, `content/project/%s`, which cannot be found. Please either set `projects = []` or fix the reference." $.File.Path . }}
{{ end }}
{{ end }}
{{ else }}
{{ with $.Params.url_project }}
<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="{{ . | absLangURL }}" target="_blank" rel="noopener">
{{ i18n "btn_project" }}
</a>
{{ end }}
{{ end }}
{{ with $.Params.url_poster }}
<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="{{ . | absURL }}" target="_blank" rel="noopener">
{{ i18n "btn_poster" }}
</a>
{{ end }}
{{ with $.Params.url_slides }}
<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="{{ . | absURL }}" target="_blank" rel="noopener">
{{ i18n "btn_slides" }}
</a>
{{ end }}
{{ with $.Params.url_video }}
<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="{{ . | absURL }}" target="_blank" rel="noopener">
{{ i18n "btn_video" }}
</a>
{{ end }}
{{ with $.Params.url_source }}
<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="{{ . | absURL }}" target="_blank" rel="noopener">
{{ i18n "btn_source" }}
</a>
{{ end }}
{{ range $.Params.url_custom }}
<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="{{ .url | absURL }}" target="_blank" rel="noopener">
{{ .name }}
</a>
{{ end }}
{{ $headers := findRE "<h[1-3].*?>(.|\n])+?</h[1-3]>" .Content }}
{{ $has_headers := ge (len $headers) 1 }}
{{ if $has_headers }}
<nav id="toc" data-toggle="">
<h4 class="text-muted">Contents</h4>
<ul style="list-style-type: none;padding-left: 20px;">
{{ range $i, $header := $headers }}
{{ $header_level := index (findRE "[1-3]" . 1) 0 }}
{{ $header_level := len (seq $header_level) }}
{{ $hash := index (findRE "id=.([^\"]+)." $header 1) 0 }}
{{ $hash := replace $hash "id=\"" "" }}
{{ $hash := replace $hash "\"" "" }}
{{ if ne $i 0 }}
{{ $previous_level := index (findRE "[1-3]" (index $headers (sub $i 1)) 1) 0 }}
{{ $previous_level := len (seq $previous_level) }}
{{ if gt $header_level $previous_level }}
{{ range seq (sub $header_level $previous_level) }}
<ul style="list-style-type: none;padding-left: 20px;">
{{ end }}
{{ end }}
{{ if lt $header_level $previous_level }}
{{ range seq (sub $previous_level $header_level) }}
</li></ul></li>
{{ end }}
{{ end }}
{{ if eq $header_level $previous_level }}
</li>
{{ end }}
<li>
{{with $hash}}
<a {{ printf "href=\"#%s\"" . | safeHTMLAttr }}>{{ $header | plainify | safeHTML }}</a>
{{end}}
{{ if eq $i (sub (len $headers) 1) }}
{{ range seq (sub $previous_level $header_level) }}
</li></ul></li>
{{ end }}
{{ end }}
{{ else }}
<li>
{{with $hash}}
<a {{ printf "href=\"#%s\"" . | safeHTMLAttr }}>{{ $header | plainify | safeHTML }}</a>
{{end}}
{{end}}
{{end}}
{{ $first_level := len (seq (index (findRE "[1-3]" (index $headers 0) 1) 0)) }}
{{ $last_level := len (seq (index (findRE "[1-3]" (index $headers (sub (len $headers) 1)) 1) 0)) }}
{{ range seq (sub $last_level $first_level) }}
</li></ul></li>
{{end}}
</ul>
</nav>
{{end}}
{{ $ := .root }}
{{ $page := .page }}
{{ $posts_len := len (where (where $.Site.RegularPages "Type" "doc") ".Params.notonhomepage" nil) }}
<!-- Blog Posts widget -->
<div class="row">
<div class="col-xs-12 col-md-4 section-heading">
<h1>{{ with $page.Title }}{{ . | markdownify }}{{ end }}</h1>
{{ with $page.Params.subtitle }}<p>{{ . | markdownify }}</p>{{ end }}
{{ if gt $posts_len $page.Params.count }}
<p class="view-all">
<a href="{{ ($.Site.GetPage "section" "doc").Permalink }}">
{{ i18n "more_posts" | markdownify }}
<i class="fa fa-angle-double-right"></i>
</a>
</p>
{{ end }}
</div>
<div class="col-xs-12 col-md-8">
{{ with $page.Content }}<p>{{ . | markdownify }}</p>{{ end }}
{{ if gt (len $page.Params.tags_include) 0 }}
{{ $posts := where (where (where $.Site.RegularPages "Type" "doc") ".Params.tags" "intersect" $page.Params.tags_include) ".Params.notonhomepage" nil }}
{{ $.Scratch.Add "show_post" "1" }}
{{ range $post := first $page.Params.count $posts }}
{{ $.Scratch.Set "show_post" "1" }}
{{/* If `tags_include` is set, exclude posts with no tags. */}}
{{ if and ($page.Params.tags_include) (lt (len .Params.tags) 1) }}
{{ $.Scratch.Set "show_post" "0" }}
{{end}}
{{/* If `tags_exclude` is set, exclude posts. */}}
{{ range $key, $val := .Params.tags }}
{{ if in $page.Params.tags_exclude $val }}
{{ $.Scratch.Set "show_post" "0" }}