diff --git a/assets/icons/svg/AddIcon.svg b/assets/icons/svg/AddIcon.svg new file mode 100644 index 000000000..d01ac7fb5 --- /dev/null +++ b/assets/icons/svg/AddIcon.svg @@ -0,0 +1,23 @@ + + + + diff --git a/assets/icons/svg/ArrowIcon.svg b/assets/icons/svg/ArrowIcon.svg new file mode 100644 index 000000000..25a2df777 --- /dev/null +++ b/assets/icons/svg/ArrowIcon.svg @@ -0,0 +1,25 @@ + + + + \ No newline at end of file diff --git a/assets/icons/svg/HomeIcon.svg b/assets/icons/svg/HomeIcon.svg new file mode 100644 index 000000000..7f29ae8db --- /dev/null +++ b/assets/icons/svg/HomeIcon.svg @@ -0,0 +1,12 @@ + + + \ No newline at end of file diff --git a/assets/icons/svg/MessageIcon.svg b/assets/icons/svg/MessageIcon.svg new file mode 100644 index 000000000..b12b6b8fb --- /dev/null +++ b/assets/icons/svg/MessageIcon.svg @@ -0,0 +1,30 @@ + + + + + \ No newline at end of file diff --git a/components/Breadcrumps/index.tsx b/components/Breadcrumps/index.tsx new file mode 100644 index 000000000..44c600659 --- /dev/null +++ b/components/Breadcrumps/index.tsx @@ -0,0 +1,47 @@ +import HomeIcon from 'assets/icons/svg/HomeIcon.svg' +import Link from 'next/link' +import { IoChevronBack } from 'react-icons/io5' + +interface ComponentProps { + sections: { name: string; url: string }[] +} +const BreadCrumbs: React.FC = ({ sections }) => { + return ( + <> +
+ + +
Home
+ +
+ / +
+ {sections.map((section, i: number) => ( + + {section.name} + + ))} +
+
+ + + +
+ {sections[0].name} +
+
+ + ) +} + +export default BreadCrumbs diff --git a/layouts/GeneralLayout.tsx b/layouts/GeneralLayout.tsx index 858679eda..ee30a2a9d 100644 --- a/layouts/GeneralLayout.tsx +++ b/layouts/GeneralLayout.tsx @@ -31,9 +31,10 @@ const GeneralLayout = ({ children }: { children: ReactNode }) => {
diff --git a/pages/[category]/index.tsx b/pages/[category]/index.tsx index 32008940a..11a6968d0 100644 --- a/pages/[category]/index.tsx +++ b/pages/[category]/index.tsx @@ -1,56 +1,100 @@ import { useRouter } from 'next/router' -import Logo from 'components/logo/logo' import { sidebarData } from 'database/data' import { SubCategories } from 'types' import Link from 'next/link' +import AddIcon from 'assets/icons/svg/AddIcon.svg' +import ArrowIcon from 'assets/icons/svg/ArrowIcon.svg' +import BreadCrumbs from 'components/Breadcrumps' +import MessageIcon from 'assets/icons/svg/MessageIcon.svg' +import categoryDescriptions from 'components/TopBar/CategoryDescriptions' const CategoryPage = () => { const router = useRouter() - const { category } = router.query as { category: string} + const { category } = router.query as { category: string } - const subcategories: SubCategories[] = [] - sidebarData.forEach((c) => { - if (c.category == category) - c.subcategory.forEach((a) => { - subcategories.push(a) - }) - }) + const subcategories: SubCategories[] = category + ? sidebarData.filter((c) => c.category == category)[0]['subcategory'] + : [] + const getDesc = (subcatName: String) => { + for (const desc in categoryDescriptions) { + if (desc == subcatName) { + return categoryDescriptions[desc] + } + } + + return 'No descrition' + } return (
-
+
{subcategories?.length ? ( <> -
-

- -/ - {category.split('-').join(' ')} -

-

- Get access to all exclusive{' '} - - {category.split('-').join(' ')} - {' '} - resources! -

+ -
- {subcategories.map((subcat, i) => ( +
+
+ {subcategories.map((subcat, i) => ( + +
+
+ {subcat.name} +
+ +
+
+
{getDesc(subcat.name)}
+
+ + ))} - {subcat.name} + + +
+
+ Wanna add something? +
+
+ Share resources, and help other fellows in the journey.{' '} +
+
- ))} +
) : ( -
+

- 404| No resources found. + + 404| + {' '} + No resources found.

)} diff --git a/styles/globals.css b/styles/globals.css index 84572306b..211e988f2 100644 --- a/styles/globals.css +++ b/styles/globals.css @@ -10,6 +10,10 @@ body { font-family: 'Urbanist', sans-serif; } +.varela { + font-family: 'Varela Round', sans-serif; +} + #__next { height: 100vh; display: grid; diff --git a/tailwind.config.js b/tailwind.config.js index c77f9ecce..e78114455 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -8,14 +8,26 @@ module.exports = { theme: { extend: { colors: { - primary: '#714EFF', 'theme-primary': '#a78bfa', 'theme-secondary': '#8b5cf6', + 'theme-tertiary': '#1f2736', + 'theme-quaternary': '#293242', + 'theme-quinary': '#BCCBE1', + 'light-primary': '#f5f3ff', + primary: '#714EFF', dark: '#0f172a', - 'dark-primary': '#101623', + 'dark-primary': '#161e2c', 'gray-text': '#9ca3af', - 'text-primary': '#d1d5db', + 'text-primary': '#EDEDED', 'text-secondary': '#4b5563', + 'text-tertiary': '#B9C0DA', + 'text-quaternary': '#EDEDED', + 'text-quinary': '#A6ABBF', + 'theme-primary-light': '#f4f7fe', + 'theme-secondary-light': '#BCCBE1', + 'theme-tertiary-light': '#E1DAF4', + 'text-primary-light': '#3F3D56', + 'text-secondary-light': '#DAE0F4', light: { primary: '#f5f3ff', silver: '#EDEDED', @@ -24,8 +36,9 @@ module.exports = { screens: { xs: '200px', folding: '320px', - tall: { raw: '(min-height: 800px)' }, }, + display: ['group-hover'], + keyframes: { 'button-press': { '0%, 100%': { @@ -81,16 +94,27 @@ module.exports = { 'scale-appearance': 'scale-appearance 0.3s ease-in forwards', 'scale-hide': 'scale-hide 0.3s ease-out forwards', }, + opacity: { + 8: '0.08', + }, + width: { + 1038: '1038px', + }, + maxWidth: { + 1038: '1038px', + }, + fontSize: { + '1.5xl': '22px', + }, boxShadow: { - header: '0px 4px 16px 0px rgba(225, 218, 244, 0.25)', - sidebar: '4px 0px 16px 0px rgba(225, 218, 244, 0.25)', - 'input-hover': '0px 0px 0px 1.6px rgba(113, 78, 255, 0.10)', - 'input-focus': '0px 0px 0px 1.6px #714EFF', - 'input-hover-dark': '0px 0px 0px 1.6px rgba(255, 255, 255, 0.20)', - 'input-focus-dark': '0px 0px 0px 1.6px rgba(238, 243, 251, 0.75)', + tile: '0px 0px 12px 0px #E1DAF440', }, }, }, plugins: [require('daisyui')], darkMode: ['class', '[data-theme="dark"]'], + variants: { + opacity: ['responsive', 'hover', 'focus', 'group-hover'], + textColor: ['responsive', 'hover', 'focus', 'group-hover'], + }, }