194 lines
4.8 KiB
HTML
194 lines
4.8 KiB
HTML
<!DOCTYPE html>
|
|
<head>
|
|
<title>gomepage</title>
|
|
<meta charset='utf-8'/>
|
|
<meta name='theme-color' content='#fffcf7'>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no"/>
|
|
<link rel='icon' type='image/x-icon' href='/favicon.ico'>
|
|
<link rel='preconnect' href='https://fonts.googleapis.com'>
|
|
<link rel='preconnect' href='https://fonts.gstatic.com' crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=Lora:ital@0;1&display=swap" rel="stylesheet">
|
|
<style type='text/css'>
|
|
html {
|
|
color: #323a42;
|
|
background-color: #fffcf7;
|
|
height: 100%;
|
|
}
|
|
body {
|
|
margin: 0;
|
|
min-height: 100%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
*::selection {
|
|
background: #ebdcc97f;
|
|
}
|
|
header {
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
width: min-content;
|
|
background-color: red;
|
|
}
|
|
main {
|
|
height: 100%;
|
|
background-color: green;
|
|
flex-grow: 1;
|
|
}
|
|
footer {
|
|
background-color: blue;
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
max-height: 50%;
|
|
}
|
|
.title-box {
|
|
position: relative;
|
|
border: 2px solid #323a42;
|
|
border-top: none;
|
|
border-right: none;
|
|
font-size: 48px;
|
|
height: 3em;
|
|
width: 10em;
|
|
font-family: 'Palatino Linotype', Optima, Lora, serif;
|
|
background-color: #fffcf7;
|
|
}
|
|
.title-box .title {
|
|
background-image: linear-gradient(to top, #fffcf700 0 13px, #fffcf7 13px 100%);
|
|
position: absolute;
|
|
bottom: -16px;
|
|
padding: 0 0.25em 0 0.25em;
|
|
user-select: none;
|
|
}
|
|
nav {
|
|
font-size: 18px;
|
|
position: relative;
|
|
display: flex;
|
|
flex-direction: column;
|
|
padding-right: 0.5em;
|
|
left: 1em;
|
|
right: 0;
|
|
overflow: hidden;
|
|
border-bottom: 2px solid #323a42;
|
|
transition: opacity 50ms;
|
|
}
|
|
nav a {
|
|
margin: 0.25em 0.25em 0.25em 0;
|
|
padding: 0.25em 0.25em 0.25em 0;
|
|
color: #323a42;
|
|
text-decoration: none;
|
|
line-height: 1.2;
|
|
}
|
|
nav a:first-child {
|
|
margin-top: 1em;
|
|
}
|
|
nav a:last-child {
|
|
margin-bottom: 1em;
|
|
}
|
|
nav a:hover, nav a:focus {
|
|
color: #6d747a;
|
|
}
|
|
nav a .link-title {
|
|
font-weight: bold;
|
|
}
|
|
nav a .link-title:after {
|
|
font-weight: normal;
|
|
content: ' —';
|
|
}
|
|
.gome-img {
|
|
width: 1280px;
|
|
width: auto;
|
|
max-width: 100%;
|
|
max-height: 50vw;
|
|
}
|
|
.gome-img[src^='./img/tablet'] {
|
|
display: none;
|
|
}
|
|
.gome-img[src^='./img/mobile'] {
|
|
position: relative;
|
|
display: none;
|
|
right: 0;
|
|
}
|
|
@media only screen and (max-width: 960px) {
|
|
header {
|
|
position: relative;
|
|
width: 100%;
|
|
}
|
|
.title-box {
|
|
border-left: none;
|
|
height: 1em;
|
|
width: 100%;
|
|
}
|
|
nav {
|
|
opacity: 1;
|
|
}
|
|
.gome-img[src^='./img/desktop'] {
|
|
display: none;
|
|
}
|
|
.gome-img[src^='./img/tablet'] {
|
|
display: initial;
|
|
}
|
|
}
|
|
@media only screen and (max-width: 640px) {
|
|
footer {
|
|
max-height: 30%;
|
|
width: auto;
|
|
}
|
|
.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>
|
|
<a href='socials'><span class='link-title'>Socials</span> <span class='link-description'>other accounts of mine around the web.</span></a>
|
|
</nav>
|
|
</header>
|
|
<main>
|
|
<h3>Word of the day</h3>
|
|
</main>
|
|
<footer>
|
|
<img src='./img/desktop_gomes.webp' class='gome-img' />
|
|
<img src='./img/tablet_gomes.webp' class='gome-img' />
|
|
<img src='./img/mobile_gome.webp' class='gome-img' />
|
|
</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>
|
|
</body>
|
|
</html>
|