design: right-align dependency versions and status tag

This commit is contained in:
Sam Rijs 2018-01-30 07:41:07 +11:00
parent 986484aed0
commit 5767849693

View file

@ -36,9 +36,9 @@ fn dependency_table(title: &str, deps: BTreeMap<CrateName, AnalyzedDependency>)
thead { thead {
tr { tr {
th "Crate" th "Crate"
th "Required" th class="has-text-right" "Required"
th "Latest" th class="has-text-right" "Latest"
th "Status" th class="has-text-right" "Status"
} }
} }
tbody { tbody {
@ -47,15 +47,15 @@ fn dependency_table(title: &str, deps: BTreeMap<CrateName, AnalyzedDependency>)
td { td {
a href=(format!("https://crates.io/crates/{}", name.as_ref())) (name.as_ref()) a href=(format!("https://crates.io/crates/{}", name.as_ref())) (name.as_ref())
} }
td code (dep.required.to_string()) td class="has-text-right" code (dep.required.to_string())
td { td class="has-text-right" {
@if let Some(ref latest) = dep.latest { @if let Some(ref latest) = dep.latest {
code (latest.to_string()) code (latest.to_string())
} @else { } @else {
"N/A" "N/A"
} }
} }
td { td class="has-text-right" {
@if dep.is_outdated() { @if dep.is_outdated() {
span class="tag is-warning" "out of date" span class="tag is-warning" "out of date"
} @else { } @else {