mirror of
https://github.com/Fluffy-Bean/website.git
synced 2024-12-26 17:36:12 +00:00
Merge pull request #18 from Fluffy-Bean/deepsource-transform-4f3bbc6b
style: format code with Prettier
This commit is contained in:
commit
58a4bb6b5c
|
@ -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 😋
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue