28 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| .row
 | |
|   .col
 | |
|     h4.mb-3
 | |
|       = t("contests.index.manage_contests")
 | |
|       .float-end
 | |
|         a.btn.btn-primary.mb-4 href=new_contest_path
 | |
|           = t("contests.index.new_contest")
 | |
| 
 | |
| .row.row-cols-1.row-cols-md-3.g-4
 | |
|   - @contests.each do |contest|
 | |
|     .col
 | |
|       css:
 | |
|         .card:hover { background-color: lightblue; }
 | |
|       .card.h-100
 | |
|         .card-header
 | |
|           = contest.name
 | |
|         .card-body
 | |
|           .card-text.mb-2
 | |
|             = "#{contest.puzzles.length} #{t('puzzles.singular')}" if contest.puzzles.length <= 1
 | |
|             = "#{contest.puzzles.length} #{t('puzzles.plural')}" if contest.puzzles.length > 1
 | |
|             = " - #{contest.contestants.length} #{t('contestants.singular')}" if contest.contestants.length <= 1
 | |
|             = " - #{contest.contestants.length} #{t('contestants.plural')}" if contest.contestants.length > 1
 | |
|           .row
 | |
|             .col
 | |
|               - contest.puzzles.each do |puzzle|
 | |
|                 - if puzzle.image.attached?
 | |
|                   = image_tag puzzle.image, style: "max-height: 50px;", class: "mb-2 me-2"
 | |
|           a.stretched-link href=contest_path(contest) |