Skip to content

Commit

Permalink
Merge branch 'main' into feature/contact-page
Browse files Browse the repository at this point in the history
  • Loading branch information
ardianta authored Oct 28, 2024
2 parents c05bf24 + 77d50b5 commit 6c8792d
Show file tree
Hide file tree
Showing 9 changed files with 410 additions and 82 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,4 @@ dist-ssr

pnpm-lock.yaml
.directory

package-lock.json
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"dependencies": {
"@emailjs/browser": "^4.4.1",
"axios": "^1.7.7",
"lucide-react": "^0.453.0",
"framer-motion": "^11.11.10",
"prop-types": "^15.8.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
Expand Down
148 changes: 111 additions & 37 deletions src/components/Navbar/index.jsx
Original file line number Diff line number Diff line change
@@ -1,70 +1,144 @@
import { Brand } from "./Brand"
import { useState } from 'react';
import { Brand } from "./Brand";
import { Link } from "react-router-dom";
// Icons
import TelegramIcon from "@/assets/icons/telegram.svg";
import GithubIcon from "@/assets/icons/github.svg";
import HamburgerIcon from '@/assets/icons/menu.svg';
import LogtengDevLogo from '@/assets/lotengdev-logo.svg';


function CTAButtons() {
return (
<div className="hidden lg:flex justify-center">
<a href="https://t.me/lotengdev" target="_blank" className="flex items-center bg-blue-600 px-4 py-3 mr-4 rounded text-white">
<img className="inline mr-3" src={TelegramIcon} />Join Group
<a href="https://t.me/lotengdev" target="_blank" className="flex items-center bg-blue-600 px-4 py-3 mr-4 rounded-full text-white shadow hover:bg-blue-700 transition duration-300">
<img className="inline mr-3" src={TelegramIcon} alt="Telegram" />Join Group
</a>
<a href="https://github.com/lotengdev/lotengdev-web/" target="_blank" className="flex items-center bg-neutral-100 border border-solid border-grey px-4 py-2 rounded-full shadow hover:bg-blue-600 hover:text-white transition duration-300">
<img className="inline mr-3" src={GithubIcon} alt="Github" />Contribute

<a href="https://t.me/lotengdev" target="_blank" rel="noopener noreferrer" className="flex items-center bg-blue-600 px-4 py-3 mr-4 rounded text-white">
<img className="inline mr-3" src={TelegramIcon} alt="Telegram Icon" />Join Group
</a>
<a href="https://github.com/lotengdev/lotengdev-web/" target="_blank" className="flex items-center bg-neutral-100 border border-solid border-grey px-4 py-2 rounded">
<img className="inline mr-3" src={GithubIcon} />Contribute
<a href="https://github.com/lotengdev/lotengdev-web/" target="_blank" rel="noopener noreferrer" className="flex items-center bg-neutral-100 border border-solid border-grey px-4 py-2 rounded">
<img className="inline mr-3" src={GithubIcon} alt="GitHub Icon" />Contribute
</a>
</div>
)
);
}


