From 6f7b41984166ff9456985bdb7238d3a085e29c3d Mon Sep 17 00:00:00 2001 From: Fluffy-Bean Date: Fri, 24 May 2024 01:09:05 +0100 Subject: [PATCH] Fix Post and Project page rendering Funky button Yeet the GitHub pages stuff, for now --- .github/workflows/deploy.yml | 41 ------- astro.config.mjs | 5 +- src/components/Card.astro | 3 +- src/components/Music.astro | 4 - src/content/posts/example.md | 4 +- src/content/posts/markdown-cheat-sheet.md | 130 ++++++++++++++++++++++ src/content/projects/example-2.md | 2 - src/content/projects/example.md | 2 - src/content/projects/gwagwa.md | 2 - src/layouts/Layout.astro | 33 +++--- src/layouts/Markdown.astro | 56 ---------- src/pages/index.astro | 24 ++-- src/pages/posts/[...slug].astro | 8 +- src/pages/projects/[...slug].astro | 6 +- src/styles/_button.scss | 16 +-- src/styles/_main.scss | 5 +- src/styles/_reset.scss | 2 +- 17 files changed, 187 insertions(+), 156 deletions(-) delete mode 100644 .github/workflows/deploy.yml create mode 100644 src/content/posts/markdown-cheat-sheet.md delete mode 100644 src/layouts/Markdown.astro diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index a0df8b8..0000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Deploy to GitHub Pages - -# https://docs.astro.build/en/guides/deploy/github/ - -on: - # Trigger the workflow every time you push to the `main` branch - # Using a different branch name? Replace `main` with your branch’s name - push: - branches: [ main ] - # Allows you to run this workflow manually from the Actions tab on GitHub. - workflow_dispatch: - -# Allow this job to clone the repo and create a page deployment -permissions: - contents: read - pages: write - id-token: write - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout your repository using git - uses: actions/checkout@v4 - - name: Install, build, and upload your site - uses: withastro/action@v2 - # with: - # path: . # The root location of your Astro project inside the repository. (optional) - # node-version: 20 # The specific version of Node that should be used to build your site. Defaults to 20. (optional) - # package-manager: pnpm@latest # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional) - - deploy: - needs: build - runs-on: ubuntu-latest - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 diff --git a/astro.config.mjs b/astro.config.mjs index a379e03..882e651 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -1,7 +1,4 @@ import { defineConfig } from 'astro/config'; // https://astro.build/config -export default defineConfig({ - site: 'https://Fuffy-Bean.github.io', - base: '/website', -}); +export default defineConfig({}); diff --git a/src/components/Card.astro b/src/components/Card.astro index 58f228f..3ebf349 100644 --- a/src/components/Card.astro +++ b/src/components/Card.astro @@ -34,7 +34,6 @@ const { href, title, body } = Astro.props; box-shadow: 0 0 0 rgba(#000, 0); list-style: none; - overflow: hidden; > a { @@ -93,7 +92,7 @@ const { href, title, body } = Astro.props; &:hover, &:focus-within { > a { - text-decoration: underline; + /*text-decoration: underline;*/ outline: none; } diff --git a/src/components/Music.astro b/src/components/Music.astro index 69efbba..7043b0d 100644 --- a/src/components/Music.astro +++ b/src/components/Music.astro @@ -62,10 +62,6 @@ list-style: none; } } - - &:hover, &:focus-visible { - background-color: lighten($gray, 1%); - } } #music-title { diff --git a/src/content/posts/example.md b/src/content/posts/example.md index d13182f..74e5420 100644 --- a/src/content/posts/example.md +++ b/src/content/posts/example.md @@ -1,6 +1,4 @@ --- -layout: ../../layouts/Markdown.astro - title: This is an example Post description: "Blamby ford" pubDate: 2022-07-08 @@ -14,4 +12,4 @@ tags: - "Fortnite" --- -Gay Balls even \ No newline at end of file +aurgh diff --git a/src/content/posts/markdown-cheat-sheet.md b/src/content/posts/markdown-cheat-sheet.md new file mode 100644 index 0000000..7cb5987 --- /dev/null +++ b/src/content/posts/markdown-cheat-sheet.md @@ -0,0 +1,130 @@ +--- +title: This is an example Post +description: "Cheat Sheet for Markdown" +pubDate: 2022-07-08 +image: + url: "https://docs.astro.build/assets/arc.webp" + alt: "Thumbnail of Astro arcs." +tags: + - "Faggor" +--- + +# Markdown Cheat Sheet + +Thanks for visiting [The Markdown Guide](https://www.markdownguide.org)! + +This Markdown cheat sheet provides a quick overview of all the Markdown syntax elements. It can’t cover every edge case, so if you need more information about any of these elements, refer to the reference guides for [basic syntax](https://www.markdownguide.org/basic-syntax/) and [extended syntax](https://www.markdownguide.org/extended-syntax/). + +## Basic Syntax + +These are the elements outlined in John Gruber’s original design document. All Markdown applications support these elements. + +### Heading + +# H1 +## H2 +### H3 + +### Bold + +**bold text** + +### Italic + +*italicized text* + +### Blockquote + +> blockquote + +### Ordered List + +1. First item +2. Second item +3. Third item + +### Unordered List + +- First item +- Second item +- Third item + +### Code + +`code` + +### Horizontal Rule + +--- + +### Link + +[Markdown Guide](https://www.markdownguide.org) + +### Image + +![alt text](https://www.markdownguide.org/assets/images/tux.png) + +## Extended Syntax + +These elements extend the basic syntax by adding additional features. Not all Markdown applications support these elements. + +### Table + +| Syntax | Description | +| ----------- | ----------- | +| Header | Title | +| Paragraph | Text | + +### Fenced Code Block + +``` +{ + "firstName": "John", + "lastName": "Smith", + "age": 25 +} +``` + +### Footnote + +Here's a sentence with a footnote. [^1] + +[^1]: This is the footnote. + +### Heading ID + +### My Great Heading {#custom-id} + +### Definition List + +term +: definition + +### Strikethrough + +~~The world is flat.~~ + +### Task List + +- [x] Write the press release +- [ ] Update the website +- [ ] Contact the media + +### Emoji + +That is so funny! :joy: + +(See also [Copying and Pasting Emoji](https://www.markdownguide.org/extended-syntax/#copying-and-pasting-emoji)) + +### Highlight + +I need to highlight these ==very important words==. + +### Subscript + +H~2~O + +### Superscript + +X^2^ diff --git a/src/content/projects/example-2.md b/src/content/projects/example-2.md index 1dcf758..3aa0672 100644 --- a/src/content/projects/example-2.md +++ b/src/content/projects/example-2.md @@ -1,6 +1,4 @@ --- -layout: ../../layouts/Markdown.astro - title: Project 2 description: Another one image: diff --git a/src/content/projects/example.md b/src/content/projects/example.md index fd5aba9..63f3981 100644 --- a/src/content/projects/example.md +++ b/src/content/projects/example.md @@ -1,6 +1,4 @@ --- -layout: ../../layouts/Markdown.astro - title: Project 1 description: Example Project Im working on image: diff --git a/src/content/projects/gwagwa.md b/src/content/projects/gwagwa.md index 2ae518f..7e10aa9 100644 --- a/src/content/projects/gwagwa.md +++ b/src/content/projects/gwagwa.md @@ -1,6 +1,4 @@ --- -layout: ../../layouts/Markdown.astro - title: GwaGwa description: :3 image: diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index d3e1bd3..13b3678 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -27,46 +27,51 @@ const { title, src, alt } = Astro.props;
+ diff --git a/src/pages/index.astro b/src/pages/index.astro index 51e4a9d..5d3b4e4 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -22,22 +22,24 @@ const posts = await getCollection('posts');

