Skip to content

Commit

Permalink
feat: browser message
Browse files Browse the repository at this point in the history
  • Loading branch information
encody committed Jul 26, 2023
1 parent c174b35 commit 1b50306
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 4 additions & 1 deletion layouts/partials/footer.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
<footer class="py:24 f:fade-50 f:fade-60@dark f:14 d:flex flex:col gap:8">
<footer class="py:24 f:fade-50 f:fade-60@dark f:14 d:flex flex:col gap:8 {text-decoration:underline}_a">
{{ if isset .Params "license" }}
<p>
This work is licensed under <a rel="license" href="{{ .Params.license.link }}">{{ .Params.license.name }}</a>.
</p>
{{ end }}
<p>&copy; Copyright {{ now.Format "2006" }} {{ .Site.Copyright }}.</p>
<p id="browserMessage" style="display:none">This site is designed for <a target="_blank" rel="noopener noreferrer"
href="https://firefox.com/">Firefox</a>, a web
browser that respects your privacy.</p>
<p class="
d:flex
{p:5}_a
Expand Down
8 changes: 7 additions & 1 deletion layouts/partials/head-extra.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
:target {
animation: highlight 1.2s forwards;
}

</style>
<script>
(() => {
Expand Down Expand Up @@ -72,6 +71,13 @@
e.trigger.textContent = 'Copy';
}, { once: true });
});

// Browser message
const browserMessage = document.getElementById('browserMessage');
const browserIsChromiumBased = !!window.chrome;
if (browserMessage && browserIsChromiumBased) {
browserMessage.style.display = '';
}
});
})();
</script>

0 comments on commit 1b50306

Please sign in to comment.