diff options
author | Curtis Timson <curt@live.co.uk> | 2018-02-24 12:20:37 +0300 |
---|---|---|
committer | Curtis Timson <curt@live.co.uk> | 2018-02-24 12:20:37 +0300 |
commit | 5bab708ea64b74b48f752f835ad49b4ac1d9bbbf (patch) | |
tree | b35a436be8a28297a26640666bc0bc38afd7010f | |
parent | 485c5d8dbab39f1d0f46cca062096c51a0a342b7 (diff) |
:recycle: Replace hugo variables with with statements
-rw-r--r-- | layouts/partials/intro.html | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/layouts/partials/intro.html b/layouts/partials/intro.html index 381cc12..d5ce1b0 100644 --- a/layouts/partials/intro.html +++ b/layouts/partials/intro.html @@ -1,43 +1,48 @@ <!-- Intro --> -{{ $section1 := index .Site.Data.home.intro.sections 0 }} -{{ $section2 := index .Site.Data.home.intro.sections 1 }} -{{ $section3 := index .Site.Data.home.intro.sections 2 }} -{{ $button1 := index .Site.Data.home.intro.buttons 0 }} -{{ $button2 := index .Site.Data.home.intro.buttons 1 }} <section id="intro" class="container"> <div class="row"> <div class="4u 12u(mobile)"> <section class="first"> - <i class='icon featured {{ $section1.icon }}'></i> + {{ with index .Site.Data.home.intro.sections 0 }} + <i class='icon featured {{ .icon }}'></i> <header> - <h2>{{ $section1.title }}</h2> + <h2>{{ .title }}</h2> </header> - <p>{{ $section1.description }}</p> + <p>{{ .description }}</p> + {{ end }} </section> </div> <div class="4u 12u(mobile)"> <section class="middle"> - <i class="icon featured alt {{ $section2.icon }}"></i> + {{ with index .Site.Data.home.intro.sections 1 }} + <i class="icon featured alt {{ .icon }}"></i> <header> - <h2>{{ $section2.title }}</h2> + <h2>{{ .title }}</h2> </header> - <p>{{ $section2.description }}</p> + <p>{{ .description }}</p> + {{ end }} </section> </div> <div class="4u 12u(mobile)"> <section class="last"> - <i class="icon featured alt2 {{ $section3.icon }}"></i> + {{ with index .Site.Data.home.intro.sections 2 }} + <i class="icon featured alt2 {{ .icon }}"></i> <header> - <h2>{{ $section3.title }}</h2> + <h2>{{ .title }}</h2> </header> - <p>{{ $section3.description }}</p> + <p>{{ .description }}</p> + {{ end }} </section> </div> </div> <footer> <ul class="actions"> - <li><a href="{{ $button1.link }}" class="button big">{{ $button1.text }}</a></li> - <li><a href="{{ $button2.link }}" class="button alt big">{{ $button2.text }}</a></li> + {{ with index .Site.Data.home.intro.buttons 0 }} + <li><a href="{{ .link }}" class="button big">{{ .text }}</a></li> + {{ end }} + {{ with index .Site.Data.home.intro.buttons 1 }} + <li><a href="{{ .link }}" class="button alt big">{{ .text }}</a></li> + {{ end }} </ul> </footer> </section>
\ No newline at end of file |