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
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r851:a103e455b223 - - 2 files changed: 37 inserted, 1 deleted
@@ -556,3 +556,39 | |||||
|
556 | .grader-comment { |
|
556 | .grader-comment { |
|
557 | word-wrap: break-word; |
|
557 | word-wrap: break-word; |
|
558 | } |
|
558 | } |
|
|
559 | + | ||
|
|
560 | + | ||
|
|
561 | + golden-btn + .golden-btn { margin-top: 1em; } | ||
|
|
562 | + | ||
|
|
563 | + .golden-btn { | ||
|
|
564 | + display: inline-block; | ||
|
|
565 | + outline: none; | ||
|
|
566 | + font-family: inherit; | ||
|
|
567 | + box-sizing: border-box; | ||
|
|
568 | + border: none; | ||
|
|
569 | + box-shadow: 0 3px 6px rgba(0,0,0,.16), 0 3px 6px rgba(110,80,20,.4), | ||
|
|
570 | + inset 0 -2px 5px 1px rgba(139,66,8,1), | ||
|
|
571 | + inset 0 -1px 1px 3px rgba(250,227,133,1); | ||
|
|
572 | + background-image: linear-gradient(160deg, #a54e07, #b47e11, #fef1a2, #bc881b, #a54e07) !important; | ||
|
|
573 | + border: 1px solid #a55d07; | ||
|
|
574 | + color: rgb(120,50,5); | ||
|
|
575 | + text-shadow: 0 2px 2px rgba(250, 227, 133, 1); | ||
|
|
576 | + cursor: pointer; | ||
|
|
577 | + transition: all .2s ease-in-out; | ||
|
|
578 | + background-size: 100% 100%; | ||
|
|
579 | + background-position:center; | ||
|
|
580 | + } | ||
|
|
581 | + .golden-btn:focus, | ||
|
|
582 | + .golden-btn:hover { | ||
|
|
583 | + background-size: 150% 150%; | ||
|
|
584 | + box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23), | ||
|
|
585 | + inset 0 -2px 5px 1px #b17d10, | ||
|
|
586 | + inset 0 -1px 1px 3px rgba(250,227,133,1); | ||
|
|
587 | + border: 1px solid rgba(165,93,7,.6); | ||
|
|
588 | + color: rgba(120,50,5,.8); | ||
|
|
589 | + } | ||
|
|
590 | + .golden-btn:active { | ||
|
|
591 | + box-shadow: 0 3px 6px rgba(0,0,0,.16), 0 3px 6px rgba(110,80,20,.4), | ||
|
|
592 | + inset 0 -2px 5px 1px #b17d10, | ||
|
|
593 | + inset 0 -1px 1px 3px rgba(250,227,133,1); | ||
|
|
594 | + } |
@@ -35,7 +35,7 | |||||
|
35 | = file_field_tag 'load_file' |
|
35 | = file_field_tag 'load_file' |
|
36 | = text_field_tag '' , nil, {readonly: true, class: 'form-control'} |
|
36 | = text_field_tag '' , nil, {readonly: true, class: 'form-control'} |
|
37 | .form-group |
|
37 | .form-group |
|
38 | - = submit_tag 'Submit', class: 'btn btn-success', id: 'live_submit', |
|
38 | + = submit_tag 'Submit', class: 'btn ' + (@submission && @submission.number >= 100 ? 'golden-btn' : 'btn-success'), id: 'live_submit', |
|
39 | data: {confirm: "Submitting this source code for task #{@problem.long_name}?"} |
|
39 | data: {confirm: "Submitting this source code for task #{@problem.long_name}?"} |
|
40 | - # latest submission status |
|
40 | - # latest submission status |
|
41 | .panel{class: (@submission && @submission.graded_at) ? "panel-info" : "panel-warning"} |
|
41 | .panel{class: (@submission && @submission.graded_at) ? "panel-info" : "panel-warning"} |
You need to be logged in to leave comments.
Login now