Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/HNG-118-external-static-pages-footer-component #229

Closed
wants to merge 88 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
6e47d18
feat: develop questions form inquiries o FAQ page
abdulmalikyusuf Jul 19, 2024
c22f410
feat: develop questions form inquiries o FAQ page
abdulmalikyusuf Jul 19, 2024
40990e3
Merge branch 'hngprojects:dev' into feat/53-questions-form
abdulmalikyusuf Jul 19, 2024
d5f2422
Merge branch 'feat/53-questions-form' of https://github.com/abdulmali…
abdulmalikyusuf Jul 19, 2024
d2e1e4b
fix: added one more test
abdulmalikyusuf Jul 20, 2024
fc6cc1d
Merge branch 'feat/53-questions-form' of https://github.com/abdulmali…
abdulmalikyusuf Jul 20, 2024
258ad89
Merge branch 'hngprojects:dev' into feat/53-questions-form
abdulmalikyusuf Jul 20, 2024
a433389
fix: removed testing
abdulmalikyusuf Jul 20, 2024
593cc2e
Merge branch 'dev' of https://github.com/hngprojects/hng_boilerplate_…
abdulmalikyusuf Jul 20, 2024
75a84a6
Merge branch 'feat/53-questions-form' of https://github.com/abdulmali…
abdulmalikyusuf Jul 20, 2024
64bf0db
feat: implement cookie consent banner with custom button styles
KehindeDaniels Jul 20, 2024
467bf04
merge: upstream/main into feat/HNG-28-floating-footer-cookie-consent-…
KehindeDaniels Jul 20, 2024
75f1e21
feat: created footer component for static external pages
Frankpesta Jul 20, 2024
3842777
feat: implement floating footer cookie consent component
KehindeDaniels Jul 20, 2024
d5f76fc
fix: resolve merge conflicts with upstream/main
KehindeDaniels Jul 20, 2024
6b3e20f
fix: change color class to arbitary class
abdulmalikyusuf Jul 20, 2024
551c3da
feat(116):user-dashboard-password-settings added route for it
Lftobs Jul 20, 2024
bbe66a8
feat(116):user-dashboard-password-settings (added component dir for d…
Lftobs Jul 20, 2024
aa6d984
feat(116):user-dashboard-password-settings (completed password update…
Lftobs Jul 20, 2024
be36ee3
feat(116):user-dashboard-password-settings (completed password update…
Lftobs Jul 20, 2024
bb56ffc
Merge branch 'hngprojects:dev' into feat/HNG-28-floating-footer-cooki…
KehindeDaniels Jul 20, 2024
df7c329
Merge branch 'dev' of https://github.com/hngprojects/hng_boilerplate_…
KehindeDaniels Jul 20, 2024
71875f2
Merge branch 'feat/HNG-28-floating-footer-cookie-consent-component' o…
KehindeDaniels Jul 20, 2024
5a3e796
fix: added max-width to the FAQ form component
abdulmalikyusuf Jul 20, 2024
54e57b0
Merge branch 'dev' into feat/116-User-Dashboard-Password-Settings-Page
Lftobs Jul 20, 2024
7ec0d9b
fix: added max-width to the FAQ form component
abdulmalikyusuf Jul 20, 2024
25cfa6b
integrate existing button component into FooterCookieConsent component
KehindeDaniels Jul 20, 2024
ca11f94
chore: remove unused components to clean up the codebase
KehindeDaniels Jul 20, 2024
f270e8d
Merge branch 'dev' of https://github.com/hngprojects/hng_boilerplate_…
KehindeDaniels Jul 20, 2024
426c3f3
feat: created footer component for static external pages
Frankpesta Jul 20, 2024
462758a
Merge branch 'feat/HNG-118-external-static-pages-footer-component' of…
Frankpesta Jul 20, 2024
79074af
feat: created footer component for static external pages
Frankpesta Jul 20, 2024
f98323e
Merge branch 'feat/HNG-118-external-static-pages-footer-component' of…
Frankpesta Jul 20, 2024
b86425d
Merge branch 'feat/53-questions-form' of https://github.com/abdulmali…
abdulmalikyusuf Jul 20, 2024
c2dcbdd
Merge branch 'dev' of https://github.com/hngprojects/hng_boilerplate_…
abdulmalikyusuf Jul 20, 2024
85398eb
fix: ran lint:fix
abdulmalikyusuf Jul 20, 2024
73f35ef
super admin side bar component
wale2009 Jul 20, 2024
5fac0d1
feat: develop the latest article card component
Adufe-Obanijesu Jul 19, 2024
3d55d6b
fix: fix the image overflow and make the article card into a link
Adufe-Obanijesu Jul 19, 2024
620c121
fix: fix conflicts in pnpm-lock.yaml
Adufe-Obanijesu Jul 20, 2024
8ae69b4
fix: fix the grid layout for desktop view
Adufe-Obanijesu Jul 20, 2024
dc1af94
fix: fix the letter spacing of description
Adufe-Obanijesu Jul 20, 2024
bf1b2e3
fix: fix lint errors
Adufe-Obanijesu Jul 20, 2024
9ffce57
fix: added id to the article interface
Adufe-Obanijesu Jul 20, 2024
b6b83a2
fix: added dot before the creation date
Adufe-Obanijesu Jul 20, 2024
ac20498
fix: fix lint error
Adufe-Obanijesu Jul 20, 2024
43a47be
fix: use global styles
Adufe-Obanijesu Jul 20, 2024
b6957da
feat:OTP verification modal
Demandtech Jul 20, 2024
721f2b9
fix: lint errors from BlogCards
Adufe-Obanijesu Jul 20, 2024
6d07901
feat(116):user-dashboard-password-settings (completed password update…
Lftobs Jul 20, 2024
0c16aa1
Merge branch 'dev' into feat/116-User-Dashboard-Password-Settings-Page
Lftobs Jul 20, 2024
afc9372
fix: use global styles
Adufe-Obanijesu Jul 20, 2024
41c55bb
fix: eslint fix
Demandtech Jul 20, 2024
ae70e8d
feat(116):user-dashboard-password-settings (completed password update…
Lftobs Jul 20, 2024
a91ab12
Merge pull request #238 from Demandtech/feat/HNG-21-otp-verification
SirhmVFX Jul 20, 2024
f950fb1
Merge branch 'dev' into feat/116-User-Dashboard-Password-Settings-Page
Lftobs Jul 20, 2024
1ab8c90
Merge pull request #235 from Adufe-Obanijesu/feat/HNG-26-latest-artic…
SirhmVFX Jul 20, 2024
984fad1
Merge branch 'dev' into feat/52-supper-admin-side-bar-component
wale2009 Jul 20, 2024
1528c18
feat(116):user-dashboard-password-settings (completed password update…
Lftobs Jul 20, 2024
db2012b
fix: removed arbitary color classes
abdulmalikyusuf Jul 20, 2024
98417a2
Merge branch 'dev' of https://github.com/hngprojects/hng_boilerplate_…
abdulmalikyusuf Jul 20, 2024
aea32e8
Merge pull request #197 from KehindeDaniels/feat/HNG-28-floating-foot…
chumex412 Jul 20, 2024
0c2f5f1
installed switch components
Jul 20, 2024
b58ecf0
Merge pull request #247 from SirhmVFX/fix
PrudentBird Jul 20, 2024
31abb27
Merge pull request #243 from hngprojects/feat/116-User-Dashboard-Pass…
SirhmVFX Jul 21, 2024
d97a5dd
installed accordion components
Jul 21, 2024
c308f6b
installed accordion components
Jul 21, 2024
945894d
chore: Update @typescript-eslint/parser and @typescript-eslint/eslint…
psalm987 Jul 21, 2024
bf8fa8e
feat/52-supper-admin-side-bar-component
wale2009 Jul 21, 2024
29ee0c2
Merge branch 'hngprojects:dev' into feat/52-supper-admin-side-bar-com…
wale2009 Jul 21, 2024
dffa222
fix: PNPM lint issues
psalm987 Jul 21, 2024
58d034a
Merge branch 'dev' of https://github.com/hngprojects/hng_boilerplate_…
abdulmalikyusuf Jul 21, 2024
855115f
Merge pull request #261 from hngprojects/chore-Update-libraries
chumex412 Jul 21, 2024
be61246
Merge branch 'hngprojects:dev' into feat/52-supper-admin-side-bar-com…
wale2009 Jul 21, 2024
b9ce760
Merge branch 'dev' of https://github.com/hngprojects/hng_boilerplate_…
abdulmalikyusuf Jul 21, 2024
570a3da
conflict
Jul 21, 2024
9fb04a4
fix
Jul 21, 2024
dbb0529
Merge pull request #252 from SirhmVFX/fix
PrudentBird Jul 21, 2024
c6abc55
Merge pull request #237 from wale2009/feat/52-supper-admin-side-bar-c…
chumex412 Jul 21, 2024
38d24da
Merge pull request #264 from abdulmalikyusuf/feat/53-questions-form
chumex412 Jul 21, 2024
6f02913
feat:created footer component for external static pages
Frankpesta Jul 21, 2024
25eee4c
feat: created footer component for static external pages
Frankpesta Jul 20, 2024
a0ed239
feat: created footer component for static external pages
Frankpesta Jul 20, 2024
d358e05
feat: created footer component for static external pages
Frankpesta Jul 20, 2024
646dfef
feat:created footer component for external static pages
Frankpesta Jul 21, 2024
36ad8b4
Merge branch 'feat/HNG-118-external-static-pages-footer-component' of…
Frankpesta Jul 21, 2024
54fe961
feat:created external static pages footer component
Frankpesta Jul 21, 2024
b372d4a
feat:created external static pages footer component
Frankpesta Jul 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions app/components/BlogCards.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import type { FC } from "react";

interface BlogCardProps {
interface BlogCardProperties {
title: string;
description: string;
date: string;
Expand All @@ -12,7 +12,7 @@ interface BlogCardProps {
link: string;
}

const BlogCard: React.FC<BlogCardProps> = ({
const BlogCard: FC<BlogCardProperties> = ({
title,
description,
date,
Expand All @@ -24,31 +24,31 @@ const BlogCard: React.FC<BlogCardProps> = ({
link,
}) => {
return (
<div className="max-w-sm lg:max-w-full lg:flex lg:flex-row rounded overflow-hidden shadow-lg m-4">
<img className="w-full lg:w-1/3 lg:order-2" src={blogImage} alt={title} />
<div className="p-4 lg:w-2/3 lg:order-1">
<div className="flex items-center mb-2">
<span className="inline-block w-3 h-3 rounded-full bg-gray-400 mr-2"></span>
<div className="m-4 max-w-sm overflow-hidden rounded shadow-lg lg:flex lg:max-w-full lg:flex-row">
<img className="w-full lg:order-2 lg:w-1/3" src={blogImage} alt={title} />
<div className="p-4 lg:order-1 lg:w-2/3">
<div className="mb-2 flex items-center">
<span className="mr-2 inline-block h-3 w-3 rounded-full bg-gray-400"></span>
<span className="text-sm font-semibold text-gray-700">{tag}</span>
</div>
<div>
<a href={link} className="text-black hover:text-blue-800">
<h3 className="font-bold text-xl mb-2">{title}</h3>
<h3 className="mb-2 text-xl font-bold">{title}</h3>
</a>
<p className="text-gray-700 text-base mb-4">{description}</p>
<p className="mb-4 text-base text-gray-700">{description}</p>
</div>
<div className="flex justify-between text-gray-500 text-sm mb-4">
<div className="mb-4 flex justify-between text-sm text-gray-500">
<span>{date}</span>
<span>{timeOfReading} mins Read</span>
</div>
<div className="flex items-center">
<img
className="w-10 h-10 rounded-full mr-4"
className="mr-4 h-10 w-10 rounded-full"
src={authorProfilePicture}
alt={authorName}
/>
<div className="text-sm">
<p className="text-gray-900 leading-none">{authorName}</p>
<p className="leading-none text-gray-900">{authorName}</p>
</div>
</div>
</div>
Expand Down
123 changes: 123 additions & 0 deletions app/components/SuperAdminSideBar/SideNarBarItems.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
import type { LinkProps } from "@remix-run/react";

export type MenuItem = {
name: string;
icon?: string;
to: LinkProps["to"];
rightIcon?: string;
subItems?: SubMenuItem[];
};

export type SubMenuItem = {
name: string;
icon: string;
to: LinkProps["to"];
};

export const mainMenuItems: MenuItem[] = [
{ name: "Dashboard", icon: "/icons/dashboard.png", to: "/admin/dashboard" },
{ name: "Products", icon: "/icons/products.png", to: "/admin/products" },
{ name: "Users", icon: "/icons/users.png", to: "/admin/users" },
{ name: "Email Template", icon: "/icons/email.png", to: "/admin/email" },
{
name: "Squeeze Pages",
icon: "/icons/squeeze.png",
to: "/admin/squeeze-pages",
},
{
name: "Waitlist Page",
icon: "/icons/waitlist.png",
to: "/admin/waitlist-page",
},
{ name: "Settings", icon: "/icons/settings.png", to: "#" },
];

export const settingsMenuItems: MenuItem[] = [
{ name: "Profile", to: "/admin/settings/profile" },
{
name: "General",
icon: "/icons/general.png",
to: "/admin/settings/general",
},
{
name: "Account Security",
icon: "/icons/account.png",
to: "/admin/settings/account",
subItems: [
{
name: "Privacy Settings",
icon: "/icons/privacy.png",
to: "/admin/settings/account/privacy",
},
{
name: "Connected Accounts",
icon: "/icons/connected.png",
to: "/admin/settings/account/connected",
},
],
},
{
name: "Notification",
icon: "/icons/notification.png",
to: "/admin/settings/notification",
subItems: [
{
name: "Privacy Settings",
icon: "/icons/privacy.png",
to: "/admin/settings/notification/privacy",
},
{
name: "Connected Account",
icon: "/icons/connected.png",
to: "/admin/settings/notification/connected",
},
{
name: "Two Factor Authentication",
icon: "/icons/two.png",
to: "/admin/settings/notification/Auth",
},
{
name: "Password Change",
icon: "/icons/password.png",
to: "/admin/settings/notification/password",
},
],
},
{
name: "Payment Information",
icon: "/icons/payment.png",
rightIcon: "/icons/accordion.png",
to: "/admin/settings/payment",
},
{
name: "Data and Privacy",
icon: "/icons/data.png",
to: "/admin/settings/privacy",
},
{
name: "Language and Region",
icon: "/icons/region.png",
to: "/admin/settings/language",
},
];

export const organizationItems: MenuItem[] = [
{
name: "Members",
icon: "/icons/members.png",
rightIcon: "/icons/accordion.png",
to: "/admin/settings/organization/members",
},
{
name: "Roles and Permissions",
icon: "/icons/roles.png",
rightIcon: "/icons/accordion.png",
to: "/admin/settings/organization/roles",
},
{
name: "Integration",
icon: "/icons/integration.png",
rightIcon: "/icons/accordion.png",
to: "/admin/settings/organization/integration",
},
];
152 changes: 152 additions & 0 deletions app/components/SuperAdminSideBar/SuperAdminSideNavBar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
import { NavLink } from "@remix-run/react";
import { useState } from "react";

import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,
} from "~/components/ui/accordion";
import {
mainMenuItems,
organizationItems,
settingsMenuItems,
type MenuItem,
} from "./SideNarBarItems";

export function AdminSideNavBar() {
const [isSettingsOpen, setIsSettingsOpen] = useState(false);

const renderMenuItem = (item: MenuItem) => (
<NavLink
key={item.name}
to={item.to}
className={({ isActive }) =>
`flex items-center justify-between rounded-md p-2 ${isActive ? "bg-[#F97316] text-white" : "text-black hover:bg-[#F97316] hover:text-white"} `
}
>
<div className="flex items-center">
{item.icon && (
<img src={item.icon} alt={item.name} className="mr-2 h-5 w-5" />
)}
{item.name}
</div>
{item.rightIcon && (
<img src={item.rightIcon} alt="right icon" className="h-5 w-5" />
)}
</NavLink>
);

return (
<nav className="h-screen w-64 bg-[#FDFDFD]">
{!isSettingsOpen && (
<div className="flex items-center p-4">
<img src="/icons/shadcn.png" alt="Logo" className="mr-2 h-8 w-8" />
<h1 className="text-xl font-bold">Shadcn</h1>
</div>
)}

{isSettingsOpen ? (
<div className="p-4">
<button
onClick={() => setIsSettingsOpen(false)}
className="mb-4 flex items-center rounded-md p-2 hover:bg-[#F97316] hover:text-white"
>
<img
src="/icons/settingsback.png"
alt="Back"
className="mr-2 h-5 w-5"
/>
Settings
</button>

<div className="mb-4">
{settingsMenuItems.map((item) => (
<div key={item.name}>
{item.subItems ? (
<Accordion type="single" collapsible>
<AccordionItem value={item.name}>
<AccordionTrigger className="flex w-full items-center justify-between rounded-md p-2 hover:bg-[#F97316] hover:text-white">
<div className="flex items-center">
{item.icon && (
<img
src={item.icon}
alt={item.name}
className="mr-2 h-5 w-5"
/>
)}
{item.name}
</div>
{item.rightIcon && (
<img
src={item.rightIcon}
alt="right icon"
className="h-5 w-5"
/>
)}
</AccordionTrigger>
<AccordionContent>
{item.subItems.map((subItem) =>
renderMenuItem(subItem),
)}
</AccordionContent>
</AccordionItem>
</Accordion>
) : (
renderMenuItem(item)
)}
</div>
))}
</div>

<div className="border-t pt-4">
<h2 className="mb-2 font-bold">Organization</h2>
{organizationItems.map((item) => renderMenuItem(item))}
</div>
</div>
) : (
<div className="grid grid-cols-1 gap-2 p-4">
{mainMenuItems.map((item) =>
item.name === "Settings" ? (
<button
key={item.name}
onClick={() => setIsSettingsOpen(true)}
className="flex items-center rounded-md p-2 text-black hover:bg-[#F97316] hover:text-white"
>
{item.icon && (
<img
src={item.icon}
alt={item.name}
className="mr-2 h-5 w-5"
/>
)}
{item.name}
</button>
) : (
<NavLink
key={item.name}
to={item.to}
className={({ isActive }) =>
`flex items-center rounded-md p-2 ${
isActive
? "bg-[#F97316] text-white"
: "text-black hover:bg-[#F97316] hover:text-white"
} `
}
>
{item.icon && (
<img
src={item.icon}
alt={item.name}
className="mr-2 h-5 w-5"
/>
)}
{item.name}
</NavLink>
),
)}
</div>
)}
</nav>
);
}
Loading