Skip to content

Commit f067a61

Browse files
author
Emaan Rana
committed
Fixed styling on smaller screens and updated I2C notes
1 parent ec01dbf commit f067a61

18 files changed

Lines changed: 644 additions & 158 deletions

File tree

src/components/pages/Read.astro

Lines changed: 4 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
import { getCollection, render } from "astro:content";
3-
import { formatDate, formatDateTime } from "@utils";
3+
import { formatDateTime } from "@utils";
44
import BreadcrumbsLayout from "@layouts/BreadcrumbsLayout.astro";
55
import Entries from "@components/app/Entries.astro";
66
import Entry from "@components/app/Entry.astro";
7-
import Tags from "@components/ui/tags/Tags.astro";
7+
import Posts from "@components/pages/partials/Posts.astro";
88
import MK from "@components/ui/MK.astro";
99
1010
const undrafted = (entry: { data: { draft?: boolean } }) => (import.meta.env.PROD ? entry.data.draft !== true : true);
@@ -25,37 +25,13 @@ const recentThoughts = sortBy((await getCollection("readThoughts")).filter(undra
2525
<section id="blog">
2626
<h1>Blog</h1>
2727
<p>Posts about anything really. <a href="/read/blog">All posts ⟶</a></p>
28-
<Entries bordered>
29-
{
30-
recentBlog.map((post) => (
31-
<Entry variant="post" href={`/read/blog/${post.id}`}>
32-
<div class="lhs">
33-
<p>{post.data.title}</p>
34-
<Tags tags={post.data.tags} />
35-
</div>
36-
<span>{formatDate(post.data.updated)}</span>
37-
</Entry>
38-
))
39-
}
40-
</Entries>
28+
<Posts posts={recentBlog} path="blog" />
4129
</section>
4230
<!-- Notes -->
4331
<section id="notes">
4432
<h1>Notes</h1>
4533
<p>Notes on different topics. <a href="/read/notes">All notes ⟶</a></p>
46-
<Entries bordered>
47-
{
48-
recentNotes.map((post) => (
49-
<Entry variant="post" href={`/read/notes/${post.id}`}>
50-
<div class="lhs">
51-
<p>{post.data.title}</p>
52-
<Tags tags={post.data.tags} />
53-
</div>
54-
<span>{formatDate(post.data.updated)}</span>
55-
</Entry>
56-
))
57-
}
58-
</Entries>
34+
<Posts posts={recentNotes} path="notes" />
5935
</section>
6036
<!-- Thoughts -->
6137
<section id="thoughts">
@@ -97,12 +73,5 @@ const recentThoughts = sortBy((await getCollection("readThoughts")).filter(undra
9773
display: flex;
9874
flex-direction: column;
9975
gap: 0.25rem;
100-
101-
.lhs {
102-
display: flex;
103-
flex-direction: row;
104-
align-items: center;
105-
gap: 0.5rem;
106-
}
10776
}
10877
</style>

src/components/pages/partials/Pastimes.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import MoreMagnet from "@components/ui/MoreMagnet.astro";
1212
<Bullets>
1313
<Bullet>Wake Up<MoreMagnet>, Get Up, Get Out There! (I attempt to).</MoreMagnet></Bullet>
1414
<Bullet>Programming<MoreMagnet>, working on this website, an Android app, and teaching myself Embedded!</MoreMagnet></Bullet>
15-
<Bullet>Exercise<MoreMagnet>, mainly Climbing, and <i>trying</i> to do Resistance Training and Cardio sometimes.</MoreMagnet></Bullet>
15+
<Bullet>Exercise<MoreMagnet>, mainly Resistance Training, and <i>trying</i> to go Climbing and do Cardio sometimes.</MoreMagnet></Bullet>
1616
</Bullets>
1717
</section>
1818

@@ -21,7 +21,7 @@ import MoreMagnet from "@components/ui/MoreMagnet.astro";
2121
<h4><WarbleText>OTHER PASTIMES</WarbleText></h4>
2222
<p>Some other notable interests of mine:</p>
2323
<Bullets>
24-
<Bullet>Gaming<MoreMagnet>, right now I'm playing <i>Persona 3: Reload</i>, <i>Pokemon Champions</i>, and <i>The Finals</i></MoreMagnet></Bullet>
24+
<Bullet>Gaming<MoreMagnet>, right now I'm playing <i>Persona 3: Reload</i>, <i>Pokemon Champions</i>, and <i>The Finals.</i></MoreMagnet></Bullet>
2525
<Bullet>Go<MoreMagnet>, also known as Baduk in Korea or Weiqi in China.</MoreMagnet></Bullet>
2626
<Bullet>Music<MoreMagnet>, listening, learning, dabbling.</MoreMagnet></Bullet>
2727
<Bullet>Art<MoreMagnet>, all kinds (not AI).</MoreMagnet></Bullet>
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
---
2+
import { formatDate, truncateTags } from "@utils";
3+
import Entries from "@components/app/Entries.astro";
4+
import Entry from "@components/app/Entry.astro";
5+
import Tags from "@components/ui/tags/Tags.astro";
6+
import type { CollectionEntry } from "astro:content";
7+
8+
type Post = CollectionEntry<"readBlog"> | CollectionEntry<"readNotes">;
9+
10+
interface Props {
11+
posts: Post[];
12+
path: "blog" | "notes";
13+
}
14+
15+
const { posts, path } = Astro.props;
16+
---
17+
18+
<Entries bordered>
19+
{
20+
posts.map((post) => (
21+
<Entry variant="post" href={`/read/${path}/${post.id}`}>
22+
<div class="lhs">
23+
<p>{post.data.title}</p>
24+
<div class="lg">
25+
<Tags tags={truncateTags(post.data.tags, 6)} />
26+
</div>
27+
<div class="md">
28+
<Tags tags={truncateTags(post.data.tags, 3)} />
29+
</div>
30+
<div class="sm">
31+
<Tags tags={truncateTags(post.data.tags, 2)} />
32+
</div>
33+
</div>
34+
<span>{formatDate(post.data.updated)}</span>
35+
</Entry>
36+
))
37+
}
38+
</Entries>
39+
40+
<style>
41+
.lhs {
42+
display: flex;
43+
flex-direction: row;
44+
align-items: center;
45+
gap: 0.5rem;
46+
}
47+
48+
/* Large */
49+
.lg {
50+
display: contents;
51+
}
52+
.md {
53+
display: none;
54+
}
55+
.sm {
56+
display: none;
57+
}
58+
59+
/* Medium */
60+
@media (max-width: 500px) {
61+
.lg {
62+
display: none;
63+
}
64+
.md {
65+
display: contents;
66+
}
67+
.sm {
68+
display: none;
69+
}
70+
}
71+
72+
/* Small */
73+
@media (max-width: 450px) {
74+
.lg {
75+
display: none;
76+
}
77+
.md {
78+
display: none;
79+
}
80+
.sm {
81+
display: contents;
82+
}
83+
}
84+
85+
/* Extra Small */
86+
@media (max-width: 400px) {
87+
.lg {
88+
display: none;
89+
}
90+
.md {
91+
display: none;
92+
}
93+
.sm {
94+
display: none;
95+
}
96+
}
97+
</style>

src/components/ui/Metadata.astro

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
import { formatDate } from "@utils";
3+
import Tags from "@components/ui/tags/Tags.astro";
4+
5+
interface Props {
6+
updated: Date;
7+
created: Date;
8+
tags?: string[];
9+
}
10+
11+
const { updated, created, tags } = Astro.props;
12+
---
13+
14+
<div id="metadata">
15+
<div>
16+
<span class="label">Updated:</span>
17+
<span>{formatDate(updated)}</span>
18+
</div>
19+
<span class="sep">✱</span>
20+
<div>
21+
<span class="label">Created:</span>
22+
<span>{formatDate(created)}</span>
23+
</div>
24+
{
25+
tags && tags.length > 0 && (
26+
<>
27+
<span class="sep">✱</span>
28+
<Tags tags={tags} />
29+
</>
30+
)
31+
}
32+
</div>
33+
34+
<style>
35+
#metadata {
36+
display: flex;
37+
flex-wrap: wrap;
38+
align-items: center;
39+
font-size: 0.8rem;
40+
}
41+
42+
.label {
43+
padding-right: 0.1rem;
44+
}
45+
46+
.sep {
47+
color: var(--red-400);
48+
padding: 0 0.5rem;
49+
font-size: 1.1rem;
50+
}
51+
</style>

src/content/exec/pop-the-led/index.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,15 @@ Project diagrams.
123123

124124
### Breadboard
125125

126-
<center>
126+
<div class="overflow">
127127
<img src={breadboard.src} width="800" style={{ background: "var(--ink-500)", padding: "1rem" }} />
128-
</center>
128+
</div>
129129

130130
### Schematics
131131

132-
<center>
132+
<div class="overflow">
133133
<img src={schema.src} width="800" style={{ background: "var(--ink-500)", padding: "1rem" }} />
134-
</center>
134+
</div>
135135

136136
## Demo
137137

src/content/read/blog/p3r-on-w11d/index.mdx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import mf from "./mf.png";
1515
1616
# Persona 3 Reload on Windows 11 Debloat
1717

18-
I recently decided I wanted to start playing _Persona 3 Reload_, so I went to my Steam library, as one does, to boot it up. Unfortunately, it wouldn't start. The Steam "PLAY" button went through the steps visually up until it shows as a blue "STOP X" button, and then it just went back to being a green "PLAY" button. Wouldn't even boot up the game window.
18+
I recently decided I wanted to start playing _Persona 3 Reload_, so I went to my Steam library, as one does, to boot it up. Unfortunately, it wouldn't start. The Steam [PLAY] button went through the steps visually up until it shows as a blue [STOP X] button, and then it just went back to being a green [PLAY] button. Wouldn't even boot up the game window.
1919

2020
## Microsoft Visual C++ Redistributable
2121

@@ -29,9 +29,9 @@ I updated Windows 11, AMD GPU, and AMD CPU and rebooted.
2929

3030
I tried running the `P3R.exe` directly with "Run an administrator". Upon doing so I actually got some error messages this time:
3131

32-
<center>
32+
<div class="overflow">
3333
<img src={directx.src} width="900" style={{ paddingBottom: "1rem", paddingTop: "1rem" }} />
34-
</center>
34+
</div>
3535

3636
Turns out these were missing DLL's from the legacy "DirectX End-User Runtime" package. I was missing these: `XAPOFX1_5.dll`, `X3DAudio1_7.dll`, `XINPUT1_3.dll`, `D3DCOMPILER_43.dll`. It turns out a lot of Japanese PC ports still rely on these runtime files from DirectX June 2010 ish. I went here: <a href="https://www.microsoft.com/en-us/download/details.aspx?id=8109" target="_blank" rel="noopener noreferrer">DirectX End-User Runtimes (June 2010)</a> and downloaded it temporarily to a folder in my Downloads (there are _A LOT_ of `.cab` files in the download). I did the following:
3737

@@ -54,11 +54,11 @@ Turns out these were missing DLL's from the legacy "DirectX End-User Runtime" pa
5454

5555
### ResampleDmo
5656

57-
After rebooting I tried running `P3R.exe` as an administrator again after hitting the "PLAY" button in Steam yielded the same behavior as before. This time I got a different error (which is progress!):
57+
After rebooting I tried running `P3R.exe` as an administrator again after hitting the [PLAY] button in Steam yielded the same behavior as before. This time I got a different error (which is progress!):
5858

59-
<center>
59+
<div class="overflow">
6060
<img src={resampledmo.src} width="300" style={{ paddingBottom: "1rem", paddingTop: "1rem" }} />
61-
</center>
61+
</div>
6262

6363
Turns out this is a standard Windows multimedia DLL that normally already exists in Windows. However... I ran this <a href="https://github.com/raphire/win11debloat" target="_blank" rel="noopener noreferrer">Windows 11 Debloat</a> script when I installed Windows on my PC because I hate bloat. So I needed to download a fresh Windows 11 ISO to mount and grab the missing DLL from. I did the following:
6464

@@ -75,7 +75,7 @@ Turns out this is a standard Windows multimedia DLL that normally already exists
7575

7676
### UnrealEngine
7777

78-
After rebooting I tried clicking on the "PLAY" button in Steam. This time the black screen for the game actually showed up and the program was in the bottom bar. The black screen was up for a few seconds before I got an UnrealEngine crash window and the game terminated.
78+
After rebooting I tried clicking on the [PLAY] button in Steam. This time the black screen for the game actually showed up and the program was in the bottom bar. The black screen was up for a few seconds before I got an UnrealEngine crash window and the game terminated.
7979

8080
There is a tool called <a href="https://github.com/lucasg/Dependencies/releases" target="_blank" rel="noopener noreferrer">Dependencies</a> that is a dependency diagnosis tool. I did the following:
8181

@@ -85,14 +85,14 @@ There is a tool called <a href="https://github.com/lucasg/Dependencies/releases"
8585

8686
#### Media Foundation
8787

88-
<center>
88+
<div class="overflow">
8989
<img src={mf.src} width="200" style={{ paddingBottom: "1rem", paddingTop: "1rem" }} />
90-
</center>
90+
</div>
9191

9292
These are foundational Windows Media Foundation DLLs and so these were most likely what was causing the crash. In order to acquire these we repeat the same process we did to retrieve `ResampleDmo.dll`. I went ahead and retrieved all of these: `MFPlat.dll`, `MF.dll`, `MFReadWrite.dll`, `mfcore.dll`, and `mfplay.dll`. After finding them and moving them into `C:\Windows\System32` I rebooted.
9393

9494
# Full Moon Again, Crazy How Time Flies
9595

96-
After rebooting, I clicked on the "PLAY" button in Steam again and it worked! During this entire process I was sitting in my room hunched over my keyboard with the lights off so I felt like a gremlin. I was tired so I didn't play the game but I did watch the <a href="https://www.youtube.com/watch?v=xFtdhQoOMH0" target="_blank" rel="noopener noreferrer">Persona 3 Reload Opening Movie</a> all the way through.
96+
After rebooting, I clicked on the [PLAY] button in Steam again and it worked! During this entire process I was sitting in my room hunched over my keyboard with the lights off so I felt like a gremlin. I was tired so I didn't play the game but I did watch the <a href="https://www.youtube.com/watch?v=xFtdhQoOMH0" target="_blank" rel="noopener noreferrer">Persona 3 Reload Opening Movie</a> all the way through.
9797

9898
I've only played _Persona 5 Royal_ and some of the original _Shin Megami Tensei: Persona_ at this point. Persona games are not unproblematic unfortunately and there are a handful of things about the games that I _really_ don't like, but I try to ignore the parts that suck and appreciate the parts that are great (such as the music and main story).

src/content/read/notes/esp32/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,4 +231,4 @@ This is _internal_ to the chip, distinct from the AMS1117 LDO's ~800 mA total ca
231231
### UART Serial Debugging
232232
### Brownout Detector -->
233233

234-
[^1]: [ESP32 Series Datasheet](https://documentation.espressif.com/esp32_datasheet_en.pdf)
234+
[^1]: <a href="https://documentation.espressif.com/esp32_datasheet_en.pdf" target="_blank" rel="noopener noreferrer">ESP32 Series Datasheet</a>

0 commit comments

Comments
 (0)