Skip to content

Commit

Permalink
reorganised assets folder
Browse files Browse the repository at this point in the history
added static site generation adapter to svelte
  • Loading branch information
aleksanderbrymora committed Jan 17, 2022
1 parent 73e6c89 commit cc87f17
Show file tree
Hide file tree
Showing 25 changed files with 25 additions and 11 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
},
"devDependencies": {
"@sveltejs/adapter-auto": "next",
"@sveltejs/adapter-static": "^1.0.0-next.26",
"@sveltejs/kit": "next",
"@tailwindcss/typography": "^0.5.0",
"@types/lodash.sample": "^4.2.6",
Expand Down
2 changes: 1 addition & 1 deletion src/components/About.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<section id="about" class="grid md:grid-cols-3 gap-12">
<img
src="profile.jpg"
src="/images/profile.jpg"
alt="My face"
class={clsx([
// grid
Expand Down
6 changes: 5 additions & 1 deletion src/components/Bio.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@
class="flex flex-col gap-5 xl:h-[20rem] bg-zinc-100 p-5 rounded-xl shadow-md text-zinc-900"
>
<div class="flex gap-5 items-center">
<img src={selected.img} class="rounded-md xl:w-32 w-16" alt={`${selected.full} logo`} />
<img
src="/images/{selected.img}"
class="rounded-md xl:w-32 w-16"
alt={`${selected.full} logo`}
/>
<p class="xl:text-5xl text-2xl font-extrabold">{selected.full}</p>
</div>
<figcaption in:fade>{selected.description}</figcaption>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Nav.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<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" />
<img src="/icons/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-5 md:gap-8 font-bold dark:text-zinc-400">
Expand Down
3 changes: 0 additions & 3 deletions src/routes/api/images.json.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
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 }
Expand Down
2 changes: 1 addition & 1 deletion src/routes/projects/arduino.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ year: 2020

# Line following robot

![Line following robot in action](/static/projects/arduino-robot.gif)
![Line following robot in action](/projects/arduino-robot.gif)

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!

Expand Down
2 changes: 1 addition & 1 deletion src/routes/projects/cheats.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ website: https://gimme-cheats-client-git-master.aleksanderbrymora.vercel.app/cre

# Cheats

![Cheats usage showcase](/static/projects/cheats.gif)
![Cheats usage showcase](/projects/cheats.gif)

## TLDR

Expand Down
2 changes: 1 addition & 1 deletion src/routes/projects/cyphers.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ github: https://github.com/aleksanderbrymora/Ceasar-and-Subtitution-Cypher

# Caesar and Substitution Cypher - Encryption & Decryption

![Showcase of bruteforce decryption](/static/projects/cipher.gif)
![Showcase of bruteforce decryption](/projects/cipher.gif)

My first, big programming project, that was written in C.

Expand Down
Binary file removed static/OpenSans-Italic-VariableFont_wdth,wght.ttf
Binary file not shown.
Binary file removed static/OpenSans-VariableFont_wdth,wght.ttf
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
9 changes: 7 additions & 2 deletions svelte.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import adapter from '@sveltejs/adapter-auto';
import adapter from '@sveltejs/adapter-static';
import preprocess from 'svelte-preprocess';
import { mdsvex } from 'mdsvex';

Expand All @@ -7,7 +7,12 @@ const config = {
// Consult https://github.com/sveltejs/svelte-preprocess
// for more information about preprocessors
kit: {
adapter: adapter(),
adapter: adapter({
pages: 'build',
assets: 'build',
fallback: null,
precompress: false
}),

// hydrate the <div id="svelte"> element in src/app.html
target: '#svelte'
Expand Down
7 changes: 7 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,13 @@
esbuild "^0.13.15"
tiny-glob "^0.2.9"

"@sveltejs/adapter-static@^1.0.0-next.26":
version "1.0.0-next.26"
resolved "https://registry.yarnpkg.com/@sveltejs/adapter-static/-/adapter-static-1.0.0-next.26.tgz#639e9ad8a9e846b750cd81d49ace48390af9d28f"
integrity sha512-LXR0HkPygZ+m9wJhFqbYWbJ0jquhgUK6vL/8AwnqbAZGGtQFloMpf49WOANk7MiLBeY6L97W5jPLSxHiDW3T0Q==
dependencies:
tiny-glob "^0.2.9"

"@sveltejs/[email protected]":
version "1.0.0-next.36"
resolved "https://registry.yarnpkg.com/@sveltejs/adapter-vercel/-/adapter-vercel-1.0.0-next.36.tgz#4163314461293aa29af1419883d0170a88dd61d5"
Expand Down

0 comments on commit cc87f17

Please sign in to comment.