fix some intendation in templates

This commit is contained in:
insects 2025-02-11 15:52:18 +01:00
parent 4696eeb509
commit dbb93543f3

View file

@ -119,7 +119,7 @@ pub fn fish_display(fish: &CombinedFish, data: &ViewData) -> Markup {
div.name { div.name {
h3 { h3 {
(fish.meta.name_en) (fish.meta.name_en)
span class=(format!("patch patch-{}", fish.entry.patch as u32)) { (format!("{:.1}", fish.entry.patch)) } span class=(format!("patch patch-{}", fish.entry.patch as u32)) { (format!("{:.1}", fish.entry.patch)) }
.subtitle { .subtitle {
span { "Rarity: " (format!("{:.2}", fish.rarity * 100.)) "%" } span { "Rarity: " (format!("{:.2}", fish.rarity * 100.)) "%" }
@ -152,8 +152,8 @@ pub fn fish_display(fish: &CombinedFish, data: &ViewData) -> Markup {
@if let Some(window2) = fish.windows.get(1) { @if let Some(window2) = fish.windows.get(1) {
.date.tiny data-ts=(clock::to_earth_time(window2.start_time).timestamp_millis()) { .date.tiny data-ts=(clock::to_earth_time(window2.start_time).timestamp_millis()) {
"next: " "next: "
.inner id=(format!("nextwindow-{}", fish.entry.id)) hx-preserve { .inner id=(format!("nextwindow-{}", fish.entry.id)) hx-preserve {
(clock::to_earth_time(window2.start_time).format("%c %Z")) (clock::to_earth_time(window2.start_time).format("%c %Z"))
} }
} }
} }
@ -161,7 +161,7 @@ pub fn fish_display(fish: &CombinedFish, data: &ViewData) -> Markup {
.date data-ts=(clock::to_earth_time(window.start_time).timestamp_millis()) { .date data-ts=(clock::to_earth_time(window.start_time).timestamp_millis()) {
.inner id=(format!("date-{}", fish.entry.id)) hx-preserve { .inner id=(format!("date-{}", fish.entry.id)) hx-preserve {
(clock::to_earth_time(window.start_time).format("%c %Z")) (clock::to_earth_time(window.start_time).format("%c %Z"))
} }
} }
} }
} }
@ -199,7 +199,7 @@ pub fn fish_display(fish: &CombinedFish, data: &ViewData) -> Markup {
@if let Some(location) = data.state.data.db_data.fishing_spots.get(&location_id) { @if let Some(location) = data.state.data.db_data.fishing_spots.get(&location_id) {
div { div {
span.zone { (fish.meta.zone_en) } span.zone { (fish.meta.zone_en) }
(location.name_en) (location.name_en)
} }
} }
} }
@ -208,11 +208,11 @@ pub fn fish_display(fish: &CombinedFish, data: &ViewData) -> Markup {
div { div {
@if !fish.is_always_up { @if !fish.is_always_up {
"ET " "ET "
(clock::display_eorzea_time(&clock::set_hm_from_float(&clock::get_current_eorzea_date(), fish.entry.start_hour.unwrap()))) (clock::display_eorzea_time(&clock::set_hm_from_float(&clock::get_current_eorzea_date(), fish.entry.start_hour.unwrap())))
"-" "-"
(clock::display_eorzea_time(&clock::set_hm_from_float(&clock::get_current_eorzea_date(), fish.entry.end_hour.unwrap()))) (clock::display_eorzea_time(&clock::set_hm_from_float(&clock::get_current_eorzea_date(), fish.entry.end_hour.unwrap())))
} @else { } @else {
"always up!" "always up!"
} }
} }
div { div {