Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
22 changes: 19 additions & 3 deletions src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,27 @@
display: flex;
align-items: center;
justify-content: space-between;
max-width: 1400px;
margin: 0 auto;
padding: 1rem 2rem;
}

@media (min-width: 640px) {
.navbar-container {
padding: 1rem 4rem; /* sm:px-8 equivalent */
}
}

@media (min-width: 768px) {
.navbar-container {
padding: 1rem 4rem; /* md:px-16 equivalent */
}
}
@media (min-width: 1024px) {
.navbar-container {
padding: 1rem 6rem; /* md:px-16 equivalent */
}
}

.navbar-logo {
display: flex;
align-items: center;
Expand Down Expand Up @@ -255,7 +271,7 @@
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
@media screen and (max-width: 928px) {
.navbar-toggle {
display: flex;
}
Expand Down Expand Up @@ -287,7 +303,7 @@
.navbar-links {
flex-direction: column;
width: 100%;
gap: 0.5rem;
gap: 2rem;
}

.navbar-link {
Expand Down
7 changes: 4 additions & 3 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ const App: React.FC = () => {
setSlidesPerView(1);
} else if (window.innerWidth <= 880) {
setSlidesPerView(2);
}
else {
} else if (window.innerWidth <= 1280) {
setSlidesPerView(3);
} else {
setSlidesPerView(4);
}
}
Expand Down Expand Up @@ -64,7 +65,7 @@ const App: React.FC = () => {
<Header />
<main>
<Home heroText={heroText} heroSubtitle={heroSubtitle} />
<Dapps slidesPerView={slidesPerView} />
<Dapps />
<Contributors slidesPerView={slidesPerView} />
</main>
<Footer />
Expand Down
10 changes: 5 additions & 5 deletions src/components/elements/cards/ContributorCard.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
interface Props {
contributor: string
imageSrc: string
contributorWeb: string
contributor: string
imageSrc: string
contributorWeb: string
}

export default function ContributorCard({ contributor, imageSrc, contributorWeb }: Props): JSX.Element {
export default function ContributorCard ({ contributor, imageSrc, contributorWeb }: Props): JSX.Element {
return (
<a
href={contributorWeb}
target='_blank'
rel='noopener noreferrer'
className='card block rounded-lg overflow-hidden shadow-lg border-[0.5px] border-[#353535] z-30 m-10 text-white bg-[linear-gradient(103deg,_#1A0E03_0.02%,_#272018_101.38%)] cursor-pointer'>
className='card block rounded-lg overflow-hidden shadow-lg border-[0.5px] border-[#353535] z-30 m-10 text-white bg-[linear-gradient(103deg,_#1A0E03_0.02%,_#272018_101.38%)] cursor-pointer hover:border-[#6b5a3a] transition-colors duration-200'>
<div className="px-6 pt-2 pb-2 m-5">
<div className='flex flex-row align-middle my-6 justify-center'>
<img className="rounded-full" style={{ width: '142px', height: '142px' }} src={imageSrc} alt={`${contributor} logo`} />
Expand Down
26 changes: 20 additions & 6 deletions src/components/pages/contributors/Contributors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,42 @@ import { Swiper, SwiperSlide } from 'swiper/react';
import 'swiper/css';
import 'swiper/css/pagination';
import 'swiper/css/navigation';
import { Navigation, Autoplay } from 'swiper';
import { Navigation, Autoplay, Pagination } from 'swiper';

interface Props {
slidesPerView: number
}

export default function Contributors(props: Props): JSX.Element {
return (
<section className="py-20 my-20 items-center" id="contributors" aria-labelledby="contributors-heading">
<section className="py-20 px-4 sm:px-8 md:px-16 my-20 items-center" id="contributors" aria-labelledby="contributors-heading">
<p className='dappsSubtitle my-3'>The Alliance&apos;s</p>
<h2 id="contributors-heading" className='dappsTitle mb-20'>Contributors</h2>
<style>{`
#contributors .swiper-pagination-bullet {
background: #b8973a;
opacity: 0.4;
}
#contributors .swiper-pagination-bullet-active {
background: #d4a843;
opacity: 1;
}
`}</style>
<Swiper
loop
loopedSlides={props.slidesPerView - 1}
loopedSlides={Math.max(1, props.slidesPerView - 1)}
autoplay={{
delay: 2000,
disableOnInteraction: false,

}}
pagination={{
clickable: true,
}}
slidesPerView={props.slidesPerView}
navigation={false}
modules={[Navigation, Autoplay]}>
modules={[Navigation, Autoplay, Pagination]}
className="pb-10"
>
<SwiperSlide>
<ContributorCard contributor="Ergo" imageSrc={ErgoImage} contributorWeb="https://ergoplatform.org/en/" />
</SwiperSlide>
Expand Down Expand Up @@ -68,4 +82,4 @@ export default function Contributors(props: Props): JSX.Element {
</Swiper>
</section>
);
}
}
101 changes: 57 additions & 44 deletions src/components/pages/dapps/Dapps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,58 +6,71 @@ import ECSDImage from '../../../assets/ecsd.png';
import { Swiper, SwiperSlide } from 'swiper/react';
import 'swiper/css';
import 'swiper/css/pagination';
import 'swiper/css/navigation';
import { Navigation, Autoplay } from 'swiper';
import { Autoplay, Pagination } from 'swiper';

interface Props {
slidesPerView: number
}
const dapps = [
{ contributor: 'SigmaUSD', imageSrc: SigmaUSDImage, contributorWeb: 'https://sigmausd.io/#/' },
{ contributor: 'Ethereum Classic Stable Dollar', imageSrc: ECSDImage, contributorWeb: 'https://etc.djed.one/' },
{ contributor: 'Zephyr Stable Dollar', imageSrc: ZSDImage, contributorWeb: 'https://zephyrprotocol.com' },
{ contributor: 'Djed powered by COTI', imageSrc: DjedCOTI, contributorWeb: 'https://djed.xyz' },
];

export default function Dapps(props: Props): JSX.Element {
export default function Dapps(): JSX.Element {
return (
<div className="py-20 my-20 items-center" id="djed_apps">
<div className="py-20 px-4 sm:px-8 md:px-16 my-20" id="djed_apps">
<h4 className='dappsSubtitle my-3'>Stablecoins based on the</h4>
<h2 className='dappsTitle mb-20'>Djed Protocol</h2>
<Swiper
loop
loopedSlides={2}
autoplay={{
delay: 2000,
disableOnInteraction: true,
}}
slidesPerView={2}
navigation={false}
modules={[Navigation, Autoplay]}>
<SwiperSlide>
<ContributorCard contributor="SigmaUSD" imageSrc={SigmaUSDImage} contributorWeb="https://sigmausd.io/#/" />
</SwiperSlide>
<SwiperSlide>
<ContributorCard contributor="Ethereum Classic Stable Dollar" imageSrc={ECSDImage} contributorWeb="https://etc.djed.one/" />
</SwiperSlide>
</Swiper>
<Swiper
loop
loopedSlides={1}
autoplay={{
delay: 2000,
disableOnInteraction: true,
}}
slidesPerView={props.slidesPerView - 2}
navigation={false}
modules={[Navigation, Autoplay]}>
<SwiperSlide>
<ContributorCard contributor="Djed powered by COTI" imageSrc={DjedCOTI} contributorWeb="https://djed.xyz" />
</SwiperSlide>
<SwiperSlide>
<ContributorCard contributor="Zephyr Stable Dollar" imageSrc={ZSDImage} contributorWeb="https://zephyrprotocol.com" />
</SwiperSlide>
</Swiper>
<h2 className='dappsTitle mb-12 md:mb-20'>Djed Protocol</h2>

<style>{`
#djed_apps .swiper-pagination-bullet {
background: #b8973a;
opacity: 0.4;
}
#djed_apps .swiper-pagination-bullet-active {
background: #d4a843;
opacity: 1;
}
`}</style>

{/* Desktop: 2x2 grid */}
<div className="hidden md:grid grid-cols-2 gap-6">
{dapps.map((dapp) => (
<ContributorCard
key={dapp.contributor}
contributor={dapp.contributor}
imageSrc={dapp.imageSrc}
contributorWeb={dapp.contributorWeb}
/>
))}
</div>

{/* Mobile: swiper carousel */}
<div className="md:hidden">
<Swiper
loop
loopedSlides={4}
autoplay={{ delay: 2500, disableOnInteraction: true }}
slidesPerView={1}
spaceBetween={16}
pagination={{ clickable: true }}
modules={[Autoplay, Pagination]}
className="pb-10"
>
{dapps.map((dapp) => (
<SwiperSlide key={dapp.contributor} style={{ height: 'auto' }}>
<ContributorCard
contributor={dapp.contributor}
imageSrc={dapp.imageSrc}
contributorWeb={dapp.contributorWeb}
/>
</SwiperSlide>
))}
</Swiper>
</div>
</div>
);
}



// import DappCard from '../../elements/cards/DappCard';
// import ContributorCard from '../../elements/cards/ContributorCard';
// import ErgoImage from '../../../assets/ergo.png';
Expand Down
8 changes: 4 additions & 4 deletions src/components/pages/footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import Twitter from '../../../assets/Twitter.png';
const Footer = () => {
return (
<footer className='my-5'>
<div className='flex lg:flex-row flex-col lg:justify-evenly align-middle sm:justify-center md:justify-center'>
<p className='footerText lg:text-md sm:text-sm lg:mt-6 mb-3'>© Djed Alliance. All rights reserved.</p>
<div className='flex flex-row justify-center align-middle lg:my-0 my-3'>
<div className='flex md:flex-row flex-col gap-6 md:justify-between md:px-10 lg:px-28 items-center justify-center'>
<p className='footerText lg:text-md sm:text-sm'>© Djed Alliance. All rights reserved.</p>
<div className='flex flex-row justify-center align-middle'>
<img src={Logo} className="mx-2 mb-1" alt="Djed Alliance logo" />
<p className='footerText lg:text-xl sm:text-sm mt-3 whitespace-pre'>Djed Alliance</p>
</div>
<div className='flex flex-row mt-3 justify-center'>
<div className='flex flex-row justify-center'>
<a href="https://discord.com/invite/5TWZwGXXym" target="_blank" rel="noreferrer" aria-label="Join Djed Alliance on Discord"><img className="socialImage mx-2 cursor-pointer" src={Discord} alt="Discord" /></a>
<a href="https://github.com/DjedAlliance" target="_blank" rel="noreferrer" aria-label="Djed Alliance GitHub"><img className="socialImage mx-2 cursor-pointer" src={GitHub} alt="GitHub" /></a>
<a href="https://twitter.com/DjedAlliance" target="_blank" rel="noreferrer" aria-label="Follow Djed Alliance on X (Twitter)"><img className="socialImage mx-2 cursor-pointer" src={Twitter} alt="X (Twitter)" /></a>
Expand Down