diff --git a/.github/ISSUE_TEMPLATE/together.md b/.github/ISSUE_TEMPLATE/together.md new file mode 100644 index 00000000..755e2c04 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/together.md @@ -0,0 +1,31 @@ +--- +name: 함께하는 곳 신청 +about: Braillify를 사용하고 있는 곳을 소개해 주세요. +title: '[함께하는 곳] ' +--- + +신청 내용과 로고는 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 적지 마세요. + +## 함께할 곳 + +- 구분 (기업·기관·학교·단체): +- 이름 (20자 이내): + +## 사용 내용 + +- 사용 상태 (사용 중·도입 준비 중): +- 사용처 이름: +- 사용처 주소 (선택): +- 어디에 어떤 용도로 쓰나요: +- 사용 방식: +- 사용 시작 시기 (선택): + +## 로고 + +밝은 바탕용 PNG 또는 JPG 로고 한 개를 첨부해 주세요 (2MB 이하). + +## 공개 동의 + +- [ ] 이름과 로고를 braillify.kr ‘함께하는 곳’에 게시하는 데 동의합니다. + +GitHub 계정이 없거나 게시 중단을 원하시면 contact@devfive.kr로 알려 주세요. diff --git a/.github/workflows/pr-ci-validation.yml b/.github/workflows/pr-ci-validation.yml new file mode 100644 index 00000000..62e982a0 --- /dev/null +++ b/.github/workflows/pr-ci-validation.yml @@ -0,0 +1,176 @@ +name: PR CI validation + +on: + pull_request: + +permissions: + contents: read + +jobs: + go: + name: Go archive validation - ${{ matrix.platform }} + runs-on: ${{ matrix.runner }} + strategy: + fail-fast: false + matrix: + include: + - { runner: windows-latest, target: x86_64-pc-windows-gnu, platform: windows-amd64 } + - { runner: ubuntu-latest, target: x86_64-unknown-linux-gnu, platform: linux-amd64 } + - { runner: ubuntu-24.04-arm, target: aarch64-unknown-linux-gnu, platform: linux-arm64 } + - { runner: macos-14, target: aarch64-apple-darwin, platform: darwin-arm64 } + - { runner: macos-15-intel, target: x86_64-apple-darwin, platform: darwin-amd64 } + steps: + - uses: actions/checkout@v6 + with: + persist-credentials: false + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: stable + target: ${{ matrix.target }} + cache: false + - uses: actions/setup-go@v5 + with: + go-version: stable + cache: false + - name: Build native library + run: cargo build --release --target ${{ matrix.target }} -p braillify-go + - name: Remove passive LLVM bitcode + if: runner.os != 'macOS' + shell: bash + run: | + rustup component add llvm-tools + sysroot=$(rustc --print sysroot) + host=$(rustc -vV | sed -n 's/^host: //p') + archive=target/${{ matrix.target }}/release/libbraillify_go.a + objcopy="$sysroot/lib/rustlib/$host/bin/llvm-objcopy" + if [ "$RUNNER_OS" = Windows ]; then objcopy="$objcopy.exe"; fi + "$objcopy" --remove-section=.llvmbc --remove-section=.llvmcmd "$archive" "$archive.cleaned" + mv "$archive.cleaned" "$archive" + - name: Prepare and verify macOS test archive + if: runner.os == 'macOS' + shell: bash + run: | + rustup component add llvm-tools + sysroot=$(rustc --print sysroot) + host=$(rustc -vV | sed -n 's/^host: //p') + tools="$sysroot/lib/rustlib/$host/bin" + archive=target/${{ matrix.target }}/release/libbraillify_go.a + candidate="$RUNNER_TEMP/go-macos-candidate.a" + "$tools/llvm-objcopy" '--remove-section=__LLVM,__bitcode' '--remove-section=__LLVM,__cmdline' "$archive" "$candidate" + python3 scripts/test_verify_macos_go_archive.py + python3 scripts/verify-macos-go-archive.py "$archive" "$candidate" "$tools" + - name: Copy native library + shell: bash + run: | + mkdir -p packages/go/libs/${{ matrix.platform }} + if [ "$RUNNER_OS" = macOS ]; then + cp "$RUNNER_TEMP/go-macos-candidate.a" packages/go/libs/${{ matrix.platform }}/libbraillify_go.a + rm "$RUNNER_TEMP/go-macos-candidate.a" + else + cp target/${{ matrix.target }}/release/libbraillify_go.a packages/go/libs/${{ matrix.platform }}/ + fi + - name: Test + working-directory: packages/go + run: go test -v ./... + + go-release-cross-build: + name: Go release cross-build - linux-arm64 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + with: + persist-credentials: false + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: stable + target: aarch64-unknown-linux-gnu + cache: false + - name: Install cross-compilation tools (Linux ARM64) + run: | + test "$(uname -m)" = x86_64 + sudo apt-get update + sudo apt-get install -y gcc-aarch64-linux-gnu + - name: Build native library + run: cargo build --release --target aarch64-unknown-linux-gnu -p braillify-go + env: + CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc + - name: Remove passive LLVM bitcode and verify archive + shell: bash + run: | + rustup component add llvm-tools + sysroot=$(rustc --print sysroot) + host=$(rustc -vV | sed -n 's/^host: //p') + archive=target/aarch64-unknown-linux-gnu/release/libbraillify_go.a + objcopy="$sysroot/lib/rustlib/$host/bin/llvm-objcopy" + ar t "$archive" > "$RUNNER_TEMP/members-before" + aarch64-linux-gnu-nm -g --defined-only --just-symbols "$archive" 2>/dev/null | LC_ALL=C sort > "$RUNNER_TEMP/symbols-before" + test -s "$RUNNER_TEMP/symbols-before" + "$objcopy" --remove-section=.llvmbc --remove-section=.llvmcmd "$archive" "$archive.cleaned" + mv "$archive.cleaned" "$archive" + test -s "$archive" + ar t "$archive" > "$RUNNER_TEMP/members-after" + aarch64-linux-gnu-nm -g --defined-only --just-symbols "$archive" 2>/dev/null | LC_ALL=C sort > "$RUNNER_TEMP/symbols-after" + cmp "$RUNNER_TEMP/members-before" "$RUNNER_TEMP/members-after" + cmp "$RUNNER_TEMP/symbols-before" "$RUNNER_TEMP/symbols-after" + aarch64-linux-gnu-objdump -f "$archive" > "$RUNNER_TEMP/archive-format" + grep -q 'architecture: aarch64' "$RUNNER_TEMP/archive-format" + "$sysroot/lib/rustlib/$host/bin/llvm-objdump" -h "$archive" > "$RUNNER_TEMP/archive-sections" + if grep -Eq '\.llvmbc|\.llvmcmd' "$RUNNER_TEMP/archive-sections"; then exit 1; fi + + rust-coverage: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + with: + persist-credentials: false + - uses: oven-sh/setup-bun@v2 + with: + bun-version: latest + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: 1.98.1 + components: rustfmt + cache: false + - run: cargo install cargo-tarpaulin --version 0.37.3 + - name: Format like publish coverage + shell: bash + run: | + rustup toolchain install stable --profile minimal --component rustfmt + echo 'max_width = 100000' > .rustfmt.toml + echo 'tab_spaces = 4' >> .rustfmt.toml + echo 'newline_style = "Unix"' >> .rustfmt.toml + echo 'fn_call_width = 100000' >> .rustfmt.toml + echo 'fn_params_layout = "Compressed"' >> .rustfmt.toml + echo 'chain_width = 100000' >> .rustfmt.toml + echo 'merge_derives = true' >> .rustfmt.toml + echo 'use_small_heuristics = "Default"' >> .rustfmt.toml + cargo +stable fmt + - run: bun run test:rust + + node-coverage: + runs-on: ${{ matrix.runner }} + strategy: + fail-fast: false + matrix: + runner: [ubuntu-latest, windows-latest, macos-latest] + steps: + - uses: actions/checkout@v6 + with: + persist-credentials: false + - uses: oven-sh/setup-bun@v2 + with: + bun-version: latest + - uses: actions/setup-python@v7 + with: + python-version: '3.14' + - uses: astral-sh/setup-uv@v10.0.1 + - run: uv pip install maturin --system + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: stable + components: clippy, rustfmt + cache: false + - run: bun install + - run: bun run build + - run: bun run lint + - run: bun test diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b4aeafee..f9149f4c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -55,12 +55,23 @@ jobs: - uses: actions-rust-lang/setup-rust-toolchain@v1 - name: Cargo tarpaulin and fmt run: | - cargo install cargo-tarpaulin rustup component add rustfmt clippy + - name: Install Linux coverage toolchain + if: runner.os == 'Linux' + run: | + rustup toolchain install 1.98.1 --profile minimal + cargo install cargo-tarpaulin --version 0.37.3 + - name: Install coverage tool + if: runner.os != 'Linux' + run: cargo install cargo-tarpaulin - name: Install dependencies run: bun install - name: Build run: bun run build + - name: Verify image test prerequisites + shell: bash + run: | + bun -e 'const { existsSync } = require("node:fs"); const exe = process.platform === "win32" ? "target/release/braillify.exe" : "target/release/braillify"; const chrome = process.env.CHROME_PATH || Bun.which("google-chrome") || Bun.which("chromium") || (process.platform === "win32" ? "C:/Program Files/Google/Chrome/Application/chrome.exe" : process.platform === "darwin" ? "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" : ""); if (!existsSync(exe) || !chrome || !(Bun.which(chrome) || existsSync(chrome))) throw new Error("Image integration tests require the release CLI and Chrome");' - name: Lint run: bun run lint - name: reformat @@ -78,6 +89,8 @@ jobs: - name: Test (Rust coverage) timeout-minutes: 20 run: bun run test:rust + env: + RUSTUP_TOOLCHAIN: ${{ runner.os == 'Linux' && '1.98.1' || 'stable' }} - name: Test (Node) timeout-minutes: 10 # Windows에서 중첩된 `bun run`이 테스트 완료 후 간헐적으로 멈추므로 직접 실행한다. @@ -336,6 +349,28 @@ jobs: retention-days: 1 - uses: actions/deploy-pages@v5 + together-approval-replies: + name: Notify approved partners + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + needs: deploy-landing + runs-on: ubuntu-latest + concurrency: + group: together-approval-replies + cancel-in-progress: false + permissions: + contents: read + issues: write + steps: + - uses: actions/checkout@v7 + with: + persist-credentials: false + - uses: oven-sh/setup-bun@v2 + with: + bun-version: latest + - run: bun scripts/send-together-replies.ts + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # publish changepacks: name: changepacks @@ -1238,6 +1273,40 @@ jobs: - name: Build native library run: cargo build --release --target ${{ matrix.target }} -p braillify-go + - name: Probe Apple bitcode removal without changing the archive + if: runner.os == 'macOS' + shell: bash + run: | + archive=target/${{ matrix.target }}/release/libbraillify_go.a + work=$(mktemp -d) + trap 'rm -rf "$work"' EXIT + if xcrun bitcode_strip "$archive" -r -o "$work/candidate.a"; then + ar -t "$archive" > "$work/before-members" + ar -t "$work/candidate.a" > "$work/after-members" + nm -gUj "$archive" | LC_ALL=C sort > "$work/before-symbols" + nm -gUj "$work/candidate.a" | LC_ALL=C sort > "$work/after-symbols" + if cmp -s "$work/before-members" "$work/after-members" && cmp -s "$work/before-symbols" "$work/after-symbols"; then + echo 'Apple bitcode_strip retained archive members and exported symbols; candidate not installed.' + else + echo 'Apple bitcode_strip changed archive members or exported symbols; candidate not installed.' + fi + else + echo 'Apple bitcode_strip rejected this static archive; original retained.' + fi + + - name: Remove passive LLVM bitcode (Linux and Windows) + if: runner.os != 'macOS' + shell: bash + run: | + rustup component add llvm-tools + sysroot=$(rustc --print sysroot) + host=$(rustc -vV | sed -n 's/^host: //p') + archive=target/${{ matrix.target }}/release/libbraillify_go.a + objcopy="$sysroot/lib/rustlib/$host/bin/llvm-objcopy" + if [ "$RUNNER_OS" = Windows ]; then objcopy="$objcopy.exe"; fi + "$objcopy" --remove-section=.llvmbc --remove-section=.llvmcmd "$archive" "$archive.cleaned" + mv "$archive.cleaned" "$archive" + - name: Copy native library run: | mkdir -p packages/go/libs/${{ matrix.platform }} @@ -1302,6 +1371,19 @@ jobs: env: CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc + - name: Remove passive LLVM bitcode (Linux and Windows) + if: runner.os != 'macOS' + shell: bash + run: | + rustup component add llvm-tools + sysroot=$(rustc --print sysroot) + host=$(rustc -vV | sed -n 's/^host: //p') + archive=target/${{ matrix.target }}/release/libbraillify_go.a + objcopy="$sysroot/lib/rustlib/$host/bin/llvm-objcopy" + if [ "$RUNNER_OS" = Windows ]; then objcopy="$objcopy.exe"; fi + "$objcopy" --remove-section=.llvmbc --remove-section=.llvmcmd "$archive" "$archive.cleaned" + mv "$archive.cleaned" "$archive" + - name: Upload artifact uses: actions/upload-artifact@v7 with: diff --git a/.gitignore b/.gitignore index 13354d85..afb16757 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,9 @@ test_status.json # Paged test results emitted by `cargo test test_by_testcase` and served to the # landing page. Generated artifact, never committed. apps/landing/public/test-status/ +apps/landing/public/together.json +apps/landing/public/together/cert/ +apps/landing/public/together/badge/ .venv __pycache__ .pytest_cache diff --git a/apps/landing/.devup/public-assets.json b/apps/landing/.devup/public-assets.json new file mode 100644 index 00000000..8be885ec --- /dev/null +++ b/apps/landing/.devup/public-assets.json @@ -0,0 +1,115 @@ +{ + "version": 1, + "assets": [ + { + "path": "/images/together/action-dot.svg", + "identity": "image/svg+xml:888051ea02f8686a39bb6cfed715c2388edeaeed20cd7050e2227fabdcb992d9:", + "sha256": "dd06c5c7030e97feab500b06fd6dce153cb34abf71c2b93785e251a2d8043e6b", + "mimeType": "image/svg+xml", + "mask": false, + "geometry": "9602ccae1cc309d25f8b0be62228e41c6e385214d6f4b43e630091b7ff763997", + "sources": [ + "I445:4786;397:5704:node" + ] + }, + { + "path": "/images/together/alert.svg", + "identity": "image/svg+xml:16a0bfbf1717231aed694fead6bc1445bc7b1a9ca4aca2dd910049b599a27b54:", + "sha256": "ab8c961202e4ea1bb0e152eb328e24951dd2fe090f1aa96fa99331b6ff4f06fc", + "mimeType": "image/svg+xml", + "mask": false, + "geometry": "40e5ca286a8543f54d8225c488d3bb6133c1403b1469c3377854731802b3efea", + "sources": [ + "456:11966:node" + ] + }, + { + "path": "/images/together/cross.svg", + "identity": "image/svg+xml:e005ba5f49c7f17dbf3ad6c530d4f484665ad51acd3d427027825cebcd85de70:", + "sha256": "b3025fa8e23b1a9c4d751d63a6078456e22176b976b8ac0243d15e72ef8bc8c9", + "mimeType": "image/svg+xml", + "mask": false, + "geometry": "fbe30455db54627e742b996183628088b55a5ea7b8d46207a388e80e79442c14", + "sources": [ + "450:5865:node" + ] + }, + { + "path": "/images/together/dialog-close.svg", + "identity": "image/svg+xml:5e8f45e7e2cf47fcfbdd74e4deb87c9b921f8e695fd17081524b8ca9333a3359:", + "sha256": "1be5f957b7ff357beb94d149c9dcd45809aed405bf9db48bf1e152790336ca02", + "mimeType": "image/svg+xml", + "mask": false, + "geometry": "7296b087f2722b74901341623ad63ddf10f82283c4484e17c6844980f28cfecf", + "sources": [ + "I402:8270;397:5872;304:1512:node" + ] + }, + { + "path": "/images/together/dialog-external.svg", + "identity": "image/svg+xml:4a8aabbdf9ae3851ecef0dc0ffb7fac07f630809f679b94a0e716628852ecd17:", + "sha256": "cce0e2d78776038ebdaf3ef168477e31b3bd6c3b698b2115cf6cd2e481591c80", + "mimeType": "image/svg+xml", + "mask": false, + "geometry": "55926549a7fd9151dfbb8b57c9c767f13bbda929e44761b97b80effaa7c6deed", + "sources": [ + "I402:8270;397:5906;397:5704:node" + ] + }, + { + "path": "/images/together/field-alert.svg", + "identity": "image/svg+xml:c3aed7104c36ce5341f1b8086cdd3d40c2b72d29a82b9abed383ea1cebc836bb:", + "sha256": "7341dc2e7bff1bea159ce84589bafafdb6fc82dd28e37e452221902897992ee9", + "mimeType": "image/svg+xml", + "mask": false, + "geometry": "432ee018027bd4105989bb77872b08c2cf076b13e8d397b0b56b439bb76427db", + "sources": [ + "402:7921:node" + ] + }, + { + "path": "/images/together/notice-desktop.svg", + "identity": "image/svg+xml:311c2f05d34929d913f2018f5bf452a53197bbc31b599556253c6ff559bd98d9:", + "sha256": "121b258044dfebbc9125c78c0ffaa06cc2b4bee893e8615d6ad2a1787c8446a4", + "mimeType": "image/svg+xml", + "mask": false, + "geometry": "1594ba2c01a5568d5792ff18c7ade2df052e24d17a0bf779910f3092744d2af2", + "sources": [ + "402:8831:node" + ] + }, + { + "path": "/images/together/notice-mobile.svg", + "identity": "image/svg+xml:37e369d3a52496351714e0e1c7704f76634c876b9ec9542cea18beaaeff147d1:", + "sha256": "719fcecb89be624974a10f01ce521ec12f61ecf48752a53dc4e63066e1022634", + "mimeType": "image/svg+xml", + "mask": false, + "geometry": "78495887788f85cad68c9b7df3390fd692aa36ba5b09b8c61f1a785e5e38c9a9", + "sources": [ + "402:8833:node" + ] + }, + { + "path": "/images/together/selected-mobile.svg", + "identity": "image/svg+xml:f701a7341c3c3b6d13fc1f993101a273f6412a04f7d4ba4f129bac6cc3be0d29:", + "sha256": "3a1315f721d179dc7ea9e315d3a8566fbb905e84069a50b4b3b7f1fb429853bf", + "mimeType": "image/svg+xml", + "mask": false, + "geometry": "cf7c5ea57763d1653fd962bf9293db01404885fd9c899887b22bcd0725a45147", + "sources": [ + "397:5809:node" + ] + }, + { + "path": "/images/together/selected-pc.svg", + "identity": "image/svg+xml:0408161ff7053244456d9d13d57bef439f97af77be4c42392cdc38aaeac297f8:", + "sha256": "7081bc21af6b0fb8fec4a707fea3b9ee9474496fa4acb8ef57101cfbcb5a18c1", + "mimeType": "image/svg+xml", + "mask": false, + "geometry": "ca701f936f80cf2cdfe6319eec0888a37869d511b0a8b1197ce3712536a5dc63", + "sources": [ + "397:5800:node" + ] + } + ] +} \ No newline at end of file diff --git a/apps/landing/TOGETHER.md b/apps/landing/TOGETHER.md new file mode 100644 index 00000000..40ad1f4a --- /dev/null +++ b/apps/landing/TOGETHER.md @@ -0,0 +1,17 @@ +# 함께하는 곳 목록 + +신청 이슈는 공개 데이터가 아니다. 실제 사용과 공개 동의, 로고를 확인한 뒤 관리자가 PR에서 `together.json`에 승인 순서대로 항목을 추가한다. 이슈 번호는 중복할 수 없다. + +```json +{ + "issue": 123, + "kind": "학교", + "name": "이름", + "logo": "/images/together/asset-123.png", + "approvedAt": "2026-11-20" +} +``` + +로고는 `public/images/together/`의 밝은 바탕용 PNG 또는 JPG 한 개로, 2 MiB 이하여야 한다. 빌드는 입력의 공개 필드만 `public/together.json`으로 생성하며 잘못된 기록이나 로고는 거부한다. 게시 중단 요청 시 해당 항목과 더 이상 다른 항목이 사용하지 않는 로고 파일을 같은 PR에서 제거한다. 공유 중인 로고는 남기며, 참조되지 않는 `asset-*` 로고가 있으면 빌드가 실패한다. + +빌드에는 `cargo build --release -p braillify`로 만든 점역 CLI와 Chrome이 필요하다. 인증 이미지와 밝은·어두운 배지는 빌드에서 생성한다. main 배포가 끝난 뒤 공개 목록과 여섯 PNG가 실제로 제공되는지 확인하고, 아직 답글이 없는 이슈에만 GitHub Actions가 답글을 단다. diff --git a/apps/landing/assets/together/LICENSE.txt b/apps/landing/assets/together/LICENSE.txt new file mode 100644 index 00000000..b2fd4697 --- /dev/null +++ b/apps/landing/assets/together/LICENSE.txt @@ -0,0 +1,94 @@ +Copyright (c) 2015-10-09 Spoqa (spoqa.com), with Reserved Font Name Spoqa Han Sans. +Copyright (c) 2015-10-09 Spoqa (spoqa.com), with Reserved Font Name Spoqa Han Sans JP. +Copyright (c) 2020-11-30 Spoqa (spoqa.com), with Reserved Font Name Spoqa Han Sans Neo. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION AND CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/apps/landing/assets/together/SpoqaHanSansNeo-Bold.woff2 b/apps/landing/assets/together/SpoqaHanSansNeo-Bold.woff2 new file mode 100644 index 00000000..da1dd600 Binary files /dev/null and b/apps/landing/assets/together/SpoqaHanSansNeo-Bold.woff2 differ diff --git a/apps/landing/assets/together/SpoqaHanSansNeo-Medium.woff2 b/apps/landing/assets/together/SpoqaHanSansNeo-Medium.woff2 new file mode 100644 index 00000000..0e9b8d74 Binary files /dev/null and b/apps/landing/assets/together/SpoqaHanSansNeo-Medium.woff2 differ diff --git a/apps/landing/devup.json b/apps/landing/devup.json index 7669cec3..c46b6304 100644 --- a/apps/landing/devup.json +++ b/apps/landing/devup.json @@ -12,6 +12,8 @@ "success": "#16887F", "warning": "#FF9800", "error": "#EA1C5D", + "togetherError": "#C8124B", + "togetherPlaceholder": "rgba(43, 43, 43, 0.55)", "info": "#2196F3", "base": "#FFF", "negativeBase": "#000", @@ -31,6 +33,8 @@ "success": "#3F8580", "warning": "#FF9800", "error": "#EA1C5D", + "togetherError": "#EA1C5D", + "togetherPlaceholder": "rgba(235, 235, 235, 0.55)", "info": "#2196F3", "base": "#000", "negativeBase": "#FFF", @@ -458,4 +462,4 @@ } } } -} \ No newline at end of file +} diff --git a/apps/landing/package.json b/apps/landing/package.json index a715f421..6396d817 100644 --- a/apps/landing/package.json +++ b/apps/landing/package.json @@ -4,7 +4,7 @@ "private": true, "scripts": { "dev": "next dev", - "build": "next build", + "build": "bun ../../scripts/generate-together.ts && next build", "start": "next start" }, "dependencies": { diff --git a/apps/landing/public/images/together/action-dot.svg b/apps/landing/public/images/together/action-dot.svg new file mode 100644 index 00000000..f46cc013 --- /dev/null +++ b/apps/landing/public/images/together/action-dot.svg @@ -0,0 +1,3 @@ + + + diff --git a/apps/landing/public/images/together/alert.svg b/apps/landing/public/images/together/alert.svg new file mode 100644 index 00000000..0422de06 --- /dev/null +++ b/apps/landing/public/images/together/alert.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/apps/landing/public/images/together/cross.svg b/apps/landing/public/images/together/cross.svg new file mode 100644 index 00000000..722e36d0 --- /dev/null +++ b/apps/landing/public/images/together/cross.svg @@ -0,0 +1,3 @@ + + + diff --git a/apps/landing/public/images/together/dialog-close.svg b/apps/landing/public/images/together/dialog-close.svg new file mode 100644 index 00000000..bf30b4ce --- /dev/null +++ b/apps/landing/public/images/together/dialog-close.svg @@ -0,0 +1,3 @@ + + + diff --git a/apps/landing/public/images/together/dialog-external.svg b/apps/landing/public/images/together/dialog-external.svg new file mode 100644 index 00000000..6e380f43 --- /dev/null +++ b/apps/landing/public/images/together/dialog-external.svg @@ -0,0 +1,3 @@ + + + diff --git a/apps/landing/public/images/together/field-alert.svg b/apps/landing/public/images/together/field-alert.svg new file mode 100644 index 00000000..d50d09d1 --- /dev/null +++ b/apps/landing/public/images/together/field-alert.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/apps/landing/public/images/together/notice-desktop.svg b/apps/landing/public/images/together/notice-desktop.svg new file mode 100644 index 00000000..bcf0bbfd --- /dev/null +++ b/apps/landing/public/images/together/notice-desktop.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/apps/landing/public/images/together/notice-mobile.svg b/apps/landing/public/images/together/notice-mobile.svg new file mode 100644 index 00000000..6d4026b2 --- /dev/null +++ b/apps/landing/public/images/together/notice-mobile.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/apps/landing/public/images/together/selected-mobile.svg b/apps/landing/public/images/together/selected-mobile.svg new file mode 100644 index 00000000..d9c8cd28 --- /dev/null +++ b/apps/landing/public/images/together/selected-mobile.svg @@ -0,0 +1,3 @@ + + + diff --git a/apps/landing/public/images/together/selected-pc.svg b/apps/landing/public/images/together/selected-pc.svg new file mode 100644 index 00000000..db0583ed --- /dev/null +++ b/apps/landing/public/images/together/selected-pc.svg @@ -0,0 +1,3 @@ + + + diff --git a/apps/landing/src/app/together/Together.tsx b/apps/landing/src/app/together/Together.tsx new file mode 100644 index 00000000..25d680c5 --- /dev/null +++ b/apps/landing/src/app/together/Together.tsx @@ -0,0 +1,486 @@ +'use client' + +import { Box, Center, Flex, Text, VStack } from '@devup-ui/react' +import Link from 'next/link' +import { useEffect, useRef, useState } from 'react' + +import { + Controls as Choice, + field, + fieldLabel, + primaryAction, + retryAction, + secondaryAction, +} from '@/components/together/Controls' +import { loadTogetherList, type Partner } from '@/lib/together-list' +import { previewDescription } from '@/lib/together-preview' + +const kinds = ['기업', '기관', '학교', '단체'] + +export default function Together() { + const [kind, setKind] = useState('기업') + const [name, setName] = useState('') + const [braille, setBraille] = useState('') + const [partners, setPartners] = useState(null) + const [failed, setFailed] = useState(false) + const [attempt, setAttempt] = useState(0) + const [visible, setVisible] = useState(60) + const [announcement, setAnnouncement] = useState('') + const focusId = useRef(null) + + useEffect(() => { + let cancelled = false + const timeout = setTimeout(() => { + import('braillify') + .then( + (mod) => + !cancelled && + setBraille( + mod.translateToUnicode(name || '이름을 입력하면 여기에 표시돼요'), + ), + ) + .catch(() => { + if (!cancelled) setBraille('') + }) + }, 200) + return () => { + cancelled = true + clearTimeout(timeout) + } + }, [name]) + + useEffect(() => { + const controller = new AbortController() + let active = true + loadTogetherList(controller.signal) + .then((data: Partner[]) => { + if (!active) return + setPartners(data) + const id = /^#org-(\d+)$/.exec(window.location.hash)?.[1] + const index = data.findIndex((item) => String(item.issue) === id) + if (index >= 0) { + focusId.current = data[index].issue + setVisible(Math.ceil((index + 1) / 60) * 60) + } + }) + .catch(() => { + if (active) setFailed(true) + }) + return () => { + active = false + controller.abort() + } + }, [attempt]) + + useEffect(() => { + if (focusId.current === null) return + const element = document.getElementById(`org-${focusId.current}`) + if (element) { + element.focus() + element.scrollIntoView({ + block: 'center', + behavior: window.matchMedia('(prefers-reduced-motion: reduce)').matches + ? 'instant' + : 'smooth', + }) + focusId.current = null + } + }, [partners, visible]) + + const register = `/together/register?${new URLSearchParams({ kind, name })}` + return ( + + + + Braillify와 함께하는 곳 + + + Braillify를 쓰고 있는 기업·기관·학교·단체를 소개합니다. 신청하면 실제 + 사용을 확인한 뒤 이곳에 함께 소개해 드려요. + + + + + + + {previewDescription(name, kind, braille)} + + + + + 우리 이름으로 미리 보기 + + + 승인되면 이 인증 이미지를 GitHub 답글로 보내 드려요. + + + + + 구분 + + + {kinds.map((value) => ( + setKind(value)} + type="radio" + > + {value} + + ))} + + + + + 이 이름으로 신청하기 + + + +