You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openpower.foundation_sw_dev/themes/openpowerfoundation/layouts/compliance/single.html

108 lines
3.6 KiB
HTML

{{ partial "header.html" . }}
{{ partial "navbar.html" . }}
{{ $filename := .File.BaseFileName }}
{{ $datafile := index $.Site.Data.compliance $filename }}
{{ $specificationfile := printf "%s/%s" "specifications" $filename }}
<main id="specifications-single">
<section id="page" class="section-bg">
<div class="row">
<div class="section-header my-3 my-md5 pb-2 pb-md3 text-center">
<h2 class="section-title text-center">{{ .Title }}</h2>
<p class="section-description"></p>
</div>
<div class="row">
<div class="col-lg-3"></div>
<div class="col-lg-6">
{{ if $datafile.versions }}
{{ range last 1 $datafile.versions }}
<a href="{{ .download }}"><i class="far fa-file-pdf mr-2"></i>&nbsp;Download version {{.number }}</a>
<span class="changetime-wrapper"><span class="changetime">{{ .date }}</span></span>
{{ end }}
{{ end }}
</div>
<div class="col-lg-3"></div>
</div>
{{ if .Param "publicreview" }}
{{ $reviewenddate := .Date.AddDate 0 0 30 }}
{{ if lt now $reviewenddate }}
<div class="row">
<div class="col-lg-3"></div>
<div class="col-lg-6">
<b>The Public Review for this document completes at close-of-business on {{ $reviewenddate.Format "Monday 2 January 2006" }}.</b>
</div>
<div class="col-lg-3"></div>
</div>
{{ end }}
{{ end }}
<div class="row">
<div class="col-lg-3"></div>
<div class="col-lg-6 content wow fadeInTop">
<p>{{ .Content }}</p>
</div>
<div class="col-lg-3">
{{ if .Param "group" }}
{{ $group := printf "%s/%s" "groups" (.Param "group") }}
{{ with $.Site.GetPage $group }}
Owned by : <a href="{{ .RelPermalink }}">{{ .Title }}</a><br>
{{ end }}
{{ end }}
{{ with $.Site.GetPage $specificationfile }}
Specification File : <a href="{{ .RelPermalink }}">{{ $filename }}</a><br>
{{ end }}
{{ if $datafile.versions }}
<ul class="changelogtimeline">
{{ range sort $datafile.versions "date" "desc" }}
<li>
<div class="direction-r">
<div class="changeflag-wrapper">
<span class="changeflag">version {{ .number }}</span>
<span class="changetime-wrapper"><span class="changetime">{{ .date }}</span></span>
</div>
<div class="desc">{{ .description }}</div>
{{ if .download }}
<div class="desc"><a href="{{ .download }}">download</a></div>
{{ end }}
</div>
</li>
{{ end }}
</ul>
{{ end }}
</div>
</div>
{{ if .Params.tags }}
{{ $tags := .Params.tags }}
<div class="row">
<div class="col-lg-3"></div>
<div class="col-lg-6 text-center">
{{ if not (eq (len $.Site.Taxonomies.tags) 0) }}
{{ $fontUnit := "rem" }}
{{ $largestFontSize := 3.5 }}
{{ $smallestFontSize := 0.5 }}
{{ $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 }}
{{ 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 := (add $smallestFontSize (mul (sub $largestFontSize $smallestFontSize) $weigth) ) }}
{{ range $tags }}
{{ if eq $name . }}
&nbsp;
<span style="font-size: {{ $currentFontSize }}{{ $fontUnit }}">{{ $name }}</span>
&nbsp;
{{ end }}
{{ end }}
{{ end }}
</div>
<div class="col-lg-3"></div>
{{ end }}
</div>
{{ end }}
</section>
</main>
{{ partial "footer.html" . }}