diff --git a/src/components/MusicPlayer.astro b/src/components/MusicPlayer.astro deleted file mode 100644 index f6d6fd2..0000000 --- a/src/components/MusicPlayer.astro +++ /dev/null @@ -1,125 +0,0 @@ ---- -import { type CollectionEntry } from "astro:content"; -import { Icon } from "astro-icon/components"; -import { Image } from "astro:assets"; -import Song from "@components/Song.astro"; -import me from "@assets/me.webp"; - -interface Props { - isPlaying?: boolean; - posts?: CollectionEntry<"blog">[]; - nowPlaying: string; - playPercent: number; - playPositon: string; - playLength: string; - sectionClass?: string; -} - -const { - isPlaying = false, - posts, - nowPlaying, - playPercent, - playPositon, - playLength, - sectionClass, -} = Astro.props as Props; ---- - -
-
- isabel roses - - { - posts && ( - - ) - } -
- -
-
-

- {nowPlaying} -

-

isabel roses

-
- -
-
-
-
-
-
- {playPositon} - {playLength} -
-
- -
- - -
- - { - isPlaying ? ( - - ) : ( - - ) - } - - -
- - -
-
-
diff --git a/src/components/Song.astro b/src/components/Song.astro deleted file mode 100644 index 234b680..0000000 --- a/src/components/Song.astro +++ /dev/null @@ -1,41 +0,0 @@ ---- -interface Props { - title: string; - slug?: string; - index: number; - time?: string; - id?: string; -} - -const { title, slug, index, time, id } = Astro.props as Props; ---- - -
  • - { - slug ? ( - - {index} - - - {title} - - - {time && ( - {time} - )} - - ) : ( -
    - {index} - - - {title} - - - {time && ( - {time} - )} -
    - ) - } -
  • diff --git a/src/layouts/Base.astro b/src/layouts/Base.astro index 89d076d..85134b3 100644 --- a/src/layouts/Base.astro +++ b/src/layouts/Base.astro @@ -16,9 +16,7 @@ const props = Astro.props; - + diff --git a/src/pages/blog/[...slug].astro b/src/pages/blog/[...slug].astro index bc170d4..b8ecbc1 100644 --- a/src/pages/blog/[...slug].astro +++ b/src/pages/blog/[...slug].astro @@ -92,7 +92,7 @@ const nextSlug = posts[posts.indexOf(post) + 1]?.id || null; document.documentElement.scrollHeight - window.innerHeight; const scrollPercent = (scrollTop / scrollHeight) * 100; - const totalSeconds = ((scrollPercent / 100) * readTime) * 60; + const totalSeconds = (scrollPercent / 100) * readTime * 60; const currentMin = Math.floor(totalSeconds / 60); const currentSec = Math.floor(totalSeconds % 60); diff --git a/src/pages/index.astro b/src/pages/index.astro index 6d54e30..a0121ac 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,10 +1,10 @@ --- import { getCollection } from "astro:content"; import { Icon } from "astro-icon/components"; +import { Image } from "astro:assets"; +import me from "@assets/me.webp"; import Base from "@layouts/Base.astro"; -import MusicPlayer from "@components/MusicPlayer.astro"; -import Song from "@components/Song.astro"; const posts = await getCollection("blog", ({ data }) => { return !data.draft && !data.archived; @@ -18,153 +18,62 @@ import { SITE_TITLES, SITE_DESCRIPTIONS } from "@lib/consts"; description={SITE_DESCRIPTIONS.index} image="/index.png" > -
    - - -
    -
    -

    Up next

    -
      - { - posts - .slice(0, 3) - .entries() - .map(([i, post]) => ( - - )) - } -
    -
    - -
    -

    Playlists

    - +
    +
    + isabel roses +
    + I am currently studying computer science, as a third year student at + Aberystwyth University. A significant amount of my time goes into being + a Nixpkgs + committer, + where I help maintain the Nixpkgs repository.
    +
    listening to nwo
    +
    -
    -

    Share

    - -
    - -
    -

    Settings

    -
    - -
    -
    -
    +
    +
    description type shit
    +
    description type shit
    +
    + +