init commit
This commit is contained in:
commit
eb5b5f883b
0
.gitignore
vendored
Normal file
0
.gitignore
vendored
Normal file
11
LICENSE
Normal file
11
LICENSE
Normal file
@ -0,0 +1,11 @@
|
||||
Copyright 2022 vodofrede
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
|
||||
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
BIN
src/assets/favicon.ico
Normal file
BIN
src/assets/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
23
src/assets/localization.js
Normal file
23
src/assets/localization.js
Normal file
@ -0,0 +1,23 @@
|
||||
const LANGUAGES = ["en-gb", "da-dk"];
|
||||
|
||||
const selected = select => select.options[select.selectedIndex];
|
||||
const getCookie = key => (document.cookie.split("; ").findLast(c => c.startsWith(key)) ?? "=").split("=").reverse()[0];
|
||||
const setCookie = (key, value) => (document.cookie = `${key}=${value}; path=/; SameSite=Strict;`);
|
||||
|
||||
function localize() {
|
||||
let currentLang = getCookie("lang");
|
||||
if (!currentLang) {
|
||||
setCookie("lang", LANGUAGES[0]);
|
||||
currentLang = LANGUAGES[0];
|
||||
}
|
||||
let langIndex = LANGUAGES.indexOf(currentLang) ?? 0;
|
||||
document.getElementById("lang").selectedIndex = langIndex;
|
||||
[...document.querySelectorAll("[lang]")].forEach(
|
||||
elem => (elem.hidden = elem.lang != currentLang && !elem.classList.contains("no-localize")),
|
||||
);
|
||||
}
|
||||
|
||||
function setLocale(language) {
|
||||
setCookie("lang", language);
|
||||
localize();
|
||||
}
|
209
src/assets/main.css
Normal file
209
src/assets/main.css
Normal file
@ -0,0 +1,209 @@
|
||||
@media (prefers-color-scheme: light) {
|
||||
:root {
|
||||
--primary: white;
|
||||
--secondary: white;
|
||||
--border: grey;
|
||||
--font-color: black;
|
||||
--font-inverted: white;
|
||||
--link-color: blue;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--primary: #202020;
|
||||
--secondary: #2b2b2b;
|
||||
--border: darkgrey;
|
||||
--font-color: white;
|
||||
--font-inverted: black;
|
||||
--link-color: tomato;
|
||||
}
|
||||
}
|
||||
|
||||
html {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
|
||||
background-color: var(--primary);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@media (max-width: 899px) {
|
||||
html {
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
}
|
||||
|
||||
html * {
|
||||
color: var(--font-color);
|
||||
box-sizing: inherit;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
body > * {
|
||||
padding: 0 2%;
|
||||
}
|
||||
|
||||
@media (min-width: 900px) {
|
||||
body > * {
|
||||
padding: 0 15%;
|
||||
}
|
||||
}
|
||||
|
||||
header {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
main {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-bottom: 5rem;
|
||||
}
|
||||
|
||||
footer {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
margin-top: auto;
|
||||
}
|
||||
|
||||
hr {
|
||||
color: var(--border);
|
||||
margin-top: 0.12rem;
|
||||
margin-bottom: 0.3rem;
|
||||
}
|
||||
|
||||
span {
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
nav {
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
nav div {
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
margin-top: 1rem;
|
||||
margin-bottom: 1.2rem;
|
||||
|
||||
overflow-wrap: break-word;
|
||||
word-wrap: break-word;
|
||||
|
||||
line-height: 1.1;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 0rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
a {
|
||||
padding-right: 0px;
|
||||
font-family: monospace;
|
||||
text-decoration: underline solid var(--link-color) 10%;
|
||||
text-underline-offset: 3.8px;
|
||||
}
|
||||
a:hover {
|
||||
background-color: var(--link-color);
|
||||
color: var(--font-inverted);
|
||||
}
|
||||
|
||||
ul {
|
||||
padding-left: 1.4em;
|
||||
margin-top: 0px;
|
||||
margin-bottom: 2.5rem;
|
||||
}
|
||||
|
||||
li {
|
||||
white-space: nowrap;
|
||||
margin-bottom: 0.4em;
|
||||
}
|
||||
|
||||
table {
|
||||
overflow-x: auto;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: 0.15rem solid var(--border);
|
||||
border-radius: 0.5rem;
|
||||
border-spacing: 0px;
|
||||
overflow: scroll;
|
||||
|
||||
background-color: var(--primary);
|
||||
}
|
||||
|
||||
table tbody,
|
||||
table thead {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
td,
|
||||
th {
|
||||
border-bottom: 1px dotted var(--border);
|
||||
text-overflow: ellipsis;
|
||||
padding: 0.4rem;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
th {
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
|
||||
thead,
|
||||
tbody {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
label {
|
||||
display: inline-block;
|
||||
user-select: none;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
input {
|
||||
width: auto;
|
||||
color: black;
|
||||
}
|
||||
|
||||
select {
|
||||
background-color: white;
|
||||
border: 1px solid #777;
|
||||
padding: 0.25em;
|
||||
width: 100%;
|
||||
color: black;
|
||||
}
|
||||
|
||||
select option {
|
||||
overflow: hidden;
|
||||
color: black;
|
||||
}
|
||||
|
||||
[hidden] {
|
||||
display: none;
|
||||
}
|
69
src/index.html
Normal file
69
src/index.html
Normal file
@ -0,0 +1,69 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<!-- metadata -->
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Home | Frederik Palmø</title>
|
||||
<meta name="description" content="palmoe.dk | Frederik Palmø" />
|
||||
<meta name="author" content="vodofrede" />
|
||||
<meta property="og:title" content="Frederik Palmø" />
|
||||
<meta property="og:description" content="" />
|
||||
<meta property="og:url" content="https://palmoe.dk" />
|
||||
|
||||
<!-- assets -->
|
||||
<link rel="stylesheet" href="/assets/main.css" />
|
||||
<link rel="icon" type="image/x-icon " href="/assets/favicon.ico" />
|
||||
<script src="/assets/localization.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body onload="localize();" lang="en-gb" class="no-localize">
|
||||
<nav>
|
||||
<div>
|
||||
<h2><a href="/">Frederik Palmø</a></h2>
|
||||
</div>
|
||||
<div>
|
||||
<span>
|
||||
<h3>
|
||||
<a href="/blog.html">
|
||||
<span lang="en-gb">blog</span>
|
||||
<span lang="da-dk">blog</span>
|
||||
</a>
|
||||
</h3>
|
||||
<h3>
|
||||
<a href="/projects.html">
|
||||
<span lang="en-gb">projects</span>
|
||||
<span lang="da-dk">projekter</span>
|
||||
</a>
|
||||
</h3>
|
||||
<h3>
|
||||
<a href="/info.html">
|
||||
<span lang="en-gb">info</span>
|
||||
<span lang="da-dk">info</span>
|
||||
</a>
|
||||
</h3>
|
||||
</span>
|
||||
<select id="lang" onchange="setLocale(selected(this).value);">
|
||||
<option value="en-gb">🇬🇧</option>
|
||||
<option value="da-dk">🇩🇰</option>
|
||||
</select>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<header></header>
|
||||
|
||||
<main>
|
||||
<p>main content goes here</p>
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<div>
|
||||
<h5>© 2022 Frederik Palmø</h5>
|
||||
</div>
|
||||
<div>
|
||||
<h5>
|
||||
<a href="https://git.palmoe.dk/vodofrede/palmoe.dk">https://git.palmoe.dk/vodofrede/palmoe.dk</a>
|
||||
</h5>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
67
src/projects.html
Normal file
67
src/projects.html
Normal file
@ -0,0 +1,67 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<!-- metadata -->
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Projects | Frederik Palmø</title>
|
||||
<meta name="description" content="palmoe.dk | Frederik Palmø" />
|
||||
<meta name="author" content="vodofrede" />
|
||||
<meta property="og:title" content="Frederik Palmø" />
|
||||
<meta property="og:description" content="" />
|
||||
<meta property="og:url" content="https://palmoe.dk" />
|
||||
|
||||
<!-- assets -->
|
||||
<link rel="stylesheet" href="/assets/main.css" />
|
||||
<link rel="icon" type="image/x-icon " href="/assets/favicon.ico" />
|
||||
<script src="/assets/localization.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body onload="localize();" lang="en-gb" class="no-localize">
|
||||
<nav>
|
||||
<div>
|
||||
<h2><a href="/">Frederik Palmø</a></h2>
|
||||
</div>
|
||||
<div>
|
||||
<h3><a href="/blog.html">blog</a></h3>
|
||||
|
||||
<span lang="en-gb">
|
||||
<h3><a href="/projects.html">projects</a></h3>
|
||||
</span>
|
||||
<span lang="da-dk">
|
||||
<h3><a href="/projects.html">projekter</a></h3>
|
||||
</span>
|
||||
|
||||
<h3>
|
||||
<a href="/info.html">
|
||||
<span lang="en-gb">info</span>
|
||||
<span lang="da-dk">info</span>
|
||||
</a>
|
||||
</h3>
|
||||
<select id="lang" onchange="setLocale(selected(this).value);">
|
||||
<option value="en-gb">🇬🇧</option>
|
||||
<option value="da-dk">🇩🇰</option>
|
||||
</select>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<header>
|
||||
<span lang="en-gb"><h1>Projects</h1></span>
|
||||
<span lang="da-dk"><h1>Projekter</h1></span>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
<p>main content goes here</p>
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<div>
|
||||
<h5>© 2022 Frederik Palmø</h5>
|
||||
</div>
|
||||
<div>
|
||||
<h5>
|
||||
<a href="https://git.palmoe.dk/vodofrede/palmoe.dk">https://git.palmoe.dk/vodofrede/palmoe.dk</a>
|
||||
</h5>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user