Compare commits

...

60 commits
0.0.1 ... main

Author SHA1 Message Date
18dbba03a6 Revert parts of "[c+a] better accessibility + HomeButton component"
All checks were successful
Build and push docker image / publish (push) Successful in 52s
This reverts commit 7308de8728.
Will revisit later.
2024-07-08 10:52:02 +02:00
3da666aa02 [a] countdown page additions 2024-07-08 10:45:36 +02:00
27ad0ecea4 [c] add bun to list of ignored files for prettier and eslint
All checks were successful
Build and push docker image / publish (push) Successful in 43s
2024-06-10 10:32:15 +02:00
7308de8728 [c+a] better accessibility + HomeButton component 2024-06-10 10:27:22 +02:00
eadd6051e9 [a] more verbose command feedback for update website debug info 2024-06-05 10:03:38 +02:00
b14080ada4 [c] add placeholder to debug.json
All checks were successful
Build and push docker image / publish (push) Successful in 49s
2024-06-05 09:59:06 +02:00
3ffb88f513 [c] fix weird text wrapping with debug mode
All checks were successful
Build and push docker image / publish (push) Successful in 57s
2024-06-05 09:10:15 +02:00
87115e9d55 [a] add echo msg output to task 2024-06-05 09:09:48 +02:00
d0da5a206f [c] add ⚙️ emoji to 'Update website debug info' 2024-06-03 21:11:39 +02:00
387b400d78 [c] fix build pipeline.. again x2...
All checks were successful
Build and push docker image / publish (push) Successful in 52s
2024-06-03 21:05:45 +02:00
28e774abf5 [c] fix build pipeline.. again...
Some checks failed
Build and push docker image / publish (push) Failing after 6s
2024-06-03 21:02:59 +02:00
a3bbc098be [e+c] fix build pipeline
Some checks failed
Build and push docker image / publish (push) Failing after 6s
2024-06-03 20:56:36 +02:00
401edbc6c4 [e] experimentally add debug information on website
Some checks failed
Build and push docker image / publish (push) Failing after 7s
2024-06-03 20:51:22 +02:00
85aed5bcc3 [a] easter egg in console
All checks were successful
Build and push docker image / publish (push) Successful in 48s
2024-06-02 22:37:39 +02:00
f35ade0784 [d] remove comment in dockerfile
All checks were successful
Build and push docker image / publish (push) Successful in 43s
2024-05-16 09:37:59 +02:00
27ab7903cf [c+a] fix #3 and make external caddyfile 2024-05-16 09:36:48 +02:00
7b8e6424d9 Merge branch 'main' of gitpot.org:sangelo/website 2024-05-16 09:12:44 +02:00
1b98e4130f [a] add mastodon link to header for verification
All checks were successful
Build and push docker image / publish (push) Successful in 44s
2024-05-16 06:50:31 +00:00
1804dc9704 Update src/lib/components/Socials.svelte
All checks were successful
Build and push docker image / publish (push) Successful in 44s
2024-05-16 06:48:15 +00:00
0745dc8d81 [c] update steam link
All checks were successful
Build and push docker image / publish (push) Successful in 42s
2024-05-16 06:46:07 +00:00
f8e5846fa5 [c] change from mas.to to chaos.social
All checks were successful
Build and push docker image / publish (push) Successful in 41s
2024-05-14 20:22:22 +02:00
9f2dbdf27c [c] hardening of Dockerfile (#4)
All checks were successful
Build and push docker image / publish (push) Successful in 49s
Reviewed-on: #4
2024-05-10 13:50:07 +00:00
b627cf1d4a [d] remove healthcheck script 2024-05-10 15:48:42 +02:00
30dbe25051 [a] add healthcheck endpoint to caddyfile config 2024-04-26 11:08:30 +02:00
3b7af7907d Initial work on hardening 2024-04-24 17:02:40 +02:00
e5abb037c9 [c] update dependencies 2024-04-19 08:16:06 +02:00
1a734dbe6d [c] update .forgejo/workflows/build.yml 2024-04-16 12:15:44 +00:00
bb66957eb8 [c] fix broken links & add comment to justfile
All checks were successful
Build and push docker image / deploy (push) Successful in 40s
2024-04-16 14:12:24 +02:00
24e0e9f29b [c] Dockerfile refactoring
All checks were successful
Build and push docker image / deploy (push) Successful in 44s
2024-04-12 09:35:09 +02:00
bcca482355 [c] fix background color of images being black and not transparent
All checks were successful
Build and push docker image / deploy (push) Successful in 39s
2024-04-08 17:22:21 +02:00
97f82f6265 [c] update readme logo 2024-04-08 17:18:20 +02:00
dd08df29df [c] add project logo to readme 2024-04-08 17:15:39 +02:00
a00a1df43d [c] Migrate to gitpot.org
All checks were successful
Build and push docker image / deploy (push) Successful in 1m11s
2024-04-08 13:52:10 +02:00
e682a4ca4f [a] Add rel=me to social links 2024-04-07 19:57:07 +02:00
6e83b55b0a [c] upgrade dependencies, add upgrade-interactive to Justfile
All checks were successful
Build and push docker image / deploy (push) Successful in 38s
2024-04-03 17:02:46 +02:00
d07163376a [a+d] Initial docker-compose + delete old build scripts 2024-04-03 16:49:15 +02:00
f5d7e719fb [c] clarify contribution requirements in README.md 2024-04-03 13:19:01 +00:00
4325badbf9 [c] Fix docker container labels
All checks were successful
Build and push docker image / deploy (push) Successful in 41s
2024-04-03 15:13:05 +02:00
fab7b8153b [c] Update README.md with link to the just project
All checks were successful
Build and push docker image / deploy (push) Successful in 40s
2024-04-03 13:07:18 +00:00
3f637dbab3 Automated building and deployment process with Docker (#2)
Reviewed-on: https://gitpot.dev/sangelo/website/pulls/2
2024-04-03 12:10:51 +00:00
e0112466ce Merge branch 'main' into docker 2024-04-03 12:10:00 +00:00
7e19be55b1 [c] Update README with up-to-date just commands 2024-04-03 13:08:42 +02:00
ef5bc8a670 [c] add description label to dockerfile 2024-04-03 12:59:24 +02:00
4ecf1f1de6 [c] modify workflow if-statement to work in SH
All checks were successful
Build and push docker image / deploy (push) Successful in 42s
2024-04-03 12:46:25 +02:00
88950724c9 [c] re-create tag var in publish container task
All checks were successful
Build and push docker image / deploy (push) Successful in 42s
2024-04-03 12:43:07 +02:00
1bc627e890 [c] debug workflow vars
Some checks failed
Build and push docker image / deploy (push) Failing after 40s
2024-04-03 12:41:20 +02:00
2ccdfe1550 [c] try fixing tag variable
Some checks failed
Build and push docker image / deploy (push) Failing after 39s
2024-04-03 12:39:23 +02:00
e2b394a6eb [c] update tag refs to work properly
Some checks failed
Build and push docker image / deploy (push) Failing after 46s
2024-04-03 12:32:42 +02:00
309e066319 [c] Mount the docker socket into the container
Some checks failed
Build and push docker image / deploy (push) Failing after 32s
2024-04-03 11:44:00 +02:00
1b8431f234 [c] force workflow to use proper image
Some checks failed
Build and push docker image / deploy (push) Failing after 32s
2024-04-03 11:25:12 +02:00
b697c19342 [c] Update Justfile Path in workflow
Some checks failed
Build and push docker image / deploy (push) Failing after 5s
2024-04-03 11:19:26 +02:00
f3c9b5b994 [c] Update workflow working directory
Some checks failed
Build and push docker image / deploy (push) Failing after 5s
2024-04-03 11:13:50 +02:00
d6243574e6 [a] Initial build workflow
Some checks failed
Build and push docker image / deploy (push) Failing after 26s
2024-04-03 11:05:30 +02:00
fb13312485 [c] Update Justfile env variables for publishing 2024-04-03 11:05:16 +02:00
968673e8cd [c] Remove broken colorisation 2024-04-02 23:18:57 +02:00
6374398544 [c] Fix Justfile errors, Dockerfile removes build image now 2024-04-02 20:25:10 +02:00
df92de60da [a] Initial Justfile build script 2024-04-02 17:42:33 +02:00
ebaa9d5783 [a] add podman build script 2024-03-26 13:57:52 +01:00
34ebf48f0b Specify Licenses in more detail 2024-03-22 13:03:42 +01:00
0aa9dffd75 Initial Docker Automatisation Work 2024-03-22 11:19:46 +01:00
28 changed files with 1046 additions and 497 deletions

View file

@ -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

View 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

View file

@ -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
View 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
View 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
View 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

View file

@ -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
View 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
View 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"

View file

@ -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": {

View file

@ -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"

View file

@ -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>

View file

@ -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>

View file

@ -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)
}

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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
View file

@ -0,0 +1,5 @@
{
"__comment__": "Do not edit file directly, this will be populated by the build script.",
"commit": "unavailable",
"tag": "unavailable"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

File diff suppressed because one or more lines are too long

View file

@ -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>

View file

@ -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} */

1021
yarn.lock

File diff suppressed because it is too large Load diff