Skip to content
Open
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
Binary file added screenshots/issue-600-about-mobile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/issue-600-tools-modal-mobile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 28 additions & 10 deletions src/app/[locale]/about/modals/our-manifesto-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { useTranslations } from 'next-intl';
import { useState } from 'react';

import BaseModal from '@/components/common/modal/base-modal';
import BaseModalMobile from '@/components/common/modal/base-modal-mobile';
import RoundedButton from '@/components/common/rounded-button';

const OurManifestoModal = () => {
Expand All @@ -12,20 +13,37 @@ const OurManifestoModal = () => {

return (
<>
<div className="ml-10 mt-5">
<div className="ml-4 mt-3 md:ml-10 md:mt-5">
<RoundedButton className="text-lg" onClick={() => setIsToolsOpened(true)}>
{t('Our Manifesto')}
</RoundedButton>
</div>
<BaseModal
title={t('Our Manifesto')}
isRelative={false}
opened={isToolsOpened}
onClose={() => setIsToolsOpened(false)}
className="left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 transform"
>
<div className="w-max max-w-[80vw] whitespace-pre-line p-10 pt-5 text-base">{t('Manifesto')}</div>
</BaseModal>
{isToolsOpened && (
<div className="hidden md:block">
<BaseModal
title={t('Our Manifesto')}
isRelative={false}
opened={isToolsOpened}
onClose={() => setIsToolsOpened(false)}
className="left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 transform"
>
<div className="w-max max-w-[80vw] whitespace-pre-line p-10 pt-5 text-base">{t('Manifesto')}</div>
</BaseModal>
</div>
)}
{isToolsOpened && (
<div className="block md:hidden">
<BaseModalMobile
title={t('Our Manifesto')}
isRelative={false}
opened={isToolsOpened}
onClose={() => setIsToolsOpened(false)}
className="left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 transform"
>
<div className="max-w-[90vw] whitespace-pre-line p-4 pt-3 text-base">{t('Manifesto')}</div>
</BaseModalMobile>
</div>
)}
</>
);
};
Expand Down
102 changes: 71 additions & 31 deletions src/app/[locale]/about/modals/our-tools-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { useTranslations } from 'next-intl';
import { ReactNode, useState } from 'react';

import BaseModal from '@/components/common/modal/base-modal';
import BaseModalMobile from '@/components/common/modal/base-modal-mobile';
import RoundedButton from '@/components/common/rounded-button';
import TextLink from '@/components/common/text-link';

Expand All @@ -19,42 +20,81 @@ const OurToolsModal = () => {
const t = useTranslations('AboutPage');
return (
<>
<div className="ml-10 mt-5">
<div className="ml-4 mt-3 md:ml-10 md:mt-5">
<RoundedButton className="text-lg" onClick={() => setIsToolsOpened(true)}>
{t('Our tools')}
</RoundedButton>
</div>
<BaseModal
title={t('Our tools')}
isRelative={false}
opened={isToolsOpened}
onClose={() => setIsToolsOpened(false)}
className="left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 transform"
>
<div className="w-max max-w-[80vw] space-y-4 p-10 pt-5">
<ListItem
text={t.rich(`Tools.0`, {
link: (text) => <TextLink content={text} href="https://www.citizenweb3.com/episodes" target="_blank" />,
})}
/>
<ListItem
text={t.rich(`Tools.1`, {
link: (text) => <TextLink content={text} href="https://t.me/web_3_society" target="_blank" />,
})}
/>
<ListItem
text={t.rich(`Tools.2`, {
link: (text) => <TextLink content={text} href="https://www.citizenweb3.com/staking" target="_blank" />,
})}
/>
<ListItem
text={t.rich(`Tools.3`, {
link: (text) => <TextLink content={text} href="https://bvc.citizenweb3.com/" target="_blank" />,
})}
/>
<ListItem text={t(`Tools.4`)} />
{isToolsOpened && (
<div className="hidden md:block">
<BaseModal
title={t('Our tools')}
isRelative={false}
opened={isToolsOpened}
onClose={() => setIsToolsOpened(false)}
className="left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 transform"
>
<div className="w-max max-w-[80vw] space-y-4 p-10 pt-5">
<ListItem
text={t.rich(`Tools.0`, {
link: (text) => <TextLink content={text} href="https://www.citizenweb3.com/episodes" target="_blank" />,
})}
/>
<ListItem
text={t.rich(`Tools.1`, {
link: (text) => <TextLink content={text} href="https://t.me/web_3_society" target="_blank" />,
})}
/>
<ListItem
text={t.rich(`Tools.2`, {
link: (text) => <TextLink content={text} href="https://www.citizenweb3.com/staking" target="_blank" />,
})}
/>
<ListItem
text={t.rich(`Tools.3`, {
link: (text) => <TextLink content={text} href="https://bvc.citizenweb3.com/" target="_blank" />,
})}
/>
<ListItem text={t(`Tools.4`)} />
</div>
</BaseModal>
</div>
</BaseModal>
)}
{isToolsOpened && (
<div className="block md:hidden">
<BaseModalMobile
title={t('Our tools')}
isRelative={false}
opened={isToolsOpened}
onClose={() => setIsToolsOpened(false)}
className="left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 transform"
>
<div className="max-w-[90vw] space-y-4 p-4 pt-3">
<ListItem
text={t.rich(`Tools.0`, {
link: (text) => <TextLink content={text} href="https://www.citizenweb3.com/episodes" target="_blank" />,
})}
/>
<ListItem
text={t.rich(`Tools.1`, {
link: (text) => <TextLink content={text} href="https://t.me/web_3_society" target="_blank" />,
})}
/>
<ListItem
text={t.rich(`Tools.2`, {
link: (text) => <TextLink content={text} href="https://www.citizenweb3.com/staking" target="_blank" />,
})}
/>
<ListItem
text={t.rich(`Tools.3`, {
link: (text) => <TextLink content={text} href="https://bvc.citizenweb3.com/" target="_blank" />,
})}
/>
<ListItem text={t(`Tools.4`)} />
</div>
</BaseModalMobile>
</div>
)}
</>
);
};
Expand Down
8 changes: 4 additions & 4 deletions src/app/[locale]/about/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default function AboutPage({ params: { locale } }: Readonly<{ params: { l
<TabList page="AboutPage" tabs={aboutTabs} />
</PageHeaderVisibilityWrapper>
<RichPageTitle>
<div className="m-4">
<div className="mx-4 mt-4 md:m-4">
{t.rich('title', {
validatorInfoLink: (chunks) => <TextLink content={chunks} href="/" withCursor={true} />,
validatorsAndMiningPoolsLink: (chunks) => <TextLink content={chunks} href="/validators" withCursor={true} />,
Expand All @@ -49,7 +49,7 @@ export default function AboutPage({ params: { locale } }: Readonly<{ params: { l
</RichPageTitle>

<div>
<div className="m-4 w-2/3 whitespace-pre-line pt-2 text-base">
<div className="m-4 w-full md:w-2/3 whitespace-pre-line pt-2 text-base">
{t.rich('description', {
homeLink: (chunks) => <TextLink content={chunks} href="/" />,
citizenLink: (chunks) => <TextLink content={chunks} href="https://www.citizenweb3.com/" target="_blank" />,
Expand All @@ -62,15 +62,15 @@ export default function AboutPage({ params: { locale } }: Readonly<{ params: { l
),
})}
</div>
<div className="flex flex-row space-x-32">
<div className="flex flex-col space-y-4 md:flex-row md:space-y-0 md:space-x-32">
<div>
<OurToolsModal />
</div>
<div>
<OurManifestoModal />
</div>
</div>
<div className="relative mt-9 h-10 bg-bgSt">
<div className="hidden md:relative md:mt-9 md:h-10 md:bg-bgSt md:block">
<Image
src="/img/icons/green-man.png"
alt="Pixelated, 90s game-style character, robin hood styled, explaining about validatorinfo.com"
Expand Down
2 changes: 1 addition & 1 deletion src/app/[locale]/components/common/tabs/tab-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const TabList: FC<OwnProps> = ({ page, tabs }) => {
const highlight = hoverTarget === 'tabs' ? 'outline outline-2 outline-dottedLine outline-offset-2' : 'outline-0';

return (
<div className={`relative mr-6 flex flex-row space-x-12 pb-1 font-handjet sm:space-x-10 md:space-x-4 ${highlight}`}>
<div className={`relative mr-6 flex flex-row gap-1 overflow-x-auto pb-1 font-handjet sm:gap-3 md:gap-4 ${highlight}`}>
{tabs.map((item) => (
<TabListItem page={page} key={item.href} item={item} />
))}
Expand Down
Loading