From 1beed29a838774cc3b177f38bb765d9e307e9f28 Mon Sep 17 00:00:00 2001 From: LynithDev <61880709+LynithDev@users.noreply.github.com> Date: Sat, 6 Jan 2024 11:35:28 +0100 Subject: Grayscale hover on navbar dropdown elements + client side mod fetching --- apps/website/config.ts | 2 +- .../src/components/base/navbar/NavbarElement.astro | 2 +- apps/website/src/pages/mods.astro | 38 +++++++++++++++++----- apps/website/src/types/Config.d.ts | 2 +- apps/website/tailwind.config.ts | 4 +++ 5 files changed, 36 insertions(+), 12 deletions(-) (limited to 'apps') diff --git a/apps/website/config.ts b/apps/website/config.ts index 1d1daef..bb52e9a 100644 --- a/apps/website/config.ts +++ b/apps/website/config.ts @@ -7,7 +7,7 @@ export const configConst = { youtube: 'https://youtube.com/', discord: 'https://discord.gg/', github: 'https://github.com/Polyfrost', - modrinth: 'https://modrinth.com/user/Wyvest', + modrinthId: 'a6VEZDKe', // user id of Wyvest }, navbar: { left: [ diff --git a/apps/website/src/components/base/navbar/NavbarElement.astro b/apps/website/src/components/base/navbar/NavbarElement.astro index c2c76b3..5e37253 100644 --- a/apps/website/src/components/base/navbar/NavbarElement.astro +++ b/apps/website/src/components/base/navbar/NavbarElement.astro @@ -74,7 +74,7 @@ function isCurrentPage(url: string): boolean { {element.dropdown.map(item => (
  • -
    +
    {item.logo && }
    diff --git a/apps/website/src/pages/mods.astro b/apps/website/src/pages/mods.astro index 20e42b5..a0286ee 100644 --- a/apps/website/src/pages/mods.astro +++ b/apps/website/src/pages/mods.astro @@ -9,11 +9,7 @@ import configConst from '@config'; import Layout from '@layouts/Layout.astro'; import { Code } from 'astro:components'; -const res = await fetch('https://api.modrinth.com/v2/user/Wyvest/projects'); -const data = await res.json(); -const mods = data.filter((mod: any) => { - return mod.slug !== 'oneconfig' && mod.slug !== 'easeify'; -}); +const modrinthId = configConst.socials.modrinthId; --- @@ -47,19 +43,19 @@ const mods = data.filter((mod: any) => {
    Redefining modding, one mod at a time
    - +
    - {Math.floor(mods.length / 5) * 5}+ mods. Unparalleled new features. OneConfig. We combine our groundbreaking library with mods with no equivalent anywhere else. + 16+ mods. Unparalleled new features. OneConfig. We combine our groundbreaking library with mods with no equivalent anywhere else.
    -
    {mods.length} maintained mods
    +
    16 maintained mods
    OneConfig is a revolutionary new way to configure mods. It allows you to configure all of your mods in one place, with a beautiful UI. @@ -138,10 +134,34 @@ const mods = data.filter((mod: any) => {
    Get our mods, available on Modrinth and GitHub.
    - +
    + + diff --git a/apps/website/src/types/Config.d.ts b/apps/website/src/types/Config.d.ts index 87f9b58..6e714b9 100644 --- a/apps/website/src/types/Config.d.ts +++ b/apps/website/src/types/Config.d.ts @@ -49,7 +49,7 @@ export interface Config { // twitter: string, discord: string, github: string, - modrinth: string, + modrinthId: string, }, navbar: { left: NavbarElement[], diff --git a/apps/website/tailwind.config.ts b/apps/website/tailwind.config.ts index 8a37a65..214421a 100644 --- a/apps/website/tailwind.config.ts +++ b/apps/website/tailwind.config.ts @@ -97,6 +97,10 @@ const config: Config = { lineHeight: { none: '0', }, + + transitionProperty: { + filter: 'filter', + }, }, }, plugins: [], -- cgit