export default function Navbar() {
const [isOpen, setIsOpen] = useState(false);

const toggleNavbar = () => {
setIsOpen(!isOpen);
};

return (
<nav className="px-6 py-4 flex items-center shadow-md">
<nav className="px-6 py-4 flex items-center shadow-md relative">
<Brand url="/" />
<ul className="hidden lg:flex flex-grow pl-10 list-none">
<li className="mr-4">
<Link to="/" className="bg-white text-gray-800 px-4 py-2 rounded-full shadow hover:bg-blue-600 hover:text-white transition duration-300">Home</Link>
</li>
<li className="mr-4">
<Link to="/event" className="bg-white text-gray-800 px-4 py-2 rounded-full shadow hover:bg-blue-600 hover:text-white transition duration-300">Acara</Link>
</li>
<li className="mr-4">
<Link to="/speaker" className="bg-white text-gray-800 px-4 py-2 rounded-full shadow hover:bg-blue-600 hover:text-white transition duration-300">Pembicara</Link>
</li>
<li className="mr-4">
<Link to="/about" className="bg-white text-gray-800 px-4 py-2 rounded-full shadow hover:bg-blue-600 hover:text-white transition duration-300">Tentang</Link>
<ul className="hidden lg:flex flex-grow justify-center list-none">

{/* Navigation for small screens */}
<div className="lg:hidden flex flex-grow justify-end items-center">
<button
onClick={toggleNavbar}
aria-label="Toggle navigation"
className="relative "
>
<img src={HamburgerIcon} alt="Menu Icon" className="w-6 h-6" />
</button>

{/* Mobile Menu */}
<div
className={` justify-between fixed inset-y-0 right-0 w-64 bg-white shadow-lg transform transition-transform duration-300 ease-in-out z-50 ${isOpen ? 'translate-x-0' : 'translate-x-full'
}`}
>

<ul className="flex flex-col pt-10 px-6">
<div className="pb-7 justify-between flex pr-10 lg:border-r border-solid border-grey">

<img width={90} src={LogtengDevLogo} />
<p onClick={toggleNavbar} className='text-xl'>X</p>

</div>
<li className="my-4">
<Link to="/" onClick={toggleNavbar} className="text-sm hover:text-blue-600">
Home
</Link>
</li>
<li className="my-4">
<Link to="/event" onClick={toggleNavbar} className="text-sm hover:text-blue-600">
Acara
</Link>
</li>
<li className="my-4">
<Link to="/speaker" onClick={toggleNavbar} className="text-sm hover:text-blue-600">
Pembicara
</Link>
</li>
<li className="my-4">
<Link to="/about" onClick={toggleNavbar} className="text-sm hover:text-blue-600">
Tentang
</Link>
</li>


</ul>

<div className=" justify-center mt-20">
<a href="https://t.me/lotengdev" target="_blank" rel="noopener noreferrer" className="flex items-center bg-blue-600 px-4 py-3 mr-4 mx-7 my-9 rounded text-xs text-white">
<img className="inline mr-3" width={21} onClick={toggleNavbar} src={TelegramIcon} alt="Telegram Icon" />Join Group
</a>
<a href="https://github.com/lotengdev/lotengdev-web/" target="_blank" rel="noopener noreferrer" className="flex items-center mx-7 my-9 text-xs bg-neutral-100 border border-solid border-grey px-4 py-2 rounded">
<img className="inline mr-3" width={21} onClick={toggleNavbar} src={GithubIcon} alt="GitHub Icon" />Contribute
</a>
</div>
</div>

{/* Overlay */}
{isOpen && (
<div
className="fixed inset-0 bg-black bg-opacity-50 z-40"
onClick={toggleNavbar}
/>
)}
</div>

{/* Navigation for large screens */}
<ul className="hidden lg:flex flex-grow pl-10 list-none">
<li className="mr-8">
<Link
to="/"
className="transition-all duration-200 border-b-2 border-transparent hover:border-black hover:scale-105"
>
Home
</Link>
<Link to="/" className="hover:text-blue-600">Home</Link>
</li>
<li className="mr-8">
<Link
to="/event"
className="transition-all duration-200 border-b-2 border-transparent hover:border-black hover:scale-105"
>
Acara
</Link>
<Link to="/event" className="hover:text-blue-600">Acara</Link>
</li>
<li className="mr-8">
<Link
to="/speaker"
className="transition-all duration-200 border-b-2 border-transparent hover:border-black hover:scale-105"
>
Pembicara
</Link>
<Link to="/speaker" className="hover:text-blue-600">Pembicara</Link>
</li>
<li className="mr-8">
<Link
to="/about"
className="transition-all duration-200 border-b-2 border-transparent hover:border-black hover:scale-105"
>
Tentang
</Link>
<Link to="/about" className="hover:text-blue-600">Tentang</Link>
</li>
<li className="mr-8"><Link to="/event">Acara</Link></li>
<li className="mr-8"><Link to="/speaker">Pembicara</Link></li>
<li className="mr-8"><Link to="/about">Tentang</Link></li>
<li className="mr-8"><Link to="/contact">Kontak</Link></li>
</ul>

<CTAButtons />
<div className="lg:hidden flex flex-grow justify-end">
<img src={HamburgerIcon} alt="Menu" />
</div>
</nav>
)
}
);
}
}
5 changes: 3 additions & 2 deletions src/components/ScrollToTopButton.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useCallback, useEffect, useState } from "react";
import { useCallback, useEffect, useState } from "react";
import styled from "styled-components";
import { CgChevronDoubleUp } from "react-icons/cg";

Expand Down Expand Up @@ -58,11 +58,12 @@ const Wrapper = styled.div`
z-index: 999;
border-radius: 50%;
box-shadow: 0px 0px 24px rgba(0, 0, 0, 0.2);
background-color: blue;
background-color: #2563eb;
.up-icon {
font-size: 1.5rem;
transition: transform 0.5s;
color: white;
&:hover {
transform: translateY(-2px);
}
Expand Down
29 changes: 25 additions & 4 deletions src/pages/about/index.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Link } from "react-router-dom";
import {Motion} from "../framer-motion";// For Motion in Text

export function AboutPage() {
return (
Expand All @@ -11,11 +12,31 @@ export function AboutPage() {
</Link>
&gt; About
</div>
<div className="font-bold lg:text-[48px] md:text-[32px] sm:text-[24px] text-[16px] mt-4">
<Motion.div
initial={{ opacity: 0, x: -100 }}
whileInView={{ opacity: 1, x: 0 }}
viewport={{ once: true }}
transition={{
duration: 0.8,
type: "spring",
stiffness: 110,
delay: 0,
}}
className="font-bold lg:text-[48px] md:text-[32px] sm:text-[24px] text-[16px] mt-4">
Tentang Komunitas Lombok Tengah Developer (Loteng Dev)
</div>
</Motion.div>
<hr className="border-1 border-grey w-full rounded-3xl md:mt-6 mt-2" />
<div className="mt-5 mb-16 text-justify text-[18px]">
<Motion.div
initial={{ opacity: 0, x: -100 }}
whileInView={{ opacity: 1, x: 0 }}
viewport={{ once: true }}
transition={{
duration: 0.8,
type: "spring",
stiffness: 110,
delay: 0,
}}
className="mt-5 mb-16 text-justify text-[18px]">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Ex molestiae quos veritatis nemo sit praesentium aperiam quasi voluptatum quisquam unde delectus mollitia eveniet rem quia, saepe aliquam, consequuntur similique? Vitae.
<br />
<br />
Expand All @@ -25,7 +46,7 @@ export function AboutPage() {
<br />
Lorem ipsum, dolor sit amet consectetur adipisicing elit. Eius temporibus vitae at. Consequatur reiciendis sit quidem, impedit, facere aperiam nostrum delectus dolore dolor quibusdam harum animi amet repellendus, sunt
voluptatibus.
</div>
</Motion.div>
</div>
</div>
</div>
Expand Down
Loading

0 comments on commit 6c8792d

Please sign in to comment.