feat: theme

This commit is contained in:
2026-01-29 14:21:26 -08:00
parent 689dbbb76f
commit 29608efe67
+374 -51
View File
@@ -50,7 +50,7 @@ nhcarriganHeadersViewport.setAttribute(
);
const nhcarriganHeadersThemeColor = document.createElement("meta");
nhcarriganHeadersThemeColor.setAttribute("name", "theme-color");
nhcarriganHeadersThemeColor.setAttribute("content", "#E1F6F9");
nhcarriganHeadersThemeColor.setAttribute("content", "#4A0E0E");
const nhcarriganHeadersReferrer = document.createElement("meta");
nhcarriganHeadersReferrer.setAttribute("name", "referrer");
nhcarriganHeadersReferrer.setAttribute(
@@ -186,9 +186,26 @@ nhcarriganHeadersStyles.innerHTML = `
}
:root {
--foreground: #8F2447;
--background: #E1F6F9DC;
font-size: 12pt;
/* Witchy Purple Rose Palette */
--witch-purple: #2B1B3D;
--witch-plum: #44275A;
--witch-rose: #A8577E;
--witch-mauve: #D4A5C7;
--witch-lavender: #E8D5E8;
--witch-black: #0A0009;
--witch-silver: #C0C0C0;
--witch-moon: #F5F5F5;
--witch-shadow: rgba(10, 0, 9, 0.7);
/* Theme variables */
--foreground: var(--witch-purple);
--background: var(--witch-moon);
--accent: var(--witch-rose);
--border: var(--witch-plum);
--highlight: var(--witch-mauve);
font-size: 14pt;
line-height: 1.6;
}
* {
@@ -199,112 +216,413 @@ nhcarriganHeadersStyles.innerHTML = `
html {
font-family: 'Vampyr', monospace;
cursor: url('https://cdn.nhcarrigan.com/cursors/cursor.cur'), auto;
cursor: url('https://cdn.nhcarrigan.com/cursors/rose-cursor.png') 16 16, url('https://cdn.nhcarrigan.com/cursors/cursor.cur'), auto;
min-height: 100vh;
min-width: 100vw;
}
body {
min-height: 100vh;
position: relative;
}
/* Witchy mystical background */
body::before {
background: url(https://cdn.nhcarrigan.com/background.png);
background-size: cover;
background-position: center;
width: 100%;
height: 100%;
z-index: -1;
content: "";
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
opacity: 1;
background: url(https://cdn.nhcarrigan.com/background.png);
background-size: cover;
background-position: center;
z-index: -2;
pointer-events: none;
}
/* Purple overlay for witchy effect */
body::after {
content: "";
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background:
radial-gradient(circle at 20% 50%, rgba(168, 87, 126, 0.35) 0%, transparent 60%),
radial-gradient(circle at 80% 80%, rgba(68, 39, 90, 0.35) 0%, transparent 60%),
linear-gradient(180deg,
rgba(10, 0, 9, 0.5) 0%,
rgba(43, 27, 61, 0.25) 50%,
rgba(43, 27, 61, 0.4) 100%
);
z-index: -1;
pointer-events: none;
}
main {
color: var(--foreground);
background-color: var(--background);
background: linear-gradient(135deg,
rgba(245, 245, 245, 0.95) 0%,
rgba(232, 213, 232, 0.9) 100%
);
text-align: center;
border-radius: 10px;
border-radius: 15px;
width: 95%;
max-width: 1080px;
margin: auto;
margin-bottom: 85px;
padding: 10px;
margin: 20px auto 85px auto;
padding: 40px;
position: relative;
/* Simple elegant border */
border: 2px solid var(--witch-plum);
box-shadow:
/* Magical purple glow */
0 0 60px rgba(168, 87, 126, 0.4),
0 0 100px rgba(68, 39, 90, 0.3),
/* Standard shadow */
0 10px 40px var(--witch-shadow),
/* Inner glow */
inset 0 0 60px rgba(168, 87, 126, 0.05);
}
footer {
width: 100%;
color: var(--foreground);
background-color: var(--background);
color: var(--witch-lavender);
background: linear-gradient(to bottom,
rgba(43, 27, 61, 0.95) 0%,
var(--witch-black) 100%
);
position: fixed;
bottom: 0;
height: 75px;
padding: 0 10px;
border-top: 2px solid var(--witch-mauve);
box-shadow:
/* Purple glow from top border */
0 -10px 40px rgba(212, 165, 199, 0.3),
0 -5px 20px rgba(168, 87, 126, 0.4),
/* Standard shadow */
0 -5px 20px var(--witch-shadow);
}
#footer-inner-container {
display: flex;
align-items: center;
justify-content: space-between;
height: 75px;
}
#footer-inner-container a {
color: var(--witch-lavender);
transition: all 0.3s ease;
}
#footer-inner-container a:hover {
color: var(--witch-mauve);
text-shadow: 0 0 10px rgba(212, 165, 199, 0.5);
}
#footer-badge-container {
display: grid;
grid-template-columns: repeat(8, 1fr);
align-items: center;
justify-content: space-around;
}
#show-socials-button, #theme-select-button {
background: none;
border: none;
cursor: url('https://cdn.nhcarrigan.com/cursors/pointer.cur'), pointer;
color: var(--foreground);
border: 1px solid var(--witch-plum);
border-radius: 20px;
cursor: url('https://cdn.nhcarrigan.com/cursors/rose-pointer.png') 16 16, url('https://cdn.nhcarrigan.com/cursors/pointer.cur'), pointer;
color: var(--witch-lavender);
font-size: 1rem;
font-family: 'Vampyr', monospace;
padding: 8px 15px;
transition: all 0.3s ease;
}
#show-socials-button:hover, #theme-select-button:hover {
background: rgba(168, 87, 126, 0.2);
border-color: var(--witch-mauve);
transform: translateY(-2px);
box-shadow: 0 4px 15px rgba(168, 87, 126, 0.3);
}
#show-socials-button > i, #theme-select-button > i {
font-size: 1.5rem;
font-size: 1.2rem;
margin-right: 5px;
}
a {
color: unset;
cursor: url('https://cdn.nhcarrigan.com/cursors/pointer.cur'), pointer;
color: var(--accent);
cursor: url('https://cdn.nhcarrigan.com/cursors/rose-pointer.png') 16 16, url('https://cdn.nhcarrigan.com/cursors/pointer.cur'), pointer;
transition: all 0.3s ease;
text-decoration: none;
}
a:hover {
color: var(--witch-plum);
text-decoration: underline;
text-decoration-color: var(--witch-mauve);
text-underline-offset: 3px;
}
#tree-nation-offset-website {
display: flex;
align-items: center;
}
#social-list {
position: absolute;
bottom: 75px;
left: 0;
right: 0;
width: 100vw;
left: 50%;
transform: translateX(-50%);
width: 90vw;
max-width: 400px;
padding: 10px;
background-color: var(--background);
color: var(--foreground);
border-radius: 10px;
border: 1px solid var(--foreground);
padding: 20px;
background: linear-gradient(135deg,
rgba(43, 27, 61, 0.98) 0%,
rgba(10, 0, 9, 0.95) 100%
);
color: var(--witch-lavender);
border-radius: 15px;
border: 1px solid var(--witch-mauve);
display: none;
z-index: 1000;
box-shadow:
0 10px 30px var(--witch-shadow),
inset 0 0 20px rgba(168, 87, 126, 0.1);
}
.social-list-item {
padding: 10px;
padding: 12px;
transition: all 0.3s ease;
border-radius: 8px;
}
.social-list-item > a {
display: flex;
align-items: center;
justify-content: space-between;
text-decoration: none;
color: var(--witch-lavender);
}
.social-list-item > a i {
font-size: 1.2rem;
margin-right: 12px;
color: var(--witch-mauve);
}
.social-list-divider {
border: 0.5px solid var(--foreground);
border: none;
height: 1px;
background: linear-gradient(
to right,
transparent 20%,
var(--witch-mauve) 50%,
transparent 80%
);
margin: 8px 0;
opacity: 0.5;
}
.social-list-item:hover {
background-color: var(--foreground);
color: var(--background);
background: rgba(168, 87, 126, 0.2);
transform: translateX(3px);
}
.social-list-item:hover > a {
color: var(--witch-rose);
}
.is-dark {
--foreground: #E1F6F9;
--background: #8F2447bb;
--foreground: var(--witch-lavender);
--background: var(--witch-black);
--accent: var(--witch-mauve);
--border: var(--witch-rose);
--highlight: var(--witch-plum);
}
/* Dark mode specific adjustments */
.is-dark main {
background: linear-gradient(135deg,
rgba(10, 0, 9, 0.95) 0%,
rgba(43, 27, 61, 0.9) 100%
);
color: var(--witch-lavender);
border-color: var(--witch-rose);
box-shadow:
/* Mystical rose glow for dark mode */
0 0 80px rgba(168, 87, 126, 0.5),
0 0 120px rgba(212, 165, 199, 0.3),
/* Standard shadow */
0 10px 40px rgba(0, 0, 0, 0.8),
/* Inner glow */
inset 0 0 60px rgba(168, 87, 126, 0.1);
}
.is-dark h1 { color: var(--witch-mauve); }
.is-dark h2, .is-dark h3 { color: var(--witch-lavender); }
.is-dark a {
color: var(--witch-mauve);
}
.is-dark a:hover {
color: var(--witch-rose);
}
/* Typography */
h1, h2, h3, h4, h5, h6 {
font-weight: normal;
}
h1 {
color: var(--witch-plum);
font-size: 2.5rem;
}
h2, h3 {
color: var(--witch-purple);
}
p {
line-height: 1.8;
margin-bottom: 1.2em;
}
/* Form elements */
input, textarea, select {
font-family: 'Vampyr', monospace;
padding: 12px 16px;
border: 1px solid var(--witch-plum);
border-radius: 8px;
background: rgba(245, 245, 245, 0.95);
color: var(--witch-purple);
transition: all 0.3s ease;
outline: none;
}
input:focus, textarea:focus, select:focus {
border-color: var(--witch-rose);
box-shadow: 0 0 0 3px rgba(168, 87, 126, 0.15);
}
button, input[type="submit"], input[type="button"] {
font-family: 'Vampyr', monospace;
padding: 12px 24px;
background: linear-gradient(135deg,
var(--witch-plum) 0%,
var(--witch-purple) 100%
);
color: var(--witch-moon);
border: none;
border-radius: 25px;
cursor: url('https://cdn.nhcarrigan.com/cursors/rose-pointer.png') 16 16, url('https://cdn.nhcarrigan.com/cursors/pointer.cur'), pointer;
transition: all 0.3s ease;
text-transform: uppercase;
letter-spacing: 1px;
}
button:hover, input[type="submit"]:hover, input[type="button"]:hover {
transform: translateY(-2px);
box-shadow: 0 5px 20px rgba(68, 39, 90, 0.4);
}
/* Lists */
ul, ol {
margin-left: 1.5em;
margin-bottom: 1em;
}
ul li::marker {
content: "✦ ";
color: var(--witch-rose);
}
/* Tables */
table {
width: 100%;
border-collapse: collapse;
margin: 1em 0;
border-radius: 8px;
overflow: hidden;
}
th, td {
padding: 12px;
text-align: left;
}
th {
background: var(--witch-plum);
color: var(--witch-moon);
}
tr:nth-child(even) {
background: rgba(212, 165, 199, 0.05);
}
tr:hover {
background: rgba(168, 87, 126, 0.1);
}
/* Blockquotes */
blockquote {
border-left: 3px solid var(--witch-rose);
padding-left: 20px;
margin: 1em 0;
font-style: italic;
color: var(--witch-plum);
}
/* Code blocks */
code, pre {
font-family: 'Courier New', monospace;
background: rgba(43, 27, 61, 0.05);
color: var(--witch-purple);
padding: 2px 6px;
border-radius: 4px;
}
pre {
padding: 15px;
overflow-x: auto;
border: 1px solid var(--witch-plum);
}
/* Scrollbar */
::-webkit-scrollbar {
width: 10px;
height: 10px;
}
::-webkit-scrollbar-track {
background: var(--witch-lavender);
}
::-webkit-scrollbar-thumb {
background: var(--witch-plum);
border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
background: var(--witch-purple);
}
/* Selection */
::selection {
background: var(--witch-rose);
color: var(--witch-moon);
}
::-moz-selection {
background: var(--witch-rose);
color: var(--witch-moon);
}
@media screen and (max-width: 625px) {
#tree-nation-offset-website {
display: none;
@@ -338,7 +656,7 @@ a {
const nhcarriganHeadersFooter = document.createElement("footer");
nhcarriganHeadersFooter.innerHTML = `
<div id="footer-inner-container">
<p id="footer-copyright">&copy; <a href="https://nhcarrigan.com" target="_blank">Naomi Carrigan</a></p>
<p id="footer-copyright" style="margin: 0; display: flex; align-items: center;">&copy; <a href="https://nhcarrigan.com" target="_blank" style="margin-left: 5px;">Naomi Carrigan</a></p>
<button id="show-socials-button" type="button">
<i class="fa-solid fa-share-nodes"></i> Connect with Us
</button>
@@ -580,23 +898,27 @@ nhcarriganHeadersCta.style.position = "fixed";
nhcarriganHeadersCta.style.top = "50%";
nhcarriganHeadersCta.style.left = "50%";
nhcarriganHeadersCta.style.transform = "translate(-50%, -50%)";
nhcarriganHeadersCta.style.padding = "10px";
nhcarriganHeadersCta.style.borderRadius = "10px";
nhcarriganHeadersCta.style.backgroundColor = "var(--background)";
nhcarriganHeadersCta.style.color = "var(--foreground)";
nhcarriganHeadersCta.style.padding = "40px";
nhcarriganHeadersCta.style.borderRadius = "20px";
nhcarriganHeadersCta.style.backgroundColor = "var(--witch-moon)";
nhcarriganHeadersCta.style.color = "var(--witch-purple)";
nhcarriganHeadersCta.style.textAlign = "center";
nhcarriganHeadersCta.style.width = "95%";
nhcarriganHeadersCta.style.maxWidth = "400px";
nhcarriganHeadersCta.style.border = "2px solid var(--witch-plum)";
nhcarriganHeadersCta.style.boxShadow = "0 20px 40px rgba(0, 0, 0, 0.5)";
nhcarriganHeadersCta.id = "community-cta";
nhcarriganHeadersCta.innerHTML = `
<h1 autofocus>Hello~!</h1>
<div style="display: flex; justify-content: space-around; margin-bottom: 10px;">
<img src="https://cdn.nhcarrigan.com/logo.png" alt="NHCarrigan Logo" style="width: 100px; height: 100px;">
<p>
Consider joining our community so you can keep up to date on all of our latest activities!
<h1 autofocus style="font-size: 2rem; margin-bottom: 20px; color: var(--witch-plum);">Welcome~! 🌙</h1>
<div style="display: flex; justify-content: space-around; margin-bottom: 25px; align-items: center;">
<img src="https://cdn.nhcarrigan.com/logo.png" alt="NHCarrigan Logo" style="width: 80px; height: 80px; filter: hue-rotate(280deg) saturate(0.7);">
<p style="flex: 1; margin-left: 20px; line-height: 1.8;">
Join our magical community to stay connected with our latest projects and activities!
</p>
</div>
<a href="https://chat.nhcarrigan.com" target="_blank" rel="noreferrer" style="padding: 10px; background: var(--foreground); color: var(--background); outline: none">Okay, take me there~!</a>
<a href="https://chat.nhcarrigan.com" target="_blank" rel="noreferrer" style="display: inline-block; padding: 15px 35px; background: linear-gradient(135deg, var(--witch-plum), var(--witch-purple)); color: var(--witch-moon); text-decoration: none; border-radius: 30px; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(68, 39, 90, 0.3);">
Join Our Community~! ✨
</a>
`;
const nhcarriganHeadersModalBg = document.createElement("div");
@@ -606,7 +928,8 @@ nhcarriganHeadersModalBg.style.top = "0";
nhcarriganHeadersModalBg.style.left = "0";
nhcarriganHeadersModalBg.style.width = "100vw";
nhcarriganHeadersModalBg.style.height = "100vh";
nhcarriganHeadersModalBg.style.backgroundColor = "rgba(0, 0, 0, 0.5)";
nhcarriganHeadersModalBg.style.background = "rgba(10, 0, 9, 0.7)";
nhcarriganHeadersModalBg.style.backdropFilter = "blur(5px)";
nhcarriganHeadersModalBg.style.display = "none";
nhcarriganHeadersModalBg.id = "modal-bg";
const nhcarriganHeadersCloseModal = (): void => {