mirror of
https://github.com/TinyTapeout/tt-support-tools.git
synced 2026-11-03 04:36:09 +01:00
fix(docs): ensure datasheet can use images properly (#125)
This commit is contained in:
@@ -65,9 +65,9 @@
|
||||
|
||||
let logo = box(baseline: 0.25em, {
|
||||
if invert_text_colour {
|
||||
image("../resources/logos/tt-logo-white.svg", height: 25%)
|
||||
get_image_by_id("logos", "tt_roundel_white", height: 25%)
|
||||
} else {
|
||||
image("../resources/logos/tt-logo-black.svg", height: 25%)
|
||||
get_image_by_id("logos", "tt_roundel_black", height: 25%)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -246,7 +246,7 @@
|
||||
let pattern = tiling(
|
||||
size: (3cm, 3cm),
|
||||
spacing: (1cm, 1cm),
|
||||
image("../resources/logos/tt-logo-light-grey.svg")
|
||||
get_image_by_id("logos", "tt_roundel_light_grey")
|
||||
)
|
||||
|
||||
page(
|
||||
@@ -309,18 +309,18 @@
|
||||
|
||||
// make titlepage
|
||||
if theme == "classic" {
|
||||
image("../resources/logos/tt-logo-colourful.png")
|
||||
get_image_by_id("logos", "tt_square_colourful")
|
||||
cover_text
|
||||
|
||||
} else if theme == "bold" {
|
||||
set page(
|
||||
background: image("../resources/backgrounds/colourful-background-gds-o10-bw.png", height: 100%),
|
||||
background: get_image_by_id("backgrounds", "gds_bw_transparent", height: 100%),
|
||||
fill: selected_theme_colour
|
||||
)
|
||||
|
||||
align(
|
||||
center + horizon,
|
||||
image("../resources/logos/tt-logo-white.svg", height: 60%)
|
||||
get_image_by_id("logos", "tt_roundel_white", height: 60%)
|
||||
)
|
||||
|
||||
set text(white)
|
||||
@@ -329,7 +329,7 @@
|
||||
} else if theme == "monochrome" {
|
||||
align(
|
||||
center + horizon,
|
||||
image("../resources/logos/tt-logo-black.svg", height: 60%)
|
||||
get_image_by_id("logos", "tt_roundel_black", height: 60%)
|
||||
)
|
||||
cover_text
|
||||
}
|
||||
|
||||
+5
-20
@@ -124,29 +124,14 @@
|
||||
|
||||
// external manifest is used for artwork repo
|
||||
// since large photos would bloat the template size
|
||||
let external_manifest = yaml("../resources/external/manifest.yaml")
|
||||
let local_manifest = yaml("../resources/manifest.yaml")
|
||||
let combined_manifest = (:)
|
||||
let manifest = yaml("../resources/external/manifest.yaml")
|
||||
|
||||
// combine the two
|
||||
for (k, v) in local_manifest.pairs() {
|
||||
combined_manifest.insert(k, v)
|
||||
if type not in manifest {
|
||||
panic("type not in manifest")
|
||||
}
|
||||
|
||||
for (k, v) in external_manifest.pairs() {
|
||||
combined_manifest.insert(k, v)
|
||||
}
|
||||
|
||||
if type not in combined_manifest {
|
||||
panic("type not in either local or external manifest")
|
||||
}
|
||||
|
||||
let root_path = "../resources"
|
||||
if type in external_manifest {
|
||||
root_path += "/external"
|
||||
}
|
||||
|
||||
let img_details = combined_manifest.at(type).at(id)
|
||||
let root_path = "../resources/external"
|
||||
let img_details = manifest.at(type).at(id)
|
||||
|
||||
// make image
|
||||
image(root_path + "/" + type + "/" + img_details.file, ..args)
|
||||
|
||||
Reference in New Issue
Block a user