diff --git a/src/App.css b/src/App.css
deleted file mode 100644
index af62d60..0000000
--- a/src/App.css
+++ /dev/null
@@ -1,12 +0,0 @@
-.nav-item {
- cursor: pointer;
-}
-
-.nav-link {
- color: rgba(255, 255, 255, .5);
- font-weight: bold;
-}
-
-.nav-link:hover {
- color: rgba(255, 255, 255, 1);
-}
diff --git a/src/App.js b/src/App.js
index 56a9467..959241e 100644
--- a/src/App.js
+++ b/src/App.js
@@ -1,10 +1,14 @@
import React from 'react';
-import "./App.css"
import HomePage from "./pages/HomePage/HomePage";
import RandomPage from "./pages/RandomPage/RandomPage";
+import StaticInfos from "./GlobalInfos";
// include bootstraps css
import 'bootstrap/dist/css/bootstrap.min.css';
+import style from './App.module.css'
+import lighttheme from './AppLightTheme.module.css'
+import darktheme from './AppDarkTheme.module.css'
+
import SettingsPage from "./pages/SettingsPage/SettingsPage";
import CategoryPage from "./pages/CategoryPage/CategoryPage";
@@ -78,38 +82,25 @@ class App extends React.Component {
}
render() {
+ const themeStyle = StaticInfos.isDarkTheme() ? darktheme : lighttheme;
return (
-
);
diff --git a/src/App.module.css b/src/App.module.css
new file mode 100644
index 0000000..0ae8d7b
--- /dev/null
+++ b/src/App.module.css
@@ -0,0 +1,51 @@
+.navitem {
+ float: left;
+ margin-left: 20px;
+
+ cursor: pointer;
+ opacity: 0.6;
+
+ font-size: large;
+ font-weight: bold;
+ text-transform: capitalize;
+}
+
+.navitem:hover {
+ opacity: 1;
+ transition: opacity .5s;
+}
+
+.navitem::after {
+ content: '';
+ display: block;
+ width: 0;
+ height: 2px;
+ background: #FFF;
+ transition: width .3s;
+}
+
+.navitem:hover::after {
+ width: 100%;
+}
+
+
+.navitemselected{
+ opacity: 0.85;
+}
+
+.navcontainer {
+ padding-top: 20px;
+ width: 100%;
+ padding-bottom: 30px;
+}
+
+.navbrand {
+ margin-left: 20px;
+ margin-right: 20px;
+ font-size: large;
+ font-weight: bold;
+ text-transform: capitalize;
+ float:left;
+}
+
+
diff --git a/src/AppDarkTheme.module.css b/src/AppDarkTheme.module.css
new file mode 100644
index 0000000..52d9939
--- /dev/null
+++ b/src/AppDarkTheme.module.css
@@ -0,0 +1,8 @@
+.navcontainer{
+ background-color: #141520;
+ color: white;
+}
+
+.navitem::after {
+ background: white;
+}
diff --git a/src/AppLightTheme.module.css b/src/AppLightTheme.module.css
new file mode 100644
index 0000000..7424440
--- /dev/null
+++ b/src/AppLightTheme.module.css
@@ -0,0 +1,8 @@
+.navcontainer{
+ background-color: white;
+ color: black;
+}
+
+.navitem::after {
+ background: black;
+}
diff --git a/src/GlobalInfos.js b/src/GlobalInfos.js
new file mode 100644
index 0000000..d44f051
--- /dev/null
+++ b/src/GlobalInfos.js
@@ -0,0 +1,10 @@
+class GlobalInfos {
+ isDarkTheme() {
+ return true;
+ };
+}
+
+const StaticInfos = new GlobalInfos();
+Object.freeze(StaticInfos);
+
+export default StaticInfos;
diff --git a/src/elements/PageTitle/PageTitle.js b/src/elements/PageTitle/PageTitle.js
index cce4ec9..67b55df 100644
--- a/src/elements/PageTitle/PageTitle.js
+++ b/src/elements/PageTitle/PageTitle.js
@@ -1,5 +1,8 @@
import React from "react";
import style from "./PageTitle.module.css"
+import darktheme from "./PageTitleDarkTheme.module.css"
+import lighttheme from "./PageTitleLightTheme.module.css"
+import StaticInfos from "../../GlobalInfos";
class PageTitle extends React.Component {
constructor(props) {
@@ -10,17 +13,19 @@ class PageTitle extends React.Component {
}
render() {
+ const themeStyle = StaticInfos.isDarkTheme() ? darktheme : lighttheme;
return (
-
-
{this.props.title}
+
+ {this.props.title}
{this.props.subtitle}
<>
{this.props.children}
>
- );
+ )
+ ;
}
}
-export default PageTitle;
\ No newline at end of file
+export default PageTitle;
diff --git a/src/elements/PageTitle/PageTitleDarkTheme.module.css b/src/elements/PageTitle/PageTitleDarkTheme.module.css
new file mode 100644
index 0000000..d41632e
--- /dev/null
+++ b/src/elements/PageTitle/PageTitleDarkTheme.module.css
@@ -0,0 +1,11 @@
+.pageheader {
+ background-color: #141520;
+}
+
+.pageheadertitle {
+ color:white;
+}
+
+.pageheadersubtitle {
+ color:white;
+}
diff --git a/src/elements/PageTitle/PageTitleLightTheme.module.css b/src/elements/PageTitle/PageTitleLightTheme.module.css
new file mode 100644
index 0000000..e69de29
diff --git a/src/index.css b/src/index.css
index d9d3047..cd1a456 100644
--- a/src/index.css
+++ b/src/index.css
@@ -5,4 +5,4 @@ body {
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-}
\ No newline at end of file
+}