Browse Source

Full fallback for logo and hamburger menu on Tor high security mode

Signed-off-by: Anxhelo Lushka <anxhelo1995@gmail.com>
pull/21/head
Anxhelo Lushka 2 years ago
parent
commit
cd7559ea2d
No known key found for this signature in database GPG Key ID: C86D6CF1F7FAAA35
  1. 2
      layouts/_default/menu.html
  2. 2
      layouts/index.html
  3. 37
      layouts/partials/menu.html
  4. 4
      layouts/partials/noscript.html
  5. BIN
      static/img/logo-nojs-dark.png
  6. BIN
      static/img/logo-nojs-default.png
  7. BIN
      static/img/logo-nojs-light.png
  8. BIN
      static/img/menu-nojs-dark.png
  9. BIN
      static/img/menu-nojs-default.png
  10. BIN
      static/img/menu-nojs-light.png

2
layouts/_default/menu.html

@ -14,7 +14,7 @@
<div class="container pt-2">
<div class="navbar align-items-center justify-content-between">
<a aria-label="Ura Logo" class="brand" href="{{ .Site.BaseURL }}">
{{ partial "logo.html" "white" }}
<img src="{{ .Site.BaseURL}}/img/logo-nojs-light.png" alt="Ura Design logo" width="114" height="41">
</a>
</div>
</div>

2
layouts/index.html

@ -6,7 +6,7 @@
<div class="row justify-content-between align-items-center">
{{ range where (where .Site.RegularPages "Type" "clients") "Params.home" true }}
<div class="col-xl-2 col-lg-4 col-6 text-center">
<a href="{{ .Page.Params.link }}" target="_blank" rel="noopener noreferrer">
<a class="d-flex justify-content-center" href="{{ .Page.Params.link }}" target="_blank" rel="noopener noreferrer">
<img class="img-fluid with-js" src="/img/clients/{{ .Page.Params.image }}.svg" alt="{{ .Page.Params.name }}">
<img class="img-fluid no-js" src="/img/clients/{{ .Params.image }}.webp" alt="{{ .Page.Params.name }}">
</a>

37
layouts/partials/menu.html

@ -21,6 +21,23 @@
{{ else }}
{{ partial "logo.html" "default" }}
{{ end }}
<noscript>
{{ if .IsHome }}
<img src="{{ .Site.BaseURL}}/img/logo-nojs-light.png" alt="Ura Design logo" width="114" height="41">
{{ else if eq .Page.Type "about" }}
<img src="{{ .Site.BaseURL}}/img/logo-nojs-light.png" alt="Ura Design logo" width="114" height="41">
{{ else if eq .Page.Type "probono" }}
<img src="{{ .Site.BaseURL}}/img/logo-nojs-light.png" alt="Ura Design logo" width="114" height="41">
{{ else if and (eq .IsPage true) (eq .Page.Type "blog") }}
<img src="{{ .Site.BaseURL}}/img/logo-nojs-light.png" alt="Ura Design logo" width="114" height="41">
{{ else if eq .Page.Params.theme "dark" }}
<img src="{{ .Site.BaseURL}}/img/logo-nojs-light.png" alt="Ura Design logo" width="114" height="41">
{{ else if eq .Page.Params.theme "light" }}
<img src="{{ .Site.BaseURL}}/img/logo-nojs-dark.png" alt="Ura Design logo" width="114" height="41">
{{ else }}
<img src="{{ .Site.BaseURL}}/img/logo-nojs-default.png" alt="Ura Design logo" width="114" height="41">
{{ end }}
</noscript>
</a>
<button class="navbar-toggler with-js" type="button" aria-label="Toggle navigation" onclick="openNav()">
<span class="inline-svg">
@ -28,9 +45,23 @@
</span>
</button>
<a class="navbar-toggler no-js d-lg-none" href="{{ "/menu/" | absLangURL }}" aria-label="Open menu">
<span class="inline-svg">
<svg class="{{ if .IsHome }}txt-white{{ else if eq $theme "dark" }}txt-white{{ else if eq $theme "light" }}txt-dark{{ else if eq $type "about" }}txt-white{{ else if eq $type "probono" }}txt-white{{ else if and (eq $page true) (eq $type "blog") }}txt-white{{ else }}color-blue-500{{ end }}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" {{ if isset .Page.Params "text" }}style="color: {{ .Page.Params.text }} !important;"{{ end }}><path fill="currentColor" d="M416 288C433.7 288 448 302.3 448 320C448 337.7 433.7 352 416 352H32C14.33 352 0 337.7 0 320C0 302.3 14.33 288 32 288H416zM416 160C433.7 160 448 174.3 448 192C448 209.7 433.7 224 416 224H32C14.33 224 0 209.7 0 192C0 174.3 14.33 160 32 160H416z"></path></svg>
</span>
<noscript>
{{ if .IsHome }}
<img src="{{ .Site.BaseURL}}/img/menu-nojs-light.png" alt="" width="24" height="24">
{{ else if eq .Page.Type "about" }}
<img src="{{ .Site.BaseURL}}/img/menu-nojs-light.png" alt="" width="24" height="24">
{{ else if eq .Page.Type "probono" }}
<img src="{{ .Site.BaseURL}}/img/menu-nojs-light.png" alt="" width="24" height="24">
{{ else if and (eq .IsPage true) (eq .Page.Type "blog") }}
<img src="{{ .Site.BaseURL}}/img/menu-nojs-light.png" alt="" width="24" height="24">
{{ else if eq .Page.Params.theme "dark" }}
<img src="{{ .Site.BaseURL}}/img/menu-nojs-light.png" alt="" width="24" height="24">
{{ else if eq .Page.Params.theme "light" }}
<img src="{{ .Site.BaseURL}}/img/menu-nojs-dark.png" alt="" width="24" height="24">
{{ else }}
<img src="{{ .Site.BaseURL}}/img/menu-nojs-default.png" alt="" width="24" height="24">
{{ end }}
</noscript>
</a>
<div class="collapse navbar-collapse flex-grow-0">
<ul class="navbar-nav">

4
layouts/partials/noscript.html

@ -92,6 +92,10 @@
height: 100%;
}
svg.logo {
display: none;
}
#expertise {
display: block !important;
}

BIN
static/img/logo-nojs-dark.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
static/img/logo-nojs-default.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
static/img/logo-nojs-light.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
static/img/menu-nojs-dark.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
static/img/menu-nojs-default.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
static/img/menu-nojs-light.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Loading…
Cancel
Save