REWORK button: add option for multiple button, CHANGE font
This commit is contained in:
parent
db7ec5795f
commit
f696b07527
9 changed files with 81 additions and 63 deletions
7
layouts/partials/components/button.html
Normal file
7
layouts/partials/components/button.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
{{ $outlined := "outlined"}}
|
||||
<a class="{{if eq .type $outlined}} button-outlined {{else}} button-filled {{end}}" href="{{ .url }}">
|
||||
{{ with .icon }}
|
||||
<i class="icon-{{ . }}"></i>
|
||||
{{ end }}
|
||||
{{ .text }}
|
||||
</a>
|
|
@ -1,4 +1,5 @@
|
|||
{{- $contact := .contact }}
|
||||
{{- $content := .content }}
|
||||
{{- $id := "contact"}}
|
||||
{{if $contact.id}}
|
||||
{{- $id = $contact.id}}
|
||||
|
@ -9,7 +10,7 @@
|
|||
<div class="section-content contact">
|
||||
<div class="contact-text">
|
||||
<h1>{{ $contact.title }}</h1>
|
||||
<p>{{ $contact.subtitle }}</p>
|
||||
<p>{{ $content }}</p>
|
||||
</div>
|
||||
<div class="contact-button-container">
|
||||
<a class="contact-button" href="{{ $contact.button.url }}">{{ $contact.button.text }}</a>
|
||||
|
|
|
@ -16,23 +16,25 @@
|
|||
<a class="home" href="/#"><img id="logo" class="logo" src="{{ .Site.Params.logo }}" alt="Logo"></a>
|
||||
<div class="header-items" id="header-items">
|
||||
{{- range $links}}
|
||||
{{ if .links }}
|
||||
<div class="header-item dropdown">
|
||||
<button class="dropbtn">{{ .text }}
|
||||
<i class="icon-caret-down"></i>
|
||||
</button>
|
||||
<div class="dropdown-content">
|
||||
{{- range .links}}
|
||||
<a href="{{ .url }}">{{ .text }}</a>
|
||||
{{- end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ else }}
|
||||
<a class="header-item" href="{{ .url }}">{{ .text }}</a>
|
||||
{{ end }}
|
||||
{{ if .links }}
|
||||
<div class="header-item dropdown">
|
||||
<button class="dropbtn">{{ .text }}
|
||||
<i class="icon-caret-down"></i>
|
||||
</button>
|
||||
<div class="dropdown-content">
|
||||
{{- range .links}}
|
||||
<a href="{{ .url }}">{{ .text }}</a>
|
||||
{{- end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ else }}
|
||||
<a class="header-item" href="{{ .url }}">{{ .text }}</a>
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
{{ if $header.button }}
|
||||
<a class="header-contact-button" href="{{ $header.button.url }}">{{ $header.button.text }}</a>
|
||||
{{- range $header.button }}
|
||||
{{ partial "components/button.html" . }}
|
||||
{{- end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -21,9 +21,12 @@
|
|||
<div class="divider"></div>
|
||||
</div>
|
||||
<p>{{ $content }}</p>
|
||||
{{if $hero.button.visible}}
|
||||
<a class="hero-button" href="{{ $hero.button.url }}">{{ $hero.button.text }}</a>
|
||||
{{end}}
|
||||
<br />
|
||||
{{ with $hero.button }}
|
||||
{{- range .}}
|
||||
{{ partial "components/button.html" . }}
|
||||
{{- end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="hero-icon-container col-7">
|
||||
<img class="service-icon" alt="{{ $hero.image.alt }}" src="{{ $hero.image.url }}">
|
||||
|
|
|
@ -20,9 +20,12 @@
|
|||
<div class="divider"></div>
|
||||
</div>
|
||||
<p>{{ $content }}</p>
|
||||
{{if and ($service.button) ($service.button.visible)}}
|
||||
<a class="service-button" href="{{ $service.button.url }}">{{ $service.button.text }}</a>
|
||||
{{end}}
|
||||
<br />
|
||||
{{ if $service.button }}
|
||||
{{- range $service.button }}
|
||||
{{ partial "components/button.html" . }}
|
||||
{{- end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{if and ($service.image) (eq $service.image.direction "right")}}
|
||||
<div class="service-icon-container col-4">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue