Skip to content
This repository has been archived by the owner on Aug 23, 2024. It is now read-only.

Commit

Permalink
just about every kind of improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
georgebaskervil committed May 17, 2024
1 parent 79283cf commit 44af160
Show file tree
Hide file tree
Showing 25 changed files with 262 additions and 327 deletions.
3 changes: 0 additions & 3 deletions .editorconfig
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

[*]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
URL is georgebaskerville.me.
Based on [this template](https://github.com/pastc/portfolio)

Code liscenced under MIT Liscence
Code liscenced under MIT Licence
Creative works liscenced under CC0 1.0 Universal
5 changes: 2 additions & 3 deletions astro.config.mts → astro.config.ts
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()],
});
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"@eslint/js": "^9.1.1",
"@tailwindcss/typography": "^0.5.13",
"@types/node": "^20.12.7",
"daisyui": "^4.10.3",
"globals": "^15.1.0",
"typescript-eslint": "^7.8.0",
"vite": "^5.2.10"
Expand Down
31 changes: 0 additions & 31 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file removed public/brand-assets/old/icon.avif
Binary file not shown.
Binary file removed public/brand-assets/old/icon.png
Binary file not shown.
Binary file removed public/brand-assets/old/icon.webp
Binary file not shown.
116 changes: 116 additions & 0 deletions src/components/Layout.astro
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>
23 changes: 5 additions & 18 deletions src/components/avatar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,8 @@ const images = getavatar();
let avatar = images[0]; // get the first avatar
---

<style>
.image-container {
overflow: hidden;
border-radius: 10px;
transition: transform 0.3s ease;
width: 35%;
height: 35%;
min-width: 125px;
}
.image-container:hover {
transform: scale(1.05);
}
</style>
<picture class="image-container">
<source srcset={`/brand-assets/${avatar}.avif`} type="image/avif">
<source srcset={`/brand-assets/${avatar}.webp`} type="image/webp">
<img src={`/brand-assets/${avatar}.png`} alt="Avatar" class="lazy" />
</picture>
<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 src={`/brand-assets/${avatar}.png`} alt="Avatar" class="lazy" />
</picture>
34 changes: 34 additions & 0 deletions src/components/image.astro
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>
2 changes: 1 addition & 1 deletion src/content/posts/im-boycotting-meta-heres-why.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ However, Meta seems to have somehow managed to convince me that they are worthy

However, this is not the real problem. The real problem lies in the fact that despite the extent of Meta's wrongoing being common knowledge, very few consequences have actually been brought against them. For example, the fines they have had to pay equal an inconsequential portion of their total revenue. Additionally, their userbase continues to grow at a phenomenal rate yearly.

This has lead me to think about why Meta hasn't suffered consequences, as one of the first and hardest hitting consequences a social media platform can face is loss of users.This is especially true for Meta because the primary reason for this is that the only appeal factor of Meta is the size of their userbase. Almost everyone has family members using Facebook or Instagram, but not everyone has family members using X or Reddit even though the content on these platforms is of similar or better quality than can be found on Meta's platforms.
This has lead me to think about why Meta hasn't suffered consequences, as one of the first and hardest hitting consequences a social media platform can face is loss of users. This is especially true for Meta because the primary reason for this is that the only appeal factor of Meta is the size of their userbase. Almost everyone has family members using Facebook or Instagram, but not everyone has family members using X or Reddit even though the content on these platforms is of similar or better quality than can be found on Meta's platforms.

This is the root of the problem: we as internet users haven't stepped up where we should have, and haven't brought down long-term consequences on the platforms that we know are doing more systemic wrong than many of the individuals cancelled in the last five or so years.

Expand Down
104 changes: 0 additions & 104 deletions src/layouts/Layout.astro

This file was deleted.

Loading

0 comments on commit 44af160

Please sign in to comment.