feat: theme

This commit is contained in:
Barrett Ruth 2025-11-09 14:45:26 -05:00
parent fb0229d80e
commit b98b6f084a
4 changed files with 31 additions and 36 deletions

View file

@ -243,9 +243,9 @@
const currentTheme = const currentTheme =
document.documentElement.getAttribute("data-theme"); document.documentElement.getAttribute("data-theme");
if (currentTheme === "dark") { if (currentTheme === "dark") {
themeToggle.textContent = "ʕ•ᴥ•ʔつ☾"; themeToggle.textContent = "☾⊂ʕ•ᴥ•ʔ";
} else { } else {
themeToggle.textContent = "ʕ•ᴥ•ʔつ☼"; themeToggle.textContent = "☼⊂ʕ•ᴥ•ʔ";
} }
} }

View file

@ -202,15 +202,17 @@ body {
header, header,
footer { footer {
padding: 20px; padding: 20px;
}
header {
font-size: 1.5em; font-size: 1.5em;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
#theme-toggle {
cursor: pointer;
user-select: none;
}
.main { .main {
display: flex; display: flex;
justify-content: center; justify-content: center;

View file

@ -1,6 +1,12 @@
<footer> <footer>
<span id="theme-toggle">ʕ•ᴥ•ʔつ☼</span> <div class="footer-links-left">
<div class="footer-links"> <a href="/resume.pdf" data-topic="resume" target="_blank">resume</a>
<a href="/transcript.pdf" data-topic="transcript" target="_blank"
>transcript</a
>
<a href="/about.html" data-topic="about">about</a>
</div>
<div class="footer-links-right">
<a href="/gist.html" data-topic="gist">gist</a> <a href="/gist.html" data-topic="gist">gist</a>
<a href="/git.html" data-topic="git">git</a> <a href="/git.html" data-topic="git">git</a>
<a <a
@ -13,22 +19,23 @@
</footer> </footer>
<style> <style>
footer { .footer-links-left,
padding: 20px; .footer-links-right {
font-size: 1.5em;
display: flex; display: flex;
align-items: center; gap: 25px;
justify-content: space-between;
} }
#theme-toggle { .footer-links-left a,
cursor: pointer; .footer-links-right a {
user-select: none;
}
.footer-links a {
margin-left: 25px;
text-decoration: none; text-decoration: none;
cursor: pointer; cursor: pointer;
} }
@media (max-width: 768px) {
.footer-links-left,
.footer-links-right {
flex-direction: column;
gap: 5px;
}
}
</style> </style>
<script type="module" src="/scripts/index.js"></script> <script type="module" src="/scripts/index.js"></script>

View file

@ -21,35 +21,21 @@ const promptText = topic ? `barrett@ruth:~$ ${topic}` : "barrett@ruth:~$";
<span class="terminal-cursor"></span> <span class="terminal-cursor"></span>
</div> </div>
</a> </a>
<div class="header-links"> <span id="theme-toggle">☼⊂ʕ•ᴥ•ʔ</span>
<a href="/resume.pdf" data-topic="resume" target="_blank">resume</a>
<a href="/transcript.pdf" data-topic="transcript" target="_blank"
>transcript</a
>
<a href="/about.html" data-topic="about">about</a>
</div>
</header> </header>
<style> <style>
.header-links a { #theme-toggle {
margin-left: 25px;
text-decoration: none;
cursor: pointer; cursor: pointer;
user-select: none;
} }
@media (max-width: 768px) { @media (max-width: 768px) {
header { header {
flex-direction: column; flex-direction: column;
align-items: flex-start; align-items: flex-start;
} }
.header-links { #theme-toggle {
align-self: flex-end; align-self: flex-end;
display: flex;
flex-direction: column;
text-align: right;
gap: 5px;
}
.header-links a {
margin-left: 0;
} }
} }
</style> </style>