diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..ae56656 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,26 @@ +.git +.gitignore +.vscode +.github +README.md +compose.yml +deploy/.dockerignore +deploy/Dockerfile + +node_modules +*.log* +.nuxt +.nitro +.cache +.output* +dist +.DS_Store +.idea + +.yarn/* +!.yarn/cache +!.yarn/patches +!.yarn/plugins +!.yarn/releases +!.yarn/sdks +!.yarn/versions diff --git a/.editorconfig b/.editorconfig index ddbe456..ff761b5 100644 --- a/.editorconfig +++ b/.editorconfig @@ -9,6 +9,10 @@ charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true quote_type = single +max_line_length = 100 [*.md] trim_trailing_whitespace = false + +[Makefile] +indent_style = tab diff --git a/.env.example b/.env.example index 6a045a1..1f0cb97 100644 --- a/.env.example +++ b/.env.example @@ -1,7 +1,6 @@ # note: if you change these values, you may need to restart the `yarn dev` nuxt server # needs to be changed in production environment -# if not set, VERCEL_URL is used instead # APP_URL="http://localhost:3000" # change if there is no need for proxy diff --git a/.github/workflows/deploy_production.yml b/.github/workflows/deploy_production.yml index 2e70eb3..cb9f774 100644 --- a/.github/workflows/deploy_production.yml +++ b/.github/workflows/deploy_production.yml @@ -11,9 +11,9 @@ jobs: - name: SSH in production server uses: appleboy/ssh-action@v1.0.3 with: - script: | - cd /var/www/html/evangelickyzpevnik && make production-pull --silent && make deploy --silent - cd /var/www/html/evangelickykancional && make production-pull --silent && make deploy --silent + # script: | + # cd /var/www/html/evangelickyzpevnik && sh deploy/deploy.sh main + # cd /var/www/html/evangelickykancional && sh deploy/deploy.sh main host: ${{ secrets.HOST }} port: ${{ secrets.PORT }} username: ${{ secrets.USERNAME }} diff --git a/.github/workflows/deploy_staging.yml b/.github/workflows/deploy_staging.yml index a149d7f..41bce5d 100644 --- a/.github/workflows/deploy_staging.yml +++ b/.github/workflows/deploy_staging.yml @@ -11,7 +11,7 @@ jobs: - name: SSH in staging server uses: appleboy/ssh-action@v1.0.3 with: - script: cd /var/www/html/staging/evangelickyzpevnik-staging && make staging-pull --silent && make deploy --silent + script: cd /var/www/staging/zpevnik-web_zps-staging && sh deploy/deploy.sh develop host: ${{ secrets.HOST }} port: ${{ secrets.PORT }} username: ${{ secrets.USERNAME }} @@ -24,4 +24,4 @@ jobs: DISCORD_USERNAME: "${{ github.workflow }} - ${{ github.event.repository.name }}" DISCORD_AVATAR: "https://upload.wikimedia.org/wikipedia/sl/1/11/048029f362c484a2a46b928afbe98837.jpg" with: - args: "Proběhlo vývojové nasazení (frontend) na dev.evangelickyzpevnik.cz! :tada:" + args: "Proběhlo vývojové nasazení (frontend) na staging.zpevnik.proscholy.cz! :tada:" diff --git a/.gitignore b/.gitignore index 50debc4..496a774 100644 --- a/.gitignore +++ b/.gitignore @@ -3,8 +3,16 @@ node_modules .nuxt .nitro .cache -.output +.output* .env dist .DS_Store .idea + +.yarn/* +!.yarn/cache +!.yarn/patches +!.yarn/plugins +!.yarn/releases +!.yarn/sdks +!.yarn/versions diff --git a/.npmrc b/.npmrc deleted file mode 100644 index cf04042..0000000 --- a/.npmrc +++ /dev/null @@ -1,2 +0,0 @@ -shamefully-hoist=true -strict-peer-dependencies=false diff --git a/.yarnrc.yml b/.yarnrc.yml new file mode 100644 index 0000000..3186f3f --- /dev/null +++ b/.yarnrc.yml @@ -0,0 +1 @@ +nodeLinker: node-modules diff --git a/Makefile b/Makefile deleted file mode 100644 index 392d85b..0000000 --- a/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -production-pull: - git checkout main -f - git pull origin main - -staging-pull: - git checkout develop -f - git pull origin develop - -deploy: - docker-compose up --build -d - if (docker-compose exec -T client yarn && docker-compose exec -T client yarn build) ; then \ - echo 'restarting the pm2 server after a successful build'; \ - docker-compose exec -T client pm2 reload all --update-env; \ - else \ - echo 'yarn build was not successful, not restarting the server'; \ - fi - sudo /var/www/html/nginx_clear_cache.sh \ No newline at end of file diff --git a/README.md b/README.md index 266db27..79cb582 100644 --- a/README.md +++ b/README.md @@ -13,5 +13,3 @@ Logo ČCE je jejím duševním vlastnictvím a nevztahuje se na něj open-source Vývojový server se spustí na adrese `http://localhost:3000`. Produkční build lze vytvořit pomocí `yarn build`. Náhled produkčního serveru se spouští příkazem `yarn preview`. - -Aktuální verzi Node.js lze specifikovat v souboru `package.json` pomocí `engines`. Uvedenou verzí se řídí i Vercel. diff --git a/app.vue b/app.vue deleted file mode 100644 index 8e7f33e..0000000 --- a/app.vue +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/app/app.vue b/app/app.vue new file mode 100644 index 0000000..77d0097 --- /dev/null +++ b/app/app.vue @@ -0,0 +1,25 @@ + + + diff --git a/assets/css/tailwind.css b/app/assets/css/tailwind.css similarity index 78% rename from assets/css/tailwind.css rename to app/assets/css/tailwind.css index 2ad7b0f..3860f61 100644 --- a/assets/css/tailwind.css +++ b/app/assets/css/tailwind.css @@ -6,16 +6,8 @@ /* @import './tm-components'; */ /* @import './song'; */ -body { - /* padding-bottom: calc(5.25 * theme(spacing.4)); */ - @apply pb-[84px] /* this is equal to the line above */ - md:pb-0 md:pl-[97px] /* pl-24 + 1px to preserve border */ - print:pb-0 print:pl-0; - /* also used in BottomBar.vue and BottomSheets.vue */ -} - .custom-container { - @apply max-w-[700px] mx-auto; + @apply w-full max-w-[700px] mx-auto; } .stretched-link { diff --git a/assets/css/tm-lib.css b/app/assets/css/tm-lib.css similarity index 100% rename from assets/css/tm-lib.css rename to app/assets/css/tm-lib.css diff --git a/assets/tailwind.config.js b/app/assets/tailwind.config.js similarity index 100% rename from assets/tailwind.config.js rename to app/assets/tailwind.config.js diff --git a/components/Basic/Badge.vue b/app/components/Basic/Badge.vue similarity index 100% rename from components/Basic/Badge.vue rename to app/components/Basic/Badge.vue diff --git a/components/Basic/Button.vue b/app/components/Basic/Button.vue similarity index 91% rename from components/Basic/Button.vue rename to app/components/Basic/Button.vue index 3d1b11b..63e6867 100644 --- a/components/Basic/Button.vue +++ b/app/components/Basic/Button.vue @@ -30,8 +30,8 @@ @@ -17,6 +17,10 @@ const props = defineProps({ border border-gray-500 dark:border-gray-200 rounded-lg text-sm tracking-[.00714em] m-1 transition-colors hover:bg-surface-400 [&.active]:bg-primary-150; + &.tag-blue { + @apply hover:bg-blue/[.15] [&.active]:bg-blue/30; + } + &.tag-green { @apply hover:bg-green/[.15] [&.active]:bg-green/30; } diff --git a/components/Basic/Clickable.vue b/app/components/Basic/Clickable.vue similarity index 74% rename from components/Basic/Clickable.vue rename to app/components/Basic/Clickable.vue index ec74454..5aa9f35 100644 --- a/components/Basic/Clickable.vue +++ b/app/components/Basic/Clickable.vue @@ -1,10 +1,11 @@ @@ -13,8 +14,8 @@ import { NuxtLink } from '#components'; const props = defineProps({ eventId: String, - href: String, - to: String, + href: [String, Object], + to: [String, Object], target: String, }); diff --git a/components/Basic/Icon.vue b/app/components/Basic/Icon.vue similarity index 88% rename from components/Basic/Icon.vue rename to app/components/Basic/Icon.vue index bbe3804..a357494 100644 --- a/components/Basic/Icon.vue +++ b/app/components/Basic/Icon.vue @@ -1,5 +1,5 @@ - diff --git a/pages/search/components/SongsList.vue b/app/components/Song/List.vue similarity index 66% rename from pages/search/components/SongsList.vue rename to app/components/Song/List.vue index fad9291..3ce77e8 100644 --- a/pages/search/components/SongsList.vue +++ b/app/components/Song/List.vue @@ -1,10 +1,7 @@