From faa42f08995f1e63ba5b7b32afd391c1a9babbe8 Mon Sep 17 00:00:00 2001 From: aronmal Date: Mon, 11 Mar 2024 19:04:26 +0100 Subject: [PATCH] Chore: improved config list style --- src/routes/config/[guildId].tsx | 2 +- src/routes/config/index.tsx | 92 ++++++++++++++++++--------------- src/styles/pages/config.scss | 82 ++++++++++++++++++++--------- 3 files changed, 109 insertions(+), 67 deletions(-) diff --git a/src/routes/config/[guildId].tsx b/src/routes/config/[guildId].tsx index a731964..cc91422 100644 --- a/src/routes/config/[guildId].tsx +++ b/src/routes/config/[guildId].tsx @@ -191,7 +191,7 @@ function config() { return ( -

Configure li'l Judd in

+

Configure li'l Judd in

diff --git a/src/routes/config/index.tsx b/src/routes/config/index.tsx index 0c6a405..e5630cc 100644 --- a/src/routes/config/index.tsx +++ b/src/routes/config/index.tsx @@ -1,8 +1,4 @@ -import { - faBadgeCheck, - faCircleExclamation, - faPlus, -} from "@fortawesome/pro-regular-svg-icons"; +import { faPlusCircle, faWrench } from "@fortawesome/pro-regular-svg-icons"; import { useLocation, useNavigate } from "@solidjs/router"; import createClient from "openapi-fetch"; import { For, createResource } from "solid-js"; @@ -91,44 +87,58 @@ function index() { { deferStream: true }, ); - const icons = [faPlus, faCircleExclamation, faBadgeCheck]; - const colors = [undefined, "orange", "green"]; - return ( -

Configure li'l Judd in

-
- - {(guild, i) => { - return ( - - Server pfp -

{guild.name}

- -
- ); - }} -
+
+

Configure li'l Judd in

+
+ + {(guild) => { + return ( + + Server pfp +

{guild.name}

+ +
+ ); + }} +
+
+
+
+

Add li'l Judd to

+
+ + {(guild) => { + return ( + + Server pfp +

{guild.name}

+ +
+ ); + }} +
+
); diff --git a/src/styles/pages/config.scss b/src/styles/pages/config.scss index 4b8b5cd..a3a5fc5 100644 --- a/src/styles/pages/config.scss +++ b/src/styles/pages/config.scss @@ -1,34 +1,66 @@ .config { - .text-center { - text-align: center; - } + .group { + margin: 5rem; - .guildpfp { - width: 50px; - height: 50px; - border-radius: 100%; - } + h3 { + text-align: center; + } - label { - margin-right: 10px; - } + .guildpfp { + width: 50px; + height: 50px; + border-radius: 100%; + } - section, - a { - background-color: rgba(0, 0, 0, 0.5); - border-radius: 4px; - padding: 1rem; - max-width: 1100px; - margin: 1rem auto; - width: 100%; - } + label { + margin-right: 10px; + } - .sub { - margin-left: 10px; + section, + a { + transition: 0.3s; + transition-timing-function: ease-out; + background-color: rgba(0, 0, 0, 0.5); + border: 2px solid transparent; + border-radius: 4px; + padding: 1rem; + max-width: 1100px; + margin: 1rem auto; + width: 100%; - &.disabled { - pointer-events: none; - opacity: 0.5; + svg { + padding: 0 1rem; + + path { + transition: 0.1s; + transform: translateX(100%); + opacity: 0; + } + } + + &:hover { + transition: 1s; + transition-delay: 0.1s; + background-color: rgba(0, 0, 0, 0.4); + border: 2px solid rgba(255, 255, 255, 0.5); + + svg path { + transition: 0.5s; + transition-delay: 0.1s; + transition-timing-function: ease-out; + transform: translateX(0); + opacity: 1; + } + } + } + + .sub { + margin-left: 10px; + + &.disabled { + pointer-events: none; + opacity: 0.5; + } } } }