2022-04-09 01:44:33 +00:00
<!DOCTYPE html>
2022-04-09 01:54:33 +00:00
< html lang = 'en' >
2022-04-09 01:44:33 +00:00
< head >
< title > gomepage< / title >
< meta charset = 'utf-8' / >
2022-04-23 15:20:32 +00:00
< meta name = 'theme-color' content = '#efe5d7' >
< meta name = 'viewport' content = 'width=device-width, initial-scale=1.0, shrink-to-fit=no' / >
2022-04-09 01:54:33 +00:00
< link rel = 'icon' type = 'image/x-icon' href = './favicon.ico' >
2022-04-09 01:44:33 +00:00
< link rel = 'preconnect' href = 'https://fonts.googleapis.com' >
< link rel = 'preconnect' href = 'https://fonts.gstatic.com' crossorigin >
2022-04-23 15:20:32 +00:00
< link rel = 'preload' href = 'https://fonts.googleapis.com/css2?family=Lora:ital@0;1&display=swap' as = 'style' onload = 'this.onload=null;this.rel="stylesheet"' >
< noscript > < link rel = 'stylesheet' href = 'https://fonts.googleapis.com/css2?family=Lora:ital@0;1&display=swap' > < / noscript >
2022-04-09 01:54:33 +00:00
< style >
2022-04-09 01:44:33 +00:00
html {
color: #323a42;
2022-04-23 15:20:32 +00:00
background-color: #efe5d7;
2022-04-30 01:19:43 +00:00
/* background-image: url(https://upload.wikimedia.org/wikipedia/commons/b/bc/Sir_Walter_Buffalo_Grass.jpg);
background-size: cover;
background-position: center; */
2022-04-09 01:44:33 +00:00
height: 100%;
2022-04-09 01:54:33 +00:00
font-family: 'Palatino Linotype', Lora, serif;
font-size: 1.25em;
2022-04-09 01:44:33 +00:00
}
body {
margin: 0;
min-height: 100%;
2022-04-09 01:54:33 +00:00
display: grid;
grid-template-columns: 1fr min-content;
grid-template-rows: 1fr auto min-content;
line-height: 1.2;
2022-04-09 01:44:33 +00:00
}
*::selection {
2022-04-30 01:19:43 +00:00
background: #eab77533;
2022-04-09 01:44:33 +00:00
}
header {
2022-04-09 01:54:33 +00:00
grid-column: 2;
grid-row: 1 / span 2;
2022-04-09 01:44:33 +00:00
width: min-content;
2022-04-30 01:19:43 +00:00
height: min-content;
2022-04-09 01:54:33 +00:00
overflow: hidden;
2022-04-30 01:19:43 +00:00
background-color: #efe5d7;
padding-left: 2em;
padding-bottom: 2em;
2022-04-09 01:44:33 +00:00
}
main {
2022-04-09 01:54:33 +00:00
grid-column: 1;
grid-row: 1;
padding: 1em;
2022-04-30 01:19:43 +00:00
background-color: #efe5d7;
max-width: fit-content;
height: fit-content;
2022-04-09 01:44:33 +00:00
}
footer {
display: flex;
2022-04-09 01:54:33 +00:00
grid-column: 1 / span 2;
grid-row: 2 / span 2;
2022-04-30 01:19:43 +00:00
pointer-events: none;
2022-04-09 01:54:33 +00:00
}
.title-box, h1, h2, h3, h4, h5, h6 {
font-weight: normal;
2022-04-09 01:44:33 +00:00
}
2022-07-01 01:01:40 +00:00
h1, h2, h3, h4, h5, h6 {
font-family: Optima, 'Palatino Linotype', Lora, serif;
}
h2, h3 {
margin: 0.5em 0;
}
2022-04-09 01:44:33 +00:00
.title-box {
position: relative;
border: 2px solid #323a42;
border-top: none;
border-right: none;
font-size: 48px;
height: 3em;
width: 10em;
2022-04-23 15:20:32 +00:00
background-color: #efe5d7;
2022-04-09 01:44:33 +00:00
}
2022-04-30 01:19:43 +00:00
.title-box:hover {
cursor: pointer;
border-color: #6d747a;
color: #6d747a;
}
2022-04-09 01:44:33 +00:00
.title-box .title {
2022-04-09 01:54:33 +00:00
background-color: inherit;
2022-04-09 01:44:33 +00:00
position: absolute;
2022-04-09 01:54:33 +00:00
bottom: -13px;
2022-04-09 01:44:33 +00:00
padding: 0 0.25em 0 0.25em;
user-select: none;
}
nav {
font-size: 18px;
position: relative;
display: flex;
flex-direction: column;
2022-04-09 01:54:33 +00:00
/* this counters the left offset, but adds no real padding */
padding-right: 1rem;
left: 1rem;
2022-04-09 01:44:33 +00:00
right: 0;
border-bottom: 2px solid #323a42;
transition: opacity 50ms;
2022-04-09 01:54:33 +00:00
opacity: 0;
pointer-events: none;
2022-04-09 01:44:33 +00:00
}
2022-07-01 03:40:10 +00:00
a {
color: #323a42;
}
2022-04-09 01:44:33 +00:00
nav a {
2022-04-09 01:54:33 +00:00
margin: 0.25em 0.75em 0.25em 0;
padding: 0.25em;
position: relative;
left: -0.25em;
2022-04-09 01:44:33 +00:00
color: #323a42;
text-decoration: none;
line-height: 1.2;
2022-04-09 01:54:33 +00:00
border-radius: 2px;
2022-04-09 01:44:33 +00:00
}
nav a:first-child {
margin-top: 1em;
}
nav a:last-child {
margin-bottom: 1em;
}
2022-04-09 01:54:33 +00:00
a:hover, a:focus {
2022-04-09 01:44:33 +00:00
color: #6d747a;
2022-04-09 01:54:33 +00:00
outline: 0;
}
a:focus-visible {
outline: 1px dashed #beb0b1;
2022-04-09 01:44:33 +00:00
}
nav a .link-title {
font-weight: bold;
}
2022-04-23 15:20:32 +00:00
nav a .link-description::before {
2022-04-09 01:44:33 +00:00
font-weight: normal;
2022-04-23 15:20:32 +00:00
content: '— ';
}
nav a.new .link-title::after {
content: '*';
color: #984624;
}
nav a.new:hover .link-title::after, nav a.new:focus .link-title::after {
color: #BF8E7C;
2022-04-09 01:44:33 +00:00
}
2022-04-09 01:54:33 +00:00
nav.show, nav:focus-within {
opacity: 1;
pointer-events: all;
}
2022-04-09 01:44:33 +00:00
.gome-img {
2022-04-09 01:54:33 +00:00
user-select: none;
}
.gome-img[src^='./img/desktop'] {
2022-04-09 01:44:33 +00:00
width: auto;
2022-04-09 01:54:33 +00:00
max-width: min(1280px, 100%);
2022-04-09 01:44:33 +00:00
}
.gome-img[src^='./img/tablet'] {
display: none;
2022-04-09 01:54:33 +00:00
max-width: 100%;
2022-04-09 01:44:33 +00:00
}
.gome-img[src^='./img/mobile'] {
display: none;
2022-04-09 01:54:33 +00:00
max-width: 100%;
}
2022-07-01 01:01:40 +00:00
article {
2022-04-09 01:54:33 +00:00
font-size: 18px;
}
#wotd h3 {
font-family: Optima, 'Palatino Linotype', Lora, serif;
font-size: 1.2em;
margin: 0 0 0.5em 0;
}
#wotd .definiendum {
font-size: 1.5em;
font-weight: bold;
margin-bottom: 0.5em;
}
#wotd time, #wotd .pronunciation {
display: block;
margin-bottom: 1em;
}
2022-04-23 15:20:32 +00:00
.pronunciation:not(:empty)::before, .pronunciation:not(:empty)::after {
2022-04-09 01:54:33 +00:00
content: '⧸ ';
}
#wotd ul {
margin: 0 0 1em 0;
padding-left: 0.5em;
list-style: none;
}
#wotd li {
margin-bottom: 0.25em;
2022-04-09 01:44:33 +00:00
}
2022-07-01 03:40:10 +00:00
#statuscafe {
padding-left: 0.5em;
}
#statuscafe-username a {
margin: -0.15em;
padding: 0.15em;
border-radius: 2px;
}
2022-04-09 01:44:33 +00:00
@media only screen and (max-width: 960px) {
2022-04-09 01:54:33 +00:00
body {
2022-04-23 15:20:32 +00:00
grid-template-rows: min-content auto min-content;
2022-04-09 01:54:33 +00:00
}
2022-04-09 01:44:33 +00:00
header {
2022-04-09 01:54:33 +00:00
grid-column: 1 / span 2;
grid-row: 1;
2022-04-09 01:44:33 +00:00
width: 100%;
2022-04-30 01:19:43 +00:00
padding: 0;
2022-04-09 01:44:33 +00:00
}
2022-04-09 01:54:33 +00:00
main {
grid-row: 2;
}
footer {
grid-row: 3;
}
2022-04-09 01:44:33 +00:00
.title-box {
border-left: none;
height: 1em;
width: 100%;
}
2022-04-30 01:19:43 +00:00
.title-box:hover {
cursor: initial;
border-color: #323a42;
color: #323a42;
}
2022-04-09 01:44:33 +00:00
nav {
opacity: 1;
2022-04-23 15:20:32 +00:00
pointer-events: all;
2022-04-09 01:44:33 +00:00
}
.gome-img[src^='./img/desktop'] {
display: none;
}
.gome-img[src^='./img/tablet'] {
display: initial;
}
}
@media only screen and (max-width: 640px) {
footer {
2022-04-09 01:54:33 +00:00
align-items: flex-end;
2022-04-09 01:44:33 +00:00
}
.gome-img[src^='./img/tablet'] {
display: none;
}
.gome-img[src^='./img/mobile'] {
display: initial;
}
}
< / style >
< / head >
< body >
< header id = 'header' >
< div class = 'title-box' >
< span class = 'title' > gomepage< / span >
< / div >
< nav >
< a href = 'journal' > < span class = 'link-title' > Journal< / span > < span class = 'link-description' > a collection of articles, essays, and posts authored by me.< / span > < / a >
< a href = 'bookmarks' > < span class = 'link-title' > Bookmarks< / span > < span class = 'link-description' > some curated lists of web pages I want to keep track of and share with others.< / span > < / a >
2022-04-23 15:20:32 +00:00
< a href = 'socials' class = 'new' > < span class = 'link-title' > Socials< / span > < span class = 'link-description' > other accounts of mine around the web.< / span > < / a >
2022-04-09 01:44:33 +00:00
< / nav >
< / header >
< main >
2022-04-09 01:54:33 +00:00
< article id = 'wotd' >
2022-07-01 01:01:40 +00:00
< h2 class = 'title' > Word of the day< / h2 >
2022-04-09 01:54:33 +00:00
< time class = 'date' > < / time >
< div class = 'definiendum' > < / div >
< div class = 'pronunciation' > < / div >
< / article >
2022-07-01 03:40:10 +00:00
< article id = 'status' >
2022-07-01 01:01:40 +00:00
< h2 > My status< / h2 >
< div id = 'statuscafe' >
< div id = 'statuscafe-username' > < / div >
< div id = 'statuscafe-content' > < / div >
< / div >
< script src = 'https://status.cafe/current-status.js?name=gome' defer > < / script >
< / article >
2022-04-09 01:44:33 +00:00
< / main >
< footer >
2022-04-09 01:54:33 +00:00
< img src = './img/desktop_gomes.webp' class = 'gome-img' alt = 'Kabouters at work' / >
< img src = './img/tablet_gomes.webp' class = 'gome-img' alt = 'Kabouters at work' / >
< img src = './img/mobile_gome.webp' class = 'gome-img' alt = 'Lone kabouter' / >
2022-04-09 01:44:33 +00:00
< / footer >
< script >
const header = document.querySelector('#header');
const nav = header.querySelector('nav');
const revealNav = () => {
nav.classList.add('show');
}
const hideNav = () => {
nav.classList.remove('show');
}
header.addEventListener('click', e => {
if (!nav.contains(e.target) & & nav !== e.target) {
if (nav.classList.contains('show')) {
hideNav();
}
else if (!nav.classList.contains('show')) {
revealNav();
}
}
});
window.addEventListener('click', e => {
if (!header.contains(e.target) & & header !== e.target) {
hideNav();
}
});
< / script >
2022-04-09 01:54:33 +00:00
< script type = 'module' >
2022-06-02 15:17:01 +00:00
const months = ['January','February','March','April','May','June','July','August','September','October','November','December'];
2022-04-09 01:54:33 +00:00
const wotd = document.querySelector('#wotd');
const today = new Date();
let entry;
try {
let day = today.getDate().toString();
if (day.length === 1) {
day = '0' + day;
}
let month = (today.getMonth() + 1).toString();
if (month.length === 1) {
month = '0' + month;
}
const response = await fetch(`./wotd/${today.getFullYear()}.${month}.${day}.json`);
if (!response.ok) {
throw new Error(`HTTP response ${response.status} ${response.statusText}`);
}
entry = await response.json();
} catch (e) {
console.error('Word of the Day error:', e);
}
if (!entry) {
document.querySelector('#wotd').remove();
} else {
wotd.querySelector('.date').textContent = today.getDate() + ' ' + months[today.getMonth()] + ' ' + today.getFullYear();
wotd.querySelector('.definiendum').textContent = entry.word;
wotd.querySelector('.pronunciation').textContent = entry.pronunciation;
let definitionHTML = '';
for (const definitionEntry of entry.definitions) {
definitionHTML += `< h3 class = 'part-of-speech' > ${definitionEntry.part}< / h4 > `;
definitionHTML += `< ul class = 'definitions' > `;
for (const definition of definitionEntry.definitions) {
definitionHTML += `< li class = 'definition' > ${definition}< / li > `
}
definitionHTML += `< / ul > `;
}
wotd.innerHTML += definitionHTML;
}
< / script >
2022-04-09 01:44:33 +00:00
< / body >
< / html >