Who am I

-

My name is Fluffy or Michał, I'm 19 and like computers

-
-

I mainly do website stuff, work with the front and backend, but I also like networking and breaking things

-
-

My favorite language currently is Go, but I also know a few other languages that are listed below!

-
-

I use Arch btw.

+

+ My name is Michał, I go by Fluffy, I'm 19 and I like computers +

+ I mainly do website stuff, work with the front and backend, but I also like networking and breaking things +

+ My favorite language currently is Go, but I also know a few other languages that are listed below! +

+ I use Arch btw. +

Find me on

diff --git a/src/pages/posts/[...slug].astro b/src/pages/posts/[...slug].astro index 02943a3..0fb5a9f 100644 --- a/src/pages/posts/[...slug].astro +++ b/src/pages/posts/[...slug].astro @@ -1,5 +1,5 @@ --- -import { getCollection } from 'astro:content'; +import { getCollection } from "astro:content"; import Layout from "../../layouts/Layout.astro"; @@ -10,10 +10,12 @@ export async function getStaticPaths() { params: { slug: post.slug }, props: { post: post }, }; - }) + }); } const { post } = Astro.props; + +const { Content } = await post.render() --- @@ -26,7 +28,7 @@ const { post } = Astro.props;
- {post.body} +
diff --git a/src/pages/projects/[...slug].astro b/src/pages/projects/[...slug].astro index 111247a..c6829f9 100644 --- a/src/pages/projects/[...slug].astro +++ b/src/pages/projects/[...slug].astro @@ -10,10 +10,12 @@ export async function getStaticPaths() { params: { slug: project.slug }, props: { project: project }, }; - }) + }); } const { project } = Astro.props; + +const { Content } = await project.render() --- @@ -27,7 +29,7 @@ const { project } = Astro.props;
- {project.body} +
diff --git a/src/styles/_button.scss b/src/styles/_button.scss index ba22127..e32d6c4 100644 --- a/src/styles/_button.scss +++ b/src/styles/_button.scss @@ -15,8 +15,9 @@ text-decoration: none; border-radius: 9999px; - border: 0 solid $gray; - background-color: rgba($light, 0.05); + border: 0 solid transparent; + //border: 2px solid rgba($light, 0.04); + background-color: rgba($light, 0.04); color: $light; overflow: hidden; @@ -32,10 +33,10 @@ left: 0; border-radius: 9999px; - background-color: rgba($light, 0.05); + background-color: rgba($light, 0.04); - transform: scale(0); opacity: 0; + transform: scaleX(0%); pointer-events: none; } @@ -43,10 +44,9 @@ outline: 0 solid transparent; &:before { - transform: scale(1); opacity: 1; - - transition: opacity 0.3s cubic-bezier(0,1,0,1), transform 0.5s cubic-bezier(0,1,0,1); + transform: scaleX(100%); + transition: opacity 0.5s cubic-bezier(0,1,0,1), transform 0.5s cubic-bezier(0,1,0,1); } } -} \ No newline at end of file +} diff --git a/src/styles/_main.scss b/src/styles/_main.scss index a6ae2d3..b5c1728 100644 --- a/src/styles/_main.scss +++ b/src/styles/_main.scss @@ -14,7 +14,10 @@ main { background-color: $dark; box-shadow: 0 8px 8px rgba(#000, 0.3); - animation: mainSlide 1s cubic-bezier(0,1,0,1) forwards; + z-index: 10; + + // causes problems on chrome + //animation: mainSlide 1s cubic-bezier(0,1,0,1) forwards; > h1 { padding-bottom: 8px; diff --git a/src/styles/_reset.scss b/src/styles/_reset.scss index d088d20..38ba0d3 100644 --- a/src/styles/_reset.scss +++ b/src/styles/_reset.scss @@ -19,5 +19,5 @@ body { flex-direction: column; background-color: #261f1b; - color: $light + color: $light; }