ticker-serve: delint template syntax
This commit is contained in:
parent
f5547cfbe6
commit
119e221856
|
@ -86,7 +86,7 @@ fn render_index(app_state: &AppState) -> String {
|
||||||
html!(
|
html!(
|
||||||
<div>
|
<div>
|
||||||
<h2>
|
<h2>
|
||||||
<span class={ day_class }>
|
<span class=day_class>
|
||||||
<span class="day">
|
<span class="day">
|
||||||
{ text!("{}", day.date.day()) }
|
{ text!("{}", day.date.day()) }
|
||||||
</span>
|
</span>
|
||||||
|
@ -101,18 +101,15 @@ fn render_index(app_state: &AppState) -> String {
|
||||||
|
|
||||||
{ day.events.iter().map(|e| html!(
|
{ day.events.iter().map(|e| html!(
|
||||||
<article class="event"
|
<article class="event"
|
||||||
style={ format!("border-left: 1.5rem solid {}", &config.calendars.get(&e.calendar).map(|o| &o.color[..]).unwrap_or("white")) }
|
style=( format!("border-left: 1.5rem solid {}", &config.calendars.get(&e.calendar).map(|o| &o.color[..]).unwrap_or("white")) )>
|
||||||
>
|
<p class="time">
|
||||||
<p class="time"
|
{ if e.recurrence {
|
||||||
>
|
html!(<span class="recurrence" title="Regelmässige Veranstaltung">"⭯"</span>)
|
||||||
{ if e.recurrence {
|
} else {
|
||||||
html!(<span class="recurrence" title="Regelmässige Veranstaltung">"⭯"</span>)
|
html!(<span class="recurrence">" "</span>)
|
||||||
} else {
|
} }
|
||||||
html!(<span class="recurrence">" "</span>)
|
|
||||||
} }
|
|
||||||
<span class="dtstart"
|
<span class="dtstart"
|
||||||
title={ format!("{}", e.dtstart.format("%c")) }
|
title=( format!("{}", e.dtstart.format("%c")) )>
|
||||||
>
|
|
||||||
{ text!("{}", &e.dtstart.format("%H:%M")) }
|
{ text!("{}", &e.dtstart.format("%H:%M")) }
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
|
@ -122,7 +119,7 @@ fn render_index(app_state: &AppState) -> String {
|
||||||
),
|
),
|
||||||
Some(url) => html!(
|
Some(url) => html!(
|
||||||
<h3>
|
<h3>
|
||||||
<a href={ fix_url(url) }>
|
<a href=fix_url(url)>
|
||||||
{ text!("{}", &e.summary) }
|
{ text!("{}", &e.summary) }
|
||||||
</a>
|
</a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
Loading…
Reference in New Issue