Responsive on small screens

This commit is contained in:
Cory Sanin 2025-01-14 20:03:09 -05:00
parent b043dce7f0
commit a6b850fddd
3 changed files with 41 additions and 16 deletions

View File

@ -191,6 +191,11 @@ input[type="submit"] {
} }
} }
.overflow-x {
max-width: 100%;
overflow-x: auto;
}
.grid-2col { .grid-2col {
display: grid; display: grid;
grid-template-columns: auto 1fr; grid-template-columns: auto 1fr;

18
styles/02-responsive.scss Normal file
View File

@ -0,0 +1,18 @@
@media screen and (max-width:65rem) {
.sidebar {
width: 100%;
height: auto;
position: initial;
text-align: center;
.sidebar_search form {
width: 18em;
margin: auto;
}
}
.content {
margin-left: 0;
}
}

View File

@ -9,24 +9,26 @@
<%- include("navigation", locals) %> <%- include("navigation", locals) %>
<div class="content"> <div class="content">
<h1>Build history</h1> <h1>Build history</h1>
<table> <div class="overflow-x">
<tr> <table>
<th>Repo</th>
<th>Distro</th>
<th>Date Started</th>
<th>Build Duration</th>
<th>Build Status</th>
</tr>
<% builds.forEach(build => { %>
<tr> <tr>
<td><a href="/build/<%= build.id %>"><%= build.repo %></a></td> <th>Repo</th>
<td><%= build.distro %></td> <th>Distro</th>
<td class="to-local-time"><%= build.startTime %></td> <th>Date Started</th>
<td><%= timeElapsed(build.startTime, build.endTime) %></td> <th>Build Duration</th>
<td><%= build.status %></td> <th>Build Status</th>
</tr> </tr>
<% }) %> <% builds.forEach(build => { %>
</table> <tr>
<td><a href="/build/<%= build.id %>"><%= build.repo %></a></td>
<td><%= build.distro %></td>
<td class="to-local-time"><%= build.startTime %></td>
<td><%= timeElapsed(build.startTime, build.endTime) %></td>
<td><%= build.status %></td>
</tr>
<% }) %>
</table>
</div>
</div> </div>
<%- include("footer", locals) %> <%- include("footer", locals) %>
<script src="/assets/js/timezone.js?v1" nonce="<%= cspNonce %>"></script> <script src="/assets/js/timezone.js?v1" nonce="<%= cspNonce %>"></script>