Fix table styling

This commit is contained in:
Yannick 2020-04-16 18:20:06 +02:00
parent f91730bcd6
commit 3b71f6b00f
2 changed files with 32 additions and 28 deletions

View File

@ -53,3 +53,7 @@ body {
background: rgb(225, 98, 89); background: rgb(225, 98, 89);
color: white; color: white;
} }
.table-wrapper{
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

View File

@ -1,32 +1,32 @@
<h1><%= @form.title %></h1> <div class="container">
<p> <div class="content is-paddingless">
<%= submission_url(@form) %> <h1><%= @form.title %></h1>
</p> <p>
<p> <%= submission_url(@form) %>
<%= link_to 'Google spreadsheet', @form.spreadsheet_url %> </p>
</p> <p>
<div class="section"> <%= link_to 'Google spreadsheet', @form.spreadsheet_url %>
<div class="columns"> </p>
<div class="column is-half is-offset-one-quarter"> </div>
<table class="table is-fullwidth"> <div class="box table-wrapper">
<thead> <table class="table is-fullwidth is-strip is-hoverable">
<tr> <thead>
<% @form.spreadsheet_headers.each do |value| %> <tr>
<th><%= value %></th> <% @form.spreadsheet_headers.each do |value| %>
<% end %> <th><%= value %></th>
</tr> <% end %>
</thead> </tr>
<tbody> </thead>
<% @submissions.each do |submission| %> <tbody>
<tr> <% @submissions.each do |submission| %>
<% @form.spreadsheet_headers.each do |column| %> <tr>
<% @form.spreadsheet_headers.each do |column| %>
<td><%= submission.data[column] %></td> <td><%= submission.data[column] %></td>
<% end %>
</tr>
<% end %> <% end %>
</tr> </tbody>
<% end %> </table>
</tbody> </div>
</table>
</div>
</div>
</div> </div>