Skip to content

Commit 83e087e

Browse files
Merge branch 'main' into thilobillerbeck/fonts
2 parents 489397e + a9cb49c commit 83e087e

28 files changed

+692
-482
lines changed

.github/workflows/deploy-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
persist-credentials: false
6060
clean: true
6161
- name: "Installing Nix"
62-
uses: "cachix/install-nix-action@456688f15bc354bef6d396e4a35f4f89d40bf2b7" # v31.8.2
62+
uses: "cachix/install-nix-action@7ec16f2c061ab07b235a7245e06ed46fe9a1cab6" # v31.8.3
6363
- name: "Build"
6464
run: nix build
6565
- name: "Upload build artifact"

.github/workflows/deploy-prod.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
persist-credentials: false
3030

3131
- name: 'Installing Nix'
32-
uses: 'cachix/install-nix-action@7ab6e7fd29da88e74b1e314a4ae9ac6b5cda3801' # v31.8.0
32+
uses: 'cachix/install-nix-action@7ec16f2c061ab07b235a7245e06ed46fe9a1cab6' # v31.8.3
3333

3434
- name: 'Setup Cachix'
3535
uses: 'cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad' # v16

.github/workflows/update-flake-lock.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
persist-credentials: false
2323

2424
- name: 'Install Nix'
25-
uses: 'cachix/install-nix-action@7ab6e7fd29da88e74b1e314a4ae9ac6b5cda3801' # v31.8.0
25+
uses: 'cachix/install-nix-action@7ec16f2c061ab07b235a7245e06ed46fe9a1cab6' # v31.8.3
2626
with:
2727
extra_nix_config: |
2828
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}

core/astro.config.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import syntaxTheme from './src/lib/shiki/theme.json';
1010
import favicons from 'astro-favicons';
1111

1212
import { createRequire } from 'module';
13+
import shellPromptTransformer from './src/lib/shiki/shellPromptTransformer';
1314
const require = createRequire(import.meta.url);
1415

1516
function selectFavicon(theme = 'default') {
@@ -51,6 +52,7 @@ export default defineConfig({
5152
markdown: {
5253
shikiConfig: {
5354
theme: syntaxTheme,
55+
transformers: [shellPromptTransformer],
5456
},
5557
},
5658
compressHTML: true,

core/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,30 @@
1313
"linkcheck:full": "linkchecker http://localhost:4321"
1414
},
1515
"dependencies": {
16-
"@astrojs/mdx": "^4.3.7",
17-
"@astrojs/rss": "^4.0.12",
16+
"@astrojs/mdx": "^4.3.10",
17+
"@astrojs/rss": "^4.0.13",
1818
"@astrojs/sitemap": "^3.6.0",
1919
"@fontsource-variable/fira-code": "^5.2.7",
2020
"@fontsource-variable/overpass": "^5.2.8",
2121
"@fontsource-variable/roboto-flex": "^5.2.8",
22-
"@tailwindcss/vite": "^4.1.14",
22+
"@tailwindcss/vite": "^4.1.17",
2323
"@xmldom/xmldom": "^0.9.8",
2424
"asciinema-player": "^3.12.1",
25-
"astro": "^5.14.4",
25+
"astro": "^5.15.4",
2626
"astro-favicons": "^3.1.5",
2727
"astro-icon": "^1.1.5",
2828
"astro-seo": "^0.8.4",
2929
"class-variance-authority": "^0.7.1",
30-
"htmx.org": "^2.0.7",
30+
"htmx.org": "^2.0.8",
3131
"markdown-it": "^14.0.0",
3232
"node-html-parser": "^7.0.1",
3333
"sanitize-html": "^2.17.0",
3434
"tailwindcss": "^4.0.0",
35-
"turndown": "^7.2.1"
35+
"turndown": "^7.2.2"
3636
},
3737
"devDependencies": {
3838
"@iconify-json/mdi": "^1.2.3",
39-
"@iconify-json/simple-icons": "^1.2.54",
39+
"@iconify-json/simple-icons": "^1.2.58",
4040
"@iconify/tailwind": "^1.2.0"
4141
}
4242
}
60.5 KB
Loading
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
import Button from '@/components/ui/Button.astro';
3+
import { Code } from 'astro:components';
4+
5+
const {
6+
type = 'logo',
7+
fillStyle = 'gradient',
8+
color = 'rainbow',
9+
fontColor = 'black',
10+
orientation = 'horizontal',
11+
style = 'regular',
12+
variant = 'recommended',
13+
} = Astro.props;
14+
15+
const brandUrl = `https://brand.nixos.org/logos/nixos-${type}-${color}-${fillStyle}-${fontColor}-${style}-${orientation}-${variant}.svg`;
16+
---
17+
18+
<div class="bg-secondary-afghani-blue-95 rounded-2xl p-4">
19+
<img
20+
src={brandUrl}
21+
class:list={[
22+
'w-auto rounded-2xl',
23+
fontColor === 'white' ? 'bg-primary-black' : 'bg-primary-white',
24+
]}
25+
/>
26+
<div class="mb-3 flex items-center gap-2 pt-4">
27+
<Code class="rounded-xl px-2 py-1" code={brandUrl} />
28+
</div>
29+
<div class="flex w-full justify-end gap-2">
30+
<Button
31+
color="semidarkblue"
32+
size="sm-mobfull"
33+
href={brandUrl}
34+
icon="mdi:download"
35+
label="Download"
36+
/>
37+
<Button
38+
color="semidarkblue"
39+
size="sm-mobfull"
40+
data-url={brandUrl}
41+
classList={['hidden']}
42+
icon="mdi:content-copy"
43+
label="Copy URL"
44+
/>
45+
</div>
46+
</div>
47+
48+
<script>
49+
document.querySelectorAll('button[data-url]').forEach((button) => {
50+
button.classList.remove('hidden');
51+
button.addEventListener('click', () => {
52+
const url = button.getAttribute('data-url');
53+
navigator.clipboard.writeText(url).then(
54+
function () {
55+
button.classList.toggle('bg-accent-zambian-green-55!');
56+
setTimeout(() => {
57+
button.classList.toggle('bg-accent-zambian-green-55!');
58+
}, 1000);
59+
},
60+
function (err) {
61+
console.error('Async: Could not copy text: ', err);
62+
button.classList.toggle('bg-accent-persian-orange-55!');
63+
setTimeout(() => {
64+
button.classList.toggle('bg-accent-persian-orange-55!');
65+
}, 1000);
66+
},
67+
);
68+
});
69+
});
70+
</script>

core/src/components/ui/Button.astro

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ const {
5757
label,
5858
nonPublic = false,
5959
icon = undefined,
60+
...other
6061
} = Astro.props;
6162
6263
const setIconSize = (size: string) => {
@@ -90,6 +91,7 @@ const setIconSize = (size: string) => {
9091
icon && 'flex items-center justify-start gap-4',
9192
!icon && 'flex items-center justify-center gap-1',
9293
]}
94+
{...other}
9395
>
9496
{icon && <Icon name={icon} size={setIconSize(size)} />}
9597
{nonPublic && <Icon name="mdi:lock" />}
@@ -112,9 +114,10 @@ const setIconSize = (size: string) => {
112114
classList,
113115
icon && 'flex items-center justify-start gap-4',
114116
]}
117+
{...other}
115118
>
116119
{icon && <Icon name={icon} />}
117-
<slot />
120+
{label || <slot />}
118121
</button>
119122
)
120123
}

