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="inner">
<div class="title-area"> <div class="title-area">
{% if page.url == '/' %} {% if page.url == '/' %}
<h1 class="site-title"> <h1 class="site-title" id="start">
<a href="{{ '/' | relative_url }}"> <a href="{{ '/' | relative_url }}">
{% if site.logo %}<img src="{{ site_logo }}" alt="" class="site-logo">{% endif %} {% if site.logo %}<img src="{{ site_logo }}" alt="" class="site-logo">{% endif %}
<span>{{ site.title | escape }}</span> <span>{{ site.title | escape }}</span>
</a> </a>
</h1> </h1>
{% else %} {% else %}
<p class="site-title"> <p class="site-title" id="start">
<a href="{{ '/' | relative_url }}"> <a href="{{ '/' | relative_url }}">
{% if site.logo %}<img src="{{ site_logo }}" alt="" class="site-logo">{% endif %} {% if site.logo %}<img src="{{ site_logo }}" alt="" class="site-logo">{% endif %}
<span>{{ site.title | escape }}</span> <span>{{ site.title | escape }}</span>
+3 -3
View File
@@ -1,9 +1,9 @@
--- ---
layout: page layout: page
--- ---
<h1>Redirecting...</h1>
<p id="cat">{{page.class}}</p> <p style="display: none;" id="cat">{{page.class}}</p>
<p id="cat2">{{page.title | uri_escape }}</p> <p style="display: none;" id="cat2">{{page.title | uri_escape }}</p>
<script> <script>
window.location.replace("/projects/" + document.getElementById("cat").innerText.toLowerCase() + "#" + document.getElementById("cat2").innerText); window.location.replace("/projects/" + document.getElementById("cat").innerText.toLowerCase() + "#" + document.getElementById("cat2").innerText);
</script> </script>
+1 -1
View File
@@ -14,7 +14,7 @@ layout: page
{% include entry.html %} {% include entry.html %}
{% endfor %} {% endfor %}
</div> </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> </section>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
+1
View File
@@ -4,6 +4,7 @@
html { html {
@include fluid-type($min-vw, $max-vw, $min-font-size, $max-font-size); @include fluid-type($min-vw, $max-vw, $min-font-size, $max-font-size);
scroll-behavior: smooth;
} }
body { body {