Skip to content

Commit fde8abe

Browse files
stuff
1 parent 1ae5b95 commit fde8abe

3 files changed

+32
-67
lines changed

src/app/app.component.ts

+25-21
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,18 @@ export class AppComponent implements OnInit {
3333
constructor(@Inject(PLATFORM_ID) private platformId: any) {
3434
afterRender(
3535
() => {
36+
37+
// let bodyEl = this.doc.querySelector("body") as HTMLElement;
38+
// bodyEl.classList.add(this.setTheme());
39+
3640
// let themeLink = this.doc.getElementById("app-theme") as HTMLLinkElement;
3741
// themeLink.href = this.setTheme();
3842

39-
let themeLink = this.doc.createElement("link");
40-
themeLink.id = "app-theme";
41-
themeLink.rel = "stylesheet";
42-
themeLink.href = this.setTheme();
43-
this.doc.head.appendChild(themeLink);
43+
// let themeLink = this.doc.createElement("link");
44+
// themeLink.id = "app-theme";
45+
// themeLink.rel = "stylesheet";
46+
// themeLink.href = this.setTheme();
47+
// this.doc.head.appendChild(themeLink);
4448
},
4549
{ phase: AfterRenderPhase.Write }
4650
);
@@ -53,21 +57,21 @@ export class AppComponent implements OnInit {
5357
return this.activeTheme;
5458
}
5559

56-
setTheme() {
57-
if (this.prefersLightMode()) {
58-
return "light.css";
59-
} else {
60-
return "dark.css";
61-
}
62-
}
60+
// setTheme() {
61+
// if (this.prefersLightMode()) {
62+
// return "light.css";
63+
// } else {
64+
// return "dark.css";
65+
// }
66+
// }
6367

64-
prefersLightMode(): boolean {
65-
if (isPlatformBrowser(this.platformId)) {
66-
return (
67-
window.matchMedia &&
68-
window.matchMedia("(prefers-color-scheme: light)").matches
69-
);
70-
}
71-
return false;
72-
}
68+
// prefersLightMode(): boolean {
69+
// if (isPlatformBrowser(this.platformId)) {
70+
// return (
71+
// window.matchMedia &&
72+
// window.matchMedia("(prefers-color-scheme: light)").matches
73+
// );
74+
// }
75+
// return false;
76+
// }
7377
}

src/styles.scss

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
// tried a lot of things separating imports in the same file does nto work they overwrite each other
2+
// If I add the SCSS files in 'public' adding `node_modules` tot he path, they do get coppied into the built app but remain as SCSS not the compiled CSS which is what I need
3+
// additions in angular.json don't seem to have effect
4+
// taking a break for now
5+
6+
17
@import "primeng/resources/primeng.css";
28
@import "primeicons/primeicons.css";
39

@@ -43,6 +49,7 @@ h1 {
4349
padding: 2em;
4450
}
4551

52+
4653
@media (prefers-color-scheme: light) {
4754

4855

vite.config.ts.timestamp-1717409199355-13e24cd1a520c.mjs

-46
This file was deleted.

0 commit comments

Comments
 (0)