general layout: removes drawer-component and adjusts font sizes in sidebar
This commit is contained in:
committed by
Johannes Kirschbauer
parent
8a4fe1405a
commit
1a24a05034
3
.gitignore
vendored
3
.gitignore
vendored
@@ -16,6 +16,9 @@ nixos.qcow2
|
|||||||
/docs/out
|
/docs/out
|
||||||
**/.local.env
|
**/.local.env
|
||||||
|
|
||||||
|
# MacOS stuff
|
||||||
|
**/.DS_store
|
||||||
|
|
||||||
# dream2nix
|
# dream2nix
|
||||||
.dream2nix
|
.dream2nix
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export const SidebarListItem = (props: SidebarListItem) => {
|
|||||||
class="sidebar__list__content"
|
class="sidebar__list__content"
|
||||||
tag="span"
|
tag="span"
|
||||||
hierarchy="body"
|
hierarchy="body"
|
||||||
size="s"
|
size="xs"
|
||||||
weight="normal"
|
weight="normal"
|
||||||
color="primary"
|
color="primary"
|
||||||
inverted={true}
|
inverted={true}
|
||||||
|
|||||||
@@ -9,6 +9,8 @@
|
|||||||
|
|
||||||
.sidebar {
|
.sidebar {
|
||||||
@apply bg-inv-2 h-full border border-solid border-inv-2 min-w-72 rounded-xl;
|
@apply bg-inv-2 h-full border border-solid border-inv-2 min-w-72 rounded-xl;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar__body {
|
.sidebar__body {
|
||||||
@@ -19,9 +21,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.sidebar__section {
|
.sidebar__section {
|
||||||
padding: theme(padding.2);
|
|
||||||
/* background-color: rgba(var(--clr-bg-inv-3) / 0.9); */
|
|
||||||
@apply bg-primary-800/90;
|
@apply bg-primary-800/90;
|
||||||
|
|
||||||
|
padding: theme(padding.2);
|
||||||
border-radius: theme(borderRadius.md);
|
border-radius: theme(borderRadius.md);
|
||||||
|
|
||||||
::marker {
|
::marker {
|
||||||
|
|||||||
@@ -21,17 +21,17 @@ export const SidebarSection = (props: {
|
|||||||
<details class="sidebar__section accordeon" open>
|
<details class="sidebar__section accordeon" open>
|
||||||
<summary class="accordeon__header">
|
<summary class="accordeon__header">
|
||||||
<Typography
|
<Typography
|
||||||
class="inline-flex w-full gap-2 uppercase"
|
class="inline-flex w-full gap-2 uppercase !tracking-wider"
|
||||||
tag="p"
|
tag="p"
|
||||||
hierarchy="body"
|
hierarchy="body"
|
||||||
size="xs"
|
size="xxs"
|
||||||
weight="normal"
|
weight="normal"
|
||||||
color="tertiary"
|
color="tertiary"
|
||||||
inverted={true}
|
inverted={true}
|
||||||
>
|
>
|
||||||
<Icon icon={props.icon} />
|
<Icon class="opacity-90" icon={props.icon} size={13} />
|
||||||
{title}
|
{title}
|
||||||
<Icon icon="CaretDown" class="ml-auto" />
|
<Icon icon="CaretDown" class="ml-auto" size={10} />
|
||||||
</Typography>
|
</Typography>
|
||||||
</summary>
|
</summary>
|
||||||
<div class="accordeon__body">{children}</div>
|
<div class="accordeon__body">{children}</div>
|
||||||
@@ -60,7 +60,7 @@ export const Sidebar = (props: RouteSectionProps) => {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div class="sidebar opacity-95">
|
<div class="sidebar">
|
||||||
<Show
|
<Show
|
||||||
when={query.data}
|
when={query.data}
|
||||||
fallback={<SidebarHeader clanName={"Untitled"} />}
|
fallback={<SidebarHeader clanName={"Untitled"} />}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.fnt-body-xxs {
|
.fnt-body-xxs {
|
||||||
font-size: 0.6875rem;
|
font-size: 0.75rem;
|
||||||
line-height: 132%;
|
line-height: 132%;
|
||||||
letter-spacing: 0.00688rem;
|
letter-spacing: 0.00688rem;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,6 +77,7 @@ export type IconVariant = keyof typeof icons;
|
|||||||
|
|
||||||
interface IconProps extends JSX.SvgSVGAttributes<SVGElement> {
|
interface IconProps extends JSX.SvgSVGAttributes<SVGElement> {
|
||||||
icon: IconVariant;
|
icon: IconVariant;
|
||||||
|
size?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Icon: Component<IconProps> = (props) => {
|
const Icon: Component<IconProps> = (props) => {
|
||||||
@@ -85,8 +86,8 @@ const Icon: Component<IconProps> = (props) => {
|
|||||||
const IconComponent = icons[local.icon];
|
const IconComponent = icons[local.icon];
|
||||||
return IconComponent ? (
|
return IconComponent ? (
|
||||||
<IconComponent
|
<IconComponent
|
||||||
width={16}
|
width={iconProps.size || 16}
|
||||||
height={16}
|
height={iconProps.size || 16}
|
||||||
viewBox="0 0 48 48"
|
viewBox="0 0 48 48"
|
||||||
// @ts-expect-error: dont know, fix this type nit later
|
// @ts-expect-error: dont know, fix this type nit later
|
||||||
ref={iconProps.ref}
|
ref={iconProps.ref}
|
||||||
|
|||||||
@@ -72,6 +72,11 @@ html {
|
|||||||
@apply font-sans;
|
@apply font-sans;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
|
|
||||||
|
-webkit-user-select: none; /* Safari */
|
||||||
|
-moz-user-select: none; /* Firefox */
|
||||||
|
-ms-user-select: none; /* Internet Explorer/Edge */
|
||||||
|
user-select: none; /* Standard */
|
||||||
}
|
}
|
||||||
|
|
||||||
.accordeon {
|
.accordeon {
|
||||||
@@ -81,7 +86,7 @@ html {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.accordeon__header {
|
.accordeon__header {
|
||||||
padding: theme(padding.2) theme(padding[1.5]);
|
padding: theme(padding.2) theme(padding[1.5]) theme(padding.1);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -90,5 +95,4 @@ html {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.accordeon__body {
|
.accordeon__body {
|
||||||
padding: theme(padding.2) 0 theme(padding.1);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,20 +17,12 @@ export const Layout: Component<RouteSectionProps> = (props) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div class="h-screen w-full p-4 bg-def-2">
|
<div class="h-screen w-full p-4 bg-def-2">
|
||||||
<div class="h-full flex">
|
<div class="flex flex-row-reverse w-full h-full">
|
||||||
<div
|
<div class="flex-1 my-2 ml-8 overflow-x-hidden overflow-y-scroll rounded-lg border bg-def-1 border-def-3">
|
||||||
class="z-40 h-full overflow-hidden"
|
|
||||||
classList={{
|
|
||||||
hidden:
|
|
||||||
props.location.pathname === "welcome" || clanList().length === 0,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Sidebar {...props} />
|
|
||||||
</div>
|
|
||||||
<div class="w-full my-2 ml-8 overflow-x-hidden overflow-y-scroll rounded-lg border bg-def-1 border-def-3">
|
|
||||||
{props.children}
|
{props.children}
|
||||||
</div>
|
</div>
|
||||||
|
<Sidebar {...props} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
6
pkgs/webview-ui/app/stylelint.config.js
Normal file
6
pkgs/webview-ui/app/stylelint.config.js
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
module.exports = {
|
||||||
|
extends: ["stylelint-config-standard", "stylelint-config-tailwindcss"],
|
||||||
|
rules: {
|
||||||
|
// You can adjust rules here
|
||||||
|
},
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user