-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added few assets started making project pages
- Loading branch information
1 parent
b17f597
commit 251d64e
Showing
24 changed files
with
437 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,34 @@ | ||
<nav class="flex justify-between py-3 mt-10 mb-36 container mx-auto px-3"> | ||
<script> | ||
import { page } from '$app/stores'; | ||
import clsx from 'clsx'; | ||
$: path = $page.url.pathname; | ||
</script> | ||
|
||
<nav class="flex justify-between items-center py-3 md:mt-10 mb-36 container mx-auto px-3"> | ||
<a href="/" class="flex items-center"> | ||
<img src="favicon-32x32.png" alt="Aleksander Brymora logo" /> | ||
<p class="text-zinc-900 dark:text-white ml-5 font-medium text-xl">Aleksander Brymora</p> | ||
<img src="/favicon-32x32.png" alt="Aleksander Brymora logo" /> | ||
<p class="text-red-800 ml-5 font-medium text-xl invisible sm:visible">Aleksander Brymora</p> | ||
</a> | ||
<ul class="flex gap-8 font-bold dark:text-zinc-400"> | ||
<li><a href="/" class="whitespace-nowrap">Main Page</a></li> | ||
<li><a href="/projects">Projects</a></li> | ||
<li><a href="/other">Other</a></li> | ||
<ul class="flex gap-5 md:gap-8 font-bold dark:text-zinc-400"> | ||
<li> | ||
<a href="/" class={clsx('whitespace-nowrap', path === '/' && 'text-zinc-100')}>Main Page</a> | ||
</li> | ||
<li> | ||
<a | ||
href="/projects" | ||
class={clsx('whitespace-nowrap', path.includes('projects') && 'text-zinc-100')}>Projects</a | ||
> | ||
</li> | ||
<li> | ||
<a href="/other" class={clsx('whitespace-nowrap', path === '/other' && 'text-zinc-100')} | ||
>Other</a | ||
> | ||
</li> | ||
</ul> | ||
</nav> | ||
|
||
<style> | ||
p { | ||
font-family: Cattedrale; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export const get = async () => { | ||
const allImgs = import.meta.glob('/static/tech-icons/*.{svg,png}'); | ||
// const paths = Object.keys(allImgs).map((p) => | ||
// p.replace(/\/static\/tech-icons\//, '').replace(/\.(png|svg)/, '') | ||
// ); | ||
const paths = Object.keys(allImgs).map((p) => p.replace('/static', '')); | ||
return { | ||
body: { paths } | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
export const get = async () => { | ||
const allPostFiles = import.meta.glob('../projects/*.md'); | ||
const iterablePostFiles = Object.entries(allPostFiles); | ||
|
||
const allProjects = await Promise.all( | ||
iterablePostFiles.map(async ([path, resolver]) => { | ||
const { metadata } = await resolver(); | ||
const postPath = path.slice(2, -3); | ||
|
||
return { | ||
meta: metadata, | ||
path: postPath | ||
}; | ||
}) | ||
); | ||
|
||
return { | ||
body: allProjects | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<script context="module" lang="ts"> | ||
import type { Load } from '@sveltejs/kit'; | ||
export const load: Load = async ({ fetch }) => { | ||
const projectPaths = await fetch('/api/projects.json'); | ||
const paths = await projectPaths.json(); | ||
return { props: { paths } }; | ||
}; | ||
</script> | ||
|
||
<script> | ||
export let paths; | ||
</script> | ||
|
||
<div class="flex flex-col"> | ||
{#each paths as p} | ||
<a class="my-2 text-xl" href={p.path}>{p.meta.title}</a> | ||
{/each} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
<script context="module" lang="ts"> | ||
import type { Load } from '@sveltejs/kit'; | ||
export const load: Load = async ({ fetch }) => { | ||
const projectPaths = await fetch('/api/projects.json'); | ||
const paths = await projectPaths.json(); | ||
return { | ||
props: { paths } | ||
}; | ||
}; | ||
</script> | ||
|
||
<script lang="ts"> | ||
import { page } from '$app/stores'; | ||
import clsx from 'clsx'; | ||
interface Project { | ||
meta: { title: string; year: number; github?: string; website?: string }; | ||
path: string; | ||
} | ||
export let paths: Project[]; | ||
let data: Project; | ||
$: { | ||
data = paths.find((p) => p.path === $page.url.pathname); | ||
} | ||
</script> | ||
|
||
<section class="grid gap-16 xl:grid-cols-project"> | ||
<aside class="flex flex-col xl:gap-5 gap-2 sticky h-min"> | ||
{#each paths as p} | ||
<a | ||
class={clsx( | ||
'flex gap-3 items-center justify-between px-3 sm:px-5 py-2', | ||
$page.url.pathname === p.path && 'text-zinc-800 bg-white rounded-xl ' | ||
)} | ||
href={p.path} | ||
> | ||
<p class={clsx('font-bold text-lg')}>{p.meta.title}</p> | ||
<div class="flex gap-2 items-center"> | ||
{#if p.meta.github} | ||
<a | ||
class="w-8 h-8 grid place-items-center text-zinc-50 bg-zinc-50 rounded-full hover:bg-zinc-200 transition-all" | ||
href={p.meta.github} | ||
> | ||
<svg | ||
height="32" | ||
aria-hidden="true" | ||
viewBox="0 0 16 16" | ||
version="1.1" | ||
width="32" | ||
data-view-component="true" | ||
class="octicon octicon-mark-github v-align-middle" | ||
> | ||
<path | ||
fill-rule="evenodd" | ||
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z" | ||
/> | ||
</svg></a | ||
> | ||
{/if} | ||
{#if p.meta.website} | ||
<a | ||
class="w-8 h-8 grid place-items-center text-zinc-50 bg-black rounded-full hover:bg-zinc-700 transition-all" | ||
href={p.meta.website} | ||
><svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
class="h-5 w-5" | ||
viewBox="0 0 20 20" | ||
fill="currentColor" | ||
> | ||
<path | ||
d="M11 3a1 1 0 100 2h2.586l-6.293 6.293a1 1 0 101.414 1.414L15 6.414V9a1 1 0 102 0V4a1 1 0 00-1-1h-5z" | ||
/> | ||
<path | ||
d="M5 5a2 2 0 00-2 2v8a2 2 0 002 2h8a2 2 0 002-2v-3a1 1 0 10-2 0v3H5V7h3a1 1 0 000-2H5z" | ||
/> | ||
</svg></a | ||
> | ||
{/if} | ||
</div> | ||
</a> | ||
{/each} | ||
</aside> | ||
|
||
<slot /> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
title: Arduino Projects | ||
year: 2020 | ||
--- | ||
<style> | ||
article { @apply prose prose-invert prose-xl mb-32; } | ||
img { @apply rounded-lg; } | ||
</style> | ||
|
||
<article> | ||
|
||
# Line following robot | ||
|
||
 | ||
|
||
This cute little robot is a culmination of a full semester of (learning) programming with few of my friends. We used Arduino to make a robot follow a black line and other guides towards the and of a track. It was my first battle with optimizations in code so the robot would keep up with all the information that was coming in. It was a life-changing experience and we have it on video! | ||
|
||
--- | ||
|
||
The robot uses a whole array of sensors - Ultrasonic, IR or touch, to determine how to follow a line (or let's be real - get back to it). | ||
</article> |
Oops, something went wrong.