-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add .env file and update gitignore, pipeline name, robots.txt, middle…
…ware, layout, page, sitemap, and navlink components
- Loading branch information
Showing
17 changed files
with
394 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Test Build and Deploy | ||
name: Pipeline [Test, Build, Deploy] | ||
|
||
on: | ||
push: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
__pycache__ | ||
storage | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALLOWED_ORIGINS=http://localhost:3000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
"use client"; | ||
|
||
import { FooterNavLink } from "./ui/navlink"; | ||
import { IconGitHub } from "./ui/icons"; | ||
import { Text, Cookie } from "lucide-react"; | ||
|
||
export default function Footer() { | ||
return ( | ||
<footer> | ||
<div className="flex flex-col items-center justify-center bg-gray-800 text-white p-4 mb-4 rounded-lg shadow-xl"> | ||
<div className="flex flex-col items-center"> | ||
<p className="text-sm text-center"> | ||
© 2024 JTC DBE. All rights reserved. | ||
</p> | ||
</div> | ||
<div className="flex items-center mt-2 gap-4"> | ||
<FooterNavLink href="https://github.com/digitalbuiltenvironment/Smart-Retrieval/" target="_blank"> | ||
<div className="text-sm text-center underline"> | ||
<IconGitHub className="h-5 w-5 inline mr-2 mb-1" /> | ||
Github | ||
</div> | ||
</FooterNavLink> | ||
<FooterNavLink href="/terms-of-service"> | ||
<div className="text-sm text-center underline"> | ||
<Text className="h-5 w-5 inline mr-2 mb-1" /> | ||
Terms of Service | ||
</div> | ||
</FooterNavLink> | ||
<FooterNavLink href="/privacy-policy"> | ||
<div className="text-sm text-center underline"> | ||
<Cookie className="h-5 w-5 inline mr-2 mb-1" /> | ||
Privacy Policy | ||
</div> | ||
</FooterNavLink> | ||
</div> | ||
</div> | ||
</footer> | ||
); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
"use client"; | ||
|
||
import { useEffect, useRef } from 'react'; | ||
import Image, { StaticImageData } from 'next/image'; | ||
import { HeaderNavLink } from '@/app/components/ui/navlink'; | ||
import { useMedia } from 'react-use'; | ||
|
||
interface MenuItem { | ||
href: string; | ||
icon: React.ReactNode; | ||
label: string; | ||
} | ||
|
||
interface MobileMenuProps { | ||
isOpen: boolean; | ||
onClose: () => void; | ||
logoSrc: StaticImageData; | ||
items: MenuItem[]; | ||
} | ||
|
||
const MobileMenu: React.FC<MobileMenuProps> = ({ isOpen, onClose, logoSrc, items }) => { | ||
const isLargeScreen = useMedia('(min-width: 1024px)', false); | ||
const menuRef = useRef<HTMLDivElement | null>(null); | ||
|
||
useEffect(() => { | ||
const handleOutsideClick = (event: MouseEvent | TouchEvent) => { | ||
if ( | ||
!isLargeScreen && | ||
isOpen && | ||
!menuRef.current?.contains(event.target as Node) && | ||
!((event.target as HTMLElement).closest('.toggle-button')) // Exclude the toggle button | ||
) { | ||
onClose(); // Close the menu | ||
} | ||
}; | ||
|
||
if (!isLargeScreen && isOpen) { | ||
// Add event listeners for both mouse and touch events | ||
document.addEventListener('mousedown', handleOutsideClick); | ||
} | ||
|
||
return () => { | ||
// Remove the event listener when the component unmounts | ||
document.removeEventListener('mousedown', handleOutsideClick); | ||
}; | ||
}, [isLargeScreen, isOpen, onClose]); | ||
|
||
useEffect(() => { | ||
if (isLargeScreen && isOpen) { | ||
onClose(); | ||
} | ||
}, [isLargeScreen, isOpen, onClose]); | ||
|
||
return ( | ||
<div ref={menuRef} className={`w-full h-full p-2 bg-opacity-80 ${isOpen ? 'flex' : 'hidden'}`}> | ||
<div className="flex items-center justify-center mt-2" style={{ width: '9%', height: '9%' }}> | ||
<Image | ||
className='rounded-full max-w-full' | ||
src={logoSrc} | ||
alt="Logo" | ||
style={{ | ||
width: 'auto', | ||
height: 'auto', | ||
}} | ||
priority | ||
sizes="100vw, 50vw, 33vw" | ||
/> | ||
</div> | ||
<div className="flex items-center justify-center h-full"> | ||
{/* Mobile menu content */} | ||
<div className="w-64 p-4 rounded-r-md"> | ||
{items.map((item, index) => ( | ||
<HeaderNavLink key={index} href={item.href} onClick={onClose}> | ||
<div className="flex items-center mb-4"> | ||
{item.icon} | ||
{item.label} | ||
</div> | ||
</HeaderNavLink> | ||
))} | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export { MobileMenu }; |
Oops, something went wrong.