Compare commits
60 commits
Author | SHA1 | Date | |
---|---|---|---|
18dbba03a6 | |||
3da666aa02 | |||
27ad0ecea4 | |||
7308de8728 | |||
eadd6051e9 | |||
b14080ada4 | |||
3ffb88f513 | |||
87115e9d55 | |||
d0da5a206f | |||
387b400d78 | |||
28e774abf5 | |||
a3bbc098be | |||
401edbc6c4 | |||
85aed5bcc3 | |||
f35ade0784 | |||
27ab7903cf | |||
7b8e6424d9 | |||
1b98e4130f | |||
1804dc9704 | |||
0745dc8d81 | |||
f8e5846fa5 | |||
9f2dbdf27c | |||
b627cf1d4a | |||
30dbe25051 | |||
3b7af7907d | |||
e5abb037c9 | |||
1a734dbe6d | |||
bb66957eb8 | |||
24e0e9f29b | |||
bcca482355 | |||
97f82f6265 | |||
dd08df29df | |||
a00a1df43d | |||
e682a4ca4f | |||
6e83b55b0a | |||
d07163376a | |||
f5d7e719fb | |||
4325badbf9 | |||
fab7b8153b | |||
3f637dbab3 | |||
e0112466ce | |||
7e19be55b1 | |||
ef5bc8a670 | |||
4ecf1f1de6 | |||
88950724c9 | |||
1bc627e890 | |||
2ccdfe1550 | |||
e2b394a6eb | |||
309e066319 | |||
1b8431f234 | |||
b697c19342 | |||
f3c9b5b994 | |||
d6243574e6 | |||
fb13312485 | |||
968673e8cd | |||
6374398544 | |||
df92de60da | |||
ebaa9d5783 | |||
34ebf48f0b | |||
0aa9dffd75 |
28 changed files with 1046 additions and 497 deletions
|
@ -7,7 +7,8 @@ node_modules
|
|||
.env.*
|
||||
!.env.example
|
||||
|
||||
# Ignore files for PNPM, NPM and YARN
|
||||
# Ignore files for PNPM, NPM, YARN and BUN
|
||||
pnpm-lock.yaml
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
bun.lockb
|
||||
|
|
58
.forgejo/workflows/build.yml
Normal file
58
.forgejo/workflows/build.yml
Normal file
|
@ -0,0 +1,58 @@
|
|||
name: Build and push docker image
|
||||
|
||||
# start workflow every time a tag/release is created
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ghcr.io/catthehacker/ubuntu:act-latest
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
defaults:
|
||||
run:
|
||||
working-directory: /tmp
|
||||
|
||||
# build the docker container
|
||||
steps:
|
||||
- name: ✨ Installing just command runner
|
||||
run: |
|
||||
# download and extract just to /bin/just
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /bin
|
||||
just --help || echo "Error: 'just' wasn't found. Maybe the download failed?"
|
||||
|
||||
- name: ⬇️ Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: ⚙️ Update website debug info
|
||||
run: |
|
||||
export TAG=$(echo "${{ github.ref }}" | sed 's/refs\/tags\///')
|
||||
export SHA=$(echo "${{ github.sha }}")
|
||||
echo 'sed -i "s|\"commit\": \"unavailable\"|\"commit\": \"$SHA\"|" /workspace/sangelo/website/static/assets/debug.json'
|
||||
sed -i "s|\"commit\": \"unavailable\"|\"commit\": \"$SHA\"|" /workspace/sangelo/website/static/assets/debug.json || echo "Failed to plant debug info into debug.json. (commit hash)"
|
||||
echo 'sed -i "s|\"tag\": \"unavailable\"|\"tag\": \"$TAG\"|" /workspace/sangelo/website/static/assets/debug.json'
|
||||
sed -i "s|\"tag\": \"unavailable\"|\"tag\": \"$TAG\"|" /workspace/sangelo/website/static/assets/debug.json || echo "Failed to plant debug info into debug.json. (git tag)"
|
||||
echo "Successfully planted debug info into debug.json"
|
||||
|
||||
- name: 🐋 Build Container
|
||||
run: |
|
||||
# extract tag name without the prefix
|
||||
export TAG=$(echo "${{ github.ref }}" | sed 's/refs\/tags\///')
|
||||
# build the container
|
||||
just -f /workspace/sangelo/website/Justfile build "${TAG}"
|
||||
|
||||
- name: 🐳 Publish Container
|
||||
run: |
|
||||
export TAG=$(echo "${{ github.ref }}" | sed 's/refs\/tags\///')
|
||||
echo "${{ secrets.PUBLISH_TOKEN }}" | docker login gitpot.org -u sangelo --password-stdin
|
||||
docker push "gitpot.org/sangelo/website:${TAG}"
|
||||
|
||||
# publish tag latest as well
|
||||
if echo "${{ github.ref }}" | grep -q "refs/tags/"; then
|
||||
docker tag "gitpot.org/sangelo/website:${TAG}" "gitpot.org/sangelo/website:latest"
|
||||
docker push "gitpot.org/sangelo/website:latest"
|
||||
fi
|
|
@ -7,7 +7,8 @@ node_modules
|
|||
.env.*
|
||||
!.env.example
|
||||
|
||||
# Ignore files for PNPM, NPM and YARN
|
||||
# Ignore files for PNPM, NPM, YARN and BUN
|
||||
pnpm-lock.yaml
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
bun.lockb
|
||||
|
|
26
Caddyfile
Normal file
26
Caddyfile
Normal file
|
@ -0,0 +1,26 @@
|
|||
:80 {
|
||||
root * /app
|
||||
try_files {path}.html {path}
|
||||
file_server
|
||||
handle_errors {
|
||||
# handle 4xx errors
|
||||
@4xx expression `{err.status_code} >= 400 && {err.status_code} < 500`
|
||||
handle @4xx {
|
||||
rewrite * /internal/error/400.html
|
||||
templates
|
||||
file_server
|
||||
}
|
||||
|
||||
# handle 5xx errors
|
||||
@5xx expression `{err.status_code} >= 500 && {err.status_code} < 600`
|
||||
handle @5xx {
|
||||
rewrite * /internal/error/500.html
|
||||
templates
|
||||
file_server
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:8080 {
|
||||
respond /health "OK" 200
|
||||
}
|
47
Dockerfile
Normal file
47
Dockerfile
Normal file
|
@ -0,0 +1,47 @@
|
|||
# Builder stage
|
||||
FROM node:20-alpine AS builder
|
||||
|
||||
# Set the working directory in the container
|
||||
WORKDIR /git
|
||||
|
||||
# Copy the repository contents into the container
|
||||
COPY . .
|
||||
|
||||
# Install dependencies and build the site. Output directory will be /git/build
|
||||
RUN yarn install && yarn run build
|
||||
|
||||
# Final stage
|
||||
FROM caddy:2-alpine
|
||||
|
||||
# Set the working directory in the container
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the build directory from the builder stage to /app
|
||||
COPY --from=builder /git/build /app
|
||||
|
||||
# Create a dedicated user 'web' and change ownership of /app to 'web'
|
||||
RUN addgroup -S web && adduser -S web -G web && chown -R web:web /app
|
||||
|
||||
# Caddyfile configuration to serve files from /app
|
||||
COPY --from=builder /git/Caddyfile /etc/caddy/Caddyfile
|
||||
|
||||
# Expose port 80
|
||||
EXPOSE 80
|
||||
|
||||
# Switch to the 'web' user
|
||||
USER web
|
||||
|
||||
# Start Caddy with the specified Caddyfile as the 'web' user
|
||||
CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile"]
|
||||
|
||||
# Docker Container Labels
|
||||
LABEL org.opencontainers.image.title="Sangelo's Space"
|
||||
LABEL org.opencontainers.image.description="Sangelo's Space website, packaged as a docker container, with the Caddy webserver."
|
||||
LABEL org.opencontainers.image.url="https://sangelo.space"
|
||||
LABEL org.opencontainers.image.documentation="https://gitpot.org/sangelo/website"
|
||||
LABEL org.opencontainers.image.vendor="Sangelo"
|
||||
LABEL org.opencontainers.image.licenses="GPL-v3"
|
||||
LABEL org.opencontainers.image.source="https://gitpot.org/sangelo/website"
|
||||
|
||||
# Remove intermediate images after build
|
||||
ONBUILD RUN rm -rf /git
|
89
Justfile
Normal file
89
Justfile
Normal file
|
@ -0,0 +1,89 @@
|
|||
# settings
|
||||
set dotenv-load
|
||||
|
||||
# defaults
|
||||
default_runner := 'docker'
|
||||
default_tag := 'latest'
|
||||
default_image := 'gitpot.org/sangelo/website:latest'
|
||||
|
||||
# run development server by default
|
||||
default: dev
|
||||
|
||||
# aliases
|
||||
alias c := clean
|
||||
alias b := build
|
||||
alias r := run
|
||||
alias d := dev
|
||||
alias p := preview
|
||||
|
||||
# building
|
||||
|
||||
# run all docker related recipes (clean, build, run) (default runner: docker)
|
||||
all tag=default_tag runner=default_runner:
|
||||
just -f {{justfile()}} clean {{runner}} {{tag}}
|
||||
just -f {{justfile()}} build {{tag}} {{runner}}
|
||||
just -f {{justfile()}} run {{tag}} {{runner}}
|
||||
|
||||
# clean containers, images and temporary svelte dirs with specified runner (default runner: docker)
|
||||
clean runner=default_runner tag=default_tag:
|
||||
@echo "Cleaning dev environment..."
|
||||
rm -rf build/ .svelte-kit/
|
||||
@echo "Cleaning containers with '{{runner}}'..."
|
||||
TAG="{{tag}}" {{runner}} compose -f docker-compose.build.yml down
|
||||
@echo "Cleaning images with '{{runner}}'..."
|
||||
just -f {{justfile()}} _clean_images {{runner}}
|
||||
|
||||
# clean images function
|
||||
_clean_images runner=default_runner:
|
||||
#!/usr/bin/env bash
|
||||
set -o pipefail
|
||||
image_ids=$({{runner}} image ls | grep gitpot.org/sangelo/website | awk '{print $3}')
|
||||
if [ -n "$image_ids" ]; then
|
||||
for image_id in $image_ids; do
|
||||
{{runner}} image rm $image_id
|
||||
echo "Image with ID $image_id deleted successfully."
|
||||
done
|
||||
else
|
||||
echo "No images matching the repository and tag found."
|
||||
fi
|
||||
|
||||
# build container image with specified runner (default runner: docker)
|
||||
build tag=default_tag runner=default_runner:
|
||||
@echo "Running with '{{runner}}' and tagging as '{{tag}}'..."
|
||||
TAG="{{tag}}" {{runner}} compose -f docker-compose.build.yml build --no-cache
|
||||
|
||||
# run container image with specified runner (default runner: docker)
|
||||
run tag=default_tag runner=default_runner:
|
||||
@echo "Running with '{{runner}}'..."
|
||||
TAG={{tag}} {{runner}} compose -f docker-compose.build.yml up -d --force-recreate
|
||||
@# watch -n 1 {{runner}} compose -f docker-compose.build.yml ps
|
||||
|
||||
publish image=default_image runner=default_runner:
|
||||
@echo "Publishing with '{{runner}}'..."
|
||||
@# log into gitpot
|
||||
echo "$GITPOT_TOKEN" | {{runner}} login gitpot.org -u $GITPOT_USERNAME --password-stdin
|
||||
@# push the specified image to the container registry
|
||||
{{runner}} push {{image}}
|
||||
@echo "Published {{image}} successfuly! Use '{{runner}} pull {{image}}' to pull the container."
|
||||
|
||||
# development
|
||||
|
||||
# install dependencies
|
||||
_install:
|
||||
yarn install
|
||||
|
||||
# run vite dev server
|
||||
dev: _install
|
||||
@echo "Running vite development server..."
|
||||
yarn run dev --open
|
||||
|
||||
# run vite preview server
|
||||
preview: _install
|
||||
@echo "Running vite preview server..."
|
||||
yarn run build
|
||||
yarn run preview --open
|
||||
|
||||
# upgrade dependencies for the project interactively with yarn
|
||||
upgrade-interactive: _install
|
||||
@echo "Interactively upgrading packages..."
|
||||
yarn upgrade-interactive --latest
|
54
README.md
54
README.md
|
@ -1,3 +1,5 @@
|
|||
<div align="center"> <img src="https://gitpot.org/sangelo/website/raw/branch/main/static/assets/img/sangelos-space-readme.png"/ width=11%> </div>
|
||||
|
||||
# Sangelo's Space
|
||||
|
||||
This is the source-code for my website, written in Svelte & SCSS.<br>
|
||||
|
@ -5,9 +7,23 @@ Feel free to explore!
|
|||
|
||||
## Contributing
|
||||
|
||||
You're welcome to contribute to this website if you have a Lunivity account (see homepage for details if registrations aren't open).<br>
|
||||
You're welcome to contribute to this website if you have a Lunivity account (see Gitpot's homepage for details if registrations aren't open).<br>
|
||||
Once you fork and clone the repository, follow the next steps.
|
||||
|
||||
If you have [`just`](https://github.com/casey/just/) installed, setting up is pretty easy:
|
||||
|
||||
```bash
|
||||
# setup dependencies and run dev server
|
||||
just
|
||||
|
||||
# you can also run `just dev`
|
||||
just dev
|
||||
```
|
||||
|
||||
View a list of all possible `just` recipes with `just -l`.
|
||||
|
||||
Otherwise, if you don't already have or don't want to install `just`, you can run the commands manually:
|
||||
|
||||
```bash
|
||||
# install dependencies
|
||||
yarn install
|
||||
|
@ -23,14 +39,44 @@ Once you've made your changes, you can create a Pull Request and I'll make sure
|
|||
|
||||
## Building
|
||||
|
||||
To create a production version of this website:
|
||||
### Build locally
|
||||
|
||||
To create a production version of this website without docker:
|
||||
|
||||
```bash
|
||||
# automatically build & preview
|
||||
just preview
|
||||
|
||||
# or, manually build
|
||||
yarn run build
|
||||
```
|
||||
|
||||
You can preview the production build with `yarn run preview`.
|
||||
You can then preview the production build locally with `yarn run preview --open`.
|
||||
|
||||
The files will be available in the repo, in the `build/` directory.
|
||||
|
||||
### Build with Docker
|
||||
|
||||
To build a docker container image with `just`:
|
||||
|
||||
```bash
|
||||
# build and run container image with docker, tag: latest
|
||||
just build
|
||||
|
||||
# build with podman
|
||||
just build <tag> podman
|
||||
|
||||
# clean, build, and run container image with docker, tag: latest
|
||||
just all
|
||||
# clean, build, and run container image with podman, tag: dev
|
||||
just all dev podman
|
||||
```
|
||||
|
||||
You can preview the produced docker build with `just run [tag] [runner]`.
|
||||
|
||||
## License
|
||||
|
||||
You can view this project's license [here](./LICENSE).
|
||||
You can view this project's source code license [here](./LICENSE).
|
||||
|
||||
All assets (images, logos, etc.) created by me (Sangelo) are Copyright (c) 2019-2024 Sangelo unless otherwise stated.<br>
|
||||
Brand logos and icons (such as Discord, Github, YouTube, etc.) are trademarked by and copyright of their respective owners.
|
||||
|
|
11
docker-compose.build.yml
Normal file
11
docker-compose.build.yml
Normal file
|
@ -0,0 +1,11 @@
|
|||
services:
|
||||
web:
|
||||
image: gitpot.org/sangelo/website:${TAG}
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
no_cache: true
|
||||
ports:
|
||||
- "3000:80"
|
||||
- "3080:8080"
|
||||
|
14
docker-compose.yml
Normal file
14
docker-compose.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
services:
|
||||
watchtower:
|
||||
image: containrrr/watchtower
|
||||
container_name: watchtower
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
|
||||
website:
|
||||
image: gitpot.org/sangelo/website:latest
|
||||
container_name: website
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "3000:80"
|
31
package.json
31
package.json
|
@ -12,22 +12,23 @@
|
|||
"format": "prettier --plugin-search-dir . --write ."
|
||||
},
|
||||
"devDependencies": {
|
||||
"@sveltejs/adapter-auto": "^2.0.0",
|
||||
"@sveltejs/adapter-static": "^2.0.3",
|
||||
"@sveltejs/kit": "^1.20.4",
|
||||
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
||||
"@typescript-eslint/parser": "^6.0.0",
|
||||
"eslint": "^8.28.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-plugin-svelte": "^2.30.0",
|
||||
"prettier": "^2.8.0",
|
||||
"prettier-plugin-svelte": "^2.10.1",
|
||||
"sass": "^1.63.6",
|
||||
"svelte": "^4.0.5",
|
||||
"svelte-check": "^3.4.3",
|
||||
"@sveltejs/adapter-auto": "^3.2.0",
|
||||
"@sveltejs/adapter-static": "^3.0.1",
|
||||
"@sveltejs/kit": "^2.5.5",
|
||||
"@sveltejs/vite-plugin-svelte": "^3.1.0",
|
||||
"@typescript-eslint/eslint-plugin": "^7.6.0",
|
||||
"@typescript-eslint/parser": "^7.6.0",
|
||||
"eslint": "^9.0.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-svelte": "^2.37.0",
|
||||
"prettier": "^3.2.5",
|
||||
"prettier-plugin-svelte": "^3.2.2",
|
||||
"sass": "^1.75.0",
|
||||
"svelte": "^4.2.13",
|
||||
"svelte-check": "^3.6.9",
|
||||
"tslib": "^2.4.1",
|
||||
"typescript": "^5.0.0",
|
||||
"vite": "^4.4.2"
|
||||
"typescript": "^5.4.5",
|
||||
"vite": "^5.2.8"
|
||||
},
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
<link rel="icon" href="%sveltekit.assets%/favicon.ico" />
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
|
||||
<link href="https://chaos.social/@sangelo" rel="me" />
|
||||
<script
|
||||
type="module"
|
||||
src="https://cdn.jsdelivr.net/gh/zerodevx/zero-md@2/dist/zero-md.min.js"
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
<script lang='ts'>
|
||||
import IconChevronDown from 'svelte-material-icons/ChevronDown.svelte';
|
||||
import { smoothScrollTo, handleKeydown } from '$lib/index';
|
||||
import { smoothScrollTo, handleKeydown, helloWorld } from '$lib/index';
|
||||
import { onMount } from 'svelte';
|
||||
|
||||
onMount(() => {
|
||||
helloWorld("ascii", "hi there, curious one. have fun exploring! :D")
|
||||
});
|
||||
</script>
|
||||
|
||||
<div id="home" class="section">
|
||||
|
@ -19,7 +24,7 @@
|
|||
style="mask-type: alpha"
|
||||
maskUnits="userSpaceOnUse"
|
||||
x="27"
|
||||
y="0"
|
||||
y="0"t
|
||||
width="90"
|
||||
height="145"
|
||||
>
|
||||
|
@ -56,4 +61,4 @@
|
|||
<style lang="scss">
|
||||
@import '$styles/index.scss';
|
||||
@import '$styles/home.scss';
|
||||
</style>
|
||||
</style>
|
||||
|
|
|
@ -15,8 +15,12 @@
|
|||
import IconMastodon from 'svelte-material-icons/Mastodon.svelte';
|
||||
import IconSteam from 'svelte-material-icons/Steam.svelte';
|
||||
|
||||
// Variables
|
||||
let showMore = false;
|
||||
let emoji = '';
|
||||
let commitHash = '';
|
||||
let gitTag = '';
|
||||
let showDebugInfo = false;
|
||||
|
||||
export function changeEmoji() {
|
||||
emoji = emojis[Math.floor(Math.random() * emojis.length)];
|
||||
|
@ -33,9 +37,25 @@
|
|||
}
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
onMount(async () => {
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
showDebugInfo = urlParams.has('debug') && urlParams.get('debug') === 'true';
|
||||
|
||||
if (showDebugInfo) {
|
||||
try {
|
||||
const response = await fetch('/assets/debug.json');
|
||||
const jsonData = await response.json();
|
||||
|
||||
commitHash = jsonData.commit;
|
||||
gitTag = jsonData.tag;
|
||||
} catch (error) {
|
||||
console.error('Error loading data:', error);
|
||||
// Display an error message or loading state
|
||||
}
|
||||
}
|
||||
|
||||
changeEmoji();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<div id="socials" class="section">
|
||||
|
@ -45,7 +65,7 @@
|
|||
<a
|
||||
href="https://discord.com/users/373525255102136341"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
rel="noopener noreferrer me"
|
||||
tabindex="0"
|
||||
class="round-button button discord"
|
||||
aria-label="Discord"
|
||||
|
@ -58,7 +78,7 @@
|
|||
<a
|
||||
href="https://youtube.com/@Sangeloo"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
rel="noopener noreferrer me"
|
||||
tabindex="0"
|
||||
class="round-button button youtube"
|
||||
aria-label="YouTube"
|
||||
|
@ -71,7 +91,7 @@
|
|||
<a
|
||||
href="https://github.com/SangeloDev"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
rel="noopener noreferrer me"
|
||||
tabindex="0"
|
||||
class="round-button button github"
|
||||
aria-label="GitHub"
|
||||
|
@ -84,7 +104,7 @@
|
|||
<a
|
||||
href="mailto:contact@sangelo.space"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
rel="noopener noreferrer me"
|
||||
tabindex="0"
|
||||
class="round-button button email"
|
||||
aria-label="Email"
|
||||
|
@ -99,22 +119,22 @@
|
|||
<div class="button-container below" transition:slide>
|
||||
<div class="tooltip">
|
||||
<a
|
||||
href="https://steamcommunity.com/id/sangeloo"
|
||||
href="https://steamcommunity.com/id/Sangelo"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
rel="noopener noreferrer me"
|
||||
tabindex="0"
|
||||
class="round-button button steam"
|
||||
aria-label="Steam"
|
||||
>
|
||||
<IconSteam class="icon" size="2.5em" />
|
||||
</a>
|
||||
<span class="tooltiptext">@sangeloo</span>
|
||||
<span class="tooltiptext">@Sangelo</span>
|
||||
</div>
|
||||
<div class="tooltip">
|
||||
<a
|
||||
href="https://matrix.to/#/@sangelo:stardust.foo"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
rel="noopener noreferrer me"
|
||||
tabindex="0"
|
||||
class="round-button button matrix"
|
||||
aria-label="Matrix"
|
||||
|
@ -125,9 +145,9 @@
|
|||
</div>
|
||||
<div class="tooltip">
|
||||
<a
|
||||
href="https://gitpot.dev/Sangelo"
|
||||
href="https://gitpot.org/sangelo"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
rel="noopener noreferrer me"
|
||||
tabindex="0"
|
||||
class="round-button button gitpot"
|
||||
aria-label="Gitpot"
|
||||
|
@ -195,16 +215,16 @@
|
|||
</div>
|
||||
<div class="tooltip">
|
||||
<a
|
||||
href="https://mas.to/@sangelo"
|
||||
href="https://chaos.social/@sangelo"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
rel="noopener noreferrer me"
|
||||
tabindex="0"
|
||||
class="round-button button mastodon"
|
||||
aria-label="Mastodon"
|
||||
>
|
||||
<IconMastodon class="icon" size="2.5em" />
|
||||
</a>
|
||||
<span class="tooltiptext">@sangelo@mas.to</span>
|
||||
<span class="tooltiptext">@sangelo@chaos.social</span>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
@ -266,6 +286,16 @@
|
|||
<span class="dynamic-icon" on:click={() => openWebsite('/old')}
|
||||
>{@html emoji}</span
|
||||
> by Sangelo.
|
||||
{#if showDebugInfo}
|
||||
<div class="debug-ct">
|
||||
<div class="debug-info">
|
||||
Commit: <pre>{commitHash}</pre>
|
||||
</div>
|
||||
<div class="debug-info">
|
||||
<p>Git Tag: </p><pre>{gitTag}</pre>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</p>
|
||||
</footer>
|
||||
</div>
|
||||
|
|
|
@ -26,3 +26,32 @@ export function handleKeydown(event: KeyboardEvent) {
|
|||
export function openWebsite(url: string) {
|
||||
goto(url);
|
||||
}
|
||||
|
||||
export function helloWorld(type: string, msg: string) {
|
||||
if (type == "ascii") {
|
||||
console.log(`
|
||||
:=*#%%#=
|
||||
-+#@@@@@@@@@.
|
||||
.=#@@@@@@@@@@@@+
|
||||
=%@@@@@@@@@@@@%+.
|
||||
+@@@@@@@@@@@%=:
|
||||
+@@@@@@@@@@@%=.
|
||||
=#@@@@@@@@@@@@#+:
|
||||
.-*%@@@@@@@@@@@%*:
|
||||
.-%@@@@@@@@@@@#.
|
||||
:*@@@@@@@@@@@@=
|
||||
-*%@@@@@@@@@@@@%+
|
||||
=#@@@@@@@@@@@@@#+:
|
||||
+@@@@@@@@@@@@%+-
|
||||
=@@@@@@@@@@%=.
|
||||
.#@@@@@@@@*
|
||||
=%@@@@@%
|
||||
:@@@@@#
|
||||
%@@@@:
|
||||
.*%#-
|
||||
|
||||
`)
|
||||
}
|
||||
|
||||
console.log(msg)
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<script>
|
||||
import IconOpenInNew from 'svelte-material-icons/OpenInNew.svelte';
|
||||
let projectLogo = "assets/logos/dashinit.svg";
|
||||
let projectReadme = "https://gitpot.dev/dashinit/cli/raw/branch/main/README.md";
|
||||
let projectSite = "https://gitpot.dev/dashinit/cli";
|
||||
let projectReadme = "https://gitpot.org/dashinit/cli/raw/branch/main/README.md";
|
||||
let projectSite = "https://gitpot.org/dashinit/cli";
|
||||
</script>
|
||||
|
||||
<content>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script>
|
||||
import IconOpenInNew from 'svelte-material-icons/OpenInNew.svelte';
|
||||
let projectLogo = "assets/logos/explorecraft.svg";
|
||||
let projectReadme = "https://gitpot.dev/ExploreCraft/website/raw/branch/main/README.md";
|
||||
let projectReadme = "https://gitpot.org/ExploreCraft/website/raw/branch/main/README.md";
|
||||
let projectSite = "https://explorecraft.net";
|
||||
</script>
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<script>
|
||||
import IconOpenInNew from 'svelte-material-icons/OpenInNew.svelte';
|
||||
let projectLogo = "assets/logos/gitpot-color.svg";
|
||||
let projectReadme = "https://gitpot.dev/gitpot/.profile/raw/branch/main/README.md";
|
||||
let projectSite = "https://gitpot.dev"
|
||||
let projectReadme = "https://gitpot.org/gitpot/.profile/raw/branch/main/README.md";
|
||||
let projectSite = "https://gitpot.org"
|
||||
</script>
|
||||
|
||||
<content>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script>
|
||||
import IconOpenInNew from 'svelte-material-icons/OpenInNew.svelte';
|
||||
let projectLogo = "assets/logos/lunivity.svg";
|
||||
let projectReadme = "https://gitpot.dev/lunivity/.profile/raw/branch/main/README.md";
|
||||
let projectReadme = "https://gitpot.org/lunivity/.profile/raw/branch/main/README.md";
|
||||
let projectSite = "https://lunivity.com"
|
||||
</script>
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<h1 class="modal-title no-select">All Projects</h1>
|
||||
<p class="modal-title">These are all of my projects, including the ones that didn't fit in the homepage. Take a look!</p>
|
||||
<ul class="item-list">
|
||||
<a class="item" href="https://gitpot.dev/sangelo/website" rel="noopener noreferrer" target="_blank" tabindex="0">
|
||||
<a class="item" href="https://gitpot.org/sangelo/website" rel="noopener noreferrer" target="_blank" tabindex="0">
|
||||
<div class="thumbnail"><img src="assets/logos/sangelos-space-website.svg" alt="Sangelo's Logo" /></div>
|
||||
<div class="item-details">
|
||||
<h2>Sangelo's Space</h2>
|
||||
|
@ -31,14 +31,14 @@
|
|||
<p class="item-description">Open-source by nature, self-hosted by choice. Self-hosted cloud services.</p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="item" href="https://gitpot.dev" rel="noopener noreferrer" target="_blank" tabindex="0">
|
||||
<a class="item" href="https://gitpot.org" rel="noopener noreferrer" target="_blank" tabindex="0">
|
||||
<div class="thumbnail"><img src="assets/logos/gitpot-color.svg" alt="Gitpot Logo" /></div>
|
||||
<div class="item-details">
|
||||
<h2>Gitpot</h2>
|
||||
<p class="item-description">Code so sweet, bugs can't compete! A Forgejo-powered git forge which is part of the Lunivity Circle.</p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="item" href="https://gitpot.dev/dashinit/cli" rel="noopener noreferrer" target="_blank" tabindex="0">
|
||||
<a class="item" href="https://gitpot.org/dashinit/cli" rel="noopener noreferrer" target="_blank" tabindex="0">
|
||||
<div class="thumbnail"><img src="assets/logos/dashinit.svg" alt="dashinit Logo" /></div>
|
||||
<div class="item-details">
|
||||
<h2>dashinit</h2>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script>
|
||||
import IconOpenInNew from 'svelte-material-icons/OpenInNew.svelte';
|
||||
let projectLogo = "assets/logos/sangefault.svg";
|
||||
let projectReadme = "https://gitpot.dev/sangelo/SangeFault/raw/branch/1.8.9/README.md";
|
||||
let projectReadme = "https://gitpot.org/sangelo/SangeFault/raw/branch/1.8.9/README.md";
|
||||
let projectSite = "https://github.com/SangeloDev/SangeFault";
|
||||
</script>
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<script>
|
||||
import IconOpenInNew from 'svelte-material-icons/OpenInNew.svelte';
|
||||
let projectLogo = "assets/logos/sangelos-space-website.svg";
|
||||
let projectReadme = "https://gitpot.dev/sangelo/website/raw/branch/main/README.md";
|
||||
let projectSite = "https://gitpot.dev/sangelo/website";
|
||||
let projectReadme = "https://gitpot.org/sangelo/website/raw/branch/main/README.md";
|
||||
let projectSite = "https://gitpot.org/sangelo/website";
|
||||
</script>
|
||||
|
||||
<content>
|
||||
|
|
|
@ -178,6 +178,29 @@
|
|||
font-weight: 800;
|
||||
margin-bottom: -0.7em;
|
||||
}
|
||||
|
||||
.debug-ct {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
gap: 0;
|
||||
margin: 1em 0 1em 0;
|
||||
}
|
||||
|
||||
.debug-info {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
gap: 0.5em;
|
||||
|
||||
p, pre {
|
||||
margin: 0;
|
||||
text-wrap: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@import './mobile/socials.scss';
|
||||
|
|
5
static/assets/debug.json
Normal file
5
static/assets/debug.json
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"__comment__": "Do not edit file directly, this will be populated by the build script.",
|
||||
"commit": "unavailable",
|
||||
"tag": "unavailable"
|
||||
}
|
BIN
static/assets/img/sangelos-space-readme.png
Normal file
BIN
static/assets/img/sangelos-space-readme.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 76 KiB |
File diff suppressed because one or more lines are too long
|
@ -1,10 +1,14 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<!--
|
||||
(c) Sangelo
|
||||
(c) Sangelo 2024
|
||||
v1.0.2
|
||||
----------------
|
||||
Simple countdown webpage that can be used as a startpage
|
||||
You can feed the date the counter should be counting down to in the URL like this:
|
||||
http://<countdown>/?date=YYYY-MM-DDTHH:MM:SS
|
||||
or you can display the current time using ?time parameter like this:
|
||||
http://<countdown>/?time
|
||||
-->
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
|
@ -46,6 +50,7 @@
|
|||
|
||||
const countdownElement = document.getElementById("countdown");
|
||||
const countdownDate = getDateFromUrl();
|
||||
const showCurrentTime = getTimeFromUrl();
|
||||
|
||||
function updateCountdown() {
|
||||
const now = new Date().getTime();
|
||||
|
@ -71,6 +76,16 @@
|
|||
requestAnimationFrame(updateCountdown);
|
||||
}
|
||||
|
||||
function updateTime() {
|
||||
const now = new Date();
|
||||
const hours = formatWithLeadingZeros(now.getHours(), 2);
|
||||
const minutes = formatWithLeadingZeros(now.getMinutes(), 2);
|
||||
const seconds = formatWithLeadingZeros(now.getSeconds(), 2);
|
||||
|
||||
countdownElement.innerHTML = `${hours}:${minutes}:${seconds}`;
|
||||
requestAnimationFrame(updateTime);
|
||||
}
|
||||
|
||||
function getDateFromUrl() {
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
const dateParam = urlParams.get('date');
|
||||
|
@ -83,8 +98,16 @@
|
|||
return new Date("1970-01-01T00:00:00").getTime();
|
||||
}
|
||||
|
||||
requestAnimationFrame(updateCountdown);
|
||||
function getTimeFromUrl() {
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
return urlParams.has('time');
|
||||
}
|
||||
|
||||
if (showCurrentTime) {
|
||||
requestAnimationFrame(updateTime);
|
||||
} else {
|
||||
requestAnimationFrame(updateCountdown);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import adapter from '@sveltejs/adapter-static';
|
||||
import { vitePreprocess } from '@sveltejs/kit/vite';
|
||||
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
|
||||
|
||||
|
||||
/** @type {import('@sveltejs/kit').Config} */
|
||||
|
|
Loading…
Reference in a new issue