Improve contest view
Some checks are pending
CI / scan_ruby (push) Waiting to run
CI / scan_js (push) Waiting to run
CI / lint (push) Waiting to run
CI / test (push) Waiting to run

This commit is contained in:
sto
2025-03-16 09:22:27 +01:00
parent 7ec51b6d85
commit 785e523ebe
5 changed files with 39 additions and 20 deletions

View File

@@ -1,31 +1,37 @@
.row.mb-2
.col
- @badges.each do |badge|
span.badge.text-bg-info.me-2
= badge
.row.mb-4
.col
a.btn.btn-primary href=edit_contest_path(@contest)
| Edit contest
.row.mb-4
.col
h4 Puzzles
css:
.badges { margin-top: -18px; position: absolute; }
.badges
- @badges.each do |badge|
span.badge.text-bg-info.me-2
= badge
.float-end
a.btn.btn-primary href=new_contest_puzzle_path(@contest)
| Add puzzle
a.btn.btn-primary href=edit_contest_path(@contest)
| Edit contest
.row.mb-4
.col
.row
.col
h4
| Puzzles
.row.row-cols-1.row-cols-md-3.g-4.mb-4
- @puzzles.each do |puzzle|
.col
css:
.card:hover { background-color: lightblue; }
.card.h-100
.card-header
= puzzle.name
= image_tag puzzle.image, class: "card-img-top" if puzzle.image.attached?
= image_tag puzzle.image if puzzle.image.attached?
.card-body
p.card-text
| TODO puzzle.brand
a.btn.btn-primary href=edit_contest_puzzle_path(@contest, puzzle)
| Edit
a.stretched-link href=edit_contest_puzzle_path(@contest, puzzle)
.row
.col
a.btn.btn-primary href=new_contest_puzzle_path(@contest)
| Add puzzle
.col
h4 Teams