Skip to content
Snippets Groups Projects
Commit fefe3c22 authored by Teal's avatar Teal
Browse files

jump to current time

parent baa3f3fb
No related branches found
No related tags found
No related merge requests found
......@@ -9,6 +9,9 @@ current_time = Time.zone.now.in_time_zone(@conference.time_zone)
%>
<%= turbo_stream_from @conference %>
<div>
<div>
<a href="#now" onclick="document.querySelector('#now').scrollIntoView({ behavior: 'smooth', block: 'center', inline: 'nearest' }); return false" class="underline text-blue-500">Jump to current time</a>
</div>
<h1 class="text-2xl font-bold my-2"><%= @conference.name %></h1>
<p class="text-xs mb-6">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="inline-block size-4 stroke-slate-500">
......@@ -88,8 +91,10 @@ current_time = Time.zone.now.in_time_zone(@conference.time_zone)
currentTimeDiv.style.top = `${topPosition}px`;
currentTimeDiv.style.display = 'block';
currentTimeDiv.id = 'now';
} else {
currentTimeDiv.style.display = 'none';
currentTimeDiv.removeAttribute('id');
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment