Added back to top button
This commit is contained in:
23
app/views/layouts/_back_to_top.html.erb
Normal file
23
app/views/layouts/_back_to_top.html.erb
Normal 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 %>
|
||||||
@@ -13,6 +13,7 @@
|
|||||||
<body class="bg-white">
|
<body class="bg-white">
|
||||||
<%= render "layouts/flash" %>
|
<%= render "layouts/flash" %>
|
||||||
<%= render "layouts/header" %>
|
<%= render "layouts/header" %>
|
||||||
|
<%= render "layouts/back_to_top" %>
|
||||||
<main class="container px-4 mx-auto mt-4">
|
<main class="container px-4 mx-auto mt-4">
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
Reference in New Issue
Block a user