Skip to content

Commit

Permalink
Add Privacy Polic Link + Imprint link
Browse files Browse the repository at this point in the history
  • Loading branch information
jggoebel committed Jun 5, 2024
1 parent f41e55b commit 1d70730
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .docker/stage-release/usr/local/bin/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -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
7 changes: 7 additions & 0 deletions src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,10 @@
</div>
</div>
</div>

<div class="imprint" *ngIf="imprint">
<a [href]="imprint">Impressum</a>
</div>
<div class="privacy" *ngIf="privacyPolicy">
<a [href]="privacyPolicy">Privacy Policy</a>
</div>
18 changes: 18 additions & 0 deletions src/app/app.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
11 changes: 11 additions & 0 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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) => {
Expand All @@ -24,5 +27,13 @@ export class AppComponent {
const fi = <HTMLLinkElement>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;
}
}
}
2 changes: 2 additions & 0 deletions src/environments/environment.prod.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export const environment = {
production: true,
server: '#####SERVER#####',
imprint: '#####IMPRINT#####',
privacypolicy: '#####PRIVACY#####',
};
2 changes: 2 additions & 0 deletions src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1d70730

Please sign in to comment.