Skip to content

Commit

Permalink
get rid of .simpleFooter content parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
stebunovd committed Dec 14, 2024
1 parent e8fa4b7 commit 4acf08a
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 58 deletions.
2 changes: 1 addition & 1 deletion assets/sass/_footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
}
}

&--simple {
&--blog {
background: #eceefd;
color: $primary-violet;
}
Expand Down
1 change: 0 additions & 1 deletion content/blog/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ title: Blog - ivelum
description: ivelum is a distributed team of engineers headquartered in Vilnius, Lithuania. We've been helping both start-ups and established businesses build their products since 2003
layout: blog
cascade:
simpleFooter: true
sitemap:
disable: true
---
10 changes: 9 additions & 1 deletion layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,18 @@
{{- end }}
</head>
<body>
{{ partial "header.html" . }}

{{- block "header" . }}
{{ partial "header.html" (dict "context" . "TalkToUsAbsolute" false) }}
{{ end }}

{{- block "main" . }}
{{- end }}

{{- block "footer" . }}
{{ partial "footer.html" . }}
{{- end }}

<script type="module">
import * as Sentry from '@sentry/browser';
import Alpine from 'alpinejs';
Expand Down
9 changes: 8 additions & 1 deletion layouts/blog/blog.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{{- define "header" }}
{{ partial "header.html" (dict "context" . "TalkToUsAbsolute" true) }}
{{ end }}

{{- define "main" }}
{{- $logs := slice }}
{{- if hugo.IsDevelopment }}
Expand Down Expand Up @@ -53,4 +57,7 @@ <h2 class=blog--item-title>{{ .Title }}</h2>
</div>
</div>
{{- end }}
{{- /* TODO: Change the footer. */}}

{{- define "footer" }}
{{ partial "blog-footer.html" . }}
{{- end }}
8 changes: 8 additions & 0 deletions layouts/blog/single.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{{- define "header" }}
{{ partial "header.html" (dict "context" . "TalkToUsAbsolute" true) }}
{{ end }}

{{- define "main" }}
<div class="page article">
<div class="article--back">
Expand Down Expand Up @@ -53,3 +57,7 @@ <h1 class="article--title">{{ .Title }}</h1>
{{ partial "blog-navigation.html" . }}
</div>
{{- end }}

{{- define "footer" }}
{{ partial "blog-footer.html" . }}
{{- end }}
17 changes: 17 additions & 0 deletions layouts/partials/blog-footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<div class="footer footer--blog">
<div class="container">
<div class="footer--grid-simple">
<a class="footer--logo" href="/">{{ (resources.Get "img/logo.svg").Content | strings.TrimSpace | safeHTML }}</a>
<div class="footer--menu">
{{- range site.Menus.main }}
<a
href="{{ .URL }}"
class="footer--menu-item {{- if eq $.RelPermalink .URL }} is-active{{ end -}}"
>
{{ .Name }}
</a>
{{- end }}
</div>
</div>
</div>
</div>
74 changes: 29 additions & 45 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
@@ -1,54 +1,38 @@
<div class="footer{{ if not .Page.Params.simpleFooter }} footer--default{{ else }} footer--simple{{ end }}">
<div class="footer footer--default">
<div class="container">
{{ if .Params.simpleFooter }}
<div class="footer--grid-simple">
<a class="footer--logo" href="/">{{ (resources.Get "img/logo.svg").Content | strings.TrimSpace | safeHTML }}</a>
<div class="footer--menu">
{{- range site.Menus.main }}
<a
href="{{ .URL }}"
class="footer--menu-item {{- if eq $.RelPermalink .URL }} is-active{{ end -}}"
>
{{ .Name }}
</a>
{{- end }}
<h2 id="talk" class="footer--title">Let's talk</h2>
<div class="footer--grid">
{{ partial "contact-form.html" . }}
<div class="footer--contacts">
{{
(resources.Get "img/ico-asterisk.svg").Content
| strings.TrimSpace
| safeHTML
}}
<div class="footer--contacts-block">
<div class="footer--contacts-title">Get in touch</div>
<div class="footer--contacts-body">
<a href="mailto:[email protected]">[email protected]</a>
</div>
</div>
{{ else }}
<h2 id="talk" class="footer--title">Let's talk</h2>
<div class="footer--grid">
{{ partial "contact-form.html" . }}
<div class="footer--contacts">
{{
(resources.Get "img/ico-asterisk.svg").Content
| strings.TrimSpace
| safeHTML
}}
<div class="footer--contacts-block">
<div class="footer--contacts-title">Get in touch</div>
<div class="footer--contacts-body">
<a href="mailto:[email protected]">[email protected]</a>
</div>
<div class="footer--contacts-block">
<div class="footer--contacts-title">Lithuania</div>
<div class="footer--contacts-body">
<a href="tel:+37067527718">+370 675 27718</a><br />
21 Upės g., Vilnius LT-08128, Lithuania
</div>
<div class="footer--contacts-block">
<div class="footer--contacts-title">Lithuania</div>
<div class="footer--contacts-body">
<a href="tel:+37067527718">+370 675 27718</a><br />
21 Upės g., Vilnius LT-08128, Lithuania
</div>
</div>
<div class="footer--contacts-block">
<div class="footer--contacts-title">Spain</div>
<div class="footer--contacts-body">
<a href="tel:+34670996329">+34 670 99 63 29</a><br />
45, Calle Beire, Madrid 28039, Spain
</div>
</div>
<div class="footer--contacts-copyright">
© ivelum 2003 – 2023 <a href="/privacy/">Privacy policy</a>
</div>
<div class="footer--contacts-block">
<div class="footer--contacts-title">Spain</div>
<div class="footer--contacts-body">
<a href="tel:+34670996329">+34 670 99 63 29</a><br />
45, Calle Beire, Madrid 28039, Spain
</div>
</div>
<div class="footer--contacts-copyright">
© ivelum 2003 – 2023 <a href="/privacy/">Privacy policy</a>
</div>
{{ end}}
</div>
</div>
</div>
</div>
14 changes: 5 additions & 9 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,11 @@
{{- end }}
</div>
<div class="header--button-wrapper">
<a
class="header--button"
{{ if .Params.simpleFooter }}
href="/contact/#talk"
{{ else }}
href="#talk"
x-on:click.prevent="talkToUs"
{{ end }}
>
{{- if .TalkToUsAbsolute }}
<a class="header--button" href="/contact/#talk">
{{- else }}
<a class="header--button" href="#talk" x-on:click.prevent="talkToUs">
{{- end }}
{{ (resources.Get "img/ico-talk.svg").Content | strings.TrimSpace | safeHTML }}
Talk to us
</a>
Expand Down

0 comments on commit 4acf08a

Please sign in to comment.