Skip to content

Commit c0cdfd1

Browse files
authored
Merge branch 'master' into claude/claude-md-mmc7vq8v7e0msgwl-QdY8h
2 parents 7006082 + f9ffe46 commit c0cdfd1

2,289 files changed

Lines changed: 66358 additions & 63817 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.

.github/pull_request_template.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Thank you for making a pull request to ZTM's Animation Nation project. We will review your pull request as soon as we can, but keep in mind we can get very busy during Hacktoberfest.
2+
3+
While you're waiting, please look over this checklist. Feel free to write a description of what you did as well!
4+
5+
## What I did
6+
7+
*Optional: Edit this to tell us what you did!*
8+
9+
## Pull request checklist
10+
11+
- [ ] This pull request uses **HTML and CSS** only and provides a `meta.json` file.
12+
- [ ] All files in this pull request are in a directory named: `<github_username>-<art_name>` without the <>.
13+
- [ ] Your pull request contains `index.html` and `styles.css`.
14+
- [ ] Your html file is named exactly: `index.html`
15+
- [ ] Your css file is named exactly: `styles.css`
16+
- [ ] Your pull request your `meta.json` with:
17+
- [ ] `githubHandle`: being your unique github user name,
18+
- [ ] `artName` : name of your animation
19+
- [ ] Your submission includes **at least one animation**.
20+
- [ ] Your pull request **does not modify any other files** in the repository.
21+
22+
#### Not normally needed
23+
- [ ] Check this if you would like to discuss an improvement besides adding animations
24+
25+
**Note: if your pull request makes an improvement besides adding a CSS animation you will need to discuss this with the maintainers. You can help kickstart this process by explaining what your change does and why you are making it in the "What I did" section**
26+
27+
## What to expect
28+
29+
- If your pull request meets the checklist requirements it will be approved and merged by a maintainer
30+
- If your pull request needs some changes. A maintainer will leave a comment requesting changes
31+
- If your pull request significantly violates the criteria in the checklist it will be closed with feedback.

.github/workflows/post-merge.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Update cards, screenshots, and fix code style
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
env:
9+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10+
SKIP_REST: false
11+
12+
jobs:
13+
update-cards-and-screenshots-and-fix-code-style:
14+
runs-on: ubuntu-latest
15+
# Don't push changes to main branches in forks as this causes merge conflicts
16+
if: ${{ !github.event.repository.fork }}
17+
permissions:
18+
contents: write
19+
# running two copies of this job at once can create race conditions
20+
# and will usually cause the most recent workflow to fail. It is
21+
# preferable to always have the most up to date workflow succeed
22+
# so we cancel this job whenever a newer one is started.
23+
concurrency:
24+
group: post-merge
25+
cancel-in-progress: true
26+
steps:
27+
- uses: actions/checkout@v4
28+
29+
- uses: actions/setup-node@v4
30+
with:
31+
node-version: 20
32+
cache: 'npm'
33+
34+
- name: Install job dependencies
35+
run: npm install
36+
37+
- name: Configure Git
38+
run: |
39+
git config --global user.name "GitHub Actions"
40+
git config --global user.email "actions@github.com"
41+
42+
- name: Generate cards.json
43+
run: node generators/generateCards.js
44+
45+
- name: Check for cards changes
46+
run: |
47+
if git diff --quiet public/cards.json; then
48+
echo "No changes to commit"
49+
echo "SKIP_REST=true" >> $GITHUB_ENV
50+
else
51+
git add public/cards.json
52+
git commit -m "(CI) cards.json Generation"
53+
fi
54+
55+
- name: Generate screenshots
56+
if: env.SKIP_REST != 'true'
57+
run: |
58+
node generators/generateScreenshot.js
59+
git add Art/**/icon.png
60+
git commit -m "(CI) Screenshot Generation" || echo "No changes to commit"
61+
62+
- name: Push changes
63+
if: env.SKIP_REST != 'true'
64+
run: git push origin master
65+
66+
- name: Run Prettier to fix code style
67+
id: prettier-run
68+
run: |
69+
npm run prettier:fix
70+
echo "filecount=$(git status -s -uno | wc -L)" >> $GITHUB_OUTPUT
71+
72+
- name: Commit Prettier changes
73+
if: ${{ steps.prettier-run.outputs.filecount > 0 }}
74+
run: |
75+
git add .
76+
git commit -m "(CI) Run Prettier"
77+
git push origin master

