patches and low-level development discussion
 help / color / mirror / code / Atom feed
* [PATCH] Documentation: add logo to site header
@ 2026-05-14 19:21 Valentin Gagarin
  2026-05-15 17:56 ` [PATCH v2] " Valentin Gagarin
  0 siblings, 1 reply; 5+ messages in thread
From: Valentin Gagarin @ 2026-05-14 19:21 UTC (permalink / raw)
  To: devel; +Cc: Valentin Gagarin

Also spell out the title.  The stylesheet adjustment makes the logo
align properly with the longer title text for different display widths.

Signed-off-by: Valentin Gagarin <valentin@gagarin.work>
---
 Documentation/_config.yml              |  3 ++-
 Documentation/_sass/custom/custom.scss | 13 +++++++++++++
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/Documentation/_config.yml b/Documentation/_config.yml
index 90018ba..192633b 100644
--- a/Documentation/_config.yml
+++ b/Documentation/_config.yml
@@ -1,7 +1,8 @@
 # SPDX-License-Identifier: CC0-1.0
 # SPDX-FileCopyrightText: 2022 Alyssa Ross <hi@alyssa.is>
 ---
-title: Spectrum Docs
+title: Spectrum OS documentation
+logo: "https://spectrum-os.org/logo/logo_html.svg"
 theme: just-the-docs
 aux_links:
   Home:
diff --git a/Documentation/_sass/custom/custom.scss b/Documentation/_sass/custom/custom.scss
index fd5a676..75e3f16 100644
--- a/Documentation/_sass/custom/custom.scss
+++ b/Documentation/_sass/custom/custom.scss
@@ -20,3 +20,16 @@
 		margin-left: 2ch;
 	}
 }
+
+.site-logo {
+  width: 3rem;
+}
+
+@media (min-width: 50rem) {
+  .site-logo {
+    width: 5.5rem;
+  }
+  .site-title {
+    font-size: 1.25rem !important;
+  }
+}
-- 
2.51.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v2] Documentation: add logo to site header
  2026-05-14 19:21 [PATCH] Documentation: add logo to site header Valentin Gagarin
@ 2026-05-15 17:56 ` Valentin Gagarin
  2026-05-18  6:40   ` Alyssa Ross
  2026-05-18 21:04   ` [PATCH v3] " Valentin Gagarin
  0 siblings, 2 replies; 5+ messages in thread
From: Valentin Gagarin @ 2026-05-15 17:56 UTC (permalink / raw)
  To: devel; +Cc: Valentin Gagarin

Also spell out the title.  The stylesheet adjustment makes the logo
align properly with the longer title text for different display widths.
Override the [title template] to show both the title text and the logo.

[title template]: https://github.com/just-the-docs/just-the-docs/blob/f43d7cfc4b1e18a97e6d6d20b88f1aaeda0e7196/_includes/title.html

Signed-off-by: Valentin Gagarin <valentin@gagarin.work>
---
 Documentation/_config.yml              |  3 ++-
 Documentation/_includes/title.html     |  6 ++++++
 Documentation/_sass/custom/custom.scss | 13 +++++++++++++
 3 files changed, 21 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/_includes/title.html

diff --git a/Documentation/_config.yml b/Documentation/_config.yml
index 90018ba..192633b 100644
--- a/Documentation/_config.yml
+++ b/Documentation/_config.yml
@@ -1,7 +1,8 @@
 # SPDX-License-Identifier: CC0-1.0
 # SPDX-FileCopyrightText: 2022 Alyssa Ross <hi@alyssa.is>
 ---
-title: Spectrum Docs
+title: Spectrum OS documentation
+logo: "https://spectrum-os.org/logo/logo_html.svg"
 theme: just-the-docs
 aux_links:
   Home:
diff --git a/Documentation/_includes/title.html b/Documentation/_includes/title.html
new file mode 100644
index 0000000..36a4017
--- /dev/null
+++ b/Documentation/_includes/title.html
@@ -0,0 +1,6 @@
+{% if site.logo %}
+  <div class="site-logo" role="img" aria-label="{{ site.title }}"></div>
+{% endif %}
+{% if site.title %}
+  {{ site.title }}
+{% endif %}
diff --git a/Documentation/_sass/custom/custom.scss b/Documentation/_sass/custom/custom.scss
index fd5a676..75e3f16 100644
--- a/Documentation/_sass/custom/custom.scss
+++ b/Documentation/_sass/custom/custom.scss
@@ -20,3 +20,16 @@
 		margin-left: 2ch;
 	}
 }
