Show More
Commit Description:
add golden submit button...
Commit Description:
add golden submit button
- When the user submit more than or equal to 100 times the submit button will turn gold
- Add golden-btn tag in applications.css.scss
References:
File last commit:
Show/Diff file:
Action:
app/views/report/_task_hof.html.haml
| 136 lines
| 5.4 KiB
| text/x-haml
| HamlLexer
|
r426 | :css | |||
.hof_user { color: orangered; font-style: italic; } | ||||
.hof_language { color: green; font-style: italic; } | ||||
.hof_value { color: deeppink;font-style: italic; } | ||||
r457 | .info_param { font-weight: bold;text-align: right; } | |||
r458 | .tooltip { | |||
font-family: Verdana,sans-serif; | ||||
font-weight: normal; | ||||
text-align: left; | ||||
font-size: 1.0em; | ||||
color: black; | ||||
line-height: 1.1; | ||||
display: none; | ||||
min-width: 20em; | ||||
position: absolute; | ||||
left: 25px; | ||||
bottom: 5px; | ||||
border: 1px solid; | ||||
padding: 5px; | ||||
background-color: #FFF; | ||||
word-wrap: break-word; | ||||
z-index: 9999; | ||||
overflow: auto; | ||||
} | ||||
r426 | ||||
r457 | ||||
r560 | .container | |||
.row | ||||
.col-md-4 | ||||
%h2 Overall Stat | ||||
%table.table.table-hover | ||||
%thead | ||||
%tr | ||||
%th | ||||
%th | ||||
%tbody | ||||
%tr | ||||
%td.info_param Submissions | ||||
%td= @summary[:count] | ||||
%tr | ||||
%td.info_param Solved/Attempted User | ||||
%td #{@summary[:solve]}/#{@summary[:attempt]} (#{(@summary[:solve]*100.0/@summary[:attempt]).round(1)}%) | ||||
- if @best | ||||
%tr | ||||
%td.info_param Best Runtime | ||||
%td | ||||
r612 | by #{link_to @best[:runtime][:user], stat_user_path(@best[:runtime][:user_id])} | |||
r560 | %br | |||
using <span class="text-success">#{@best[:runtime][:lang]}</span> | ||||
%br | ||||
with <span class="text-success">#{@best[:runtime][:value] * 1000} milliseconds</span> | ||||
%br | ||||
at submission | ||||
r596 | = link_to "#" + @best[:runtime][:sub_id].to_s, submission_path(@best[:runtime][:sub_id]) | |||
r457 | ||||
r560 | %tr | |||
%td.info_param | ||||
Best Memory Usage | ||||
%sup{ id: "xmem_remark", | ||||
style: "position:relative; color: blue;", | ||||
data: {toggle: 'tooltip', placement: 'top', animation: 'false', delay: 20}, | ||||
title: "This counts only for submission with 100% score. Right now, java is excluded from memory usage competition. (Because it always uses 2GB memory...)"} | ||||
[?] | ||||
%td | ||||
r612 | by #{link_to @best[:memory][:user], stat_user_path(@best[:memory][:user_id])} | |||
r560 | %br | |||
using <span class="text-success">#{@best[:memory][:lang]}</span> | ||||
%br | ||||
with <span class="text-success">#{number_with_delimiter(@best[:memory][:value])} kbytes </span> | ||||
%br | ||||
at submission | ||||
r596 | = link_to "#" + @best[:memory][:sub_id].to_s, submission_path(@best[:memory][:sub_id]) | |||
r457 | ||||
r560 | %tr | |||
%td.info_param Shortest Code | ||||
%td | ||||
r612 | by #{link_to @best[:length][:user], stat_user_path(@best[:length][:user_id])} | |||
r560 | %br | |||
using <span class="text-success">#{@best[:length][:lang]}</span> | ||||
%br | ||||
with <span class="text-success">#{@best[:length][:value]} bytes</span> | ||||
%br | ||||
at submission | ||||
r596 | = link_to "#" + @best[:length][:sub_id].to_s, submission_path(@best[:length][:sub_id]) | |||
r426 | ||||
r560 | %tr | |||
%td.info_param First solver | ||||
%td | ||||
- if @best[:first][:user] != '(NULL)' | ||||
r612 | #{link_to @best[:first][:user], stat_user_path(@best[:first][:user_id])} is the first solver | |||
r560 | %br | |||
using <span class="text-success">#{@best[:first][:lang]}</span> | ||||
%br | ||||
on <span class="text-success">#{@best[:first][:value]}</span> | ||||
%br | ||||
at submission | ||||
r596 | = link_to "#" + @best[:first][:sub_id].to_s, submission_path( @best[:first][:sub_id]) | |||
r560 | - else | |||
no first solver | ||||
.col-md-8 | ||||
- if @best | ||||
%h2 By Language | ||||
%table.table.table-hover | ||||
%thead | ||||
%tr | ||||
%th Language | ||||
%th Best runtime (ms) | ||||
%th Best memory (kbytes) | ||||
%th Shortest Code (bytes) | ||||
%th First solver | ||||
%tbody | ||||
- @by_lang.each do |lang,value| | ||||
%tr | ||||
%td= lang | ||||
%td | ||||
r612 | = link_to value[:runtime][:user], stat_user_path(value[:runtime][:user_id]) | |||
r560 | %br | |||
r596 | = "#{(value[:runtime][:value] * 1000).to_i} @" | |||
= link_to "#" + value[:runtime][:sub_id].to_s, submission_path( value[:runtime][:sub_id]) | ||||
r560 | %td | |||
r612 | = link_to value[:memory][:user], stat_user_path( value[:memory][:user_id]) | |||
r560 | %br | |||
r596 | = "#{number_with_delimiter(value[:memory][:value])} @" | |||
= link_to "#" + value[:memory][:sub_id].to_s, submission_path(value[:memory][:sub_id]) | ||||
r560 | %td | |||
r612 | = link_to value[:length][:user], stat_user_path(value[:length][:user_id]) | |||
r560 | %br | |||
r596 | = "#{value[:length][:value]} @" | |||
= link_to "#" + value[:length][:sub_id].to_s, submission_path(value[:length][:sub_id]) | ||||
r560 | %td | |||
- if value[:first][:user] != '(NULL)' #TODO: i know... this is wrong... | ||||
r612 | = link_to value[:first][:user], stat_user_path(value[:first][:user_id]) | |||
r560 | %br | |||
r596 | = "#{value[:first][:value]} @" | |||
= link_to "#" + value[:first][:sub_id].to_s, submission_path( value[:first][:sub_id]) | ||||
r426 | ||||