Skip to content

Commit 3be223e

Browse files
authored
Merge pull request #330 from Neikon/main
Page Rework
2 parents 35ed592 + 224f5d1 commit 3be223e

520 files changed

Lines changed: 10603 additions & 11161 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/post-create.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,4 @@ if ! command -v jq >/dev/null 2>&1; then
66
sudo apt-get install -y jq
77
fi
88

9-
if ! command -v nu >/dev/null 2>&1; then
10-
npm install -g nushell
11-
fi
12-
139
npm ci

.github/ISSUE_TEMPLATE/-send-your-theme.md

Lines changed: 0 additions & 33 deletions
This file was deleted.
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Submit a theme
2+
description: Share a Firefox userChrome.css theme repository with the hub.
3+
title: "[Theme]: "
4+
labels:
5+
- theme submission
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Thanks for sharing a Firefox CSS theme. This form opens a review issue; automation will turn it into a candidate pull request when possible.
11+
- type: input
12+
id: title
13+
attributes:
14+
label: Theme title
15+
description: Use the public name of the theme.
16+
placeholder: My Firefox Theme
17+
validations:
18+
required: true
19+
- type: input
20+
id: repository
21+
attributes:
22+
label: Original repository
23+
description: Link to the source repository maintained by the author or project.
24+
placeholder: https://github.com/owner/repository
25+
validations:
26+
required: true
27+
- type: input
28+
id: homepage
29+
attributes:
30+
label: Homepage
31+
description: Optional project page, docs page, or website.
32+
placeholder: https://example.com
33+
validations:
34+
required: false
35+
- type: textarea
36+
id: description
37+
attributes:
38+
label: Short description
39+
description: Keep it concise. Mention the visual style, layout idea, or main browser customization.
40+
placeholder: A compact dark Firefox theme with vertical tabs and rounded controls.
41+
validations:
42+
required: true
43+
- type: textarea
44+
id: screenshots
45+
attributes:
46+
label: Screenshot URLs
47+
description: Attach images here or paste direct image URLs. Use one screenshot per line when pasting links.
48+
placeholder: Drag screenshots into this field, or paste image URLs.
49+
validations:
50+
required: true
51+
- type: input
52+
id: tags
53+
attributes:
54+
label: Tags
55+
description: Use lowercase tags separated by commas, such as dark, compact, sidebery, oneline.
56+
placeholder: dark, compact, sidebery
57+
validations:
58+
required: true
59+
- type: dropdown
60+
id: submitter_role
61+
attributes:
62+
label: Your relationship to the theme
63+
options:
64+
- Author
65+
- Maintainer
66+
- User or recommender
67+
validations:
68+
required: true
69+
- type: textarea
70+
id: notes
71+
attributes:
72+
label: Notes for reviewers
73+
description: Optional compatibility notes, install caveats, or context for maintainers.
74+
validations:
75+
required: false

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,7 @@ updates:
1010
directory: "/"
1111
schedule:
1212
interval: weekly
13+
- package-ecosystem: "npm"
14+
directory: "/"
15+
schedule:
16+
interval: weekly
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Audit Theme Repositories
2+
3+
on:
4+
schedule:
5+
- cron: '17 3 1 * *'
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
concurrency:
13+
group: audit-theme-repositories
14+
cancel-in-progress: false
15+
16+
jobs:
17+
audit:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v6
21+
22+
- uses: actions/setup-node@v6
23+
with:
24+
node-version: 24
25+
cache: npm
26+
27+
- run: npm ci
28+
29+
- name: Audit published and archived theme repositories
30+
env:
31+
GITHUB_TOKEN: ${{ github.token }}
32+
RETIREMENT_REPORT: theme-repository-audit.md
33+
run: npm run audit:theme-repos
34+
35+
- run: npm test
36+
- run: npm run build
37+
38+
- name: Open repository audit review PR
39+
env:
40+
GH_TOKEN: ${{ secrets.AUDIT_PR_TOKEN || github.token }}
41+
shell: bash
42+
run: |
43+
if git diff --quiet -- src/content/themes; then
44+
echo "No theme archive or removal changes proposed."
45+
exit 0
46+
fi
47+
48+
branch="automation/theme-repository-audit-$(date -u +%Y-%m)"
49+
50+
git config user.name "github-actions[bot]"
51+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
52+
git checkout -B "$branch"
53+
git add src/content/themes
54+
git commit -m "chore: propose theme repository audit changes"
55+
git fetch --no-tags --depth=1 origin "$branch:refs/remotes/origin/$branch" || true
56+
git push --force-with-lease origin "$branch"
57+
58+
manual_url="https://github.com/${GITHUB_REPOSITORY}/pull/new/${branch}"
59+
title="Review archived or unavailable theme repositories"
60+
61+
if pr_url="$(gh pr view "$branch" --json url --jq .url 2>/dev/null)"; then
62+
gh pr edit "$branch" \
63+
--title "$title" \
64+
--body-file theme-repository-audit.md
65+
echo "Updated repository audit PR: ${pr_url}" >> "$GITHUB_STEP_SUMMARY"
66+
else
67+
if pr_url="$(gh pr create \
68+
--base main \
69+
--head "$branch" \
70+
--title "$title" \
71+
--body-file theme-repository-audit.md 2>pr-create-error.txt)"; then
72+
echo "Created repository audit PR: ${pr_url}" >> "$GITHUB_STEP_SUMMARY"
73+
else
74+
echo "::warning::The audit branch was pushed, but GitHub refused to create the PR automatically."
75+
cat pr-create-error.txt
76+
{
77+
echo "Repository audit changes were pushed to \`${branch}\`, but the workflow token could not create the PR automatically."
78+
echo ""
79+
echo "Open it manually: ${manual_url}"
80+
echo ""
81+
echo "To allow automatic PR creation, enable **Settings > Actions > General > Workflow permissions > Allow GitHub Actions to create and approve pull requests**, or add an \`AUDIT_PR_TOKEN\` secret with permission to create pull requests."
82+
} >> "$GITHUB_STEP_SUMMARY"
83+
fi
84+
fi