.github/workflows/pre-review.yml

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
name: PR Pre-review
2+
3+
on:
4+
pull_request_target:
5+
branches: [ master ]
6+
types: [opened, synchronize, reopened, closed]
7+
pull_request_review:
8+
types: [submitted]
9+
10+
permissions:
11+
contents: read
12+
pull-requests: write
13+
issues: write
14+
15+
env:
16+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
18+
jobs:
19+
pre-review:
20+
if: github.event_name == 'pull_request_target' && github.event.action != 'closed'
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
with:
26+
repository: ${{ github.event.pull_request.head.repo.full_name }}
27+
ref: ${{ github.event.pull_request.head.sha }}
28+
fetch-depth: 50
29+
30+
- name: Fetch master branch
31+
run: git fetch origin master
32+
33+
- name: Check for labelled PR to skip
34+
id: check-skip
35+
run: |
36+
LABELS=$(gh pr view ${{ github.event.pull_request.number }} \
37+
-R "${{ github.event.pull_request.base.repo.full_name }}" \
38+
--json labels --jq ".labels[].name")
39+
40+
if echo "$LABELS" | grep -Eiq 'Out of scope|Consideration / WIP'; then
41+
echo "Skipping pre-review for non-scoped contributions."
42+
echo "skip=true" >> $GITHUB_OUTPUT
43+
else
44+
echo "Eligible for pre-review"
45+
echo "skip=false" >> $GITHUB_OUTPUT
46+
fi
47+
48+
- uses: actions/setup-node@v4
49+
if: steps.check-skip.outputs.skip != 'true'
50+
with:
51+
node-version: 20
52+
cache: 'npm'
53+
54+
55+
- name: Collect information
56+
if: steps.check-skip.outputs.skip != 'true'
57+
run: |
58+
echo "Setting environment variables for preReview.js"
59+
setEnv() { echo "$1=${!1}" >> $GITHUB_ENV; }
60+
61+
PR_NUMBER=${{ github.event.pull_request.number }}
62+
setEnv "PR_NUMBER"
63+
64+
CONTRIBUTOR=${{ github.event.pull_request.user.login }}
65+
setEnv "CONTRIBUTOR"
66+
echo "Contributor github handle: $CONTRIBUTOR"
67+
68+
BASE_REPO=${{ github.event.pull_request.base.repo.full_name }}
69+
setEnv "BASE_REPO"
70+
71+
HEAD_REF=${{ github.event.pull_request.head.ref }}
72+
setEnv "HEAD_REF"
73+
74+
git fetch origin ${{ github.event.pull_request.base.ref }}
75+
MERGE_BASE=$(git merge-base origin/${{ github.event.pull_request.base.ref }} HEAD)
76+
setEnv "MERGE_BASE"
77+
78+
CHANGED_FILES=$(gh pr view $PR_NUMBER -R "$BASE_REPO" --json files -q '.files[].path')
79+
echo "CHANGED_FILES<<EOF" >> $GITHUB_ENV
80+
printf '%s\n' "$CHANGED_FILES" >> $GITHUB_ENV
81+
echo "EOF" >> $GITHUB_ENV
82+
83+
GITHUB_PERMISSION_ROLE=$(gh api "repos/$BASE_REPO/collaborators/$CONTRIBUTOR/permission" -q '.role_name' 2>/dev/null || echo 'unknown')
84+
setEnv "GITHUB_PERMISSION_ROLE"
85+
86+
- name: Run "preReview" script
87+
if: steps.check-skip.outputs.skip != 'true'
88+
id: pre-review
89+
run: |
90+
PR_NUMBER=${{ github.event.pull_request.number }}
91+
REVIEW_MESSAGE=$(node ./generators/pre-review/preReview.js "$CONTRIBUTOR" "$CHANGED_FILES" "$GITHUB_PERMISSION_ROLE")
92+
93+
echo "REVIEW_MESSAGE<<EOF" >> $GITHUB_ENV
94+
echo "$REVIEW_MESSAGE" >> $GITHUB_ENV
95+
echo "EOF" >> $GITHUB_ENV
96+
97+
echo "===== REVIEW_MESSAGE ====="
98+
echo "$REVIEW_MESSAGE"
99+
echo "=========================="
100+
101+
echo "Submit review comment"
102+
gh pr comment "$PR_NUMBER" --body "$REVIEW_MESSAGE" -R "${{ github.event.pull_request.base.repo.full_name }}"
103+
104+
echo "Handle 'Changes Requested' label and contributor assignment"
105+
CURRENT_MONTH=$(date +%m)
106+
107+
if echo "$REVIEW_MESSAGE" | grep -q '\- \[ \]'; then
108+
if [[ "$GITHUB_PERMISSION_ROLE" != "unknown" ]]; then
109+
echo "Assigning contributor: $CONTRIBUTOR"
110+
gh pr edit "$PR_NUMBER" --add-assignee "$CONTRIBUTOR" -R "${{ github.event.pull_request.base.repo.full_name }}" || true
111+
else
112+
echo "Contributor $CONTRIBUTOR is not a collaborator — skipping assignment"
113+
fi
114+
115+
gh pr edit "$PR_NUMBER" --add-label "Changes Requested" -R "${{ github.event.pull_request.base.repo.full_name }}"
116+
gh pr edit "$PR_NUMBER" --remove-label "Awaiting Maintainer Validation" -R "${{ github.event.pull_request.base.repo.full_name }}"
117+
else
118+
gh pr edit "$PR_NUMBER" --add-label "Awaiting Maintainer Validation" -R "${{ github.event.pull_request.base.repo.full_name }}"
119+
gh pr edit "$PR_NUMBER" --remove-label "Changes Requested" -R "${{ github.event.pull_request.base.repo.full_name }}"
120+
121+
if [[ "$CURRENT_MONTH" == "10" ]]; then
122+
echo "Adding 'hacktoberfest-accepted' as no review detected"
123+
gh pr edit "$PR_NUMBER" --add-label "hacktoberfest-accepted" -R "${{ github.event.pull_request.base.repo.full_name }}"
124+
fi
125+
fi
126+
127+
echo "Handle 'invalid' label"
128+
if echo "$REVIEW_MESSAGE" | grep -q -Eqi 'empty file'; then
129+
gh pr edit "$PR_NUMBER" --add-label "invalid" -R "${{ github.event.pull_request.base.repo.full_name }}"
130+
else
131+
gh pr edit "$PR_NUMBER" --remove-label "invalid" -R "${{ github.event.pull_request.base.repo.full_name }}"
132+
fi
133+
134+
echo "Handle 'Conflict present' label"
135+
if echo "$REVIEW_MESSAGE" | grep -q -Eqi '/icon'; then
136+
gh pr edit "$PR_NUMBER" --add-label "Conflict present" -R "${{ github.event.pull_request.base.repo.full_name }}"
137+
else
138+
gh pr edit "$PR_NUMBER" --remove-label "Conflict present" -R "${{ github.event.pull_request.base.repo.full_name }}"
139+
fi
140+
141+
env:
142+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
143+
144+
remove-awaiting-on-merge:
145+
if: github.event_name == 'pull_request_target' && github.event.action == 'closed'
146+
runs-on: ubuntu-latest
147+
steps:
148+
- name: Remove 'Awaiting Maintainer Validation' on merged PR
149+
run: |
150+
if [ "${{ github.event.pull_request.merged }}" == "true" ]; then
151+
echo "PR merged — removing 'Awaiting Maintainer Validation' label"
152+
gh pr edit ${{ github.event.pull_request.number }} --remove-label "Awaiting Maintainer Validation" -R "${{ github.event.pull_request.base.repo.full_name }}"
153+
else
154+
echo "PR closed but not merged — skipping label removal"
155+
fi
156+
env:
157+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
.DS_Store
2-
.idea
3-
start-here-guidelines
4-
start
5-
.vs
1+
/node_modules
2+
.vscode
3+
**/.DS_Store

.prettierignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.prettierrc
2+
.github/
3+
node_modules/
4+
public/
5+
package*.json

.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"trailingComma": "none",
3+
"tabWidth": 2,
4+
"semi": true,
5+
"singleQuote": true
6+
}

Art/1rotate/index.html

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

Art/1rotate/rotation.gif

-395 KB
Binary file not shown.

Art/1rotate/style.css

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

0 commit comments

Comments
 (0)