Skip to content

Commit

Permalink
Fix width formatting, better error messaging
Browse files Browse the repository at this point in the history
  • Loading branch information
zrwaite committed Apr 30, 2024
1 parent b445043 commit ec10e6d
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 12 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

```bash
npm i
./redis.sh
npm run dev
```

1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ services:
website:
build: .
image: zrwaite/insomnizac_website:2.2.0
network_mode: host
ports:
- 8010:8010
10 changes: 7 additions & 3 deletions src/lib/api/projects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ import { redis } from './redis'
export const getProjects = async (skills?: SkillType[]): Promise<ProjectType[]> => {
if (browser) throw error(400, 'Ran on client')
const loadedSkills = skills || await getSkills()
const projectCache = await redis.get('insomnizac-website-projects')
if (projectCache) {
return JSON.parse(projectCache)
try {
const projectCache = await redis.get('insomnizac-website-projects')
if (projectCache) {
return JSON.parse(projectCache)
}
} catch (e) {
console.log('Cache failed', e)
}

const res = await pool.query('SELECT * FROM projects')
Expand Down
2 changes: 0 additions & 2 deletions src/lib/api/redis.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { REDIS_URL } from '$env/static/private'
import { createClient } from 'redis'

export const a = 'a'

export const redis = createClient({ url: REDIS_URL })
await redis.connect()
12 changes: 6 additions & 6 deletions src/lib/pages/home/Graphs.svelte
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<section class="graphsSection">
<img width="390" src="https://github-readme-stats.vercel.app/api/top-langs/?username=zrwaite&hide=makefile,powershell,html,css&layout=compact&langs_count=10&theme=dark" alt="Github Most Used Stats"/>
<img width="390" src="https://graphs.insomnizac.com/api/wakatime/Insomnizac" alt="Wakatime Most Used Stats"/>
<img width="390" src='https://github-readme-stats.vercel.app/api/wakatime?username=insomnizac&layout=compact&theme=dark&langs_count=10&hide=json,markdown,git%20config,bash,%20other,%20xml,yaml' alt='Languages over last 7 days '/>
<img width="390" src="https://github-readme-stats.vercel.app/api?username=zrwaite&show_icons=true&line_height=27&count_private=true&title_color=ffffff&text_color=c9cacc&icon_color=2bbc8a&bg_color=1d1f21" alt="Github Stats"/>
<img width="390" src='https://github-readme-streak-stats.herokuapp.com/?user=zrwaite&theme=dark' alt='Github Streak Stats' />
<img width="800" src="https://graphs.insomnizac.com/api/streak/zrwaite" alt="Github Streak Graph" />
<img width="390" src="https://github-readme-stats.vercel.app/api/top-langs/?username=zrwaite&hide=makefile,powershell,html,css&layout=compact&langs_count=10&theme=dark" alt=""/>
<img width="390" src="https://graphs.insomnizac.com/api/wakatime/Insomnizac" alt=""/>
<img width="390" src='https://github-readme-stats.vercel.app/api/wakatime?username=insomnizac&layout=compact&theme=dark&langs_count=10&hide=json,markdown,git%20config,bash,%20other,%20xml,yaml' alt=""/>
<img width="390" src="https://github-readme-stats.vercel.app/api?username=zrwaite&show_icons=true&line_height=27&count_private=true&title_color=ffffff&text_color=c9cacc&icon_color=2bbc8a&bg_color=1d1f21" alt=""/>
<img width="390" src='https://github-readme-streak-stats.herokuapp.com/?user=zrwaite&theme=dark' alt=""/>
<img width="800" src="https://graphs.insomnizac.com/api/streak/zrwaite" alt=""/>
</section>

<style lang="scss">
Expand Down
2 changes: 1 addition & 1 deletion src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
height: 100vh;
}
#contentContainer {
width: 100%;
width: calc(100% - 5rem);
margin-left: 5rem;
}
main {
Expand Down

0 comments on commit ec10e6d

Please sign in to comment.