Make scroll to top better, improve clarity on redirect page

This commit is contained in:
WillJeynes
2024-05-26 22:10:30 +01:00
parent f3d4c0a8b5
commit de77b77016
4 changed files with 7 additions and 6 deletions
+2 -2
View File
@@ -4,14 +4,14 @@
<div class="inner">
<div class="title-area">
{% if page.url == '/' %}
<h1 class="site-title">
<h1 class="site-title" id="start">
<a href="{{ '/' | relative_url }}">
{% if site.logo %}<img src="{{ site_logo }}" alt="" class="site-logo">{% endif %}
<span>{{ site.title | escape }}</span>
</a>
</h1>
{% else %}
<p class="site-title">
<p class="site-title" id="start">
<a href="{{ '/' | relative_url }}">
{% if site.logo %}<img src="{{ site_logo }}" alt="" class="site-logo">{% endif %}
<span>{{ site.title | escape }}</span>
+3 -3
View File
@@ -1,9 +1,9 @@
---
layout: page
---
<p id="cat">{{page.class}}</p>
<p id="cat2">{{page.title | uri_escape }}</p>
<h1>Redirecting...</h1>
<p style="display: none;" id="cat">{{page.class}}</p>
<p style="display: none;" id="cat2">{{page.title | uri_escape }}</p>
<script>
window.location.replace("/projects/" + document.getElementById("cat").innerText.toLowerCase() + "#" + document.getElementById("cat2").innerText);
</script>
+1 -1
View File
@@ -14,7 +14,7 @@ layout: page
{% include entry.html %}
{% endfor %}
</div>
<a href="#page-title" class="back-to-top">{{ site.data.text[site.locale].back_to_top | default: 'Back to Top' }} &uarr;</a>
<a href="#start" class="back-to-top">{{ site.data.text[site.locale].back_to_top | default: 'Back to Top' }} &uarr;</a>
</section>
{% endif %}
{% endfor %}
+1
View File
@@ -4,6 +4,7 @@
html {
@include fluid-type($min-vw, $max-vw, $min-font-size, $max-font-size);
scroll-behavior: smooth;
}
body {