update style
This commit is contained in:
parent
7a386f5c14
commit
7736d5596c
15 changed files with 188 additions and 24 deletions
|
|
@ -30,3 +30,8 @@
|
|||
margin: 0.5em;
|
||||
}
|
||||
}
|
||||
|
||||
.pipe {
|
||||
color: var(--color-dimmed);
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
"use client";
|
||||
|
||||
import Link from "next/link";
|
||||
|
||||
import styles from "./Footer.module.css";
|
||||
|
||||
const Footer = () => {
|
||||
|
|
@ -25,13 +27,13 @@ const Footer = () => {
|
|||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<span style={{ color: "rgba(255,255,255,0.25" }}>{"|"}</span>
|
||||
<span className={styles.pipe}>{"|"}</span>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/accounts">{"accounts"}</a>
|
||||
<Link href="/accounts">{"accounts"}</Link>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/contact">{"contact"}</a>
|
||||
<Link href="/contact">{"contact"}</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -80,3 +80,8 @@
|
|||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.button {
|
||||
background: none;
|
||||
display: flex;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,24 @@
|
|||
"use client";
|
||||
|
||||
import Link from "next/link";
|
||||
import { useContext } from "react";
|
||||
|
||||
import { ThemeContext } from "@contexts";
|
||||
import { ThemeIcon } from "./icons";
|
||||
|
||||
import styles from "./Header.module.css";
|
||||
|
||||
const Header = () => {
|
||||
const { darkTheme, setDarkTheme } = useContext(ThemeContext);
|
||||
|
||||
const toggleTheme = () => {
|
||||
if (darkTheme) {
|
||||
setDarkTheme(false);
|
||||
} else {
|
||||
setDarkTheme(true);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className={styles.header}>
|
||||
<div>
|
||||
|
|
@ -31,6 +45,9 @@ const Header = () => {
|
|||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<button className={styles.button} onClick={toggleTheme}>
|
||||
<ThemeIcon darkTheme={darkTheme} />
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
16
components/icons/ThemeIcon.tsx
Normal file
16
components/icons/ThemeIcon.tsx
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import * as React from "react";
|
||||
|
||||
const ThemeIcon = ({ darkTheme }: any) => (
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
style={{ background: darkTheme ? "#111111" : "#FFFFFF" }}
|
||||
height="1.5em"
|
||||
width="1.5em"
|
||||
viewBox="0 0 100 100"
|
||||
>
|
||||
<circle cx="50" cy="50" r="40" fill={darkTheme ? "#F5F5F5" : "#0A0A0A"} />
|
||||
<circle cx="60" cy="50" r="37" fill={darkTheme ? "#111111" : "#FFFFFF"} />
|
||||
</svg>
|
||||
);
|
||||
|
||||
export default ThemeIcon;
|
||||
1
components/icons/index.ts
Normal file
1
components/icons/index.ts
Normal file
|
|
@ -0,0 +1 @@
|
|||
export { default as ThemeIcon } from "./ThemeIcon";
|
||||
Loading…
Add table
Add a link
Reference in a new issue