mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2026-07-21 20:55:56 -04:00
use the excellent next-themes module
This commit is contained in:
+1
-3
@@ -5,12 +5,10 @@ module.exports = {
|
||||
siteDomain: "jarv.is",
|
||||
siteLocale: "en_us",
|
||||
baseUrl: process.env.BASE_URL || "https://jarv.is",
|
||||
onionDomain: "jarvis2i2vp4j4tbxjogsnqdemnte5xhzyi7hziiyzxwge3hzmh57zad.onion",
|
||||
onionDomain: "http://jarvis2i2vp4j4tbxjogsnqdemnte5xhzyi7hziiyzxwge3hzmh57zad.onion",
|
||||
shortDescription: "Front-End Web Developer in Boston, MA",
|
||||
longDescription:
|
||||
"Hi there! I'm a frontend web developer based in Boston, Massachusetts specializing in the JAMstack, modern JavaScript frameworks, and progressive web apps.",
|
||||
themeColorLight: "#fcfcfc",
|
||||
themeColorDark: "#252525",
|
||||
githubRepo: "jakejarvis/jarv.is",
|
||||
facebookAppId: "3357248167622283",
|
||||
monetization: "$ilp.uphold.com/BJp6d2FrEB69",
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
import { themeColorLight, themeColorDark } from "./config";
|
||||
|
||||
// Inlined JS in pages/_app.tsx to restore these light/dark theme settings ASAP:
|
||||
// `<html data-theme="...">`, `<meta name="color-scheme" ...>`, and color-scheme CSS property.
|
||||
export const restoreThemeScript = `
|
||||
try {
|
||||
var pref = localStorage.getItem("dark_mode"),
|
||||
dark = pref === "true" || (!pref && window.matchMedia("(prefers-color-scheme: dark)").matches),
|
||||
theme = dark ? "dark" : "light";
|
||||
document.documentElement.setAttribute("data-theme", theme);
|
||||
document.documentElement.style.colorScheme = theme;
|
||||
document.head.querySelector('meta[name="theme-color"]').setAttribute("content", dark ? "${themeColorDark}" : "${themeColorLight}");
|
||||
} catch (e) {}
|
||||
`.trim();
|
||||
Reference in New Issue
Block a user