Make scroll to top better, improve clarity on redirect page
This commit is contained in:
@@ -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
@@ -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
@@ -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' }} ↑</a>
|
||||
<a href="#start" class="back-to-top">{{ site.data.text[site.locale].back_to_top | default: 'Back to Top' }} ↑</a>
|
||||
</section>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
html {
|
||||
@include fluid-type($min-vw, $max-vw, $min-font-size, $max-font-size);
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
body {
|
||||
|
||||
Reference in New Issue
Block a user