Skip to content
This repository was archived by the owner on Mar 4, 2023. It is now read-only.

Commit c61cd72

Browse files
authored
Merge pull request #12 from eksrvb/feature/theming
Feature/theming
2 parents 1c77521 + 9866b96 commit c61cd72

28 files changed

+496
-687
lines changed

.github/workflows/branchPR.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
name: Build PR
22

33
on:
4-
push:
5-
branches-ignore:
6-
- "main"
7-
- 'docs/**'
4+
pull_request:
85
paths-ignore:
96
- "README.md"
107
- 'docs/**'
@@ -37,4 +34,4 @@ jobs:
3734
- name: Dry-Run release
3835
run: ./awesome-ci createRelease -patchLevel bugfix -dry-run
3936
env:
40-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ If you want to give me feedback and don't want to open an issue on github, pleas
2020
- get a date back with the annotation "clickDate" (see example)
2121
- insert your own calendar data and render the new template
2222
- multiselect days optional (returns the daily span)
23+
- include your own [theme](https://eksrvb.github.io/material-calendar/api.html#theaming) (requiered since version 3.1.0)
2324
more in the docs... ;)
2425

2526
## Getting help

docs/api.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,36 @@ Optionally provide your location:
8686
| {string} badgeMode | null | badgeMode options: 'Int' or 'Icon' |
8787
| {number} badgeInt | null | if badgeMode == 'Int', set our Number here |
8888
| {string} badgeIcon | null | if badgeMode == 'Icon', set Icon (Matireal-Icons) |
89-
| {string} toolTip | null | if set, this displays a mat-tooltip |
89+
| {string} toolTip | null | if set, this displays a mat-tooltip |
90+
91+
## theaming
92+
93+
Make sure your using the standard material palette!
94+
95+
> Since Version 3.1.0 theaming is required.
96+
97+
style.scss or theme.scss
98+
```scss
99+
@import "material-calendar/calendar-theme.scss";
100+
// standard angular material -->
101+
@import "~@angular/material/theming";
102+
@include mat-core();
103+
104+
$mat-primary-palette: mat-palette($mat-indigo);
105+
$mat-accent-palette: mat-palette($mat-light-green);
106+
107+
$app-light-theme: mat-light-theme($mat-primary-palette, $mat-accent-palette);
108+
$app-dark-theme: mat-dark-theme($mat-primary-palette, $mat-accent-palette);
109+
110+
@include angular-material-theme($app-light-theme);
111+
// <-- standard angular material
112+
// this include prowides the calendar with the right colors
113+
@include calendar-theme($app-light-theme);
114+
115+
// following section is for dark mode and optional.
116+
// use appropriate class name for darkMode
117+
.darkMode {
118+
@include angular-material-theme($app-dark-theme);
119+
@include calendar-theme($app-dark-theme);
120+
}
121+
```

docs/index.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,19 @@ If you need an example for your pipeline you can find it in the sidebar under th
3838
> All available version are listed at [npmjs](https://www.npmjs.com/package/material-calendar)
3939
4040

41-
## A couple of impressions
41+
## A few impressions
4242

43-
### One single panel without displaying calendar week
44-
![example-picture](https://github.com/eksrvb/material-calendar/raw/bugfix/unification-github-gitlab/docs/pictures/monthly-onem-cdata.png)
43+
### One single panel without displaying calendar week and with dark theme
44+
![example-picture](https://github.com/eksrvb/material-calendar/raw/main/docs/pictures/monthly-onem-cdata-kw_1.png)
4545

4646
### One single panel with displaying calendar week
47-
![example-picture](https://github.com/eksrvb/material-calendar/raw/bugfix/unification-github-gitlab/docs/pictures/monthly-onem-cdata-kw.png)
47+
![example-picture](https://github.com/eksrvb/material-calendar/raw/main/docs/pictures/monthly-onem-cdata-kw.png)
4848

4949
### Three panels with displaying calendar week
50-
![example-picture](https://github.com/eksrvb/material-calendar/raw/bugfix/unification-github-gitlab/docs/pictures/monthly-threem-cdata-kw.png)
50+
![example-picture](https://github.com/eksrvb/material-calendar/raw/main/docs/pictures/monthly-threem-cdata-kw_1.png)
5151

52-
### A calendar with 12 months (annual-mode) and with displaying calendar week
53-
![example-picture](https://github.com/eksrvb/material-calendar/raw/bugfix/unification-github-gitlab/docs/pictures/annual-cdata-kw.png)
52+
### Three panels with displaying calendar week and dark theme
53+
![example-picture](https://github.com/eksrvb/material-calendar/raw/main/docs/pictures/monthly-threem-cdata-kw_2.png)
54+
55+
### A calendar with 12 months (annual-mode) and without displaying calendar week
56+
![example-picture](https://github.com/eksrvb/material-calendar/raw/main/docs/pictures/annual-cdata-kw.png)

docs/pictures/annual-cdata-kw.png

-7.55 KB
Loading
740 Bytes
Loading
14.5 KB
Loading
-15.1 KB
Binary file not shown.
-36.8 KB
Binary file not shown.
43.1 KB
Loading

0 commit comments

Comments
 (0)