Skip to content

Commit

Permalink
side menu
Browse files Browse the repository at this point in the history
  • Loading branch information
GraemeFulton committed Jan 30, 2024
1 parent 153ddf6 commit ef57443
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 13 deletions.
7 changes: 5 additions & 2 deletions components/FilterCategory.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ export default function FilterCategory({
paginationRoot,
}) {
return (
<div className="display-none mb-8 p-4 lg:block text-gray-800">
<div className="display-none lg:block text-gray-800">
<h1 className="font-semibold pb-2 mb-6 text-xl capitalize text-gray-900">
Categories
</h1>
{items?.map((item, index) => {
return (
<>
{item?.subItems? <div key={`${key}${index}`} className="text-gray-800 mb-10">
<div className="">
<h1 className="font-bold pb-2 mb-2 border-b border-gray-200 pr-3 text-sm uppercase text-gray-900">
<h1 className="font-medium border-b border-gray-200 pb-2 mb-2 pr-3 text-lg capitalize text-gray-900">
{item.title}
</h1>
</div>
Expand Down
13 changes: 8 additions & 5 deletions components/toolbox/ToolboxIndexPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,16 @@ const ToolboxIndexPage = ({
{/* {title} */}


<Container maxWidth="max-w-[1320px] flex grid grid-cols-12">
<Sidebar
<Container maxWidth="max-w-[1320px] grid grid-cols-12">

<Sidebar
title={title}
paginationRoot={paginationRoot}
urlRoot={urlRoot}
filterCategories={filterCategories}
slug={currentSlug}
/>
<div className={`w-full px-0 ${title!=='All tools'?'-mt-20':''} md:pr-0 md:pl-8 mx-auto pb-20 gap-2 col-span-12 md:col-span-10 pb-10`}>
<div className={`w-full px-0 ${title!=='All tools'?'-mt-20':''} pl-0 md:pl-8 mx-auto pb-20 gap-2 col-span-12 md:col-span-10 pb-10`}>
{router.isFallback ? (
<PostTitle>Loading…</PostTitle>
) : (
Expand Down Expand Up @@ -141,9 +143,10 @@ const ToolboxIndexPage = ({

export default ToolboxIndexPage;

const Sidebar = ({ filterCategories, paginationRoot, urlRoot, slug }) => {
const Sidebar = ({ filterCategories, paginationRoot, urlRoot, slug, title }) => {
return (
<div className="hidden md:block relative col-span-2 max-w-[410px] border-r border-opacity-20">
// <div className="hidden md:block h-[fit-content] relative col-span-2 bg-white shadow-md rounded-3xl p-6">
<div className={`${title!=='All tools'?'mt-6':'' } hidden md:block h-[fit-content] relative col-span-2 rounded-3xl`}>
<div className="w-full min-h-screen flex flex-col">
<FilterCategory
urlRoot={urlRoot}
Expand Down
2 changes: 1 addition & 1 deletion lib/menus/chatTools.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const ALL_SLUGS_CATEGORY = [
{
title: "Category",
title: "Chat",
subItems: [
{
key: "chat_design",
Expand Down
2 changes: 1 addition & 1 deletion lib/menus/realityTools.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const ALL_SLUGS_CATEGORY = [
{
title: "Category",
title: "AR/VR",
subItems: [
{
key: "3d",
Expand Down
8 changes: 4 additions & 4 deletions lib/menus/uxTools.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const ALL_SLUGS_GROUPS = [
{
title: "ANALYSIS",
title: "Analysis",
subItems: [
{
key: "heatmaps",
Expand Down Expand Up @@ -35,7 +35,7 @@ const ALL_SLUGS_GROUPS = [
],
},
{
title: "BRAINSTORM",
title: "Brainstorm",
subItems: [
{
key: "collaboration",
Expand Down Expand Up @@ -64,7 +64,7 @@ const ALL_SLUGS_GROUPS = [
],
},
{
title: "PROJECT MANAGEMENT",
title: "Project Management",
subItems: [
{
key: "feedback",
Expand Down Expand Up @@ -99,7 +99,7 @@ const ALL_SLUGS_GROUPS = [
],
},
{
title: "USER JOURNEY",
title: "User Journey",
subItems: [
{
key: "journey",
Expand Down

0 comments on commit ef57443

Please sign in to comment.