homepage/articles.html

83 lines
3.1 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<title>Andrew's Articles</title>
<meta charset="utf-8">
<meta name="description" content="Articles written by Andrew Lalis.">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="styles/font.css" type="text/css">
<!-- CSS class to hide elements if JS is not enabled. -->
<noscript><style>.jsonly{display: none !important;}</style></noscript>
<script>
// An inline script that manages the site's color theme.
const THEMES = ["light", "dark"];
function getPreferredTheme() {
const storedTheme = localStorage.getItem("theme");
if (storedTheme !== null && THEMES.includes(storedTheme)) return storedTheme;
if (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches) {
return "dark";
}
return "light";
}
function setPreferredTheme(theme) {
document.documentElement.className = theme;
localStorage.setItem("theme", theme);
}
setPreferredTheme(getPreferredTheme());
window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", event => {
const newTheme = event.matches ? "dark" : "light";
setPreferredTheme(newTheme);
});
document.addEventListener("DOMContentLoaded", event => {
const themeToggleButton = document.getElementById("themeToggleButton");
themeToggleButton.onclick = clickEvent => {
const currentTheme = getPreferredTheme();
const idx = THEMES.indexOf(currentTheme);
const nextIdx = idx === THEMES.length - 1 ? 0 : idx + 1;
setPreferredTheme(THEMES[nextIdx]);
};
});
</script>
<link rel="stylesheet" href="styles/style.css" type="text/css">
</head>
<body>
<header class="page-header">
<h1>Andrew's Articles</h1>
<nav>
<div>
<a href="index.html">Home</a>
<a class="page-header-selected" href="articles.html">Articles</a>
<a href="projects.html">Projects</a>
<a href="training.html">Training</a>
<a href="contact.html">Contact</a>
</div>
<div>
<a href="https://github.com/andrewlalis">GitHub</a>
<a href="https://www.linkedin.com/in/andrew-lalis/">LinkedIn</a>
<a href="https://www.youtube.com/channel/UC9X4mx6-ObPUB6-ud2IGAFQ">YouTube</a>
</div>
</nav>
<button id="themeToggleButton" class="jsonly">Change Color Theme</button>
<hr>
</header>
<main>
<article>
<h2>About</h2>
<p>
Although I don't generally write much, sometimes I'll find something interesting, or something that I notice a significant number of people could benefit from reading about. In that case, it'll most likely end up on this page as an article.
</p>
</article>
</main>
</body>
</html>