Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
98717db3d5 | |||
5d249eb3c7 | |||
4ed915a2c0 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -63,8 +63,7 @@ data/
|
||||
node_modules/
|
||||
|
||||
# Compiled assets
|
||||
public/css/
|
||||
public/js/
|
||||
public/*/
|
||||
|
||||
# Ignore production configuration files to protect against credential leaks
|
||||
config/production.yaml
|
||||
|
@@ -1,7 +1,9 @@
|
||||
# Game Data
|
||||

|
||||
|
||||

|
||||
|
||||
# Game Data
|
||||
|
||||
Web-based tool to store and organize PC hardware gaming benchmarks.
|
||||
|
||||
## Project Goals
|
||||
|
BIN
assets/img/app-logo.png
Normal file
BIN
assets/img/app-logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 MiB |
BIN
assets/img/favicon.png
Normal file
BIN
assets/img/favicon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1008 KiB |
@@ -1,7 +1,34 @@
|
||||
$ ->
|
||||
# run foundation scripts
|
||||
# let us know when javascript is running.
|
||||
console.log('Ready.')
|
||||
|
||||
lastColumn = null
|
||||
ascending = true
|
||||
|
||||
tableHeaders = $('th')
|
||||
tableHeaders.click (e) ->
|
||||
column = $(this).index()
|
||||
table = $(this).closest('table')
|
||||
|
||||
if column is lastColumn
|
||||
ascending = not ascending
|
||||
else
|
||||
ascending = true
|
||||
|
||||
lastColumn = column
|
||||
sortTable(table, column, ascending)
|
||||
|
||||
sortTable = (table, column, ascending) ->
|
||||
rows = table.find('tbody tr').get()
|
||||
|
||||
compareFunction = (a, b) ->
|
||||
res = a.cells[column].textContent.localeCompare b.cells[column].textContent
|
||||
if ascending then res else -res
|
||||
|
||||
rows.sort compareFunction
|
||||
$(rows).detach().appendTo(table.find('tbody'))
|
||||
return
|
||||
|
||||
averageResults = (results, decimals = 2) ->
|
||||
avgScore = 0
|
||||
minScore = Infinity
|
||||
|
@@ -19,3 +19,12 @@ table
|
||||
padding: 1.5rem 2rem
|
||||
border: 1px solid #bbb
|
||||
border-radius: 8px
|
||||
|
||||
#main-nav
|
||||
li
|
||||
a
|
||||
font-size: 1.25rem
|
||||
|
||||
#site-title
|
||||
img
|
||||
max-height: 40px
|
||||
|
@@ -20,16 +20,23 @@ function compileCoffee() {
|
||||
.pipe(gulp.dest('public/js', { sourcemaps: '.' }));
|
||||
}
|
||||
|
||||
// Copy image files to public/img/
|
||||
function copyImages() {
|
||||
return gulp.src('assets/img/**/*', {encoding: false})
|
||||
.pipe(gulp.dest('public/img/'));
|
||||
}
|
||||
|
||||
// Watch files for changes
|
||||
function watchFiles(cb) {
|
||||
gulp.watch('assets/styles/**/*.sass', compileSass);
|
||||
gulp.watch('assets/scripts/**/*.coffee', compileCoffee);
|
||||
gulp.watch('assets/img/**/*', copyImages)
|
||||
cb();
|
||||
}
|
||||
|
||||
// Chain all asset builds together
|
||||
function buildAssets() {
|
||||
return gulp.parallel(compileSass, compileCoffee);
|
||||
return gulp.parallel(compileSass, compileCoffee, copyImages);
|
||||
}
|
||||
|
||||
// Perform initial build then watch
|
||||
|
@@ -8,9 +8,9 @@
|
||||
<table class="table table-hover table-responsive">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th>Test name</th>
|
||||
<th># Benchmarks</th>
|
||||
<th>Last Updated</th>
|
||||
<th data-sort="name">Test name</th>
|
||||
<th data-sort="benchmark-count"># Benchmarks</th>
|
||||
<th data-sort="updated'">Last Updated</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@@ -4,6 +4,7 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<link rel="shortcut icon" href="/img/favicon.png">
|
||||
<title><%= title %> | Game Data</title>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.7/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="/css/rimmington.css">
|
||||
|
@@ -1,6 +1,9 @@
|
||||
<div id="main-nav" class="navbar navbar-expand-md bg-dark border-bottom border-body mb-3" data-bs-theme="dark">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand mb-0 h1" href="#">Game Data</a>
|
||||
<a id="site-title" class="navbar-brand mb-0 h1" href="#">
|
||||
Game Data
|
||||
<img src="/img/app-logo.png" alt="">
|
||||
</a>
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
|
Reference in New Issue
Block a user