+
+.site-logo {
+  width: 3rem;
+}
+
+@media (min-width: 50rem) {
+  .site-logo {
+    width: 5.5rem;
+  }
+  .site-title {
+    font-size: 1.25rem !important;
+  }
+}
-- 
2.51.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] Documentation: add logo to site header
  2026-05-15 17:56 ` [PATCH v2] " Valentin Gagarin
@ 2026-05-18  6:40   ` Alyssa Ross
  2026-05-18 21:04   ` [PATCH v3] " Valentin Gagarin
  1 sibling, 0 replies; 5+ messages in thread
From: Alyssa Ross @ 2026-05-18  6:40 UTC (permalink / raw)
  To: Valentin Gagarin; +Cc: devel

[-- Attachment #1: Type: text/plain, Size: 2564 bytes --]

Valentin Gagarin <valentin@gagarin.work> writes:

> Also spell out the title.  The stylesheet adjustment makes the logo
> align properly with the longer title text for different display widths.
> Override the [title template] to show both the title text and the logo.
>
> [title template]: https://github.com/just-the-docs/just-the-docs/blob/f43d7cfc4b1e18a97e6d6d20b88f1aaeda0e7196/_includes/title.html
>
> Signed-off-by: Valentin Gagarin <valentin@gagarin.work>
> ---
>  Documentation/_config.yml              |  3 ++-
>  Documentation/_includes/title.html     |  6 ++++++
>  Documentation/_sass/custom/custom.scss | 13 +++++++++++++
>  3 files changed, 21 insertions(+), 1 deletion(-)
>  create mode 100644 Documentation/_includes/title.html
>
> diff --git a/Documentation/_config.yml b/Documentation/_config.yml
> index 90018ba..192633b 100644
> --- a/Documentation/_config.yml
> +++ b/Documentation/_config.yml
> @@ -1,7 +1,8 @@
>  # SPDX-License-Identifier: CC0-1.0
>  # SPDX-FileCopyrightText: 2022 Alyssa Ross <hi@alyssa.is>
>  ---
> -title: Spectrum Docs
> +title: Spectrum OS documentation

No "OS" in the name.  (This might change in the future but should be an
atomic change all at once when it happens.)

> +logo: "https://spectrum-os.org/logo/logo_html.svg"
>  theme: just-the-docs
>  aux_links:
>    Home:
> diff --git a/Documentation/_includes/title.html b/Documentation/_includes/title.html
> new file mode 100644
> index 0000000..36a4017
> --- /dev/null
> +++ b/Documentation/_includes/title.html
> @@ -0,0 +1,6 @@
> +{% if site.logo %}
> +  <div class="site-logo" role="img" aria-label="{{ site.title }}"></div>
> +{% endif %}
> +{% if site.title %}
> +  {{ site.title }}
> +{% endif %}

New files need copyright headers (and it's strongly encouraged for
changes that aren't completely trivial to existing files).  Otherwise
release/checks/reuse.nix fails.  In this case I'd take the copyright
text from Just the Docs' license since that's what their license says
must be preserved.

> diff --git a/Documentation/_sass/custom/custom.scss b/Documentation/_sass/custom/custom.scss
> index fd5a676..75e3f16 100644
> --- a/Documentation/_sass/custom/custom.scss
> +++ b/Documentation/_sass/custom/custom.scss
> @@ -20,3 +20,16 @@
>  		margin-left: 2ch;
>  	}
>  }
> +
> +.site-logo {
> +  width: 3rem;
> +}
> +
> +@media (min-width: 50rem) {
> +  .site-logo {
> +    width: 5.5rem;
> +  }
> +  .site-title {
> +    font-size: 1.25rem !important;
> +  }
> +}
> -- 
> 2.51.2

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v3] Documentation: add logo to site header
  2026-05-15 17:56 ` [PATCH v2] " Valentin Gagarin
  2026-05-18  6:40   ` Alyssa Ross
@ 2026-05-18 21:04   ` Valentin Gagarin
  2026-05-20  8:57     ` [PATCH v4] " Valentin Gagarin
  1 sibling, 1 reply; 5+ messages in thread
From: Valentin Gagarin @ 2026-05-18 21:04 UTC (permalink / raw)
  To: devel; +Cc: Valentin Gagarin

Also spell out the title.  The stylesheet adjustment makes the logo
align properly with the longer title text for different display widths.
Override the [title template] to show both the title text and the logo.

[title template]: https://github.com/just-the-docs/just-the-docs/blob/f43d7cfc4b1e18a97e6d6d20b88f1aaeda0e7196/_includes/title.html

Signed-off-by: Valentin Gagarin <valentin@gagarin.work>
---
 Documentation/_config.yml              |  3 ++-
 Documentation/_includes/title.html     |  9 +++++++++
 Documentation/_sass/custom/custom.scss | 13 +++++++++++++
 3 files changed, 24 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/_includes/title.html

diff --git a/Documentation/_config.yml b/Documentation/_config.yml
index 90018ba..dbc4f7a 100644
--- a/Documentation/_config.yml
+++ b/Documentation/_config.yml
@@ -1,7 +1,8 @@
 # SPDX-License-Identifier: CC0-1.0
 # SPDX-FileCopyrightText: 2022 Alyssa Ross <hi@alyssa.is>
 ---
-title: Spectrum Docs
+title: Spectrum documentation
+logo: "https://spectrum-os.org/logo/logo_html.svg"
 theme: just-the-docs
 aux_links:
   Home:
diff --git a/Documentation/_includes/title.html b/Documentation/_includes/title.html
new file mode 100644
index 0000000..76c1b2a
--- /dev/null
+++ b/Documentation/_includes/title.html
@@ -0,0 +1,9 @@
+# SPDX-License-Identifier: MIT
+# SPDX-FileCopyrightText: 2016 Patrick Marsceill
+# SPDX-FileCopyrightText: 2026 Valentin Gagarin <valentin@gagarin.work>
+{% if site.logo %}
+  <div class="site-logo" role="img" aria-label="{{ site.title }}"></div>
+{% endif %}
+{% if site.title %}
+  {{ site.title }}
+{% endif %}
diff --git a/Documentation/_sass/custom/custom.scss b/Documentation/_sass/custom/custom.scss
index fd5a676..75e3f16 100644
--- a/Documentation/_sass/custom/custom.scss
+++ b/Documentation/_sass/custom/custom.scss
@@ -20,3 +20,16 @@
 		margin-left: 2ch;
 	}
 }
+
+.site-logo {
+  width: 3rem;
+}
+
+@media (min-width: 50rem) {
+  .site-logo {
+    width: 5.5rem;
+  }
+  .site-title {
+    font-size: 1.25rem !important;
+  }
+}
-- 
2.51.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v4] Documentation: add logo to site header
  2026-05-18 21:04   ` [PATCH v3] " Valentin Gagarin
