Skip to content

Commit

Permalink
Move global SVGs to assets and find them with resources.Get
Browse files Browse the repository at this point in the history
  • Loading branch information
Perlence committed Dec 6, 2024
1 parent 54c7bcd commit 9887327
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 7 deletions.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
4 changes: 3 additions & 1 deletion layouts/about/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ <h3 class="about--what-we-do-item-title">{{ .Title }}</h3>
x-data="LetsTalkButton"
x-on:click.prevent="talkToUs"
>Let's talk{{
readFile "static/img/arrow-button.svg" | strings.TrimSpace | safeHTML
(resources.Get "img/arrow-button.svg").Content
| strings.TrimSpace
| safeHTML
}}</a
>
<script type="module">
Expand Down
10 changes: 7 additions & 3 deletions layouts/partials/contact-form.html
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,17 @@
>
Submit
{{
readFile "static/img/arrow-button.svg"
(resources.Get "img/arrow-button.svg").Content
| strings.TrimSpace
| safeHTML
}}
</button>

<div class="contact-form--fast-answer">
<span class="contact-form--fast-answer-ico">{{
readFile "static/img/ico-clock.svg" | strings.TrimSpace | safeHTML
(resources.Get "img/ico-clock.svg").Content
| strings.TrimSpace
| safeHTML
}}</span>We'll respond within 24 hours
</div>
</div>
Expand All @@ -143,7 +145,9 @@
<template x-if="formSent">
<div class="contact-form--success">
<span class="contact-form--success-ico">{{
readFile "static/img/ico-success.svg" | strings.TrimSpace | safeHTML
(resources.Get "img/ico-success.svg").Content
| strings.TrimSpace
| safeHTML
}}</span>Thank you! Your message has been sent.
</div>
</template>
Expand Down
4 changes: 3 additions & 1 deletion layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ <h2 id="talk" class="footer--title">Let's talk</h2>
{{ partial "contact-form.html" . }}
<div class="footer--contacts">
{{
readFile "static/img/ico-asterisk.svg" | strings.TrimSpace | safeHTML
(resources.Get "img/ico-asterisk.svg").Content
| strings.TrimSpace
| safeHTML
}}
<div class="footer--contacts-block">
<div class="footer--contacts-title">Get in touch</div>
Expand Down
6 changes: 4 additions & 2 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
class="header--logo"
x-bind:class="isMenuOpen && 'is-open'"
href="/"
>{{ readFile "static/img/logo.svg" | strings.TrimSpace | safeHTML }}</a
>{{ (resources.Get "img/logo.svg").Content | strings.TrimSpace | safeHTML }}</a
>
<div class="header--menu" x-bind:class="isMenuOpen && 'is-open'">
<div class="header--menu-inner">
Expand All @@ -28,7 +28,9 @@
<div class="header--button-wrapper">
<a class="header--button" href="#talk" x-on:click.prevent="talkToUs"
>{{
readFile "static/img/ico-talk.svg" | strings.TrimSpace | safeHTML
(resources.Get "img/ico-talk.svg").Content
| strings.TrimSpace
| safeHTML
}}Talk to us</a
>
</div>
Expand Down

0 comments on commit 9887327

Please sign in to comment.