Skip to content
Snippets Groups Projects
Commit 48a85356 authored by Naoya Ozawa's avatar Naoya Ozawa
Browse files

[add] pull-down button for the events section without children #7

parent 6682caf9
Tags
No related merge requests found
......@@ -19,21 +19,21 @@
<div class="nest">
<!-- Special action: "lab" -->
{{ if eq .Identifier "lab" }}
<div>
{{ range .Children }}
{{ $nm := .Name }}
{{ $w := .Weight }}
{{ $pt := .URL | relLangURL }}
<!-- Fetch image path -->
{{ range $.Site.RegularPages }}
{{ if (.Param "mktile") }}
{{ if eq .Weight $w }}
<a href="{{ .RelPermalink }}" class="tile"><img src="{{ .Page.Param "image" }}" alt={{ $nm }} title={{ $nm }}><div class="caption">{{ $nm }}</div></a>
<div>
{{ range .Children }}
{{ $nm := .Name }}
{{ $w := .Weight }}
{{ $pt := .URL | relLangURL }}
<!-- Fetch image path -->
{{ range $.Site.RegularPages }}
{{ if (.Param "mktile") }}
{{ if eq .Weight $w }}
<a href="{{ .RelPermalink }}" class="tile"><img src="{{ .Page.Param "image" }}" alt={{ $nm }} title={{ $nm }}><div class="caption">{{ $nm }}</div></a>
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
</div>
</div>
<!-- END Special action: "lab" -->
......@@ -55,7 +55,19 @@
{{ end }}
</div>
{{ else }}
<a href="{{ .URL }}"><button class="pseudo_button">{{- .Name -}}</button></a>
<!-- Special action: "events" -->
{{ if eq .URL "/events" }}
<button class="button">{{ .Name }}</button>
<div class="nest">
<p>This is where the upcoming events will be listed.</p>
</div>
<!-- END Special action: "events" -->
{{ else }}
<a href="{{ .URL }}"><button class="pseudo_button">{{- .Name -}}</button></a>
{{ end }}
{{ end }}
{{ end }}
</ul>
......
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