make favorite view more mobile friendly

append buttons under each row of data instead besides
append a line which separates the tables beneath every odd line to group data and buttons
This commit is contained in:
Pfingstfrosch 2020-05-31 13:50:07 +02:00
parent ea47df1043
commit 32ec7c49ff
4 changed files with 11 additions and 31 deletions

View File

@ -36,30 +36,12 @@
width: 100%; width: 100%;
} }
th, td { tr:nth-child(odd) {
padding: 8px; th, td {
text-align: left; //padding: 8px;
border-bottom: 1px solid #ddd; text-align: left;
border-bottom: 1px solid #ddd;
}
} }
}
.thumb {
width: 3em;
}
.table_wrapper {
table {
border-collapse: collapse;
width: 100%;
}
th, td {
padding: 8px;
text-align: left;
border-bottom: 1px solid #ddd;
}
} }

View File

@ -8,8 +8,6 @@
<tr> <tr>
<th><%= sortable "Title", "title" %></th> <th><%= sortable "Title", "title" %></th>
<th><%= sortable "Registration Date", "created_at" %></th> <th><%= sortable "Registration Date", "created_at" %></th>
<th></th>
<th></th>
</tr> </tr>
<% for course in @favorite_courses %> <% for course in @favorite_courses %>
<tr> <tr>
@ -19,6 +17,8 @@
<td> <td>
<%= course['created_at'] %> <%= course['created_at'] %>
</td> </td>
</tr>
<tr>
<td> <td>
<%= button_to 'Details', crawlers_courses_crawler_show_detail_url(:number => course['number'], :semester => course['semester']) %> <%= button_to 'Details', crawlers_courses_crawler_show_detail_url(:number => course['number'], :semester => course['semester']) %>
</td> </td>

View File

@ -32,8 +32,6 @@
<th><%= sortable "First Name", "first_name" %></th> <th><%= sortable "First Name", "first_name" %></th>
<th><%= sortable "Last Name", "last_name" %></th> <th><%= sortable "Last Name", "last_name" %></th>
<th><%= sortable "Registration Date", "created_at" %></th> <th><%= sortable "Registration Date", "created_at" %></th>
<!-- <th></th>-->
<!-- <th></th>-->
</tr> </tr>
<% for person in @favorite_people %> <% for person in @favorite_people %>
<tr> <tr>

View File

@ -8,8 +8,6 @@
<tr> <tr>
<th><%= sortable "Title", "title" %></th> <th><%= sortable "Title", "title" %></th>
<th><%= sortable "Registration Date", "created_at" %></th> <th><%= sortable "Registration Date", "created_at" %></th>
<th></th>
<th></th>
</tr> </tr>
<% for project in @favorite_projects %> <% for project in @favorite_projects %>
<tr> <tr>
@ -19,6 +17,8 @@
<td> <td>
<%= project['created_at'] %> <%= project['created_at'] %>
</td> </td>
</tr>
<tr>
<td> <td>
<%= button_to 'Details', crawlers_projects_crawler_show_detail_url(:id => project['id']) %> <%= button_to 'Details', crawlers_projects_crawler_show_detail_url(:id => project['id']) %>
</td> </td>