feat: improve & fix some styles

This commit is contained in:
Sonny
2023-11-07 17:54:51 +01:00
parent a2a4d145df
commit 3497c3f92d
9 changed files with 60 additions and 40 deletions

View File

@@ -24,9 +24,9 @@
cursor: pointer; cursor: pointer;
height: fit-content; height: fit-content;
width: 100%; width: 100%;
font-size: 0.9em;
background-color: $white; background-color: $white;
padding: 7px 12px; padding: 0.5em 1em;
border: 1px solid $lightest-grey;
border-bottom: 2px solid $lightest-grey; border-bottom: 2px solid $lightest-grey;
border-radius: 3px; border-radius: 3px;
transition: 0.15s; transition: 0.15s;

View File

@@ -39,20 +39,17 @@ export default function Links({
return ( return (
<div className={styles["links-wrapper"]}> <div className={styles["links-wrapper"]}>
<h2 className={styles["category-header"]}> <h2 className={styles["category-header"]}>
<span {isMobile && (
className={styles["category-name"]} <ButtonLink
style={{ display: "flex", alignItems: "center", gap: ".25em" }} style={{
> display: "flex",
{isMobile && ( }}
<ButtonLink onClick={openMobileModal}
style={{ >
display: "flex", <RxHamburgerMenu size={"1.5em"} style={{ marginRight: ".5em" }} />
}} </ButtonLink>
onClick={openMobileModal} )}
> <span className={styles["category-name"]}>
<RxHamburgerMenu size={"1.5em"} style={{ marginRight: ".5em" }} />
</ButtonLink>
)}
{name} {name}
{links.length > 0 && ( {links.length > 0 && (
<span className={styles["links-count"]}> {links.length}</span> <span className={styles["links-count"]}> {links.length}</span>

View File

@@ -23,7 +23,7 @@
} }
.links-wrapper { .links-wrapper {
height: calc(100% - 54px); // FIXME: eurk height: calc(100%); // FIXME: eurk
min-width: 0; min-width: 0;
padding: 10px; padding: 10px;
display: flex; display: flex;
@@ -45,10 +45,12 @@
.category-header { .category-header {
display: flex; display: flex;
gap: 0.25em;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
& .category-name { & .category-name {
min-width: 0;
width: 100%; width: 100%;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;

View File

@@ -1,5 +1,5 @@
import ButtonLink from "components/ButtonLink"; import ButtonLink from "components/ButtonLink";
import { BsSearch } from "react-icons/bs"; import { BiSearchAlt } from "react-icons/bi";
import styles from "./quickactions.module.scss"; import styles from "./quickactions.module.scss";
@@ -10,7 +10,7 @@ export default function QuickActionSearch({
}) { }) {
return ( return (
<ButtonLink className={styles["action"]} onClick={openSearchModal}> <ButtonLink className={styles["action"]} onClick={openSearchModal}>
<BsSearch /> <BiSearchAlt />
</ButtonLink> </ButtonLink>
); );
} }

View File

@@ -51,6 +51,7 @@ export default function CategoryItem({
gap: ".25em", gap: ".25em",
transition: "none", transition: "none",
}} }}
title={category.name}
> >
{category.id === categoryActive.id ? ( {category.id === categoryActive.id ? (
<AiFillFolderOpen size={24} /> <AiFillFolderOpen size={24} />

View File

@@ -11,25 +11,23 @@
} }
.items { .items {
padding-right: 5px; overflow-y: auto;
overflow-y: scroll; overflow-x: hidden;
} }
.item { .item {
border-bottom: 2px solid transparent !important;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
&.active { &.active {
color: $white; color: $blue;
background: $blue; border-bottom: 2px solid $lightest-grey !important;
border-color: $blue;
} }
&:hover:not(.active) { &:hover:not(.active) {
color: $blue; color: $blue;
background: $white;
border-bottom: 2px solid $blue;
} }
&.active .menu-item .option-edit svg { &.active .menu-item .option-edit svg {
@@ -37,7 +35,7 @@
} }
& .content { & .content {
width: 100%; width: calc(100% - 42px);
display: flex; display: flex;
flex: 1; flex: 1;
align-items: center; align-items: center;
@@ -55,9 +53,6 @@
color: $grey; color: $grey;
} }
} }
&:hover .content {
width: calc(100% - 42px);
}
& .menu-item { & .menu-item {
height: 100%; height: 100%;

View File

@@ -9,9 +9,9 @@ export default function FavoriteItem({ link }: { link: Link }): JSX.Element {
const { name, url, category } = link; const { name, url, category } = link;
return ( return (
<li className={styles["item"]}> <li className={styles["item"]}>
<LinkTag href={url} target={"_blank"} rel={"noreferrer"}> <LinkTag href={url} target={"_blank"} rel={"noreferrer"} title={name}>
<LinkFavicon url={url} size={24} /> <LinkFavicon url={url} size={24} noMargin />
<span>{name}</span> <span className={styles["link-name"]}>{name}</span>
<span className={styles["category"]}> - {category.name}</span> <span className={styles["category"]}> - {category.name}</span>
</LinkTag> </LinkTag>
</li> </li>

View File

@@ -27,16 +27,29 @@
& a { & a {
width: 100%; width: 100%;
color: inherit; color: inherit;
padding: 0.65em 1.15em; padding: 0.5em 1em;
border: 0 !important; border: 0 !important;
display: flex; display: flex;
align-items: center; align-items: center;
gap: 0.25em; gap: 0.25em;
} }
& .link-name {
display: block;
white-space: nowrap;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
& .category { & .category {
color: $grey; max-width: 75px;
font-size: 0.85em; font-size: 0.85em;
text-overflow: ellipsis;
white-space: nowrap;
color: $grey;
display: block;
overflow: hidden;
} }
&:not(:last-child) { &:not(:last-child) {

View File

@@ -1,11 +1,12 @@
@import "keyframes.scss"; @import "keyframes.scss";
@import "colors.scss"; @import "colors.scss";
* { *:not(html) {
box-sizing: border-box;
outline: 0; outline: 0;
margin: 0; margin: 0;
padding: 0; padding: 0;
box-sizing: border-box;
scroll-behavior: smooth;
} }
html, html,
@@ -13,13 +14,24 @@ body {
height: 100dvh; height: 100dvh;
width: 100dvw; width: 100dvw;
color: $black; color: $black;
background-color: $light-grey;
font-family: "Poppins", sans-serif; font-family: "Poppins", sans-serif;
padding: 0; background-color: $light-grey;
margin: 0; }
html {
overflow: hidden; overflow: hidden;
} }
body {
overflow: auto;
scrollbar-gutter: stable both-edges;
&.lock-scroll {
scrollbar-gutter: unset;
overflow: hidden;
}
}
#__next { #__next {
height: 100%; height: 100%;
width: 100%; width: 100%;