Compare commits

...

5 Commits

Author SHA1 Message Date
e292a0352d add icons functionality 2025-12-03 10:56:56 -06:00
6a2b7d7743 move html into assets 2025-12-03 10:08:21 -06:00
478d84b0be adjust file structure 2025-12-03 09:59:01 -06:00
70806b80ee bottom navigation functionality 2025-12-02 11:46:59 -06:00
8af6ee7cd5 load bottomnav from js 2025-12-02 10:22:42 -06:00
16 changed files with 213 additions and 78 deletions

View File

@@ -0,0 +1,9 @@
<div id="bottomnav">
<link rel="stylesheet" href="assets/css/bottomnav.css">
<ul>
<li><a href="/">[/]</a></li>
<li><a href="/projects.html">[/projects]</a></li>
<li><a href="/links.html">[/links]</a></li>
</ul>
<span>PWD: [%PATH%]</span>
</div>

43
assets/css/bottomnav.css Normal file
View File

@@ -0,0 +1,43 @@
#bottomnav {
display: flex;
justify-content: space-between;
padding: 32px;
margin: 0;
outline: 1px solid black;
}
#bottomnav span {
align-self: center;
}
#bottomnav ul {
display: flex;
flex-direction: row;
list-style: none;
padding: 0;
gap: 16px;
}
#bottomnav li {
padding: 0px;
}
#bottomnav a {
color: black;
background: white;
text-decoration: none;
padding: 4px;
outline: 1px black solid;
}
#bottomnav a:hover {
text-decoration: underline;
background: black;
color: white;
}

25
assets/css/global.css Normal file
View File

@@ -0,0 +1,25 @@
@font-face {
font-family: 'JetBrains-Mono';
src: url('/assets/jetbrains-mono-font/fonts/webfonts/JetBrainsMono-Regular.woff2') format('woff2');
}
:root {
font-family: 'JetBrains-Mono', sans-serif;
}
body {
display: flex;
flex-direction: column;
gap: 0;
height: 100dvh;
width: 100dvw;
padding: 0;
margin: 0;
}
main {
flex: 1;
padding: 32px;
}

32
assets/css/icon.css Normal file
View File

@@ -0,0 +1,32 @@
main {
display: grid;
grid-template-columns: repeat( auto-fit, minmax(256px, 1fr) );
overflow-x: hidden;
gap: 32px;
}
/* @media screen and (min-width: ){
} */
Icon {
display: flex;
padding: 32px;
text-align: end;
justify-content: space-between;
align-items: center;
outline: 1px solid black;
}
Icon:hover {
cursor: pointer;
}
Icon img {
width: 8rem;
height: 8rem;
}

7
assets/css/index.css Normal file
View File

@@ -0,0 +1,7 @@
main div {
font-size: 28px;
}
main img {
box-shadow: 0px 0px 8px 4px black;
}

BIN
assets/images/cashapp.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

BIN
assets/images/discord.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 279 KiB

BIN
assets/images/tiktok.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
assets/images/tiktok.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 298 KiB

View File

@@ -1,72 +0,0 @@
@font-face {
font-family: 'JetBrains-Mono';
src: url('./jetbrains-mono-font/fonts/webfonts/JetBrainsMono-Regular.woff2') format('woff2');
}
:root {
font-family: 'JetBrains-Mono', sans-serif;
}
/* * {
outline: 1px black solid;
} */
body {
display: flex;
flex-direction: column;
gap: 0;
height: 100dvh;
width: 100dvw;
padding: 0;
margin: 0;
}
main {
flex: 1;
padding: 32px;
}
main div {
font-size: 28px;
}
main img {
box-shadow: 0px 0px 8px 4px black;
}
#bottomnav {
display: flex;
/* width: 100dvw; */
list-style: none;
padding: 32px;
margin: 0;
gap: 16px;
outline: 1px solid black;
}
#bottomnav li {
padding: 0px;
}
#bottomnav a {
color: black;
background: white;
text-decoration: none;
padding: 4px;
outline: 1px black solid;
}
#bottomnav a:hover {
cursor: not-allowed;
text-decoration: underline;
background: black;
color: white;
}

View File

13
assets/js/global.js Normal file
View File

@@ -0,0 +1,13 @@
const parser = new DOMParser();
fetch("/assets/components/_bottomnav.html")
.then(response => response.text())
.then(text => {
const bottomNavHTML = parser.parseFromString(text, "text/html");
const bottomNav = bottomNavHTML.getElementById("bottomnav");
const pathSpan = bottomNav.querySelector("span");
pathSpan.innerText = pathSpan.innerText.replace("%PATH%", document.location.pathname);
document.body.appendChild(bottomNav);
});

35
assets/js/icon.js Normal file
View File

@@ -0,0 +1,35 @@
const main = document.querySelector("main");
const icons = main.querySelectorAll("Icon");
icons.forEach((icon) => {
let iconImage = icon.getAttribute("image");
let link = icon.getAttribute("href");
let title = icon.getAttribute("title");
console.log(iconImage, link, title);
if (iconImage) {
let imageElement = document.createElement("img");
imageElement.src = iconImage;
imageElement.height = 64;
imageElement.width = 64;
icon.appendChild(imageElement);
}
if (link) {
icon.addEventListener('click', (e) => {
window.open(link, "_blank");
});
}
if (title) {
let titleElement = document.createElement("span");
titleElement.textContent = title;
icon.appendChild(titleElement);
}
});

View File

@@ -4,7 +4,10 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Im bad at naming things</title> <title>Im bad at naming things</title>
<link rel="stylesheet" href="assets/index.css"> <link rel="stylesheet" href="assets/css/global.css">
<link rel="stylesheet" href="assets/css/index.css">
<script src="assets/js/global.js" defer></script>
</head> </head>
<body> <body>
<main> <main>
@@ -13,10 +16,5 @@
Lucielle Lucielle
</div> </div>
</main> </main>
<ul id="bottomnav">
<li><a href="/">[/]</a></li>
<li><a href="#">[/projects]</a></li>
<li><a href="#">[/links]</a></li>
</ul>
</body> </body>
</html> </html>

24
links.html Normal file
View File

@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Links are pretty cool</title>
<link rel="stylesheet" href="assets/css/global.css">
<link rel="stylesheet" href="assets/css/icon.css">
<script src="assets/js/global.js" defer></script>
<script src="assets/js/icon.js" defer></script>
</head>
<body>
<main>
<Icon href="https://lunarware.tech" image="/favicon.ico" title="Website"></Icon>
<Icon href="https://git.lunarware.tech/lucielle" image="https://git.lunarware.tech/assets/img/favicon.png" title="Gitea"></Icon>
<Icon href="#" image="assets/images/discord.ico" title="Discord"></Icon>
<Icon href="https://www.tiktok.com/@lucielle.0x22" image="assets/images/tiktok.png" title="TikTok"></Icon>
<Icon href="https://cash.app/$LuciEll00" image="assets/images/cashapp.png" title="Cashapp"></Icon>
</main>
</body>
</html>

21
projects.html Normal file
View File

@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Projects 'n' stuff</title>
<link rel="stylesheet" href="assets/css/global.css">
<link rel="stylesheet" href="assets/css/icon.css">
<script src="assets/js/global.js" defer></script>
<script src="assets/js/icon.js" defer></script>
</head>
<body>
<main>
<Icon href="https://git.lunarware.tech/lucielle/website" image="/favicon.ico" title="Website"></Icon>
</main>
</body>
</html>