mirror of
https://github.com/Xevion/100prisoners.git
synced 2025-12-10 06:06:27 -06:00
Sticky (fixed) dark mode switch, solid moon icon
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import React, {FunctionComponent, useEffect, useState} from "react";
|
import React, {FunctionComponent, useEffect, useState} from "react";
|
||||||
|
|
||||||
import {MoonIcon, SunIcon} from "@heroicons/react/24/outline";
|
import {SunIcon} from "@heroicons/react/24/outline";
|
||||||
|
import {MoonIcon} from "@heroicons/react/24/solid";
|
||||||
import {classNames} from "@/utils/helpers";
|
import {classNames} from "@/utils/helpers";
|
||||||
|
|
||||||
function setMode(dark: boolean) {
|
function setMode(dark: boolean) {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ const Page: FunctionComponent<PageProps> = ({children}: PageProps) => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<main className="flex w-full flex-col items-center bg-white dark:bg-zinc-900 text-gray-700 dark:text-gray-300">
|
<main className="flex w-full flex-col items-center bg-white dark:bg-zinc-900 text-gray-700 dark:text-gray-300">
|
||||||
<DarkModeSwitch className="absolute top-5 right-5" />
|
<DarkModeSwitch className="fixed top-5 right-5" />
|
||||||
<div className="mt-8 px-3 max-w-screen-md w-[90%]">
|
<div className="mt-8 px-3 max-w-screen-md w-[90%]">
|
||||||
<h1 className="text-3xl font-rokkitt text-zinc-800 dark:text-zinc-100 sm:text-5xl mb-2">
|
<h1 className="text-3xl font-rokkitt text-zinc-800 dark:text-zinc-100 sm:text-5xl mb-2">
|
||||||
<Link href={"/"}>100Prisoners.com</Link>
|
<Link href={"/"}>100Prisoners.com</Link>
|
||||||
|
|||||||
Reference in New Issue
Block a user