Skip to content
Snippets Groups Projects
Commit 376eab61 authored by Lukas Mauß's avatar Lukas Mauß
Browse files

Add translation for new menu in header

parent e90e3798
No related merge requests found
# How to add a new Theme
## Preparation
Create a new directory with the name of the new theme in src/theme.
## Create new theme
1. Create a new scss file with the same structure as `_dark-theme.scss` and style it using material palette.
2. Create a new scss file in your working theme directory named {YourThemeName}.const.ts and copy the structure of `darkTheme.const.ts`.
## Add new theme to theme manager
Import the file in `styles.scss` and add the new theme to theme menu in `header.component.html`.
## Configure your theme
Start editing the variables and see the magic happen. We recommend to use [material colors](https://material.io/tools/color).
......@@ -8,8 +8,8 @@
<span class="fill-remaining-space"></span>
<mat-menu #themeMenu="matMenu" [overlapTrigger]="false">
<button mat-menu-item (click)="changeTheme('')">{{ 'default' | translate }}</button>
<button mat-menu-item (click)="changeTheme('dark')">{{ 'dark' | translate }}</button>
<button mat-menu-item (click)="changeTheme('')">{{ 'header.default' | translate }}</button>
<button mat-menu-item (click)="changeTheme('dark')">{{ 'header.dark' | translate }}</button>
</mat-menu>
<button mat-icon-button [matMenuTriggerFor]="themeMenu">
......
......@@ -7,7 +7,9 @@
"logged-out": "Ausloggen erfolgreich.",
"back": "Zurück",
"my-sessions": "Meine Sessions",
"visited-sessions": "Besuchte Sessions"
"visited-sessions": "Besuchte Sessions",
"default": "ARSnova",
"dark": "Nacht"
},
"login-page": {
"creator": "Dozent/in",
......
......@@ -7,7 +7,9 @@
"logged-out": "Logout successful",
"back": "Back",
"my-sessions": "My Sessions",
"visited-sessions": "Visited Sessions"
"visited-sessions": "Visited Sessions",
"default": "ARSnova",
"dark": "Night"
},
"login-page": {
"creator": "Lecturer",
......
# How to add a new Theme
- create a new directory with the name of the theme in src/theme
- than create a new scss file with the same construct as _dark-theme.scss and style it using
material palette
- import the file in styles.scss and add the option in header.component.html
- create a new scss file in your working theme directory : name.const.ts
and copy the construct of darkTheme.const.ts
- start editing the variables and see the magic happen
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment