├── .dockerignore ├── .editorconfig ├── .github └── workflows │ └── build-and-push.yml ├── .gitignore ├── .prettierrc ├── Dockerfile ├── README.md ├── bun.lockb ├── frontend ├── images │ ├── bg-trans.png │ ├── color_profile-1.png │ └── defragment-1.png ├── index.css ├── index.html └── index.js ├── package.json └── src ├── index.js ├── source.svg └── svg.js /.dockerignore: -------------------------------------------------------------------------------- 1 | **/.classpath 2 | **/.dockerignore 3 | **/.env 4 | **/.git 5 | **/.gitignore 6 | **/.project 7 | **/.settings 8 | **/.toolstarget 9 | **/.vs 10 | **/.vscode 11 | **/.next 12 | **/.cache 13 | **/*.*proj.user 14 | **/*.dbmdl 15 | **/*.jfm 16 | **/charts 17 | **/docker-compose* 18 | **/compose.y*ml 19 | **/Dockerfile* 20 | **/node_modules 21 | **/npm-debug.log 22 | **/obj 23 | **/secrets.dev.yaml 24 | **/values.dev.yaml 25 | **/build 26 | **/dist 27 | LICENSE 28 | README.md -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = tab 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | 11 | [*.yml] 12 | indent_style = space 13 | -------------------------------------------------------------------------------- /.github/workflows/build-and-push.yml: -------------------------------------------------------------------------------- 1 | name: Build and Push 2 | 3 | permissions: 4 | contents: read 5 | packages: write 6 | 7 | on: 8 | push: 9 | branches: 10 | - main 11 | 12 | jobs: 13 | build: 14 | runs-on: ubuntu-latest 15 | steps: 16 | - 17 | name: Set up Docker Buildx 18 | uses: docker/setup-buildx-action@v1 19 | - 20 | name: Login to GHCR 21 | uses: docker/login-action@v1 22 | with: 23 | registry: ghcr.io 24 | username: ${{ github.repository_owner }} 25 | password: ${{ github.token }} 26 | - 27 | name: Build and push 28 | id: docker_build 29 | uses: docker/build-push-action@v2 30 | with: 31 | push: true 32 | tags: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:latest 33 | - 34 | name: Image digest 35 | run: echo ${{ steps.docker_build.outputs.digest }} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | 3 | logs 4 | _.log 5 | npm-debug.log_ 6 | yarn-debug.log* 7 | yarn-error.log* 8 | lerna-debug.log* 9 | .pnpm-debug.log* 10 | 11 | # Diagnostic reports (https://nodejs.org/api/report.html) 12 | 13 | report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json 14 | 15 | # Runtime data 16 | 17 | pids 18 | _.pid 19 | _.seed 20 | \*.pid.lock 21 | 22 | # Directory for instrumented libs generated by jscoverage/JSCover 23 | 24 | lib-cov 25 | 26 | # Coverage directory used by tools like istanbul 27 | 28 | coverage 29 | \*.lcov 30 | 31 | # nyc test coverage 32 | 33 | .nyc_output 34 | 35 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 36 | 37 | .grunt 38 | 39 | # Bower dependency directory (https://bower.io/) 40 | 41 | bower_components 42 | 43 | # node-waf configuration 44 | 45 | .lock-wscript 46 | 47 | # Compiled binary addons (https://nodejs.org/api/addons.html) 48 | 49 | build/Release 50 | 51 | # Dependency directories 52 | 53 | node_modules/ 54 | jspm_packages/ 55 | 56 | # Snowpack dependency directory (https://snowpack.dev/) 57 | 58 | web_modules/ 59 | 60 | # TypeScript cache 61 | 62 | \*.tsbuildinfo 63 | 64 | # Optional npm cache directory 65 | 66 | .npm 67 | 68 | # Optional eslint cache 69 | 70 | .eslintcache 71 | 72 | # Optional stylelint cache 73 | 74 | .stylelintcache 75 | 76 | # Microbundle cache 77 | 78 | .rpt2_cache/ 79 | .rts2_cache_cjs/ 80 | .rts2_cache_es/ 81 | .rts2_cache_umd/ 82 | 83 | # Optional REPL history 84 | 85 | .node_repl_history 86 | 87 | # Output of 'npm pack' 88 | 89 | \*.tgz 90 | 91 | # Yarn Integrity file 92 | 93 | .yarn-integrity 94 | 95 | # dotenv environment variable files 96 | 97 | .env 98 | .env.development.local 99 | .env.test.local 100 | .env.production.local 101 | .env.local 102 | 103 | # parcel-bundler cache (https://parceljs.org/) 104 | 105 | .cache 106 | .parcel-cache 107 | 108 | # Next.js build output 109 | 110 | .next 111 | out 112 | 113 | # Nuxt.js build / generate output 114 | 115 | .nuxt 116 | dist 117 | 118 | # Gatsby files 119 | 120 | .cache/ 121 | 122 | # Comment in the public line in if your project uses Gatsby and not Next.js 123 | 124 | # https://nextjs.org/blog/next-9-1#public-directory-support 125 | 126 | # public 127 | 128 | # vuepress build output 129 | 130 | .vuepress/dist 131 | 132 | # vuepress v2.x temp and cache directory 133 | 134 | .temp 135 | .cache 136 | 137 | # Docusaurus cache and generated files 138 | 139 | .docusaurus 140 | 141 | # Serverless directories 142 | 143 | .serverless/ 144 | 145 | # FuseBox cache 146 | 147 | .fusebox/ 148 | 149 | # DynamoDB Local files 150 | 151 | .dynamodb/ 152 | 153 | # TernJS port file 154 | 155 | .tern-port 156 | 157 | # Stores VSCode versions used for testing VSCode extensions 158 | 159 | .vscode-test 160 | 161 | # yarn v2 162 | 163 | .yarn/cache 164 | .yarn/unplugged 165 | .yarn/build-state.yml 166 | .yarn/install-state.gz 167 | .pnp.\* 168 | 169 | # wrangler project 170 | 171 | .dev.vars 172 | .wrangler/ 173 | 174 | # some aras proudly use macOS 175 | .DS_Store -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 140, 3 | "singleQuote": true, 4 | "semi": true, 5 | "useTabs": true 6 | } 7 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM oven/bun:1-alpine 2 | 3 | RUN mkdir -p /home/bun/app/node_modules && chown -R bun:bun /home/bun/app 4 | 5 | WORKDIR /home/bun/app 6 | 7 | COPY --chown=bun:bun package.json bun.lockb ./ 8 | 9 | USER bun 10 | 11 | RUN bun install --frozen-lockfile --production 12 | 13 | COPY --chown=bun:bun . . 14 | 15 | EXPOSE 3000 16 | 17 | CMD [ "bun", "run", "src/index.js" ] -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # badge-gen 2 | 3 | ### an 88x31 badge pride flag mashup generator, for all your queer web 1.0 needs! 4 | 5 | https://badge.les.bi -------------------------------------------------------------------------------- /bun.lockb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oake/badge-gen/8039ec8155db5396fbbd3504874be48e201cf7d9/bun.lockb -------------------------------------------------------------------------------- /frontend/images/bg-trans.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oake/badge-gen/8039ec8155db5396fbbd3504874be48e201cf7d9/frontend/images/bg-trans.png -------------------------------------------------------------------------------- /frontend/images/color_profile-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oake/badge-gen/8039ec8155db5396fbbd3504874be48e201cf7d9/frontend/images/color_profile-1.png -------------------------------------------------------------------------------- /frontend/images/defragment-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oake/badge-gen/8039ec8155db5396fbbd3504874be48e201cf7d9/frontend/images/defragment-1.png -------------------------------------------------------------------------------- /frontend/index.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --text-color: #222222; 3 | --surface: #c0c0c0; 4 | --button-highlight: #ffffff; 5 | --button-face: #dfdfdf; 6 | --button-shadow: #808080; 7 | --window-frame: #0a0a0a; 8 | --dialog-blue: #000080; 9 | --dialog-blue-light: #1084d0; 10 | --dialog-gray: #808080; 11 | --dialog-gray-light: #b5b5b5; 12 | --link-blue: #0000ff; 13 | --border-field: inset -1px -1px var(--button-highlight), 14 | inset 1px 1px var(--button-shadow), inset -2px -2px var(--button-face), 15 | inset 2px 2px var(--window-frame); 16 | } 17 | 18 | ::-webkit-scrollbar-button:vertical:start, 19 | ::-webkit-scrollbar-button:vertical:end { 20 | display: none; 21 | } 22 | 23 | body { 24 | user-select: none; 25 | background-color: #008080; 26 | 27 | height: 100vh; 28 | margin: 0; 29 | display: flex; 30 | justify-content: center; 31 | align-items: center; 32 | } 33 | 34 | .hidden { 35 | display: none !important; 36 | } 37 | 38 | .main { 39 | width: fit-content; 40 | } 41 | 42 | .window-body { 43 | gap: 10px; 44 | } 45 | 46 | .windowarea { 47 | display: grid; 48 | height: 120px; 49 | width: fit-content; 50 | align-items: center; 51 | 52 | padding: 12px 8px; 53 | margin: 0; 54 | margin-top: 6px; 55 | gap: 10px; 56 | } 57 | 58 | .settings-fieldset { 59 | display: grid; 60 | align-items: center; 61 | gap: 5px; 62 | width: 100px; 63 | } 64 | 65 | .download-fieldset { 66 | width: 100%; 67 | } 68 | 69 | .download-buttons { 70 | display: inline-flex; 71 | margin-left: 10px; 72 | gap: 5px; 73 | align-items: center; 74 | } 75 | 76 | .download-radio { 77 | display: inline-flex; 78 | justify-content: space-between; 79 | width: 100%; 80 | margin-bottom: 10px; 81 | } 82 | 83 | .space-windowbody { 84 | display: flex; 85 | place-content: space-between; 86 | } 87 | 88 | button.active { 89 | box-shadow: inset -1px -1px #ffffff, inset 1px 1px #0a0a0a, 90 | inset -2px -2px #dfdfdf, inset 2px 2px #808080; 91 | text-shadow: 1px 1px #222; 92 | } 93 | 94 | .options-pane { 95 | overflow-y: scroll; 96 | background-image: url("images/bg-trans.png"); 97 | background-color: lightcyan; 98 | } 99 | 100 | #dummy-flag { 101 | content: ''; 102 | width: 88px; 103 | flex-shrink: 0; 104 | } 105 | 106 | .flag { 107 | image-rendering: pixelated; 108 | width: 88px; 109 | height: 31px; 110 | } 111 | 112 | #final-badge-pane { 113 | background-image: url("images/bg-trans.png"); 114 | background-color: khaki; 115 | } 116 | 117 | textarea { 118 | width: 100%; 119 | overflow: hidden; 120 | height: fit-content; 121 | resize: none; 122 | } 123 | 124 | .window-field-stack { 125 | display: flex; 126 | flex-direction: column; 127 | } 128 | 129 | .border { 130 | box-shadow: var(--border-field); 131 | } 132 | 133 | .focused { 134 | outline: 1px dotted #000000; 135 | outline-offset: 2px; 136 | } -------------------------------------------------------------------------------- /frontend/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 |