Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
57b70c8445 | ||
|
|
0d3221c22f | ||
|
|
013fd7151e | ||
|
|
99b29bb09f |
Generated
+1
-1
@@ -2948,7 +2948,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "portal"
|
name = "portal"
|
||||||
version = "0.3.25"
|
version = "0.3.26"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"arc-swap",
|
"arc-swap",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "portal"
|
name = "portal"
|
||||||
version = "0.3.26"
|
version = "0.3.28"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|||||||
+5
-9
@@ -587,14 +587,10 @@ fn Hero(title: String, description: String, landing: bool, site: SiteConfig, cur
|
|||||||
None
|
None
|
||||||
};
|
};
|
||||||
let has_module = module.is_some();
|
let has_module = module.is_some();
|
||||||
// Light theme inverts white-stroke wordmarks to ink. The house
|
// Light theme can invert a white-stroke wordmark to ink. Default:
|
||||||
// mark and the sibling-site marks are all white-stroke SVGs; a
|
// only the built-in house mark inverts; a content-shipped logo
|
||||||
// raster logo is a client brand and keeps its colors.
|
// keeps its colours unless site.yaml opts in with wordmark_invert.
|
||||||
let house_wordmark = site
|
let house_wordmark = site.wordmark_invert.unwrap_or(site.wordmark.is_none());
|
||||||
.wordmark
|
|
||||||
.as_deref()
|
|
||||||
.map(|w| w.ends_with(".svg"))
|
|
||||||
.unwrap_or(true);
|
|
||||||
let wordmark = site.wordmark.clone().unwrap_or_else(|| "/wordmark.svg".to_string());
|
let wordmark = site.wordmark.clone().unwrap_or_else(|| "/wordmark.svg".to_string());
|
||||||
// Clamped server-side too, but belt and braces for the inline style.
|
// Clamped server-side too, but belt and braces for the inline style.
|
||||||
let wordmark_style = site
|
let wordmark_style = site
|
||||||
@@ -691,7 +687,7 @@ fn Hero(title: String, description: String, landing: bool, site: SiteConfig, cur
|
|||||||
<img src=wordmark alt=site_title style=wordmark_style/>
|
<img src=wordmark alt=site_title style=wordmark_style/>
|
||||||
</a>
|
</a>
|
||||||
<h1>{title}</h1>
|
<h1>{title}</h1>
|
||||||
<p>{description}</p>
|
<p inner_html=render_inline_markdown(&description)></p>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -523,6 +523,12 @@ pub struct SiteConfig {
|
|||||||
/// `None` falls back to `/wordmark.svg`.
|
/// `None` falls back to `/wordmark.svg`.
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub wordmark: Option<String>,
|
pub wordmark: Option<String>,
|
||||||
|
/// Whether to invert the wordmark in light theme. `None` inverts
|
||||||
|
/// only the built-in house wordmark (a white-stroke SVG); a
|
||||||
|
/// content-shipped logo keeps its own colours unless it sets this
|
||||||
|
/// true (e.g. a sibling site's white-stroke mark).
|
||||||
|
#[serde(default)]
|
||||||
|
pub wordmark_invert: Option<bool>,
|
||||||
/// Wordmark display height in rem (0.5–6.0). `None` keeps the
|
/// Wordmark display height in rem (0.5–6.0). `None` keeps the
|
||||||
/// stylesheet's default. Raster logos look best at or below their
|
/// stylesheet's default. Raster logos look best at or below their
|
||||||
/// intrinsic pixel height.
|
/// intrinsic pixel height.
|
||||||
|
|||||||
Reference in New Issue
Block a user