This repository has been archived by the owner on Aug 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
just about every kind of improvement
- Loading branch information
1 parent
79283cf
commit 44af160
Showing
25 changed files
with
262 additions
and
327 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
# EditorConfig is awesome: https://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
[*] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
import { defineConfig } from "astro/config"; | ||
import tailwind from "@astrojs/tailwind"; | ||
|
||
// https://astro.build/config | ||
export default defineConfig({ | ||
prefetch: true, | ||
integrations: [tailwind()] | ||
prefetch: true, | ||
integrations: [tailwind()], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
--- | ||
import { Config } from "../config"; | ||
interface Props { | ||
title?: string; | ||
description?: string; | ||
og_title?: string; | ||
og_description?: string; | ||
og_type?: string; | ||
og_image?: string; | ||
} | ||
const currentPath = Astro.url.pathname; | ||
--- | ||
|
||
<!doctype html> | ||
<html class="bg-base-100 text-base-content overflow-y-scroll" lang="en"> | ||
<body> | ||
<div class="mx-auto min-h-screen flex flex-col gap-9 px-10 py-8 md:gap-20 md:py-8"> | ||
<header class="flex w-full gap-3 md:gap-2 flex-row justify-between pb-5 md:pb-0"> | ||
<a href="/" class="text-sm md:text-xl lg:text-xl whitespace-nowrap mr-4 text-text">{Config.me.name}</a> | ||
<nav class="text-xs md:text-sm lg:text-sm custom-breadcrumbs text-text"> | ||
<ul> | ||
<li> | ||
<a class={currentPath === "/" ? "text-purple-500" : ""} href="/">Home</a> | ||
</li> | ||
<li> | ||
<a class={currentPath.startsWith("/posts") ? "text-purple-500" : ""} href="/posts">Posts</a> | ||
</li> | ||
<li> | ||
<a class={currentPath.startsWith("/pictures") ? "text-purple-500" : ""} href="/pictures">Pictures</a> | ||
</li> | ||
<li> | ||
<a class={currentPath.startsWith("/contact") ? "text-purple-500" : ""} href="/contact">Contact</a> | ||
</li> | ||
<li> | ||
<a class={currentPath.startsWith("/netflixdobetter") ? "text-purple-500" : ""} href="/netflixdobetter">Netflix, Do Better</a> | ||
</li> | ||
<li> | ||
<a class={currentPath.startsWith("/privacy") ? "text-purple-500" : ""} href="/privacy">Privacy</a> | ||
</li> | ||
</ul> | ||
</nav> | ||
</header> | ||
<div class="flex-grow"> | ||
<slot /> | ||
</div> | ||
</div> | ||
<style is:global> | ||
.custom-breadcrumbs { | ||
max-width: 100%; | ||
overflow-x: auto; | ||
padding-top: 0.5%; | ||
} | ||
|
||
.custom-breadcrumbs > ul { | ||
display: flex; | ||
align-items: center; | ||
white-space: nowrap; | ||
min-height: min-content; | ||
} | ||
|
||
.custom-breadcrumbs > ul > li { | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
.custom-breadcrumbs > ul > li > a { | ||
display: flex; | ||
cursor: pointer; | ||
align-items: center; | ||
} | ||
|
||
@media (hover: hover) { | ||
.custom-breadcrumbs > ul > li > a:hover { | ||
text-decoration-line: underline; | ||
} | ||
} | ||
|
||
.custom-breadcrumbs > ul > li > a:focus { | ||
outline: 2px solid transparent; | ||
outline-offset: 2px; | ||
} | ||
|
||
.custom-breadcrumbs > ul > li > a:focus-visible { | ||
outline: 2px solid currentColor; | ||
outline-offset: 2px; | ||
} | ||
|
||
.custom-breadcrumbs > ul > li + *:before { | ||
content: "/"; | ||
margin-left: 0.5rem /* 8px */; | ||
margin-right: 0.75rem /* 12px */; | ||
display: block; | ||
opacity: 0.4; | ||
background-color: transparent; | ||
} | ||
|
||
[dir="rtl"] .custom-breadcrumbs > ul > li + *:before { | ||
--tw-rotate: -180deg; | ||
} | ||
|
||
footer { | ||
font-family: monospace; | ||
} | ||
</style> | ||
</body> | ||
<footer class="bottom-0 text-left p-4 text-white text-sm ml-6" style="opacity:0.4; font-style: italic"> | ||
// Built with Astro, Tailwind CSS, and TypeScript by George Baskerville. | ||
Based on | ||
<a href="https://tahir.sh" target="_blank" rel="noopener noreferrer" class="hover:underline">a template</a> | ||
by | ||
<a href="https://tahir.sh" target="_blank" rel="noopener noreferrer" class="hover:underline">Tahir Murata</a>. | ||
<a href="https://github.com/georgebaskervil/Personal-Website" target="_blank" rel="noopener noreferrer" class="hover:underline">Source code available under MIT licence on GitHub</a>. | ||
</footer> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
import { getavatar } from '../getavatar'; | ||
const images = getavatar(); | ||
let avatar = images[0]; // get the first avatar | ||
--- | ||
|
||
<picture class="image-container overflow-hidden rounded-lg transition-transform duration-300 hover:scale-105" style="width: 35%; height: 35%; min-width: 125px;"> | ||
<source srcset={`/brand-assets/${avatar}.avif`} type="image/avif"> | ||
<source srcset={`/brand-assets/${avatar}.webp`} type="image/webp"> | ||
<img data-src={`/brand-assets/${avatar}.png`} alt="Avatar" class="lazy" /> | ||
</picture> | ||
|
||
<script> | ||
window.onload = () => { | ||
const observer = new IntersectionObserver((entries, observer) => { | ||
entries.forEach(entry => { | ||
if (entry.isIntersecting) { | ||
// Load image | ||
const img = entry.target as HTMLImageElement; | ||
if (img.dataset.src) { | ||
img.src = img.dataset.src; | ||
} | ||
|
||
// Stop observing | ||
observer.unobserve(entry.target); | ||
} | ||
}); | ||
}); | ||
|
||
document.querySelectorAll('img.lazy').forEach(img => { | ||
observer.observe(img); | ||
}); | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.