Merge pull request #18 from Fluffy-Bean/deepsource-transform-4f3bbc6b

style: format code with Prettier
This commit is contained in:
Michał 2024-05-29 14:47:01 +01:00 committed by GitHub
commit 58a4bb6b5c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 18 additions and 8 deletions

View file

@ -9,6 +9,7 @@ tags:
- networking
- webdev
---
import Note from "../../components/Note.astro";
<Note text="This is an older blog post imported from my old Django website" />
@ -49,4 +50,4 @@ In the end, I went with the third option, I went back to `Nginx Proxy Manager` (
After all of that, switching proxies, dropping Docker, and a lot of suffering, I got this page working. Overall, would I go with Django again? Most likely! It was fast and easy to learn, and it has some really nice features. Though I wish Python was faster so I could use this for larger projects :c
While I continue to work out bugs on this page and my terrible server management, enjoy reading the slop in the blog 😋
While I continue to work out bugs on this page and my terrible server management, enjoy reading the slop in the blog 😋

View file

@ -14,12 +14,14 @@ It's been written from scratch with Astro, Typescript and a lot of suffering, mo
So where do I start, maybe _why_ I have chosen Astro over other existing options.
## Why Astro
TLDR: I don't know :3
I've been trying to learn Typescript for about a month now, mainly to broaden my skill set, but to also help me with job
searching. Firstly through Svelte for a college project (which I may write about), but now Astro.
I've chosen Astro for two main reasons
1. It's statically compiled, meaning that I don't ship any smelly Javascript to the browser, which I detest doing when not needed
2. It looked simple enough compared to other options
@ -31,9 +33,10 @@ So, what was the experience like so far you may be asking, ehh...
The first and biggest hurdle I faced was the `Image` and `Picture` elements from Astro. I could not for the life of me,
figure out a good solution for using both a file path, and a URL for the `frontmatter` data. I tried:
- `getImage()`
- Checking if the start of the string begins with `https://`
- Loading the image using `getImage()` on every page that passed the image data into the `Layout.astro` to set as the banner image
- `getImage()`
- Checking if the start of the string begins with `https://`
- Loading the image using `getImage()` on every page that passed the image data into the `Layout.astro` to set as the banner image
**NOTHING FUCKING WORKED.**
@ -115,7 +118,9 @@ does what it needs todo and doesn't run in the users browser anyway, thanks Astr
```typescript
// utils.ts
export async function getTagsBySlug(postTags: string[]): Promise<CollectionEntry<"tags">[]> {
export async function getTagsBySlug(
postTags: string[],
): Promise<CollectionEntry<"tags">[]> {
const allTags: CollectionEntry<"tags">[] = await getCollection("tags");
// Loop through all the tags in a post and the tags in the collections
@ -149,6 +154,6 @@ I'm hoping to write more blogs in the future, mainly to practice my writing skil
regardless if it's something political or programming related. But life's in a tangle right now
<div style="width: 200px">
![Maned Wolf art by Pulex](../../assets/posts/pulex_leg.webp)
[Art by Pulex](https://www.pulexart.com/)
![Maned Wolf art by Pulex](../../assets/posts/pulex_leg.webp) [Art by
Pulex](https://www.pulexart.com/)
</div>

View file

@ -30,7 +30,11 @@
//border-radius: $radius;
mask-image: linear-gradient(to right, rgba(#fff, 0.5), rgba(#fff, 0) 80%);
mask-image: linear-gradient(
to right,
rgba(#fff, 0.5),
rgba(#fff, 0) 80%
);
object-fit: cover;
z-index: +1;
}