mmenu in contao 5
von Andreas
cd public/bundles
ln -s ../../vendor/dklemmt/contao_dk_mmenu/public/ contaommenu
von Andreas
cd public/bundles
ln -s ../../vendor/dklemmt/contao_dk_mmenu/public/ contaommenu
{
"type": "module",
"scripts": {
"js": "bun run _scripts/js.mjs",
"scss:prod": "sass files_resources/scss/app.scss --style=compressed | postcss --config postcss.config.cjs -o files/assets/css/app.min.css",
"scss": "sass files_resources/scss/app.scss files/assets/css/app.min.css --style=compressed --source-map",
"scss:be": "sass files_resources/scss/be.contao.scss assets/css/be.contao.css --style=compressed --source-map",
"scss:be:prod": "sass files_resources/scss/be.contao.scss --style=compressed | postcss --config postcss.config.cjs -o assets/css/be.contao.css",
"postcss": "postcss files/assets/css/app.min.css --use autoprefixer cssnano postcss-import @tailwindcss/postcss -o files/assets/css/app.min.css",
"svg:copy": "cpy 'files_resources/svg/**/*.{svg,SVG}' '!files_resources/svg/brands/**/*.{svg,SVG}' '!files_resources/svg/technique/**/*.{svg,SVG}' files/assets/svg",
"svg:modify": "bun run _scripts/modify-svg.mjs",
"img:copy": "cpy 'files_resources/img/**/*.{png,jpg,jpeg,gif,ico}' files/assets/img",
"fonts:copy": "cpy 'files_resources/fonts/**/*' 'node_modules/@fortawesome/fontawesome-free/webfonts/*' files/assets/fonts",
"build": "bun run js && bun run scss && bun run postcss && bun run svg:copy && bun run svg:modify && bun run img:copy && bun run fonts:copy && bun run scss:be",
"watch": "chokidar 'files_resources/**/*.{scss,js}' -c 'bun run build'"
}
}
# This job runs in the deploy stage.
deploy-job:
image: $IMAGE_DEPLOY_ONLY
stage: deploy # It only runs when *both* jobs in the test stage complete successfully.
environment:
name: production
only:
- main # nur in main branch ausführen!
# variables:
# GIT_STRATEGY: none # Git-Checkout für diese Stage verhindern, [none,fetch,clone]
before_script:
- mkdir -p ~/.ssh
- echo $SSH_PRIVATE_KEY_AS_BASE_64 | base64 -d > ~/.ssh/$FILENAME_SSH
- chmod 600 ~/.ssh/$FILENAME_SSH
- eval $(ssh-agent -s)
- ssh-add ~/.ssh/$FILENAME_SSH
# Erstelle die SSH Konfigurationsdatei
#ServerAliveInterval 60\n ServerAliveCountMax 2\n ExitOnForwardFailure yes
#ServerAliveInterval 60 → Sendet jede 60 Sekunden ein Keep-Alive-Signal.
#ServerAliveCountMax 2 → Trennt die Verbindung, wenn 2 Keep-Alive-Signale ausbleiben.
#ExitOnForwardFailure yes → Verhindert das Offenlassen von hängenden SSH-Verbindungen.
- echo -e "Host $SSH_CONFIG_HOST\nHostName $SSH_CONFIG_HOSTNAME\nUser $SSH_CONFIG_USER\nPort $SSH_CONFIG_PORT\nIdentityFile ~/.ssh/$FILENAME_SSH\nIdentitiesOnly yes\nStrictHostKeyChecking no\nServerAliveInterval 60\nServerAliveCountMax 2\nExitOnForwardFailure yes" > ~/.ssh/config
- chmod 644 ~/.ssh/config
# Verhindert SSH-Warnungen
- echo $SSH_CONFIG_HOSTNAME $SSH_CONFIG_HOST >> /etc/hosts
- cat /etc/hosts
- echo $SSH_CONFIG_HOST
- ssh-keyscan $SSH_CONFIG_HOST > ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
- cat ~/.ssh/known_hosts
#Erstelle unter _dep/from_gitlab_to_live eine neue .deploy.env Datei
- echo "PHP_VERSION=$PHP_VERSION" > ./_dep/from_gitlab_to_live/.deploy.env
- echo "PHP_CMD=/usr/bin/php$PHP_VERSION" >> ./_dep/from_gitlab_to_live/.deploy.env
# Achtung WEB_PATH_LOCAL wird zusammengesetzt
- echo "WEB_PATH_LOCAL=/builds/$CI_PROJECT_PATH/" >> ./_dep/from_gitlab_to_live/.deploy.env
- echo "WEB_PATH_REMOTE=$DEPLOYER_WEB_PATH_REMOTE" >> ./_dep/from_gitlab_to_live/.deploy.env
- echo "CHOWN_USER=$DEPLOYER_CHOWN_USER" >> ./_dep/from_gitlab_to_live/.deploy.env
- echo "CHOWN_GROUP=$DEPLOYER_CHOWN_GROUP" >> ./_dep/from_gitlab_to_live/.deploy.env
- echo "HOST_SSH_CONFIG=$SSH_CONFIG_HOST" >> ./_dep/from_gitlab_to_live/.deploy.env
- echo "RSYNC_FILTER_FILE=$DEPLOYER_RSYNC_FILTER_FILE" >> ./_dep/from_gitlab_to_live/.deploy.env
- echo "RSYNC_FILTER_FOR_BUILD_FILE=$DEPLOYER_RSYNC_FILTER_FOR_BUILD_FILE" >> ./_dep/from_gitlab_to_live/.deploy.env
const parseColor = (color) => {
const normalized = color.trim().toLowerCase();
if (normalized === 'white') {
return { r: 255, g: 255, b: 255 };
}
const hex3 = /^#([0-9a-f]{3})$/i.exec(normalized);
if (hex3) {
const r = parseInt(hex3[1][0] + hex3[1][0], 16);
const g = parseInt(hex3[1][1] + hex3[1][1], 16);
const b = parseInt(hex3[1][2] + hex3[1][2], 16);
return { r, g, b };
}
const hex6 = /^#([0-9a-f]{6})$/i.exec(normalized);
if (hex6) {
const r = parseInt(hex6[1].substring(0, 2), 16);
const g = parseInt(hex6[1].substring(2, 4), 16);
const b = parseInt(hex6[1].substring(4, 6), 16);
return { r, g, b };
}
const rgbMatch = /^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/.exec(normalized);
if (rgbMatch) {
return {
r: parseInt(rgbMatch[1], 10),
g: parseInt(rgbMatch[2], 10),
b: parseInt(rgbMatch[3], 10)
};
}
const rgbaMatch = /^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d*\.?\d+)\s*\)$/.exec(normalized);
if (rgbaMatch && parseFloat(rgbaMatch[4]) >= 1) {
return {
r: parseInt(rgbaMatch[1], 10),
g: parseInt(rgbaMatch[2], 10),
b: parseInt(rgbaMatch[3], 10)
};
}
return null;
};
Diese Webseite verwendet Cookies bzw. Drittanwendungen, um bestimmte Funktionen zu ermöglichen und das Angebot zu verbessern.
Schützt vor Cross-Site-Request-Forgery Angriffen.
Speichert die aktuelle PHP-Session.
Anwendungen Dritter zu Analysezwecken für unseren Webauftritt