{{ $page->t('Official name') }}
+LibreSign
+{{ $page->t('Always write LibreSign with an uppercase L and S, with no space between Libre and Sign.') }}
+{{ $page->t('Avoid: Libresign, Libre Sign, libreSign.') }}
+diff --git a/.github/workflows/node-test.yml b/.github/workflows/node-test.yml new file mode 100644 index 00000000..6c48986f --- /dev/null +++ b/.github/workflows/node-test.yml @@ -0,0 +1,26 @@ +name: Node tests + +on: + pull_request: + push: + branches: + - main + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + + - name: Install dependencies + run: npm ci + + - name: Run Node tests + run: npm run test:js diff --git a/.github/workflows/preview-fork-deploy.yml b/.github/workflows/preview-fork-deploy.yml index ef23bc5a..7e0de3dc 100644 --- a/.github/workflows/preview-fork-deploy.yml +++ b/.github/workflows/preview-fork-deploy.yml @@ -10,60 +10,16 @@ permissions: contents: read pull-requests: write -concurrency: - group: site-preview-deploy - cancel-in-progress: false - queue: max - jobs: - deploy-fork-preview: + deploy: if: > - github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success' && - github.event.workflow_run.event == 'pull_request' + github.event.workflow_run.event == 'pull_request' && + github.event.workflow_run.pull_requests[0].head.repo.id != github.event.workflow_run.repository.id runs-on: ubuntu-latest - steps: - - name: Extract PR number from workflow_run payload - id: pr - run: | - pr_number=$(jq -r '.workflow_run.pull_requests[0].number // empty' "$GITHUB_EVENT_PATH") - echo "number=$pr_number" >> "$GITHUB_OUTPUT" - - - name: Evaluate fork and freshness - id: pr_meta - if: steps.pr.outputs.number != '' - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - pr_json=$(curl -sS \ - -H "Authorization: Bearer $GH_TOKEN" \ - -H "Accept: application/vnd.github+json" \ - "https://api.github.com/repos/${{ github.repository }}/pulls/${{ steps.pr.outputs.number }}") - - pr_head_sha=$(echo "$pr_json" | jq -r '.head.sha // ""') - pr_head_repo=$(echo "$pr_json" | jq -r '.head.repo.full_name // ""') - - is_fork=false - if [ "$pr_head_repo" != "${{ github.repository }}" ]; then - is_fork=true - fi - is_latest=false - if [ "$pr_head_sha" = "${{ github.event.workflow_run.head_sha }}" ]; then - is_latest=true - fi - - should_deploy=false - if [ "$is_fork" = "true" ] && [ "$is_latest" = "true" ]; then - should_deploy=true - fi - - echo "is_fork=$is_fork" >> "$GITHUB_OUTPUT" - echo "is_latest=$is_latest" >> "$GITHUB_OUTPUT" - echo "should_deploy=$should_deploy" >> "$GITHUB_OUTPUT" - - - name: Download fork build artifact - if: steps.pr.outputs.number != '' && steps.pr_meta.outputs.should_deploy == 'true' + steps: + - name: Download preview artifact uses: actions/download-artifact@v4 with: name: preview-build-fork @@ -71,18 +27,14 @@ jobs: run-id: ${{ github.event.workflow_run.id }} github-token: ${{ secrets.GITHUB_TOKEN }} - - name: Deploy fork preview - if: steps.pr.outputs.number != '' && steps.pr_meta.outputs.should_deploy == 'true' - # Temporary LibreSign fork: forwards explicit `pr-number` to the native - # sticky PR comment in `workflow_run`; replace with upstream after merge/release. + - name: Deploy preview uses: LibreSign/pr-preview-action@2a6da1177b47dc23173ba9a75e01da0a0d800978 with: action: deploy source-dir: ./build_production/ - pr-number: ${{ steps.pr.outputs.number }} + pr-number: ${{ github.event.workflow_run.pull_requests[0].number }} pages-base-url: libresign.github.io/site-preview deploy-repository: LibreSign/site-preview preview-branch: main - wait-for-pages-deployment: false + wait-for-pages-deployment: true token: ${{ secrets.PREVIEW_TOKEN }} - diff --git a/.github/workflows/preview-remove.yml b/.github/workflows/preview-remove.yml index ed8db297..3e66f109 100644 --- a/.github/workflows/preview-remove.yml +++ b/.github/workflows/preview-remove.yml @@ -1,47 +1,25 @@ -name: PR Preview Manual Remove +name: PR Preview Remove on: - workflow_dispatch: - inputs: - pr_number: - description: "Pull request number to remove preview for" - required: true - type: string + pull_request_target: + branches: [main] + types: [closed] permissions: contents: read -concurrency: - group: site-preview-deploy - cancel-in-progress: false - queue: max - jobs: - remove-preview: + remove: runs-on: ubuntu-latest - steps: - - name: Validate PR number input - id: validate - env: - INPUT_PR_NUMBER: ${{ inputs.pr_number }} - run: | - if ! [[ "$INPUT_PR_NUMBER" =~ ^[1-9][0-9]*$ ]]; then - echo "Invalid pr_number: must be a positive integer." >&2 - exit 1 - fi - echo "pr_number=$INPUT_PR_NUMBER" >> "$GITHUB_OUTPUT" - - - name: Remove preview snapshot - # Keep this pinned to the same reviewed fork commit used by other - # privileged preview paths for consistent behavior. + steps: + - name: Remove preview uses: LibreSign/pr-preview-action@2a6da1177b47dc23173ba9a75e01da0a0d800978 with: action: remove - pr-number: ${{ steps.validate.outputs.pr_number }} + pr-number: ${{ github.event.pull_request.number }} deploy-repository: LibreSign/site-preview preview-branch: main pages-base-url: libresign.github.io/site-preview - wait-for-pages-deployment: false comment: false token: ${{ secrets.PREVIEW_TOKEN }} diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index a74a5ba6..2d94452b 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -2,23 +2,22 @@ name: PR Preview on: pull_request: - branches: [ main ] + branches: [main] types: [opened, reopened, synchronize] +concurrency: + group: pr-preview-${{ github.event.pull_request.number }} + cancel-in-progress: true + permissions: contents: read pull-requests: write -concurrency: - group: site-preview-deploy - cancel-in-progress: false - queue: max - jobs: preview: runs-on: ubuntu-latest + steps: - # Deliberately no `closed` handling: previews are kept as historical snapshots. - uses: actions/checkout@v4 - name: Set up Node.js @@ -34,12 +33,11 @@ jobs: - name: Install PHP dependencies run: composer install - - name: Adjust preview base URLs and config + - name: Adjust preview URLs run: | sed -i "s|libresign.coop|libresign.github.io|g" CNAME sed -i "s|baseUrl' => '/'|baseUrl' => 'https://LibreSign.github.io/site-preview/pr-preview/pr-${{ github.event.pull_request.number }}/'|g" config.php sed -i "s|base: '/assets/build/'|base: 'https://libresign.github.io/site-preview/pr-preview/pr-${{ github.event.pull_request.number }}/assets/build/'|g" vite.config.js - cat config.php|grep "'baseUrl' => " sed -i "/'matomo_container'/d" config.production.php - name: Build production site @@ -56,10 +54,8 @@ jobs: path: build_production/ retention-days: 1 - - name: Deploy internal preview + - name: Deploy preview if: github.event.pull_request.head.repo.full_name == github.repository - # Temporary LibreSign fork with the pr-number forwarding fix. - # Replace with upstream once the fix is merged and released. uses: LibreSign/pr-preview-action@2a6da1177b47dc23173ba9a75e01da0a0d800978 with: action: deploy @@ -68,5 +64,5 @@ jobs: pages-base-url: libresign.github.io/site-preview deploy-repository: LibreSign/site-preview preview-branch: main - wait-for-pages-deployment: false + wait-for-pages-deployment: true token: ${{ secrets.PREVIEW_TOKEN }} diff --git a/package.json b/package.json index 07551145..1c15a0d3 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,8 @@ "watch": "NODE_ENV=development vite build --watch", "build-assets": "NODE_ENV=local vite build", "staging": "NODE_ENV=staging vite build", - "prod": "NODE_ENV=production vite build" + "prod": "NODE_ENV=production vite build", + "test:js": "node --test tests/js/*.test.mjs" }, "devDependencies": { "@tighten/jigsaw-vite-plugin": "^2.0.0", diff --git a/source/_assets/js/brand-pronunciation.mjs b/source/_assets/js/brand-pronunciation.mjs new file mode 100644 index 00000000..45227672 --- /dev/null +++ b/source/_assets/js/brand-pronunciation.mjs @@ -0,0 +1,47 @@ +export function createPronunciationController({ button, status, audio }) { + const reset = () => { + button.disabled = false; + button.removeAttribute('aria-busy'); + }; + + const play = async () => { + audio.currentTime = 0; + button.disabled = true; + button.setAttribute('aria-busy', 'true'); + status.textContent = 'Playing LibreSign pronunciation.'; + + try { + await audio.play(); + } catch { + status.textContent = 'Pronunciation playback is not available on this device.'; + reset(); + } + }; + + audio.addEventListener('ended', () => { + status.textContent = 'Pronunciation playback finished.'; + reset(); + }); + + audio.addEventListener('error', () => { + status.textContent = 'Pronunciation playback is not available on this device.'; + reset(); + }); + + button.addEventListener('click', play); + + return { play }; +} + +export function initBrandPronunciation({ documentRef = document } = {}) { + const button = documentRef.querySelector('[data-brand-pronunciation]'); + const status = documentRef.querySelector('[data-brand-pronunciation-status]'); + const audio = documentRef.querySelector('[data-brand-pronunciation-audio]'); + + if (!button || !status || !audio || typeof audio.play !== 'function') { + return false; + } + + createPronunciationController({ button, status, audio }); + return true; +} diff --git a/source/_assets/js/main.js b/source/_assets/js/main.js index a2d0bbe6..1564a889 100644 --- a/source/_assets/js/main.js +++ b/source/_assets/js/main.js @@ -1,6 +1,9 @@ +import { initBrandPronunciation } from './brand-pronunciation.mjs'; import 'bootstrap/dist/js/bootstrap.bundle.min.js'; import 'animate.css'; +initBrandPronunciation(); + import AOS from 'aos'; const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches; AOS.init({ diff --git a/source/_assets/scss/_brand.scss b/source/_assets/scss/_brand.scss new file mode 100644 index 00000000..13b6ddac --- /dev/null +++ b/source/_assets/scss/_brand.scss @@ -0,0 +1,224 @@ +@use "variables" as *; + +.ud-brand-banner { + padding-top: 118px; + padding-bottom: 64px; + + .ud-banner-content { + max-width: 760px; + } + + &__eyebrow { + color: rgba(255, 255, 255, 0.78) !important; + font-size: 0.88rem !important; + font-weight: 700; + margin: 0 0 12px !important; + } + + h1 { + font-size: clamp(2.3rem, 4vw, 3.6rem); + font-weight: 800; + letter-spacing: -0.03em; + } +} + +.ud-brand-basics { + background: var(--bg-light); + padding: 72px 0; +} + +.ud-brand-card { + background: var(--white); + border: 1px solid var(--border-light); + border-radius: 18px; + box-shadow: 0 16px 40px rgba(18, 60, 64, 0.07); + padding: 34px; + + &__label, + .ud-brand-card__label { + color: var(--primary-color); + font-size: 0.82rem; + font-weight: 700; + margin-bottom: 10px; + } + + h2 { + color: var(--text-gray); + font-size: clamp(1.8rem, 2.7vw, 2.4rem); + margin-bottom: 16px; + } + + p { + color: var(--text-muted); + line-height: 1.72; + } + + &__note { + border-top: 1px solid var(--border-light); + margin-top: 20px; + padding-top: 16px; + } +} + + +.ud-brand-pronunciation { + &__button { + align-items: center; + display: inline-flex; + gap: 9px; + margin-top: 8px; + } + + &__note { + color: var(--text-muted); + font-size: 0.88rem; + line-height: 1.55; + margin-top: 14px; + max-width: 36rem; + } +} + +.ud-brand-section-label { + color: var(--primary-color); + font-size: 0.82rem; + font-weight: 700; + letter-spacing: 0.08em; + margin-bottom: 10px; + text-transform: uppercase; +} + +.ud-brand-meaning { + background: var(--surface-dark); + color: var(--white); + padding: 78px 0; + + .ud-brand-section-label { + color: rgba(255, 255, 255, 0.72); + } + + h2 { + color: var(--white); + font-size: var(--fs-h2-section); + margin-bottom: 20px; + } + + p { + color: rgba(255, 255, 255, 0.9); + line-height: 1.75; + margin: 0 auto 14px; + max-width: 900px; + } +} + +.ud-brand-promise { + align-items: center; + background: rgba(255, 255, 255, 0.08); + border: 1px solid rgba(255, 255, 255, 0.18); + border-radius: 14px; + display: inline-flex; + flex-direction: column; + gap: 5px; + margin-top: 26px; + padding: 18px 28px; + + span { + color: rgba(255, 255, 255, 0.72); + font-size: 0.78rem; + font-weight: 700; + } + + strong { + color: var(--white); + font-size: clamp(1.15rem, 2vw, 1.45rem); + } +} + +.ud-brand-assets { + background: var(--bg-light); + padding: 86px 0; + + &__preview { + align-items: center; + background: var(--white); + border: 1px solid var(--border-light); + border-radius: 22px; + display: flex; + min-height: 310px; + justify-content: center; + padding: 44px; + + img { + height: auto; + max-width: 320px; + width: 100%; + } + } + + &__content { + h2 { + color: var(--text-gray); + font-size: var(--fs-h2-section); + margin-bottom: 18px; + } + + > p { + color: var(--text-muted); + line-height: 1.72; + } + } + + &__actions { + display: flex; + flex-wrap: wrap; + gap: 12px; + margin: 28px 0; + } + + &__meta { + border-left: 3px solid var(--primary-color); + margin: 8px 0 24px; + padding-left: 16px; + + p { + color: var(--text-muted); + font-size: 0.95rem; + line-height: 1.6; + margin-bottom: 4px; + } + } +} + +.ud-brand-source-link { + color: var(--primary-color); + font-weight: 700; + + &:hover { + color: var(--primary-hover); + } +} + +@media #{$xs, $sm} { + .ud-brand-banner { + padding-top: 96px; + padding-bottom: 52px; + } + + .ud-brand-basics, + .ud-brand-meaning, + .ud-brand-assets { + padding: 56px 0; + } + + .ud-brand-card { + padding: 26px; + } + + .ud-brand-assets__preview { + min-height: 240px; + padding: 30px; + } + + .ud-brand-assets__actions .btn { + width: 100%; + } +} diff --git a/source/_assets/scss/ud-styles.scss b/source/_assets/scss/ud-styles.scss index ff4b3e1a..6d9de9f0 100644 --- a/source/_assets/scss/ud-styles.scss +++ b/source/_assets/scss/ud-styles.scss @@ -16,6 +16,7 @@ @use "header" as *; @use "hero" as *; @use "about" as *; +@use "brand" as *; @use "pricing" as *; @use "testimonials" as *; @use "team" as *; diff --git a/source/_layouts/footer.blade.php b/source/_layouts/footer.blade.php index dc9b1c61..0f1e6d60 100644 --- a/source/_layouts/footer.blade.php +++ b/source/_layouts/footer.blade.php @@ -129,6 +129,9 @@
{{ $page->t('Official name') }}
+{{ $page->t('Always write LibreSign with an uppercase L and S, with no space between Libre and Sign.') }}
+{{ $page->t('Avoid: Libresign, Libre Sign, libreSign.') }}
+{{ $page->t('Pronunciation') }}
++ Libre: + {{ $page->t('Stress the first syllable. It begins with an ee sound, not “lye”.') }} +
+Sign: {{ $page->t('Use the English pronunciation.') }}
+ + ++ {{ $page->t('Recorded human pronunciation of LibreSign. The written pronunciation above remains available as a text reference.') }} +
+ +{{ $page->t('What the name stands for') }}
+{{ $page->t('Libre means freedom. LibreSign gives organizations practical control over signing infrastructure, documents and data, integration, operation, and long-term maintenance.') }}
+{{ $page->t('That freedom supports self-hosting, inspectable software, interoperability, adaptability, and continuity without dependence on a single proprietary signing service.') }}
+{{ $page->t('Official files') }}
+{{ $page->t('Use the official files from the public brand repository. Preserve the logo proportions, clear space, and visual integrity. Do not recreate the logo from screenshots or old exports.') }}
+ + + + + + + {{ $page->t('View the canonical brand source on GitHub') }} + +