Compare commits

..

10 Commits

Author SHA1 Message Date
Pihkaal
1ee616ce7e chore: docker restart always
Some checks failed
Build and Push Docker Image / build (push) Failing after 12s
2025-03-16 20:41:57 +01:00
Pihkaal
988e1ac756 feat(ci/cd): push image to docker hub on push to main 2024-10-25 01:06:25 +02:00
Pihkaal
3586df5b7a fix(docker): wrong port 2024-10-08 23:05:10 +02:00
Pihkaal
82dd742b7f feat(manifest): only provide icon name 2024-10-08 23:03:41 +02:00
Pihkaal
e231e1a984 feat(docker): traefik in docker-compose 2024-10-08 21:31:26 +02:00
Pihkaal
31ffd809b4 feat(nvim-tree): open README.md on startup 2024-09-18 10:05:55 +02:00
Pihkaal
276b490e37 feat: smaller outer padding on small devices 2024-09-13 20:00:45 +02:00
Pihkaal
f3b1a9da55 feat(icons): add codingame and linkedin icons 2024-09-13 19:14:11 +02:00
Pihkaal
31fb9c1a91 feat(cava): change music 2024-09-13 18:45:57 +02:00
Pihkaal
225f4e65c0 fix(spotify-player): crop text when it's too long for a simple row 2024-09-13 18:30:00 +02:00
12 changed files with 81 additions and 14 deletions

28
.github/workflows/docker-build.yml vendored Normal file
View File

@@ -0,0 +1,28 @@
name: Build and Push Docker Image
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Docker image
run: |
docker build -t pihkaal/me:latest --build-arg GH_PAT=${{ secrets.GH_PAT }} .
docker push pihkaal/me:latest

View File

@@ -1,7 +1,11 @@
FROM node:20-slim AS base FROM node:20-slim AS base
ARG GH_PAT
ENV PNPM_HOME="/pnpm" ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH" ENV PATH="$PNPM_HOME:$PATH"
ENV GH_PAT="$GH_PAT"
RUN corepack enable RUN corepack enable
COPY . /app COPY . /app

View File

@@ -1,5 +0,0 @@
services:
app:
build: .
ports:
- "3001:80"

17
docker-compose.yml Normal file
View File

@@ -0,0 +1,17 @@
services:
pihkaal-me:
image: pihkaal/me:latest
networks:
- web
labels:
- "traefik.enable=true"
- "traefik.http.routers.pihkaal-me.rule=Host(`pihkaal.me`)"
- "traefik.http.routers.pihkaal-me.service=pihkaal-me"
- "traefik.http.services.pihkaal-me.loadbalancer.server.port=80"
- "traefik.http.routers.pihkaal-me.tls=true"
- "traefik.http.routers.pihkaal-me.tls.certResolver=myresolver"
restart: always
networks:
web:
external: true

Binary file not shown.

BIN
public/audio/music.mp3 Normal file

Binary file not shown.

View File

