Some initial UI work
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<div class="-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
|
||||
<div class="inline-block min-w-full py-2 align-middle sm:px-6 lg:px-8">
|
||||
<div class="overflow-hidden shadow ring-1 ring-black ring-opacity-5 sm:rounded-lg">
|
||||
<h2 class="text-2xl p-2 px-4">Continuum Mechanics</h2>
|
||||
<h2 class="text-2xl p-2 px-4"><%= @course.title %></h2>
|
||||
|
||||
<table class="border-t-2 min-w-full divide-y divide-gray-300">
|
||||
<thead class="bg-gray-50">
|
||||
@@ -18,41 +18,40 @@
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-200 bg-white">
|
||||
|
||||
<tr class="border-t border-gray-200">
|
||||
<th colspan="4" scope="colgroup" class="bg-gray-50 py-2 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-5">Week 1</th>
|
||||
</tr>
|
||||
<% @course.lectures.group_by { |lecture| lecture.week_number }.each do |(week_number, lectures)| %>
|
||||
<tr class="border-t border-gray-200">
|
||||
<th colspan="4" scope="colgroup" class="bg-gray-50 py-2 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Week <%= week_number %></th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6">Lindsay Walton</td>
|
||||
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">Front-end Developer</td>
|
||||
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">lindsay.walton@example.com</td>
|
||||
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">Member</td>
|
||||
</tr>
|
||||
|
||||
<tr class="border-t border-gray-200">
|
||||
<th colspan="4" scope="colgroup" class="bg-gray-50 py-2 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-5">Week 1</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6">Lindsay Walton</td>
|
||||
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">Front-end Developer</td>
|
||||
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">lindsay.walton@example.com</td>
|
||||
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">Member</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6">Lindsay Walton</td>
|
||||
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">Front-end Developer</td>
|
||||
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">lindsay.walton@example.com</td>
|
||||
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">Member</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6">Lindsay Walton</td>
|
||||
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">Front-end Developer</td>
|
||||
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">lindsay.walton@example.com</td>
|
||||
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">Member</td>
|
||||
</tr>
|
||||
|
||||
<!-- More people... -->
|
||||
<% lectures.each do |lecture| %>
|
||||
<tr>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6">
|
||||
<%= lecture.title %>
|
||||
</td>
|
||||
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
||||
<%= lecture.start_time.to_fs(:dmy) %>
|
||||
</td>
|
||||
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
||||
<% if lecture.status == 'future' %>
|
||||
<i class="fa fa-clock"></i>
|
||||
<% elsif lecture.status == 'happening_now' %>
|
||||
<i class="fa fa-hourglass-start"></i>
|
||||
<% elsif lecture.status == 'attended_in_person' %>
|
||||
<i class="fa fa-chalkboard-user"></i>
|
||||
<% elsif lecture.status == 'watched_recording' %>
|
||||
<i class="fa fa-video"></i>
|
||||
<% else %>
|
||||
<% lecture.status %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
||||
<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
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user