Skip to content

Commit e23fc1a

Browse files
authored
Prototype site: some appearance tweaks (#1264)
* Deduplicate & optimise logo; set in config * Remove component overrides * Use Nix brand colours, and tweak banner
1 parent 9f7d01d commit e23fc1a

8 files changed

Lines changed: 46 additions & 90 deletions

File tree

site/astro.config.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ export default defineConfig({
99
starlight({
1010
title: "Documentation",
1111
logo: { src: "./src/assets/nixos-logo.svg", alt: "NixOS" },
12+
favicon: "./src/assets/nixos-logo.svg",
13+
customCss: [ "./src/styles/style.css" ],
1214
social: [
1315
{
1416
icon: "github",
@@ -23,8 +25,6 @@ export default defineConfig({
2325
],
2426
components: {
2527
Banner: "./src/components/Banner.astro",
26-
SocialIcons: "./src/components/SocialIcons.astro",
27-
Sidebar: "./src/components/Sidebar.astro",
2828
},
2929
plugins: [
3030
starlightSidebarTopics([

site/public/favicon.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

site/src/assets/nixos-logo.svg

Lines changed: 1 addition & 1 deletion
Loading

site/src/components/Banner.astro

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const message = "Prototype. Expect breaking changes. Contribute on ";
33
---
44

55
<div class="sl-banner global-banner" data-pagefind-ignore>
6-
<span aria-hidden="true">🚧</span>
6+
<span aria-hidden="true">🚧 </span>
77
<strong>{message}</strong><a
88
href="https://github.com/nixos/nix.dev"
99
target="_blank"
@@ -16,14 +16,16 @@ const message = "Prototype. Expect breaking changes. Contribute on ";
1616
@layer starlight.core {
1717
.sl-banner.global-banner {
1818
padding: 1rem var(--sl-nav-pad-x);
19-
background-color: #d21c1c;
19+
margin: 1rem var(--sl-content-pad-x);
20+
background-color: #b71205;
2021
color: #fff;
2122
font-size: var(--sl-text-lg);
2223
font-weight: 700;
2324
line-height: var(--sl-line-height-headings);
2425
text-align: center;
2526
text-wrap: balance;
2627
box-shadow: var(--sl-shadow-sm);
28+
border-radius: 999rem;
2729
}
2830
.sl-banner.global-banner :global(a) {
2931
color: #fff;

site/src/components/Nav.astro

Lines changed: 0 additions & 44 deletions
This file was deleted.

site/src/components/Sidebar.astro

Lines changed: 0 additions & 33 deletions
This file was deleted.

site/src/components/SocialIcons.astro

Lines changed: 0 additions & 7 deletions
This file was deleted.

site/src/styles/style.css

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/* Dark mode colors (default) */
2+
:root {
3+
/* Nix brand colours */
4+
--sl-color-accent-low: #28395f; /* L35 */
5+
--sl-color-accent: #87adfa; /* L75 */
6+
--sl-color-accent-high: #b7cefd; /* L85 */
7+
--sl-color-white: #ffffff;
8+
--sl-color-gray-1: #eeeeee; /* L95 */
9+
--sl-color-gray-2: #cecece; /* L85 */
10+
--sl-color-gray-3: #8f8f8f; /* L65 */
11+
--sl-color-gray-4: #555555; /* L45 */
12+
--sl-color-gray-5: #3a3a3a; /* L35 */
13+
--sl-color-gray-6: #0b0b0b; /* L25 */
14+
--sl-color-black: #0b0b0b; /* L15 */
15+
--sl-hue-orange: 24;
16+
--sl-hue-green: 138;
17+
--sl-hue-blue: 220;
18+
--sl-hue-purple: 246;
19+
--sl-hue-red: 356;
20+
21+
/* Remove borders */
22+
--sl-color-hairline: transparent;
23+
--sl-color-hairline-shade: transparent;
24+
}
25+
/* Light mode colors */
26+
:root[data-theme='light'] {
27+
--sl-color-accent-low: #87adfa; /* L75 */
28+
--sl-color-accent: #506fb2; /* L55 */
29+
--sl-color-accent-high: #28395f; /* L35 */
30+
--sl-color-white: #0b0b0b; /* L15 */
31+
--sl-color-gray-1: #222222; /* L25 */
32+
--sl-color-gray-2: #3a3a3a; /* L35 */
33+
--sl-color-gray-3: #555555; /* L45 */
34+
--sl-color-gray-4: #8f8f8f; /* L65 */
35+
--sl-color-gray-5: #aeaeae; /* L75 */
36+
--sl-color-gray-6: #cecece; /* L85 */
37+
--sl-color-gray-7: #ffffff;
38+
--sl-color-black: #ffffff;
39+
}

0 commit comments

Comments
 (0)