Port queue page to maud
This commit is contained in:
parent
b3f8c6390c
commit
5d4232ac6b
6 changed files with 131 additions and 159 deletions
|
|
@ -57,17 +57,7 @@ impl LinkCommit {
|
|||
|
||||
pub fn html(&self) -> Markup {
|
||||
let (class, title) = self.class_and_title();
|
||||
|
||||
let truncate = self.short.chars().take(81).count() > 80;
|
||||
let short = if truncate {
|
||||
self.short
|
||||
.chars()
|
||||
.take(80 - 3)
|
||||
.chain("...".chars())
|
||||
.collect::<String>()
|
||||
} else {
|
||||
self.short.to_string()
|
||||
};
|
||||
let short = util::truncate(&self.short, 80);
|
||||
|
||||
html! {
|
||||
a href=(self.link) .(class) title=(title) { (short) }
|
||||
|
|
@ -92,6 +82,12 @@ impl LinkRunShort {
|
|||
short: util::format_commit_short(hash, message),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn html(&self) -> Markup {
|
||||
html! {
|
||||
a href=(self.link) { "Run of " (util::truncate(&self.short, 80)) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Template)]
|
||||
|
|
@ -133,4 +129,10 @@ impl LinkWorker {
|
|||
name,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn html(&self) -> Markup {
|
||||
html! {
|
||||
a href=(self.link) { (self.name) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue