diff --git a/.docker/stage-release/usr/local/bin/entrypoint.sh b/.docker/stage-release/usr/local/bin/entrypoint.sh index bea084b..9bc7933 100644 --- a/.docker/stage-release/usr/local/bin/entrypoint.sh +++ b/.docker/stage-release/usr/local/bin/entrypoint.sh @@ -1,7 +1,9 @@ #!/bin/sh sed -i'' "s|#####SERVER#####|$SERVER|g;" /usr/share/nginx/html/main*.js* +sed -i'' "s|#####IMPRINT#####|$IMPRINT|g;" /usr/share/nginx/html/main*.js* +sed -i'' "s|#####PRIVACY#####|$PRIVACY|g;" /usr/share/nginx/html/main*.js* -echo "Configured with SERVER=$SERVER" +echo "Configured with SERVER=$SERVER amd IMPRINT=$IMPRINT and PRIVACY=$PRIVACY" nginx -g 'daemon off;' # overriding nginx default startup diff --git a/src/app/app.component.html b/src/app/app.component.html index 936f76b..1ccb306 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -5,3 +5,10 @@ + +
+ Impressum +
+
+ Privacy Policy +
diff --git a/src/app/app.component.scss b/src/app/app.component.scss index a25e722..717c867 100644 --- a/src/app/app.component.scss +++ b/src/app/app.component.scss @@ -166,3 +166,21 @@ clr-dg-cell.red { > cds-icon[shape^='angle'].dropdown-selection-angle { right: 0.5rem; } + +.imprint { + position: absolute; + left: 20px; + bottom: 20px; + a { + color: white; + } +} + +.privacy { + position: absolute; + left: 100px; + bottom: 20px; + a { + color: white; + } +} diff --git a/src/app/app.component.ts b/src/app/app.component.ts index addddad..46af310 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -3,6 +3,7 @@ import '@cds/core/icon/register.js'; import { ClarityIcons } from '@cds/core/icon'; import { AppConfigService } from './app-config.service'; import { themes } from './terminals/terminal-themes/themes'; +import { environment } from 'src/environments/environment'; @Component({ selector: 'app-root', templateUrl: './app.component.html', @@ -14,6 +15,8 @@ export class AppComponent { private logo = this.Config.logo || '/assets/bashbrawl/bashbrawl_text.png'; public themes = themes; + public imprint = ''; + public privacyPolicy = ''; constructor(private config: AppConfigService) { this.config.getLogo(this.logo).then((obj: string) => { @@ -24,5 +27,13 @@ export class AppComponent { const fi = document.querySelector('#favicon'); fi.href = this.Config.favicon; } + + if (environment.imprint && environment.imprint != '') { + this.imprint = environment.imprint; + } + + if (environment.privacypolicy && environment.privacypolicy != '') { + this.privacyPolicy = environment.privacypolicy; + } } } diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index 2f48c22..b1b779b 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -1,4 +1,6 @@ export const environment = { production: true, server: '#####SERVER#####', + imprint: '#####IMPRINT#####', + privacypolicy: '#####PRIVACY#####', }; diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 6a4ca1b..6afc52c 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -4,6 +4,8 @@ export const environment = { production: false, server: 'http://localhost:16210', + imprint: '', + privacypolicy: '', }; /* * For easier debugging in development mode, you can import the following file