@ 2026-05-20  8:57     ` Valentin Gagarin
  0 siblings, 0 replies; 5+ messages in thread
From: Valentin Gagarin @ 2026-05-20  8:57 UTC (permalink / raw)
  To: devel; +Cc: Valentin Gagarin

Also spell out the title.  The stylesheet adjustment makes the logo
align properly with the longer title text for different display widths.
Override the [title template] to show both the title text and the logo.

[title template]: https://github.com/just-the-docs/just-the-docs/blob/f43d7cfc4b1e18a97e6d6d20b88f1aaeda0e7196/_includes/title.html

Signed-off-by: Valentin Gagarin <valentin@gagarin.work>
---
 Documentation/_config.yml              |  3 ++-
 Documentation/_includes/title.html     | 11 +++++++++++
 Documentation/_sass/custom/custom.scss | 13 +++++++++++++
 3 files changed, 26 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/_includes/title.html

diff --git a/Documentation/_config.yml b/Documentation/_config.yml
index 90018ba..dbc4f7a 100644
--- a/Documentation/_config.yml
+++ b/Documentation/_config.yml
@@ -1,7 +1,8 @@
 # SPDX-License-Identifier: CC0-1.0
 # SPDX-FileCopyrightText: 2022 Alyssa Ross <hi@alyssa.is>
 ---
-title: Spectrum Docs
+title: Spectrum documentation
+logo: "https://spectrum-os.org/logo/logo_html.svg"
 theme: just-the-docs
 aux_links:
   Home:
diff --git a/Documentation/_includes/title.html b/Documentation/_includes/title.html
new file mode 100644
index 0000000..0b36987
--- /dev/null
+++ b/Documentation/_includes/title.html
@@ -0,0 +1,11 @@
+{% comment %}
+SPDX-License-Identifier: MIT
+SPDX-FileCopyrightText: 2016 Patrick Marsceill
+SPDX-FileCopyrightText: 2026 Valentin Gagarin <valentin@gagarin.work>
+{% endcomment %}
+{% if site.logo %}
+  <div class="site-logo" role="img" aria-label="{{ site.title }}"></div>
+{% endif %}
+{% if site.title %}
+  {{ site.title }}
+{% endif %}
diff --git a/Documentation/_sass/custom/custom.scss b/Documentation/_sass/custom/custom.scss
index fd5a676..75e3f16 100644
--- a/Documentation/_sass/custom/custom.scss
+++ b/Documentation/_sass/custom/custom.scss
@@ -20,3 +20,16 @@
 		margin-left: 2ch;
 	}
 }
+
+.site-logo {
+  width: 3rem;
+}
+
+@media (min-width: 50rem) {
+  .site-logo {
+    width: 5.5rem;
+  }
+  .site-title {
+    font-size: 1.25rem !important;
+  }
+}
-- 
2.51.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-05-20  8:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-14 19:21 [PATCH] Documentation: add logo to site header Valentin Gagarin
2026-05-15 17:56 ` [PATCH v2] " Valentin Gagarin
2026-05-18  6:40   ` Alyssa Ross
2026-05-18 21:04   ` [PATCH v3] " Valentin Gagarin
2026-05-20  8:57     ` [PATCH v4] " Valentin Gagarin

Code repositories for project(s) associated with this public inbox

	https://spectrum-os.org/git/crosvm
	https://spectrum-os.org/git/doc
	https://spectrum-os.org/git/mktuntap
	https://spectrum-os.org/git/nixpkgs
	https://spectrum-os.org/git/spectrum
	https://spectrum-os.org/git/ucspi-vsock
	https://spectrum-os.org/git/www

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).