@@ -33,12 +33,12 @@ const AppRoot = () => {
<Sddm /> <Sddm />
) : ( ) : (
<div className="h-full flex-col"> <div className="h-full flex-col">
<div className="relative z-10 px-2 py-2"> <div className="relative z-10 p-1 md:p-2">
<Waybar /> <Waybar />
</div> </div>
<div className="relative flex h-[calc(100%-50px)] w-full flex-col"> <div className="relative flex h-[calc(100svh-39px)] w-full flex-col md:h-[calc(100svh-50px)]">
<Kitty className="w-full flex-1 pb-1 pl-2 pr-2 pt-1"> <Kitty className="w-full flex-1 px-1 pt-1 md:px-2 md:pb-1">
<Nvim /> <Nvim />
</Kitty> </Kitty>

View File

@@ -107,7 +107,7 @@ const InnerCava = (props: InnerKittyProps<typeof Cava>) => {
const audioContext = new AudioContext(); const audioContext = new AudioContext();
audioContextRef.current = audioContext; audioContextRef.current = audioContext;
const response = await fetch("/audio/mesmerizing_galaxy.mp3"); const response = await fetch("/audio/music.mp3");
const arrayBuffer = await response.arrayBuffer(); const arrayBuffer = await response.arrayBuffer();
const audioBuffer = await audioContext.decodeAudioData(arrayBuffer); const audioBuffer = await audioContext.decodeAudioData(arrayBuffer);

View File

@@ -91,6 +91,18 @@ const InnerSpotifyPlayer = (props: InnerKittyProps<typeof SpotifyPlayer>) => {
.write(timeStringLeft - fillSize, timeString) .write(timeStringLeft - fillSize, timeString)
.toString(); .toString();
let titleAndArtist = `${
props.playing.item.name
} · ${props.playing.item.artists.map((a) => a.name).join(", ")}`;
if (titleAndArtist.length > props.cols - 4) {
titleAndArtist = titleAndArtist.slice(0, props.cols - 7) + "...";
}
let album = props.playing.item.album.name;
if (album.length > props.cols - 2) {
album = album.slice(0, props.cols - 5) + "...";
}
return ( return (
<> <>
{/* title */} {/* title */}
@@ -131,11 +143,10 @@ const InnerSpotifyPlayer = (props: InnerKittyProps<typeof SpotifyPlayer>) => {
<span className="font-normal"> <span className="font-normal">
{false ? "\udb81\udc0a " : "\udb80\udfe4 "} {false ? "\udb81\udc0a " : "\udb80\udfe4 "}
</span> </span>
{props.playing.item.name} ·{" "} {titleAndArtist}
{props.playing.item.artists.map((a) => a.name).join(", ")}
</span> </span>
<br /> <br />
<span className="text-color3">{props.playing.item.album.name}</span> <span className="text-color3">{album}</span>
<br /> <br />
<div className="relative font-extrabold"> <div className="relative font-extrabold">
<span className="bg-color2 text-color8">{fill}</span> <span className="bg-color2 text-color8">{fill}</span>

View File

@@ -67,7 +67,7 @@ export const Music = () => {
<div className="flex flex-row pb-1"> <div className="flex flex-row pb-1">
<Kitty <Kitty
className={cn( className={cn(
"h-full pb-2 pl-2 pr-1 pt-1", "h-full pb-1.5 pl-1 pr-1 pt-1 md:px-2",
screenWidth < 900 ? "w-full" : "w-1/2", screenWidth < 900 ? "w-full" : "w-1/2",
)} )}
rows={5} rows={5}

View File

@@ -95,6 +95,10 @@ export const NvimTree = (
} }
useEffect(() => { useEffect(() => {
const readme = files.find((file) => file.name === "README.md") as Child;
props.onOpen(readme);
setSelectedY(files.indexOf(readme));
const onScroll = (event: KeyboardEvent) => { const onScroll = (event: KeyboardEvent) => {
if (activeKitty !== props.id) return; if (activeKitty !== props.id) return;
switch (event.key) { switch (event.key) {
@@ -122,7 +126,7 @@ export const NvimTree = (
return () => { return () => {
window.removeEventListener("keydown", onScroll); window.removeEventListener("keydown", onScroll);
}; };
}); }, []);
return ( return (
<div className="h-full select-none bg-[#0000001a]"> <div className="h-full select-none bg-[#0000001a]">

View File

@@ -48,6 +48,14 @@ export const ICONS: Record<string, Icon> = {
char: "󰊤 ", char: "󰊤 ",
color: "#ffffff", color: "#ffffff",
}, },
LinkedIn: {
char: " ",
color: "#0077b5",
},
CodinGame: {
char: " ",
color: "#f1c40f",
},
}; };
export const DEFAULT_ICON = { char: "󰈚 ", color: "#f599ae" }; export const DEFAULT_ICON = { char: "󰈚 ", color: "#f599ae" };