update link, collection header icons

This commit is contained in:
Yee Jia Wei 2023-12-16 23:33:33 +08:00
parent d976761280
commit ef33f2c948
3 changed files with 28 additions and 62 deletions

View File

@ -1,10 +1,4 @@
import useCollectionStore from "@/store/collections"; import useCollectionStore from "@/store/collections";
import {
faEllipsis,
faFolder,
faPlus,
} from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import CollectionCard from "@/components/CollectionCard"; import CollectionCard from "@/components/CollectionCard";
import { useState } from "react"; import { useState } from "react";
import MainLayout from "@/layouts/MainLayout"; import MainLayout from "@/layouts/MainLayout";
@ -13,6 +7,7 @@ import SortDropdown from "@/components/SortDropdown";
import { Sort } from "@/types/global"; import { Sort } from "@/types/global";
import useSort from "@/hooks/useSort"; import useSort from "@/hooks/useSort";
import NewCollectionModal from "@/components/ModalContent/NewCollectionModal"; import NewCollectionModal from "@/components/ModalContent/NewCollectionModal";
import PageHeader from "@/components/PageHeader";
export default function Collections() { export default function Collections() {
const { collections } = useCollectionStore(); const { collections } = useCollectionStore();
@ -28,24 +23,14 @@ export default function Collections() {
return ( return (
<MainLayout> <MainLayout>
<div className="p-5"> <div className="p-5 flex flex-col gap-5 w-full h-full">
<div className="flex gap-3 justify-between mb-5"> <PageHeader
<div className="flex gap-3"> icon={"bi-folder2"}
<div className="flex items-center gap-3"> title={"Collections"}
<FontAwesomeIcon description={"Collections you own"}
icon={faFolder} />
className="sm:w-10 sm:h-10 w-6 h-6 text-primary drop-shadow"
/>
<div>
<p className="text-3xl capitalize font-thin">
Your Collections
</p>
<p>Collections you own</p>
</div>
</div>
</div>
<div className="flex gap-3 justify-end">
<div className="relative mt-2"> <div className="relative mt-2">
<SortDropdown sortBy={sortBy} setSort={setSortBy} /> <SortDropdown sortBy={sortBy} setSort={setSortBy} />
</div> </div>
@ -63,20 +48,15 @@ export default function Collections() {
onClick={() => setNewCollectionModal(true)} onClick={() => setNewCollectionModal(true)}
> >
<p className="group-hover:opacity-0 duration-100">New Collection</p> <p className="group-hover:opacity-0 duration-100">New Collection</p>
<FontAwesomeIcon <i className="bi-plus text-5xl group-hover:text-7xl group-hover:-mt-6 text-primary drop-shadow duration-100"></i>
icon={faPlus}
className="w-8 h-8 text-primary group-hover:w-12 group-hover:h-12 group-hover:-mt-10 duration-100"
/>
</div> </div>
</div> </div>
{sortedCollections.filter((e) => e.ownerId !== data?.user.id)[0] ? ( {sortedCollections.filter((e) => e.ownerId !== data?.user.id)[0] ? (
<> <>
<div className="flex items-center gap-3 my-5"> <div className="flex items-center gap-3 my-5">
<FontAwesomeIcon <i className="bi-folder2 text-3xl sm:text-2xl text-primary drop-shadow"></i>
icon={faFolder}
className="sm:w-10 sm:h-10 w-6 h-6 text-primary drop-shadow"
/>
<div> <div>
<p className="text-3xl capitalize font-thin"> <p className="text-3xl capitalize font-thin">
Other Collections Other Collections

View File

@ -5,9 +5,8 @@ import useLinks from "@/hooks/useLinks";
import MainLayout from "@/layouts/MainLayout"; import MainLayout from "@/layouts/MainLayout";
import useLinkStore from "@/store/links"; import useLinkStore from "@/store/links";
import { Sort } from "@/types/global"; import { Sort } from "@/types/global";
import { faLink } from "@fortawesome/free-solid-svg-icons"; import React, { useState } from "react";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import PageHeader from "@/components/PageHeader";
import { useState } from "react";
export default function Links() { export default function Links() {
const { links } = useLinkStore(); const { links } = useLinkStore();
@ -19,23 +18,18 @@ export default function Links() {
return ( return (
<MainLayout> <MainLayout>
<div className="p-5 flex flex-col gap-5 w-full h-full"> <div className="p-5 flex flex-col gap-5 w-full h-full">
<div className="flex gap-3 justify-between"> <PageHeader
<div className="flex items-center gap-3"> icon={"bi-link-45deg"}
<FontAwesomeIcon title={"All Links"}
icon={faLink} description={"Links from every Collections"}
className="sm:w-10 sm:h-10 w-6 h-6 text-primary drop-shadow" />
/>
<div>
<p className="text-3xl capitalize font-thin">All Links</p>
<p>Links from every Collections</p>
</div>
</div>
<div className="flex gap-3 justify-end">
<div className="relative mt-2"> <div className="relative mt-2">
<SortDropdown sortBy={sortBy} setSort={setSortBy} /> <SortDropdown sortBy={sortBy} setSort={setSortBy} />
</div> </div>
</div> </div>
{links[0] ? ( {links[0] ? (
<div className="grid 2xl:grid-cols-3 xl:grid-cols-2 grid-cols-1 gap-5"> <div className="grid 2xl:grid-cols-3 xl:grid-cols-2 grid-cols-1 gap-5">
{links.map((e, i) => { {links.map((e, i) => {

View File

@ -4,9 +4,8 @@ import useLinks from "@/hooks/useLinks";
import MainLayout from "@/layouts/MainLayout"; import MainLayout from "@/layouts/MainLayout";
import useLinkStore from "@/store/links"; import useLinkStore from "@/store/links";
import { Sort } from "@/types/global"; import { Sort } from "@/types/global";
import { faThumbTack } from "@fortawesome/free-solid-svg-icons"; import React, { useState } from "react";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import PageHeader from "@/components/PageHeader";
import { useState } from "react";
export default function PinnedLinks() { export default function PinnedLinks() {
const { links } = useLinkStore(); const { links } = useLinkStore();
@ -18,19 +17,12 @@ export default function PinnedLinks() {
return ( return (
<MainLayout> <MainLayout>
<div className="p-5 flex flex-col gap-5 w-full h-full"> <div className="p-5 flex flex-col gap-5 w-full h-full">
<div className="flex gap-3 justify-between"> <PageHeader
<div className="flex items-center gap-3"> icon={"bi-pin-angle"}
<FontAwesomeIcon title={"Pinned Links"}
icon={faThumbTack} description={"Pinned Links from your Collections"}
className="sm:w-10 sm:h-10 w-6 h-6 text-primary drop-shadow" />
/> <div className="flex gap-3 justify-end">
<div>
<p className="text-3xl capitalize font-thin">Pinned Links</p>
<p>Pinned Links from your Collections</p>
</div>
</div>
<div className="relative mt-2"> <div className="relative mt-2">
<SortDropdown sortBy={sortBy} setSort={setSortBy} /> <SortDropdown sortBy={sortBy} setSort={setSortBy} />
</div> </div>