Partials take styling class for section as param
This commit is contained in:
@ -110,7 +110,7 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{{template "benefits" .}}
|
||||
{{template "benefits" (dict "Page" . "SectionClass" "section--light") }}
|
||||
|
||||
<section id="windows10-eol" class="section windows-eol">
|
||||
<div class="container">
|
||||
@ -322,7 +322,7 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{{template "linux_features" .}}
|
||||
{{template "linux_features" (dict "Page" . "SectionClass" "section--light-green") }}
|
||||
|
||||
<section class="section cta">
|
||||
<div class="container">
|
||||
|
@ -72,7 +72,7 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{{template "benefits" .}}
|
||||
{{template "benefits" (dict "Page" . "SectionClass" "section--light-green") }}
|
||||
|
||||
<section class="section section--light distros">
|
||||
<div class="container">
|
||||
@ -113,7 +113,7 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{{template "linux_features" .}}
|
||||
{{template "linux_features" (dict "Page" . "SectionClass" "section--light-green") }}
|
||||
|
||||
<section class="section cta">
|
||||
<div class="container">
|
||||
|
@ -1,5 +1,8 @@
|
||||
{{define "benefits"}}
|
||||
<section id="voordelen" class="section {{if eq .CurrentPage "linux"}}section--light-green{{else}}section--light{{end}} benefits">
|
||||
{{/* Pass SectionClass via dict: template "benefits" (dict "Page" . "SectionClass" "section--light") */}}
|
||||
{{ $sectionClass := "section--light" }}
|
||||
{{ with index . "SectionClass" }}{{ $sectionClass = . }}{{ end }}
|
||||
<section id="voordelen" class="section {{$sectionClass}} benefits">
|
||||
<div class="container">
|
||||
<h2><a href="/linux">Waarom Linux kiezen?</a></h2>
|
||||
<div class="benefits-grid">
|
||||
|
@ -1,5 +1,7 @@
|
||||
{{define "linux_features"}}
|
||||
<section class="section section--light-green linux-features">
|
||||
{{ $sectionClass := "section--light-green" }}
|
||||
{{ with index . "SectionClass" }}{{ $sectionClass = . }}{{ end }}
|
||||
<section class="section {{$sectionClass}} linux-features">
|
||||
<div class="container">
|
||||
<h2><a href="/linux">Linux in actie</a></h2>
|
||||
<p class="section-subtitle">Zie hoe Linux eruitziet en werkt in de praktijk</p>
|
||||
|
Reference in New Issue
Block a user