.github/workflows/build.yml

Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,27 @@
1-
name: Build And Publish Docs
1+
name: Build And Deploy
22

33
on:
44
push:
55
branches:
66
- main
77
paths:
8-
- 'dev/**'
9-
- 'images/**'
10-
- 'themes.json'
11-
- 'gulpfile.js'
12-
- 'gulpconfig.js'
8+
- 'src/**'
9+
- 'public/**'
10+
- 'scripts/**'
11+
- 'astro.config.mjs'
12+
- 'tsconfig.json'
1313
- 'package.json'
1414
- 'package-lock.json'
15-
- 'dev/config/**'
15+
- '.github/workflows/**'
1616
workflow_dispatch:
1717

18-
env:
19-
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
20-
2118
permissions:
22-
contents: write
19+
contents: read
20+
pages: write
21+
id-token: write
2322

2423
concurrency:
25-
group: build-and-publish-${{ github.ref }}
24+
group: pages-${{ github.ref }}
2625
cancel-in-progress: true
2726

2827
jobs:
@@ -42,16 +41,8 @@ jobs:
4241
- run: npm test
4342
- run: npm run build
4443

45-
- name: Commit generated docs
46-
shell: bash
47-
run: |
48-
if git diff --quiet -- docs; then
49-
echo "No generated docs changes to commit."
50-
exit 0
51-
fi
52-
53-
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
54-
git config --local user.name "github-actions[bot]"
55-
git add docs
56-
git commit -m "ci(build): compile and deploy"
57-
git push
44+
- uses: actions/configure-pages@v6
45+
- uses: actions/upload-pages-artifact@v5
46+
with:
47+
path: dist
48+
- uses: actions/deploy-pages@v5

.github/workflows/check-themes.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,15 @@ on:
44
pull_request:
55
branches: [ main ]
66
paths:
7-
- 'dev/**'
8-
- 'images/**'
9-
- 'themes.json'
10-
- 'gulpfile.js'
11-
- 'gulpconfig.js'
7+
- 'src/**'
8+
- 'public/**'
9+
- 'scripts/**'
10+
- 'astro.config.mjs'
11+
- 'tsconfig.json'
1212
- 'package.json'
1313
- 'package-lock.json'
14-
- 'dev/config/**'
1514
- '.github/workflows/**'
1615

17-
env:
18-
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
19-
2016
jobs:
2117
validate_pull_requests:
2218
runs-on: ubuntu-latest
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Close Merged Theme Submission Issue
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
7+
permissions:
8+
issues: write
9+
pull-requests: read
10+
11+
jobs:
12+
close_issue:
13+
if: ${{ github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'submissions/theme-') }}
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Close source issue
17+
env:
18+
GH_TOKEN: ${{ github.token }}
19+
PR_BODY: ${{ github.event.pull_request.body }}
20+
PR_NUMBER: ${{ github.event.pull_request.number }}
21+
shell: bash
22+
run: |
23+
issue_number="$(printf '%s' "$PR_BODY" | sed -nE 's/^Generated from #([0-9]+)\.$/\1/p' | head -n 1)"
24+
25+
if [ -z "$issue_number" ]; then
26+
echo "No source issue number found in PR #${PR_NUMBER}."
27+
exit 0
28+
fi
29+
30+
gh issue close "$issue_number" \
31+
--comment "Theme submission was merged in #${PR_NUMBER}. Thanks for sharing it."

0 commit comments

Comments
 (0)