///|
pub fn AssetSet::to_asset_index(self : AssetSet) -> String {
let lines : Array[String] = [
"### Asset index",
"",
"| Name | Path | Minimum width | Background |",
"| --- | --- | ---: | --- |",
"| " +
self.primary_logo.name +
" | `" +
self.primary_logo.path +
"` | " +
self.primary_logo.min_width_px.to_string() +
"px | " +
self.primary_logo.background.describe() +
" |",
]
for logo in self.alternate_logos {
lines.push(
"| " +
logo.name +
" | `" +
logo.path +
"` | " +
logo.min_width_px.to_string() +
"px | " +
logo.background.describe() +
" |",
)
}
lines.join("\n")
}
///|
pub fn AssetSet::to_asset_manifest(self : AssetSet) -> String {
let paths : Array[String] = [self.primary_logo.path]
for logo in self.alternate_logos {
paths.push(logo.path)
}
paths.join("\n")
}