core/src/content/banners/survey-2025-and-sc.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@ import Banner from '@/components/ui/Banner.astro';
1818
Second Steering Committee Election
1919
</span>
2020
<span class="text-md text-primary-white">
21-
Registration for voters and candidates is now open!
21+
Voter registration is still open and voting has started. Click for
22+
details.
2223
</span>
2324
</span>
2425
<a
25-
href="https://discourse.nixos.org/t/the-election-committee-announces-the-second-steering-committee-election/69354/1"
26+
href="https://github.com/NixOS/SC-election-2025/?tab=readme-ov-file#timeline"
2627
target="_blank"
2728
rel="noopener noreferrer"
2829
class="bg-primary-white hover:bg-primary-black hover:text-primary-white mt-1.5 w-full rounded-md px-4 py-3 text-center leading-none font-bold text-black no-underline md:mt-0 md:w-auto"

core/src/content/banners/survey-2025.mdx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
11
---
22
sitewide:
3-
message: 'Nix Community Survey 2025 is here!'
3+
message: 'Nix Community Survey 2025 is still running!'
44
link:
55
url: https://survey.nixos.org/759934
66
text: 'Take the Survey'
7-
wrapperClasses: 'bg-[#260D40] text-white'
7+
wrapperClasses: 'bg-[#260D40] text-primary-white'
88
---
99

1010
import Banner from '@/components/ui/Banner.astro';
1111

1212
<Banner
13-
wrapperClasses="bg-gradient-to-r from-[#260D40] to-nix-blue text-white"
13+
wrapperClasses="bg-gradient-to-r from-[#260D40] to-secondary-afghani-blue text-primary-white"
1414
class="font-heading flex flex-col items-center justify-between gap-1 text-lg font-bold md:flex-row"
1515
>
1616
<span class="flex flex-col">
17-
<span class="text-2xl font-bold">Nix Community Survey 2025 is here!</span>
17+
<span class="text-2xl font-bold">
18+
Nix Community Survey 2025 is still running!
19+
</span>
1820
<span class="text-md">Help us improve by sharing your feedback.</span>
1921
</span>
2022
<a
2123
href="https://survey.nixos.org/759934"
2224
target="_blank"
2325
rel="noopener noreferrer"
24-
class="mt-1.5 w-full rounded-md bg-white px-4 py-3 text-center leading-none font-bold text-black no-underline hover:bg-black hover:text-white md:mt-0 md:w-auto"
26+
class="bg-primary-white hover:bg-primary-black hover:text-primary-white mt-1.5 w-full rounded-md px-4 py-3 text-center leading-none font-bold text-black no-underline md:mt-0 md:w-auto"
2527
>
2628
Take the Survey
2729
</a>

0 commit comments

Comments
 (0)