diff --git a/.dockerignore b/.dockerignore index 77188c1..37e3bdd 100644 --- a/.dockerignore +++ b/.dockerignore @@ -4,6 +4,9 @@ node_modules/ .pnpm-store/ +# generated libs +/lib/* + # logs *.log diff --git a/.env.local.example b/.env.local.example index ca80980..90d856e 100644 --- a/.env.local.example +++ b/.env.local.example @@ -15,5 +15,6 @@ NUXT_PUBLIC_API_BASE_URL="https://frischmuth-dev.acdh-dev.oeaw.ac.at" # ------------------------------------------------------------------------------------------------- # analytics # ------------------------------------------------------------------------------------------------- +# NUXT_PUBLIC_GOOGLE_SITE_VERIFICATION= NUXT_PUBLIC_MATOMO_BASE_URL="https://matomo.acdh.oeaw.ac.at" # NUXT_PUBLIC_MATOMO_ID= diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index 8c03d1c..0158f47 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -10,6 +10,7 @@ on: jobs: env: + name: Generate environment variables runs-on: ubuntu-latest steps: - name: Derive environment from git ref @@ -37,6 +38,7 @@ jobs: image: ${{ github.repository }} vars: + name: Generate public url needs: [env] runs-on: ubuntu-latest environment: @@ -56,11 +58,14 @@ jobs: public_url: ${{ steps.public_url.outputs.PUBLIC_URL }} build: + name: Build and push docker image needs: [env, vars] runs-on: ubuntu-latest permissions: contents: read packages: write + environment: + name: "${{ needs.env.outputs.environment }}" steps: - name: Checkout repository @@ -97,8 +102,9 @@ jobs: tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} build-args: | - "NUXT_PUBLIC_APP_BASE_URL=${{ needs.vars.outputs.public_url }}" "NUXT_PUBLIC_API_BASE_URL=${{ vars.NUXT_PUBLIC_API_BASE_URL }}" + "NUXT_PUBLIC_APP_BASE_URL=${{ needs.vars.outputs.public_url }}" + "NUXT_PUBLIC_GOOGLE_SITE_VERIFICATION=${{ vars.NUXT_PUBLIC_GOOGLE_SITE_VERIFICATION }}" "NUXT_PUBLIC_MATOMO_BASE_URL=${{ vars.NUXT_PUBLIC_MATOMO_BASE_URL }}" "NUXT_PUBLIC_MATOMO_ID=${{ vars.NUXT_PUBLIC_MATOMO_ID }}" "NUXT_PUBLIC_REDMINE_ID=${{ vars.SERVICE_ID }}" @@ -106,8 +112,9 @@ jobs: cache-to: type=gha,mode=max deploy: + name: Deploy docker image needs: [env, vars, build] - uses: acdh-oeaw/gl-autodevops-minimal-port/.github/workflows/deploy-cluster-2.yml@main + uses: acdh-oeaw/gl-autodevops-minimal-port/.github/workflows/deploy.yml@main secrets: inherit with: environment: ${{ needs.env.outputs.environment }} diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 8ffe1bf..b24144e 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -5,6 +5,7 @@ concurrency: cancel-in-progress: true on: + workflow_dispatch: pull_request: branches: - main @@ -33,7 +34,7 @@ jobs: # Necessary because `actions/setup-node` does not yet support `corepack`. # @see https://github.com/actions/setup-node/issues/531 - name: Install pnpm - uses: pnpm/action-setup@v3 + uses: pnpm/action-setup@v4 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 @@ -78,8 +79,8 @@ jobs: - name: Build app run: pnpm run build env: - NUXT_PUBLIC_APP_BASE_URL: "http://localhost:3000" NUXT_PUBLIC_API_BASE_URL: "${{vars.NUXT_PUBLIC_API_BASE_URL}}" + NUXT_PUBLIC_APP_BASE_URL: "http://localhost:3000" NUXT_PUBLIC_REDMINE_ID: "${{ vars.SERVICE_ID }}" - name: Run e2e tests diff --git a/.gitignore b/.gitignore index 4ad4f90..78382b3 100644 --- a/.gitignore +++ b/.gitignore @@ -2,8 +2,8 @@ node_modules/ .pnpm-store/ -#generated libs -lib/* +# generated libs +/lib/* # logs *.log diff --git a/.npmrc b/.npmrc index 982432f..e284682 100644 --- a/.npmrc +++ b/.npmrc @@ -1,3 +1,4 @@ engine-strict=true +package-manager-strict=false shell-emulator=true -use-node-version=20.11.0 +use-node-version=20.14.0 diff --git a/.vscode/app.code-snippets b/.vscode/app.code-snippets index 2d5c37d..01a7ccd 100644 --- a/.vscode/app.code-snippets +++ b/.vscode/app.code-snippets @@ -17,7 +17,7 @@ "", "" ] diff --git a/Dockerfile b/Dockerfile index 52ba36e..af0125f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,6 +24,7 @@ RUN sed -i "s/use-node-version/# use-node-version/" .npmrc ARG NUXT_PUBLIC_API_BASE_URL ARG NUXT_PUBLIC_APP_BASE_URL ARG NUXT_PUBLIC_BOTS +ARG NUXT_PUBLIC_GOOGLE_SITE_VERIFICATION ARG NUXT_PUBLIC_MATOMO_BASE_URL ARG NUXT_PUBLIC_MATOMO_ID ARG NUXT_PUBLIC_REDMINE_ID diff --git a/components/app-header.vue b/components/app-header.vue index 1b93ae1..e6ea008 100644 --- a/components/app-header.vue +++ b/components/app-header.vue @@ -3,7 +3,9 @@ import type { NavLinkProps } from "@/components/nav-link.vue"; import { Separator } from "@/components/ui/separator"; const t = useTranslations(); + const route = useRoute(); + const homeLink = { href: { path: "/" } }; const links = computed(() => { return { @@ -18,7 +20,7 @@ const links = computed(() => {
diff --git a/components/route-announcer.vue b/components/route-announcer.vue deleted file mode 100644 index 3f4b67f..0000000 --- a/components/route-announcer.vue +++ /dev/null @@ -1,47 +0,0 @@ - - - diff --git a/components/search-data-table/data-table.vue b/components/search-data-table/data-table.vue index 53714f9..c1021d3 100644 --- a/components/search-data-table/data-table.vue +++ b/components/search-data-table/data-table.vue @@ -1,4 +1,4 @@ - diff --git a/components/search-form.vue b/components/search-form.vue index ca8decb..1e2d923 100644 --- a/components/search-form.vue +++ b/components/search-form.vue @@ -1,4 +1,4 @@ - diff --git a/messages/de.json b/messages/de/index.json similarity index 84% rename from messages/de.json rename to messages/de/index.json index 655da22..f197140 100644 --- a/messages/de.json +++ b/messages/de/index.json @@ -18,10 +18,6 @@ "navigation-main": "Hauptnavigation" }, "DefaultLayout": { - "meta": { - "description": "ACDH-CH App", - "title": "ACDH-CH App" - }, "skip-to-main-content": "Zum Hauptinhalt springen" }, "ErrorBoundary": { @@ -52,11 +48,6 @@ }, "title": "Startseite" }, - "Manifest": { - "name": "ACDH-CH App", - "short-name": "ACDH-CH App", - "description": "ACDH-CH App" - }, "NotFoundPage": { "meta": { "title": "Seite nicht gefunden" diff --git a/messages/de/metadata.json b/messages/de/metadata.json new file mode 100644 index 0000000..da940e6 --- /dev/null +++ b/messages/de/metadata.json @@ -0,0 +1,12 @@ +{ + "Manifest": { + "name": "Digitales Archiv Barbara Frischmuth", + "short-name": "Digitales Archiv Barbara Frischmuth", + "description": "Digitales Archiv Barbara Frischmuth" + }, + "Metadata": { + "description": "Digitales Archiv Barbara Frischmuth", + "title": "Digitales Archiv Barbara Frischmuth", + "twitter": "{'@acdh_oeaw'}" + } +} diff --git a/nuxt.config.ts b/nuxt.config.ts index 5378c1d..e6b47d4 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -65,7 +65,6 @@ export default defineNuxtConfig({ compressPublicAssets: true, prerender: { routes: ["/manifest.webmanifest", "/robots.txt", "/sitemap.xml"], - failOnError: false, }, }, postcss: { @@ -76,9 +75,10 @@ export default defineNuxtConfig({ runtimeConfig: { NODE_ENV: process.env.NODE_ENV, public: { - appBaseUrl: process.env.NUXT_PUBLIC_APP_BASE_URL, apiBaseUrl: process.env.NUXT_PUBLIC_API_BASE_URL, + appBaseUrl: process.env.NUXT_PUBLIC_APP_BASE_URL, bots: process.env.NUXT_PUBLIC_BOTS, + googleSiteVerification: process.env.NUXT_PUBLIC_GOOGLE_SITE_VERIFICATION, matomoBaseUrl: process.env.NUXT_PUBLIC_MATOMO_BASE_URL, matomoId: process.env.NUXT_PUBLIC_MATOMO_ID, redmineId: process.env.NUXT_PUBLIC_REDMINE_ID, diff --git a/package.json b/package.json index ed703b3..21c1493 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@acdh-oeaw/app", + "name": "@acdh-oeaw/frischmuth-frontend", "private": true, "license": "MIT", "type": "module", @@ -11,19 +11,19 @@ "scripts": { "analyze": "nuxt analyze", "build": "nuxt build --dotenv ./.env.local", - "createclient": "openapi-zod-client \"https://frischmuth-dev.acdh-dev.oeaw.ac.at/apis/swagger/schema/?format=json\" -o \"./lib/api.ts\"", "dev": "nuxt dev --dotenv ./.env.local", "format:check": "prettier . \"!./content/**\" --cache --check --ignore-path ./.gitignore", "format:fix": "pnpm run format:check --write", + "generate:api-client": "openapi-zod-client \"https://frischmuth-dev.acdh-dev.oeaw.ac.at/apis/swagger/schema/?format=json\" -o \"./lib/api.ts\"", "lint:check": "run-p --continue-on-error \"lint:*:check\"", "lint:fix": "run-p --continue-on-error \"lint:*:fix\"", "lint:code:check": "eslint . --cache --ext .js,.ts,.vue --ignore-path ./.gitignore", "lint:code:fix": "pnpm run lint:code:check --fix", "lint:styles:check": "stylelint \"./**/*.@(css|vue)\" --cache --ignore-path ./.gitignore", "lint:styles:fix": "pnpm run lint:styles:check --fix", - "postinstall": "nuxt prepare && pnpm run createclient", + "postinstall": "nuxt prepare", "preinstall": "npx only-allow pnpm", - "prepare": "run-s setup", + "prepare": "run-s setup generate:api-client", "setup": "is-ci || simple-git-hooks", "start": "nuxt preview --dotenv ./.env.local", "test": "exit 0", @@ -36,36 +36,37 @@ "validate": "run-p format:check lint:check types:check test test:e2e" }, "dependencies": { - "@acdh-oeaw/lib": "^0.1.7", + "@acdh-oeaw/lib": "^0.1.12", "@fontsource-variable/inter": "^5.0.18", "@nuxt/content": "^2.12.1", - "@nuxt/image": "^1.4.0", - "@nuxtjs/color-mode": "^3.3.2", - "@nuxtjs/i18n": "^8.2.0", + "@nuxt/image": "^1.7.0", + "@nuxtjs/color-mode": "^3.4.1", + "@nuxtjs/i18n": "^8.3.1", "@radix-icons/vue": "^1.0.0", "@tailwindcss/typography": "^0.5.13", - "@tanstack/vue-query": "^5.32.0", + "@tanstack/vue-query": "^5.45.0", "@tanstack/vue-table": "^8.17.3", - "@vueuse/core": "^10.9.0", - "@vueuse/nuxt": "^10.9.0", + "@vueuse/core": "^10.11.0", + "@vueuse/nuxt": "^10.11.0", "@zodios/core": "^10.9.6", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", "cva": "^1.0.0-beta.1", "fast-glob": "^3.3.2", - "lucide-vue-next": "^0.358.0", - "nuxt": "^3.11.0", - "pino-http": "^9.0.0", - "radix-vue": "^1.8.1", + "lucide-vue-next": "^0.395.0", + "nuxt": "^3.12.2", + "pino-http": "^10.1.0", + "radix-vue": "^1.8.3", "satori": "^0.10.13", "shadcn-vue": "^0.10.5", "tailwind-merge": "^2.3.0", "tailwindcss-animate": "^1.0.7", - "vue": "^3.4.21", - "vue-i18n": "^9.10.2", + "valibot": "^0.32.0", + "vue": "^3.4.29", + "vue-i18n": "^9.13.1", "vue-i18n-routing": "^1.2.0", - "vue-router": "^4.3.0", - "zod": "^3.22.4" + "vue-router": "^4.3.3", + "zod": "^3.23.8" }, "devDependencies": { "@acdh-oeaw/eslint-config": "^1.0.7", @@ -76,29 +77,29 @@ "@acdh-oeaw/stylelint-config": "^2.0.1", "@acdh-oeaw/tailwindcss-preset": "^0.0.22", "@acdh-oeaw/tsconfig": "^1.0.2", - "@nuxt/devtools": "^1.0.8", - "@playwright/test": "^1.42.1", - "@types/node": "^20.11.28", - "axe-core": "^4.8.4", + "@nuxt/devtools": "^1.3.3", + "@playwright/test": "^1.44.1", + "@types/node": "^20.14.2", + "axe-core": "^4.9.1", "axe-playwright": "^2.0.1", "ci-info": "^4.0.0", "dotenv": "^16.4.5", "dotenv-expand": "^11.0.6", "eslint": "^8.57.0", - "eslint-plugin-tailwindcss": "^3.15.1", + "eslint-plugin-tailwindcss": "^3.17.3", "is-ci": "^3.0.1", - "lint-staged": "^15.2.2", - "npm-run-all2": "^6.1.2", - "openapi-zod-client": "^1.16.2", - "postcss": "^8.4.36", + "lint-staged": "^15.2.7", + "npm-run-all2": "^6.2.0", + "openapi-zod-client": "^1.18.1", + "postcss": "^8.4.38", "prettier": "^2.8.8", "schema-dts": "^1.1.2", - "simple-git-hooks": "^2.11.0", - "stylelint": "^16.2.1", - "tailwindcss": "^3.4.1", - "typescript": "^5.4.2", - "vite": "^5.1.6", - "vue-tsc": "^2.0.6" + "simple-git-hooks": "^2.11.1", + "stylelint": "^16.6.1", + "tailwindcss": "^3.4.4", + "typescript": "^5.4.5", + "vite": "^5.3.1", + "vue-tsc": "^2.0.21" }, "browserslist": { "development": [ diff --git a/pages/about.vue b/pages/about.vue index fdd3bf7..caf4b66 100644 --- a/pages/about.vue +++ b/pages/about.vue @@ -1,20 +1,19 @@ -