diff --git a/assets/styles/rimmington.sass b/assets/styles/rimmington.sass index 3b3628e..f138c7d 100644 --- a/assets/styles/rimmington.sass +++ b/assets/styles/rimmington.sass @@ -5,42 +5,9 @@ $primary-color: cornflowerblue $primary-color-highlight: color.adjust($primary-color, $lightness: -10%) body - background: #eee - -a - color: $primary-color - transition: color 225ms ease-in-out - &:hover - color: $primary-color-highlight - -input[type=submit], -button - background: $primary-color - color: #eee - border-radius: 8px - transition: all 225ms ease-in-out - &:hover - background: $primary-color-highlight - color: white + background: rgb(240, 235, 248) #wrapper background: white - padding: 1rem 2rem + padding: 1.5rem 2rem border-radius: 8px - -#main-nav - margin-bottom: 15px - background: $primary-color - border-bottom: 1px solid #eee - - ul - background: none - - a - color: #eee - font-weight: bold - &:hover - color: white - -h1.invalid - color: red diff --git a/src/helpers.rb b/src/helpers.rb index dacac4f..9e0e5a0 100644 --- a/src/helpers.rb +++ b/src/helpers.rb @@ -3,6 +3,14 @@ # Helpers - view helper functions module Helpers + def ruby_version() + return RUBY_VERSION + end + + def app_version() + return `git describe --tags` + end + def date_format(date) dt = date.to_datetime return dt.strftime('%B %d, %Y @ %I:%M:%S %p %Z') diff --git a/src/routes/init.rb b/src/routes/init.rb index c1158d7..4d2fdec 100644 --- a/src/routes/init.rb +++ b/src/routes/init.rb @@ -3,8 +3,8 @@ require_relative 'index' require_relative 'hardware' require_relative 'benchmark' -require_relative 'result' require_relative 'reports' +require_relative 'result' require_relative 'test' require_relative 'api1' diff --git a/src/routes/reports.rb b/src/routes/reports.rb index 66a68f2..bab6aa6 100644 --- a/src/routes/reports.rb +++ b/src/routes/reports.rb @@ -3,7 +3,7 @@ # /reports routes class GameData < Sinatra::Base - get '/reports' do + get '/report' do benchmarks = Benchmark.order(:name).all() tests = Test.order(:name).all() @@ -14,7 +14,7 @@ class GameData < Sinatra::Base } end - post '/reports' do + post '/report' do report_type = params[:type] report_choice = params[:choice] report_compare = params[:compare] diff --git a/src/routes/result.rb b/src/routes/result.rb index 4331ebc..5d488f3 100644 --- a/src/routes/result.rb +++ b/src/routes/result.rb @@ -3,25 +3,6 @@ # /result routes class GameData < Sinatra::Base - get '/result' do - results = Result.reverse(:updated_at).limit(10).all() - - erb :'result/index', locals: { - title: 'List of Results', - results: results - } - end - - get '/result/add' do - hardware = Hardware.all() - benchmarks = Benchmark.all() - - erb :'result/add', locals: { - title: 'Add Result', - hardware: hardware, - benchmarks: benchmarks - } - end post '/result/add' do result_minimum = params[:result_minimum] if params.key?(:result_minimum) result_maximum = params[:result_maximum] if params.key?(:result_maximum) diff --git a/views/benchmark/add.erb b/views/benchmark/add.erb index 6929f6c..a6014b2 100644 --- a/views/benchmark/add.erb +++ b/views/benchmark/add.erb @@ -1,43 +1,36 @@ -