Added back to top button

This commit is contained in:
2024-09-18 06:45:18 +02:00
parent 472236e6f5
commit bf87e09bc6
2 changed files with 24 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
<!-- Back to top button -->
<%= link_to "#" do %>
<button
type="button"
data-twe-ripple-init
data-twe-ripple-color="light"
class="!fixed bottom-5 end-5 rounded-full bg-hsrm-red p-3 text-xs font-medium uppercase leading-tight text-white shadow-md transition duration-150 ease-in-out hover:bg-hsrm-red-light hover:shadow-lg focus:bg-hsrm-red-light focus:shadow-lg focus:outline-none focus:ring-0 active:bg-hsrm-red-light active:shadow-lg"
id="btn-back-to-top">
<span class="[&>svg]:w-4">
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="3"
stroke="currentColor">
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M4.5 10.5 12 3m0 0 7.5 7.5M12 3v18" />
</svg>
</span>
</button>
<% end %>

View File

@@ -13,6 +13,7 @@
<body class="bg-white">
<%= render "layouts/flash" %>
<%= render "layouts/header" %>
<%= render "layouts/back_to_top" %>
<main class="container px-4 mx-auto mt-4">
<%= yield %>
</main>