Added some more scaffolding to the project to get going; added Foundation css to start with styles

This commit is contained in:
2023-07-03 23:02:25 -04:00
parent b376bf3a79
commit 6f680e72e5
12 changed files with 121 additions and 12 deletions

31
views/index/index.erb Normal file
View File

@ -0,0 +1,31 @@
<div class="grid-x grid-margin-x">
<% if results.length > 0 %>
<div class="cell small-12">
<h2>Latest benchmark results:</h2>
</div>
<div class="cell small-12">
<table>
<thead>
<tr>
<th width="200">Hardware tested</th>
<th width="200">Benchmark used</th>
<th>Score</th>
</tr>
</thead>
<tbody>
<% results.each do |r| %>
<tr>
<td><%= r.hardware %></td>
<td><%= r.benchmark %></td>
<td><%= r.formatted_score() %></td>
</tr>
<% end %>
</tbody>
</table>
</div>
<% else %>
<div class="cell small-12">
<p>I'm sorry, there don't appear to be any benchmark results logged yet. Check again later!</p>
</div>
<% end %>
</div>

23
views/layout.erb Normal file
View File

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title><%= title %> | Game Data</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/foundation/6.7.5/css/foundation.min.css">
<link rel="stylesheet" href="/css/remmington.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.0/jquery.min.js" charset="utf-8"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/foundation/6.7.5/js/foundation.min.js" charset="utf-8"></script>
<script src="/js/edgeville.js" charset="utf-8"></script>
</head>
<body>
<!-- main navigation -->
<%= erb :'partials/navbar', :locals => locals %>
<!-- main content -->
<div class="grid-container">
<%= yield %>
</div>
</body>
</html>

11
views/partials/navbar.erb Normal file
View File

@ -0,0 +1,11 @@
<div id="main-nav" class="top-bar">
<div class="top-bar-left">
<ul class="menu">
<li><a href="/">Dashboard</a></li>
<li><a href="/hardware">Hardware</a></li>
<li><a href="/benchmarks">Benchmarks</a></li>
<li><a href="/comparisons">Comparisons</a></li>
<li><a href="/results">Results</a></li>
</ul>
</div>
</div>