Skip to content

Commit

Permalink
a lot of stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
akisblack committed Jan 25, 2023
1 parent 30c99fc commit 371ecdb
Show file tree
Hide file tree
Showing 17 changed files with 305 additions and 57 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@
"@sveltejs/adapter-node": "^1.1.3",
"@sveltejs/kit": "^1.0.0",
"@unocss/reset": "^0.48.4",
"axios": "^1.2.3",
"prettier": "^2.8.0",
"prettier-plugin-svelte": "^2.8.1",
"sanitize-html": "^2.8.1",
"svelte": "^3.54.0",
"svelte-check": "^3.0.1",
"svelte-copy": "^1.3.0",
"svelte-dark-mode": "^2.1.0",
"svelte-seo": "^1.4.1",
"tslib": "^2.4.1",
"typescript": "^4.9.3",
"unocss": "^0.48.4",
Expand Down
143 changes: 128 additions & 15 deletions pnpm-lock.yaml

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

6 changes: 3 additions & 3 deletions src/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ html, html.light {
--secondary: #eeeeee;
--tertiary: #141414;
--grey: #444444;
--accent: #088058;
--accent: #009b50;
color-scheme: light;
}

Expand All @@ -25,7 +25,7 @@ html, html.light {
}

body {
@apply bg-primary duration-400 font-primary text-grey transition;
@apply bg-primary duration-200 font-primary text-grey transition-colors;
}

.container {
Expand All @@ -37,5 +37,5 @@ h1 {
}

a {
@apply text-accent underline underline-offset-4 transition-opacity hover:opacity-75;
@apply text-accent underline underline-offset-4 transition-filter hover:brightness-75;
}
1 change: 1 addition & 0 deletions src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/logo.png" />
<meta name="viewport" content="width=device-width" />
<script defer data-domain="akisblack.dev" src="https://pl.akisblack.dev/js/script.js"></script>
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">
Expand Down
33 changes: 30 additions & 3 deletions src/hooks.server.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,37 @@
import map from "$lib/map";
import axios from "axios";
import { Agent } from "https";

const agent = new Agent({
family: 4
});

const updateMap = async () => {
const res = await fetch("https://gh-pinned-repos.egoist.dev/?username=akisblack");
const data = await res.json();
try {
const announcements = await axios("https://status.akisblack.dev/api/status-page/akisblack", { httpsAgent: agent });

if (announcements.status === 200) {
map.set("announcements", announcements.data);
} else {
map.set("announcements", { error: true, message: "Error: " + announcements.status });
}

} catch (err) {
map.set("announcements", { error: true, message: "Error: " + err });
}

try {
const projects = await axios("https://gh-pinned-repos.egoist.dev/?username=akisblack", { httpsAgent: agent });

map.set("data", data);
if (projects.status === 200) {
map.set("projects", projects.data);
} else {
map.set("projects", { error: true, message: "Error: " + projects.status });
}

} catch (err) {
map.set("projects", { error: true, message: "Error: " + err });
}
};

updateMap();
Expand Down
9 changes: 9 additions & 0 deletions src/lib/Hero.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@
{/if}
</div>
<span>Web developer, Linux enthusiast and average Greek.</span>
<div class="flex flex-row gap-2 text-2xl">
<div class="i-simple-icons:svelte" />
<div class="i-simple-icons:unocss" />
<div class="i-simple-icons:typescript" />
<div class="i-simple-icons:docker" />
<div class="i-simple-icons:git" />
<div class="i-simple-icons:linux" />
<div class="i-simple-icons:mongodb" />
</div>
<hr class="border-grey" />
</div>

Expand Down
10 changes: 10 additions & 0 deletions src/lib/PageTransition.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<script>
import { fly } from "svelte/transition";
export let pathname = "";
</script>

{#key pathname}
<div in:fly={{ x: -10, duration: 250, delay: 250 }} out:fly={{ x: 5, duration: 250 }}>
<slot />
</div>
{/key}
Loading

0 comments on commit 371ecdb

Please sign in to comment.