Skip to content

Commit 0e3d36b

Browse files
authored
feat: Rewrite site using react (#26)
1 parent 7ba5625 commit 0e3d36b

28 files changed

+443
-329
lines changed

.github/workflows/site.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,21 @@ jobs:
1919
uses: actions/checkout@v2
2020
- name: Setup Pages
2121
uses: actions/configure-pages@v3
22-
- name: Setup node
23-
uses: actions/setup-node@v4
22+
- name: Setup bun
23+
uses: oven-sh/setup-bun@v2
2424
with:
25-
node-version: lts/*
25+
bun-version: latest
2626
- name: Setup dependencies
27-
run: sudo apt install -y librsvg2-bin pngquant && npm i -g svgo
27+
run: sudo apt install -y librsvg2-bin pngquant && bun i -g svgo
2828
- name: Build
2929
run: sh/site.sh
30+
- name: Bundle
31+
run: cd site && bun install && bun run build
3032
- name: Upload
3133
id: deployment
3234
uses: actions/upload-pages-artifact@v3
3335
with:
34-
path: site/
36+
path: site/dist
3537
deploy:
3638
permissions:
3739
pages: write

addons/plenticons/plugin.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
name="plenticons"
44
description="A library of icons for your custom nodes!"
55
author="Tamás Gálffy"
6-
version="1.0.0"
6+
version="1.1.0"
77
script="plenticons.gd"

sh/site.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
./sh/build.sh
55

66
# Copy icons to site
7-
cp -r build/site/icons site/
7+
cp -r build/site/icons site/public/
88

99
# Add favicon
1010
rsvg-convert --zoom 2 icon.svg > site/favicon.png
@@ -13,7 +13,7 @@ rsvg-convert --zoom 2 icon.svg > site/favicon.png
1313
bundle="$(echo build/*.zip)"
1414
bundle="$(basename "$bundle")"
1515

16-
cp "build/$bundle" "site/$bundle"
16+
cp "build/$bundle" "site/public/$bundle"
1717

1818
# Generate manifest
1919
MANIFEST="site/manifest.json"

site/.gitignore

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,30 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?
25+
126
# Ignore build artifacts
227
*.zip
328
*.json
4-
icons
29+
public/icons
530
favicon.png

site/bun.lockb

87.5 KB
Binary file not shown.

site/eslint.config.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import js from '@eslint/js'
2+
import globals from 'globals'
3+
import reactHooks from 'eslint-plugin-react-hooks'
4+
import reactRefresh from 'eslint-plugin-react-refresh'
5+
import tseslint from 'typescript-eslint'
6+
7+
export default tseslint.config(
8+
{ ignores: ['dist'] },
9+
{
10+
extends: [
11+
js.configs.recommended,
12+
...tseslint.configs.strict,
13+
...tseslint.configs.stylistic
14+
],
15+
files: ['**/*.{ts,tsx}'],
16+
languageOptions: {
17+
ecmaVersion: 2020,
18+
globals: globals.browser,
19+
},
20+
plugins: {
21+
'react-hooks': reactHooks,
22+
'react-refresh': reactRefresh,
23+
},
24+
rules: {
25+
...reactHooks.configs.recommended.rules,
26+
'react-refresh/only-export-components': [
27+
'warn',
28+
{ allowConstantExport: true },
29+
],
30+
},
31+
},
32+
)

site/index.html

Lines changed: 3 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,13 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<title>plenticons</title>
55
<meta charset="UTF-8">
66
<meta name="viewport" content="width=device-width, initial-scale=1">
7-
<link href="css/style.css" rel="stylesheet">
87
<link href="favicon.png" rel="icon">
9-
10-
<script src="js/index.js" defer></script>
118
</head>
129
<body>
13-
<h1><img src="icons/foxs-sake/plenticons-yellow.svg" />lenticons</h1>
14-
15-
<p>A pack of icons to use with custom nodes in the <a href="https://godotengine.org/">Godot</a> editor. Or wherever else!</p>
16-
17-
<h2 id="features">Features</h2>
18-
<ul>
19-
<li><img src="./icons/2d/plus-yellow.svg" alt="plus"> 50+ icons of various categories</li>
20-
<li><img src="./icons/objects/chest-yellow.svg" alt="chest"> Each icon comes in multiple variants</li>
21-
<li><img src="./icons/creatures/heart-full-yellow.svg" alt="heart"> Licensed as CC0 - take it and use it</li>
22-
<li><img src="./icons/objects/globe-yellow.svg" alt="globe"> <a href="https://foxssake.github.io/plenticons/">Dedicated site</a> for browsing</li>
23-
<li><img src="./icons/2d/checkmark-yellow.svg" alt="check"> Available for HiDPI displays too</li>
24-
<li><img src="./icons/objects/lightning-yellow.svg" alt="lightning"> Optimized for size</li>
25-
</ul>
26-
27-
<div class="toolbar">
28-
<variant-picker></variant-picker>
29-
<a href="https://discord.gg/xWGh4GskG5" target="_blank">
30-
<button><img src="assets/discord-mark-white.svg" />Discord</button>
31-
</a>
32-
<a href="https://ko-fi.com/foxssake" target="_blank">
33-
<button><img src="assets/kofi_symbol.svg" />Ko-Fi</button>
34-
</a>
35-
<a href="https://github.com/foxssake/plenticons" target="_blank">
36-
<button><img src="assets/github-mark-white.svg" />GitHub</button>
37-
</a>
38-
<a href="https://github.com/foxssake/plenticons/blob/main/LICENSE" target="_blank">
39-
<button><img/>📜 License</button>
40-
</a>
41-
</div>
42-
43-
<div class="icon-card-container">
44-
</div>
45-
46-
<div class="modal" style="visibility: hidden;">
47-
<icon-modal></icon-modal>
48-
</div>
10+
<div id="root"></div>
11+
<script type="module" src="/src/main.tsx"></script>
4912
</body>
5013
</html>

0 commit comments

Comments
 (0)