diff --git a/.github/workflows/dependabot.yml b/.github/workflows/dependabot.yml deleted file mode 100644 index f2cba9f9..00000000 --- a/.github/workflows/dependabot.yml +++ /dev/null @@ -1,12 +0,0 @@ -# To get started with Dependabot version updates, you'll need to specify which -# package ecosystems to update and where the package manifests are located. -# Please see the documentation for all configuration options: -# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates - -version: 2 -updates: - - package-ecosystem: "npm" # See documentation for possible values - directory: "/" # Location of package manifests - schedule: - interval: "weekly" - target-branch: "uat" diff --git a/.github/workflows/deploy2prod.yml b/.github/workflows/deploy2prod.yml index ff135c9e..7f2ef59d 100644 --- a/.github/workflows/deploy2prod.yml +++ b/.github/workflows/deploy2prod.yml @@ -8,15 +8,15 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 30 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: '19.8.1' + node-version: '20.3.0' - name: Cache node_modules id: cache-npm - uses: actions/cache@v3 + uses: actions/cache@v4 env: cache-name: cache-node-modules with: diff --git a/.github/workflows/deploy2uat.yml b/.github/workflows/deploy2uat.yml index cb155f77..3a7eae81 100644 --- a/.github/workflows/deploy2uat.yml +++ b/.github/workflows/deploy2uat.yml @@ -8,15 +8,15 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 30 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: '19.8.1' + node-version: '20.3.0' - name: Cache node_modules id: cache-npm - uses: actions/cache@v3 + uses: actions/cache@v4 env: cache-name: cache-node-modules with: diff --git a/package.json b/package.json index 96c9fa30..b4115aa2 100644 --- a/package.json +++ b/package.json @@ -65,6 +65,7 @@ "scripts": { "generate-meta-tag": "node ./node_modules/react-cache-buster/dist/generate-meta-tag.js", "start": "webpack serve --mode development --port 3000 --open --hot --progress --host localhost --static .", + "start-remote-api": "webpack serve --config webpack.config_uat.js --mode development --port 3000 --open --hot --progress --host localhost --static .", "build": "npm run generate-meta-tag && npm run build-app", "build-app": "webpack --config webpack.config_prod.js", "test": "react-scripts test", diff --git a/public/img/background_start_mobil_at.webp b/public/img/background_start_mobil_at.webp index 551d68dc..b6f0b804 100644 Binary files a/public/img/background_start_mobil_at.webp and b/public/img/background_start_mobil_at.webp differ diff --git a/public/img/background_start_mobil_it.webp b/public/img/background_start_mobil_it.webp new file mode 100644 index 00000000..7bb37791 Binary files /dev/null and b/public/img/background_start_mobil_it.webp differ diff --git a/public/img/background_start_mobil_si.webp b/public/img/background_start_mobil_si.webp index b6f0b804..551d68dc 100644 Binary files a/public/img/background_start_mobil_si.webp and b/public/img/background_start_mobil_si.webp differ diff --git a/public/img/background_start_small_at.jpeg b/public/img/background_start_small_at.jpeg index c2b372cb..a0b84579 100644 Binary files a/public/img/background_start_small_at.jpeg and b/public/img/background_start_small_at.jpeg differ diff --git a/public/img/background_start_small_at.webp b/public/img/background_start_small_at.webp index c124dff8..f384e3e7 100644 Binary files a/public/img/background_start_small_at.webp and b/public/img/background_start_small_at.webp differ diff --git a/public/img/background_start_small_it.jpeg b/public/img/background_start_small_it.jpeg new file mode 100644 index 00000000..c2b372cb Binary files /dev/null and b/public/img/background_start_small_it.jpeg differ diff --git a/public/img/background_start_small_it.webp b/public/img/background_start_small_it.webp new file mode 100644 index 00000000..c124dff8 Binary files /dev/null and b/public/img/background_start_small_it.webp differ diff --git a/public/img/background_start_small_si.jpeg b/public/img/background_start_small_si.jpeg index a0b84579..c2b372cb 100644 Binary files a/public/img/background_start_small_si.jpeg and b/public/img/background_start_small_si.jpeg differ diff --git a/public/img/background_start_small_si.webp b/public/img/background_start_small_si.webp index f384e3e7..c124dff8 100644 Binary files a/public/img/background_start_small_si.webp and b/public/img/background_start_small_si.webp differ diff --git a/public/img/background_start_tiny_at.jpeg b/public/img/background_start_tiny_at.jpeg index 7692539a..935fdf29 100644 Binary files a/public/img/background_start_tiny_at.jpeg and b/public/img/background_start_tiny_at.jpeg differ diff --git a/public/img/background_start_tiny_it.jpeg b/public/img/background_start_tiny_it.jpeg new file mode 100644 index 00000000..7692539a Binary files /dev/null and b/public/img/background_start_tiny_it.jpeg differ diff --git a/public/img/background_start_tiny_si.jpeg b/public/img/background_start_tiny_si.jpeg index 935fdf29..7692539a 100644 Binary files a/public/img/background_start_tiny_si.jpeg and b/public/img/background_start_tiny_si.jpeg differ diff --git a/src/axios.js b/src/axios.js index 7216bab4..5568fa54 100644 --- a/src/axios.js +++ b/src/axios.js @@ -2,7 +2,7 @@ var axios = require("axios"); export const baseURL = // "https://www2.zuugle.at/api"; window.location.host.indexOf("localhost") >= 0 - ? "http://localhost:8080/api" + ? process.env.REACT_APP_API_URL : `${window.location.protocol}//${window.location.host}/api`; let axiosInstance = axios.create({ diff --git a/src/components/DomainMenu/index.js b/src/components/DomainMenu/index.js index e4a409f3..0be607f5 100644 --- a/src/components/DomainMenu/index.js +++ b/src/components/DomainMenu/index.js @@ -33,6 +33,11 @@ if(process.env.NODE_ENV === "development") { }, { id: 3, + name: "Zuugle.it", + url: "https://www.zuugle.it", + }, + { + id: 4, name: "Zuugle.si", url: "https://www.zuugle.si", }, @@ -55,6 +60,11 @@ if (host.indexOf("www.zuugle.at") >= 0) { }, { id: 2, + name: "Zuugle.it", + url: "https://www.zuugle.it", + }, + { + id: 3, name: "Zuugle.si", url: "https://www.zuugle.si", }, @@ -75,6 +85,11 @@ else if (host.indexOf("www.zuugle.de") >= 0) { }, { id: 2, + name: "Zuugle.it", + url: "https://www.zuugle.it", + }, + { + id: 3, name: "Zuugle.si", url: "https://www.zuugle.si", }, @@ -94,14 +109,41 @@ else if (host.indexOf("www.zuugle.si") >= 0) { url: "https://www.zuugle.at", }, { + id: 2, name: "Zuugle.de", url: "https://www.zuugle.de", }, + { + id: 3, + name: "Zuugle.it", + url: "https://www.zuugle.it", + }, ]; } else if (host.indexOf("www.zuugle.it") >= 0) { domain = 'www.zuugle.it'; - + listOfDomains = [ + { + id: 0, + name: "Zuugle.it", + url: "https://www.zuugle.it", + }, + { + id: 1, + name: "Zuugle.at", + url: "https://www.zuugle.at", + }, + { + id: 2, + name: "Zuugle.de", + url: "https://www.zuugle.de", + }, + { + id: 3, + name: "Zuugle.si", + url: "https://www.zuugle.si", + }, + ]; } else if (host.indexOf("www.zuugle.ch") >= 0) { domain = 'www.zuugle.ch'; @@ -125,6 +167,12 @@ if (host.indexOf("www2.zuugle.at") >= 0) { url: "https://www2.zuugle.de", }, { + id: 2, + name: "UAT Zuugle.it", + url: "https://www2.zuugle.it", + }, + { + id: 3, name: "UAT Zuugle.si", url: "https://www2.zuugle.si", }, @@ -144,6 +192,12 @@ else if (host.indexOf("www2.zuugle.de") >= 0) { url: "https://www2.zuugle.at", }, { + id: 2, + name: "UAT Zuugle.it", + url: "https://www2.zuugle.it", + }, + { + id: 3, name: "UAT Zuugle.si", url: "https://www2.zuugle.si", }, @@ -163,14 +217,41 @@ else if (host.indexOf("www2.zuugle.si") >= 0) { url: "https://www2.zuugle.at", }, { + id: 2, name: "UAT Zuugle.de", url: "https://www2.zuugle.de", }, + { + id: 3, + name: "UAT Zuugle.it", + url: "https://www2.zuugle.it", + }, ]; } else if (host.indexOf("www2.zuugle.it") >= 0) { domain = 'www2.zuugle.it'; - + listOfDomains = [ + { + id: 0, + name: "UAT Zuugle.it", + url: "https://www2.zuugle.it", + }, + { + id: 1, + name: "UAT Zuugle.at", + url: "https://www2.zuugle.at", + }, + { + id: 2, + name: "UAT Zuugle.de", + url: "https://www2.zuugle.de", + }, + { + id: 3, + name: "UAT Zuugle.si", + url: "https://www2.zuugle.si", + }, + ]; } else if (host.indexOf("www2.zuugle.ch") >= 0) { domain = 'www2.zuugle.ch'; @@ -183,7 +264,7 @@ else if (host.indexOf("www2.zuugle.fr") >= 0) { const secondMenu = [ - { id: 0, name: "Über Zuugle", url: "https://www.bahnzumberg.at/" }, + { id: 0, name: "Über Zuugle", url: "https://verein.bahn-zum-berg.at/" }, { id: 1, name: "Impressum", url: "https://" + domain + "/imprint" }, { id: 2, name: "Datenschutz", url: "https://" + domain + "/privacy" }, ]; diff --git a/src/components/Search/CityInput.js b/src/components/Search/CityInput.js index ea1fa779..233595a6 100644 --- a/src/components/Search/CityInput.js +++ b/src/components/Search/CityInput.js @@ -50,7 +50,7 @@ export default function CityInput({ } else if (host.indexOf("zuugle.si") >= 0) { return "Ljubljana, Maribor,..."; } else if (host.indexOf("zuugle.it") >= 0) { - return "Bozen, ..."; + return "Milano, Bozen, ..."; } else { return "Wien, Graz, ..."; } diff --git a/webpack.config.js b/webpack.config.js index ee86d070..34b4d06c 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -96,7 +96,7 @@ module.exports = { attributes: {}, }), new webpack.DefinePlugin({ - "process.env.API_URL": JSON.stringify("http://localhost:8080/api"), + "process.env.REACT_APP_API_URL": JSON.stringify("http://localhost:8080/api"), }), ], }; diff --git a/webpack.config_uat.js b/webpack.config_uat.js new file mode 100644 index 00000000..715719d1 --- /dev/null +++ b/webpack.config_uat.js @@ -0,0 +1,102 @@ +const webpack = require("webpack"); +const path = require("path"); +const HtmlWebpackPlugin = require("html-webpack-plugin"); +const CopyWebpackPlugin = require("copy-webpack-plugin"); +const MiniCssExtractPlugin = require("mini-css-extract-plugin"); + +const BUILD_DIR = path.resolve(__dirname, "build"); + +module.exports = { + mode: "development", + output: { + path: BUILD_DIR, + filename: "./app_static/[name].bundle.js", + }, + + devServer: { + static: BUILD_DIR, + // directory: BUILD_DIR, + // staticOptions: { + // setHeaders: (res, path) => { + // if (path.endsWith('.json')) { + // res.setHeader('Content-Type', 'application/javascript'); + // } + // }, + // }, + // staticOptions: { + // setHeaders: (res, path) => { + // if (path.endsWith('.json')) { + // res.setHeader('Content-Type', 'text/html'); + // } + // }, + // }, + + compress: true, + open: true, + historyApiFallback: true, + }, + module: { + rules: [ + { + test: /\.(js|jsx)$/, + exclude: /node_modules/, + use: { + loader: "babel-loader", + options: { + presets: [["@babel/preset-env", { targets: "defaults" }]], + }, + }, + }, + { + test: /\.html$/, + loader: "html-loader", + }, + { + test: /\.(scss)$/, + loader: "css-loader", + }, + { + test: /\.css$/i, + use: [MiniCssExtractPlugin.loader, "css-loader"], + }, + { + test: /\.svg$/i, + issuer: /\.[jt]sx?$/, + use: ["@svgr/webpack", "url-loader"], + }, + { + test: /\.(png|jpg|jpeg|gif|ico)$/, + use: [ + { + loader: "file-loader", + options: { + name: "./img/[name].[hash].[ext]", + }, + }, + ], + }, + { + test: /\.js$/, + enforce: "pre", + use: ["source-map-loader"], + }, + ], + }, + plugins: [ + new webpack.HotModuleReplacementPlugin(), + new HtmlWebpackPlugin({ + inject: true, + template: "./public/index.html", + }), + new CopyWebpackPlugin({ + patterns: [{ from: "./public", to: "app_static" }], + }), + new MiniCssExtractPlugin({ + filename: "./app_static/[name].styles.css", + attributes: {}, + }), + new webpack.DefinePlugin({ + "process.env.REACT_APP_API_URL": JSON.stringify("https://www2.zuugle.at/api"), + }), + ], +}; diff --git a/yarn.lock b/yarn.lock index 41bf640e..c59e5ab8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -864,7 +864,7 @@ integrity sha512-bDhuzwWMuInwCYeDeMzyi7TaBgRQei6DqxhbyniL7/VG4RSS7HtSL2QbY4eESy1KJqlWt8g3xeEBGPuo+XqC8A== dependencies: "@babel/plugin-transform-react-jsx" "^7.22.5" - + "@babel/plugin-transform-react-jsx@^7.14.9", "@babel/plugin-transform-react-jsx@^7.22.15", "@babel/plugin-transform-react-jsx@^7.22.5": version "7.23.4" resolved "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.23.4.tgz" @@ -2052,6 +2052,7 @@ integrity sha512-b9MIk7yhdS1pMCZM8VeNfUlSKVRhsHZNMl5O9SfaX0l0t5wjdgu4IDzGB8bpnGBBOjGST3rRFVsaaEtI4W6f7g== "@svgr/babel-plugin-add-jsx-attribute@^5.4.0": + version "5.4.0" resolved "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-5.4.0.tgz" integrity sha512-ZFf2gs/8/6B8PnSofI0inYXr2SDNTDScPXhN7k5EqD4aZ3gi6u+rbmZHVB8IM3wDyx8ntKACZbtXSm7oZGRqVg== @@ -2072,10 +2073,12 @@ integrity sha512-5BcGCBfBxB5+XSDSWnhTThfI9jcO5f0Ai2V24gZpG+wXF14BzwxxdDb4g6trdOux0rhibGs385BeFMSmxtS3uA== "@svgr/babel-plugin-remove-jsx-empty-expression@^5.0.1": + version "5.0.1" resolved "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-empty-expression/-/babel-plugin-remove-jsx-empty-expression-5.0.1.tgz" integrity sha512-LA72+88A11ND/yFIMzyuLRSMJ+tRKeYKeQ+mR3DcAZ5I4h5CPWN9AHyUzJbWSYp/u2u0xhmgOe0+E41+GjEueA== + "@svgr/babel-plugin-replace-jsx-attribute-value@8.0.0": version "8.0.0" resolved "https://registry.npmjs.org/@svgr/babel-plugin-replace-jsx-attribute-value/-/babel-plugin-replace-jsx-attribute-value-8.0.0.tgz" @@ -2092,16 +2095,19 @@ integrity sha512-omNiKqwjNmOQJ2v6ge4SErBbkooV2aAWwaPFs2vUY7p7GhVkzRkJ00kILXQvRhA6miHnNpXv7MRnnSjdRjK8og== "@svgr/babel-plugin-svg-dynamic-title@^5.4.0": + version "5.4.0" resolved "https://registry.npmjs.org/@svgr/babel-plugin-svg-dynamic-title/-/babel-plugin-svg-dynamic-title-5.4.0.tgz" integrity sha512-zSOZH8PdZOpuG1ZVx/cLVePB2ibo3WPpqo7gFIjLV9a0QsuQAzJiwwqmuEdTaW2pegyBE17Uu15mOgOcgabQZg== + "@svgr/babel-plugin-svg-em-dimensions@8.0.0": version "8.0.0" resolved "https://registry.npmjs.org/@svgr/babel-plugin-svg-em-dimensions/-/babel-plugin-svg-em-dimensions-8.0.0.tgz" integrity sha512-mURHYnu6Iw3UBTbhGwE/vsngtCIbHE43xCRK7kCw4t01xyGqb2Pd+WXekRRoFOBIY29ZoOhUCTEweDMdrjfi9g== "@svgr/babel-plugin-svg-em-dimensions@^5.4.0": + version "5.4.0" resolved "https://registry.npmjs.org/@svgr/babel-plugin-svg-em-dimensions/-/babel-plugin-svg-em-dimensions-5.4.0.tgz" integrity sha512-cPzDbDA5oT/sPXDCUYoVXEmm3VIoAWAPT6mSPTJNbQaBNUuEKVKyGH93oDY4e42PYHRW67N5alJx/eEol20abw== @@ -2122,10 +2128,12 @@ integrity sha512-DFx8xa3cZXTdb/k3kfPeaixecQLgKh5NVBMwD0AQxOzcZawK4oo1Jh9LbrcACUivsCA7TLG8eeWgrDXjTMhRmw== "@svgr/babel-plugin-transform-svg-component@^5.5.0": + version "5.5.0" resolved "https://registry.npmjs.org/@svgr/babel-plugin-transform-svg-component/-/babel-plugin-transform-svg-component-5.5.0.tgz" integrity sha512-q4jSH1UUvbrsOtlo/tKcgSeiCHRSBdXoIoqX1pgcKK/aU3JD27wmMKwGtpB8qRYUYoyXvfGxUVKchLuR5pB3rQ== + "@svgr/babel-preset@8.1.0": version "8.1.0" resolved "https://registry.npmjs.org/@svgr/babel-preset/-/babel-preset-8.1.0.tgz" @@ -8978,12 +8986,12 @@ react-helmet@^6.1.0: react-fast-compare "^3.1.1" react-side-effect "^2.1.0" -react-horizontal-scrolling-menu@^2.8.2: - version "2.8.2" - resolved "https://registry.npmjs.org/react-horizontal-scrolling-menu/-/react-horizontal-scrolling-menu-2.8.2.tgz" - integrity sha512-OmCQDONx/4TnyxQr+RoxP7AwSPQxdQGkFnWuCknF3s2pySNAogL4AB1LQv6bUrXIwFMXdrJBqxFeq3tZ24J7/w== +react-horizontal-scrolling-menu@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/react-horizontal-scrolling-menu/-/react-horizontal-scrolling-menu-4.1.1.tgz#1af2862c085b5c7baf950bfa743bec7feb278905" + integrity sha512-IahECLO4ovahv/JWYYJf9AkiAznx/oI7G0zKkiAj9GCJTPp+s+susIFsTSnzWxWhHrnSZ1F6flp2yEbrqoGnVg== dependencies: - smooth-scroll-into-view-if-needed "^1.1.32" + smooth-scroll-into-view-if-needed "~1.1" react-i18next@^12.2.2: version "12.3.1" @@ -9772,9 +9780,9 @@ slash@^4.0.0: resolved "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz" integrity sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew== -smooth-scroll-into-view-if-needed@^1.1.32: +smooth-scroll-into-view-if-needed@~1.1: version "1.1.33" - resolved "https://registry.npmjs.org/smooth-scroll-into-view-if-needed/-/smooth-scroll-into-view-if-needed-1.1.33.tgz" + resolved "https://registry.yarnpkg.com/smooth-scroll-into-view-if-needed/-/smooth-scroll-into-view-if-needed-1.1.33.tgz#2c7b88c82784c69030cb0489b9df584e94e01533" integrity sha512-crS8NfAaoPrtVYOCMSAnO2vHRgUp22NiiDgEQ7YiaAy5xe2jmR19Jm+QdL8+97gO8ENd7PUyQIAQojJyIiyRHw== dependencies: scroll-into-view-if-needed "^2.2.28"