Add future styling

This commit is contained in:
Joshua Coles 2023-09-29 21:40:52 +01:00
parent 211825faf8
commit 3c55c64b3f

View File

@ -25,7 +25,8 @@
</tr> </tr>
<% lectures.each do |lecture| %> <% lectures.each do |lecture| %>
<tr> <% style = if lecture.start_time.future? then 'background: repeating-linear-gradient(45deg, #f3f4f6, #f3f4f6 10px, white 10px, white 20px);' else '' end %>
<tr style="<%= style %>">
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6"> <td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6">
<%= lecture.nice_title %> <%= lecture.nice_title %>
</td> </td>
@ -52,16 +53,16 @@
<% end %> <% end %>
</td> </td>
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500"> <td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
<% if lecture.attendance.nil? %> <% if lecture.attendance.nil? %>
<button type="button" class="rounded bg-indigo-600 px-2 py-1 font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"> <button type="button" class="rounded bg-indigo-600 px-2 py-1 font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600">
Start Start
</button> </button>
<% else %> <% else %>
<%= link_to "Open recording", lecture.recording_url %> <%= link_to "Open recording", lecture.recording_url %>
<% end %> <% end %>
</td> </td>
<% end %> <% end %>
</tr> </tr>
<% end %> <% end %>
<% end %> <% end %>