Refactor app in to its own slice
This commit is contained in:
14
slices/main/templates/workouts/index.html.slim
Normal file
14
slices/main/templates/workouts/index.html.slim
Normal file
@@ -0,0 +1,14 @@
|
||||
- context.content_for(:title, "Hikes | ")
|
||||
|
||||
div class="mb-12 prose dark:prose-invert max-w-prose mx-auto text-gray-800 dark:text-gray-200"
|
||||
h1 🥾 Hikes
|
||||
|
||||
div class="prose dark:prose-invert max-w-prose mx-auto"
|
||||
- workouts_by_year.each do |year, workouts|
|
||||
h3= year
|
||||
h1= "#{workouts.map{|w| w.distance }.sum.round} km — #{workouts.map{|w| w.duration / 60 / 60 }.sum.round} hours"
|
||||
div class="grid grid-cols-3 gap-4 mb-4 max-w-prose mx-auto"
|
||||
- workouts.each do |workout|
|
||||
== workout.path
|
||||
|
||||
div class="max-w-screen-md mx-auto border-t border-solid border-gray-200 dark:border-gray-600"
|
Reference in New Issue
Block a user