Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev > prod #28

Merged
merged 27 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
28226c9
Added borders
atrincas Sep 26, 2024
783e9f5
Small UI changes
atrincas Sep 30, 2024
796436b
Show top borders in thematic-areas accordionItem image
atrincas Sep 30, 2024
f6e63c8
Merge pull request #26 from Vizzuality/bugfix/small-changes-design
agnlez Sep 30, 2024
1000355
updates more4nature goals image
agnlez Oct 3, 2024
4193434
updates texts for mission and strategy section
agnlez Oct 3, 2024
cfe0c63
case studies filters are now inclusive
agnlez Oct 3, 2024
735f927
case studies filters now remember current selection
agnlez Oct 3, 2024
9916ad3
case studies filters now closes after applying filters
agnlez Oct 3, 2024
cdc64e9
increases z-index of app menu
agnlez Oct 3, 2024
b07c0ce
hide event sections if there are less than 3 of them respectively
agnlez Oct 3, 2024
c2313da
standardises Citizen Science initiatives wording
agnlez Oct 3, 2024
7494521
updates events and news
agnlez Oct 3, 2024
9809017
removes log
agnlez Oct 3, 2024
f8b8488
updates placeholder of search filter to clarify how it works
agnlez Oct 3, 2024
d488ead
reduces horizontal padding of case studies list
agnlez Oct 3, 2024
3100eca
minor accordion styles
agnlez Oct 3, 2024
b1f4cfb
reverts format of m4n goals image
agnlez Oct 3, 2024
969851e
updates study cases
agnlez Oct 4, 2024
f2b1280
Merge pull request #27 from Vizzuality/new-dev
agnlez Oct 4, 2024
3f51443
fixes home accordion
agnlez Oct 4, 2024
7e4667e
restores newsletter. contact-us points to email
agnlez Oct 8, 2024
3ada316
updates pictures of events
agnlez Oct 8, 2024
0f15b76
adds privacy page
agnlez Oct 8, 2024
203a7bf
updates study cases tests
agnlez Oct 8, 2024
f8e8475
minor changes in about page
agnlez Oct 8, 2024
ac3e1e0
updates news tests
agnlez Oct 8, 2024
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 public/images/events/coastwatch-seagrass.webp
Binary file not shown.
Binary file added public/images/events/earth-day-workshop.webp
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed public/images/events/people.webp
Binary file not shown.
Binary file added public/images/events/pollinator-portugal.webp
Binary file not shown.
Binary file removed public/images/events/town.webp
Binary file not shown.
Binary file added public/images/events/world-water-day.webp
Binary file not shown.
Binary file removed public/images/m4n-goals.avif
Binary file not shown.
Binary file added public/images/m4n-goals.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/app/(static)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { PropsWithChildren } from 'react';

import Footer from '@/containers/footer';
import Newsletter from '@/containers/newsletter';

export default function StaticPageLayout({ children }: Readonly<PropsWithChildren>) {
return (
<main>
{children}
<Newsletter />
<Footer />
</main>
);
Expand Down
8 changes: 4 additions & 4 deletions src/app/cases/responsive.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,15 @@ export default function ResponsiveCasesPage() {
/>
</CaseStudiesTotal>
</motion.div>
<div className="px-4 md:p-[50px]" ref={ref}>
<div className="px-6" ref={ref}>
<CaseStudiesTotal className="flex items-baseline justify-between gap-4 text-xl">
<MobileFiltersDropdown
onClickSearch={handleOpenSearch}
onClickFilters={handleOpenFilters}
/>
</CaseStudiesTotal>
</div>
<div className="flex grow px-4">
<div className="flex grow px-6">
<CaseStudies />
</div>
<motion.div
Expand All @@ -118,7 +118,7 @@ export default function ResponsiveCasesPage() {
<Media greaterThanOrEqual="md" className="relative flex flex-1">
<>
<Sidebar>
<div className="px-[60px]">
<div className="px-6">
<CaseStudiesTotal className="text-xl" />
</div>
<CaseStudies />
Expand All @@ -135,7 +135,7 @@ export default function ResponsiveCasesPage() {
setFilters((prev) => ({ ...prev, keyword }));
}}
autoFocus
placeholder="Search case studies by keyword..."
placeholder="Search case studies by title or tag..."
onClose={handleCloseSearch}
showCloseIconAlways
/>
Expand Down
12 changes: 12 additions & 0 deletions src/app/privacy-policy/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { PropsWithChildren } from 'react';

import Footer from '@/containers/footer';

export default function PrivacyPolicyLayout({ children }: Readonly<PropsWithChildren>) {
return (
<main>
{children}
<Footer />
</main>
);
}
5 changes: 5 additions & 0 deletions src/app/privacy-policy/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import PrivacyPolicy from '@/containers/privacy-policy';

export default function PrivacyPolicyPage() {
return <PrivacyPolicy />;
}
43 changes: 3 additions & 40 deletions src/components/app-menu/content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,10 @@ import { cn } from '@/lib/utils';
import { menuOpenAtom } from '@/app/store';

import { SECTIONS } from '@/containers/header';
import Newsletter from '@/containers/newsletter';

import {
Dialog,
DialogContent,
DialogHeader,
DialogTitle,
DialogTrigger,
} from '@/components/ui/dialog';

const navItemContainerClass =
'hover:text-navy-500 relative inline-flex items-center space-x-6 text-xl text-grey-800 2xl:text-4xl' as const;
const NavItem = (props: PropsWithChildren<LinkProps & { isDialogButton?: boolean }>) => {
const NavItem = (props: PropsWithChildren<LinkProps>) => {
const setOpen = useSetAtom(menuOpenAtom);
const Text = (
<>
Expand All @@ -32,32 +23,6 @@ const NavItem = (props: PropsWithChildren<LinkProps & { isDialogButton?: boolean
</>
);

if (props.isDialogButton) {
return (
<Dialog>
<DialogTrigger asChild>
<button
type="button"
className={navItemContainerClass}
onClick={() => {
setOpen(false);
}}
>
{Text}
</button>
</DialogTrigger>
<DialogContent className="bg-white pt-8 text-grey-800" aria-describedby={undefined}>
<DialogHeader>
<DialogTitle className="pr-2 text-xl font-bold text-grey-800 md:text-2xl">
Interested in our work?
</DialogTitle>
</DialogHeader>
<Newsletter />
</DialogContent>
</Dialog>
);
}

return (
<Link
href={props.href}
Expand Down Expand Up @@ -87,7 +52,7 @@ export const Nav = () => {
return (
<div
className={cn({
'pointer-events-none fixed left-0 top-0 z-50 h-screen w-full overflow-y-auto bg-white opacity-0 transition-all':
'pointer-events-none fixed left-0 top-0 z-[60] h-screen w-full overflow-y-auto bg-white opacity-0 transition-all':
true,
'pointer-events-auto opacity-100': open,
})}
Expand Down Expand Up @@ -131,9 +96,7 @@ export const Nav = () => {
<ul className="flex flex-col gap-5 lg:gap-8">
{SECTIONS.map((item) => (
<li key={item.href} className="text-right">
<NavItem href={item.href} isDialogButton={item.href === '#contact-us'}>
{item.name}
</NavItem>
<NavItem href={item.href}>{item.name}</NavItem>
</li>
))}
</ul>
Expand Down
2 changes: 1 addition & 1 deletion src/components/search/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default function Search({
<div className="relative flex w-full">
<input
className={cn(
'flex w-[310px] items-center bg-white pl-6 pr-6 placeholder:text-grey-600 focus:outline-none',
'flex w-[345px] items-center bg-white pl-6 pr-6 placeholder:text-grey-600 focus:outline-none',
)}
placeholder={placeholder}
onChange={(e) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const AccordionItem = React.forwardRef<
<AccordionPrimitive.Item
ref={ref}
className={cn(
'border-t border-t-grey-800/30 transition-colors data-[state=open]:border-t-grey-800',
// 'border-t border-t-grey-800/30 transition-colors last:border-b-grey-800/30 data-[state=open]:border-t-grey-800',
className,
)}
{...props}
Expand Down
19 changes: 10 additions & 9 deletions src/containers/about/description/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,18 @@ import ForestPerson from '../../../../public/images/forest-person.webp';

export default function AboutDescription() {
return (
<Wrapper className="space-y-10">
<div className="space-y-4 lg:grid lg:grid-cols-12">
<p className="uppercase tracking-wide lg:col-span-6">A Horizon Europe project</p>
<h2 className="text-xl font-semibold lg:col-span-6 lg:text-3xl">
Doing
<br /> more
<span className="font-thin">4</span>
nature with citizen science
<Wrapper className="space-y-10 lg:space-y-20">
<div className="space-y-4">
<p className="uppercase tracking-wide">A Horizon Europe project</p>
<h2 className="text-xl font-semibold lg:text-3xl">
<span className="text-wrap">
Doing more
<span className="font-thin">4</span>nature
</span>
<span className="text-nowrap"> with citizen science</span>
</h2>
</div>
<div className="items-end space-y-10 lg:grid lg:grid-cols-12">
<div className="space-y-4 lg:grid lg:grid-cols-12 lg:space-y-0">
<div className="relative lg:col-span-5">
<Image src={ForestPerson} alt="person in a forest" />
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/containers/about/partners/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default function Partners() {
collaborations, with scientific experts from the social sciences, data science and
technology, and natural sciences, most of whom also have substantial experience with
hands-on Citizen Science. The consortium combines institutional actors, namely environmental
agencies and institutions with citizen science initiatives and environmental NGOs practicing
agencies and institutions with Citizen Science initiatives and environmental NGOs practicing
Citizen Science and intermediaries as well as a network of Fab Labs and Designers and the
private sector. This enables the consortium to implement its ambitious and truly innovative
socio-technical approach for large-scale double loop Action Research.
Expand Down
138 changes: 126 additions & 12 deletions src/containers/case-detail/sidebar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ export default function CaseDetailSidebar() {
<Media greaterThanOrEqual="md">
{(className: string, renderChildren: boolean) =>
renderChildren ? (
<Button asChild variant="ghost" className="border border-grey-900">
<Link href="/cases">Close detail</Link>
<Button asChild variant="secondary" className="border border-grey-900 text-white">
<Link href="/cases">Back</Link>
</Button>
) : (
<Button
Expand Down Expand Up @@ -155,33 +155,147 @@ export default function CaseDetailSidebar() {
className="flex w-full flex-col divide-y divide-white/20"
defaultValue={accordionItems[0].value}
>
{accordionItems.map((item) => (
<AccordionItem key={item.value} value={item.value} className="py-5 first:pt-0">
{/*<AccordionItem*/}
{/* value="citizenScienceInitiatives"*/}
{/* className="peer w-full py-5 first:pt-0"*/}
{/*>*/}
{/* <AccordionTrigger>*/}
{/* <div className="flex items-center space-x-5">*/}
{/* <span className="text-lg font-semibold">Citizen Science Initiatives</span>*/}
{/* </div>*/}
{/* </AccordionTrigger>*/}
{/* <AccordionContent className="leading-9">*/}
{/* <ul>*/}
{/* {data?.citizenScienceInitiatives.map((item, index) => (*/}
{/* <li key={index}>{renderItem(item)}</li>*/}
{/* ))}*/}
{/* </ul>*/}
{/* </AccordionContent>*/}
{/*</AccordionItem>*/}
<AccordionItem value="citizenScienceData" className="peer w-full py-5 first:pt-0">
<AccordionTrigger>
<div className="flex items-center space-x-5">
<span className="text-lg font-semibold">Citizen Science Data</span>
</div>
</AccordionTrigger>
<AccordionContent className="leading-9">
<ul>
{data?.citizenScienceData.map((item, index) => (
<li key={index}>{renderItem(item)}</li>
))}
</ul>
</AccordionContent>
</AccordionItem>
<AccordionItem value="complianceNeed" className="peer w-full py-5 first:pt-0">
<AccordionTrigger>
<div className="flex items-center space-x-5">
<span className="text-lg font-semibold">Compliance Need</span>
</div>
</AccordionTrigger>
<AccordionContent className="leading-9">
<ul className="space-y-4">
{data?.complianceNeed.map((item, index) => (
<li key={index}>
{typeof item === 'object' && 'impact' in item ? (
<>
<h4 className="font-semibold">{item.impact.name}</h4>
<ul className="space-y-2">
{item.impact.list.map((subItem, index) => (
<li key={index}>{renderItem(subItem)}</li>
))}
</ul>
</>
) : (
renderItem(item)
)}
</li>
))}
</ul>
</AccordionContent>
</AccordionItem>
{data?.relevantPoliciesLaw && data.relevantPoliciesLaw.length > 0 && (
<AccordionItem value="relevantPoliciesLaw" className="peer w-full py-5 first:pt-0">
<AccordionTrigger>
<span className="text-lg font-semibold">{item.title}</span>
<div className="flex items-center space-x-5">
<span className="text-lg font-semibold">Relevant policy/laws</span>
</div>
</AccordionTrigger>
<AccordionContent className="leading-9">
<ul className="space-y-4">
{item.data.map((dataItem, index) => (
{data.relevantPoliciesLaw.map((item, index) => (
<li key={index}>
{typeof dataItem === 'object' && 'impact' in dataItem ? (
{typeof item === 'object' && 'impact' in item ? (
<>
<h4 className="font-semibold">{dataItem.impact.name}</h4>
<h4 className="font-semibold">{item.impact.name}</h4>
<ul className="space-y-2">
{dataItem.impact.list.map((subItem, subIndex) => (
<li key={subIndex}>{renderItem(subItem)}</li>
{item.impact.list.map((subItem, index) => (
<li key={index}>{renderItem(subItem)}</li>
))}
</ul>
</>
) : (
renderItem(dataItem)
renderItem(item)
)}
</li>
))}
</ul>
</AccordionContent>
</AccordionItem>
))}
)}
{/*<AccordionItem value="stakeholders" className="peer w-full py-5 first:pt-0">*/}
{/* <AccordionTrigger>*/}
{/* <div className="flex items-center space-x-5">*/}
{/* <span className="text-lg font-semibold">Stakeholders</span>*/}
{/* </div>*/}
{/* </AccordionTrigger>*/}
{/* <AccordionContent className="leading-9">*/}
{/* <ul className="space-y-4">*/}
{/* {data?.stakeholders.map((item, index) => (*/}
{/* <li key={index}>*/}
{/* {typeof item === 'object' && 'impact' in item ? (*/}
{/* <>*/}
{/* <h4 className="font-semibold">{item.impact.name}</h4>*/}
{/* <ul className="space-y-2">*/}
{/* {item.impact.list.map((subItem, index) => (*/}
{/* <li key={index}>{renderItem(subItem)}</li>*/}
{/* ))}*/}
{/* </ul>*/}
{/* </>*/}
{/* ) : (*/}
{/* renderItem(item)*/}
{/* )}*/}
{/* </li>*/}
{/* ))}*/}
{/* </ul>*/}
{/* </AccordionContent>*/}
{/*</AccordionItem>*/}
{/*<AccordionItem value="authorities" className="peer w-full py-5 first:pt-0">*/}
{/* <AccordionTrigger>*/}
{/* <div className="flex items-center space-x-5">*/}
{/* <span className="text-lg font-semibold">Authorities</span>*/}
{/* </div>*/}
{/* </AccordionTrigger>*/}
{/* <AccordionContent className="leading-9">*/}
{/* <ul className="space-y-4">*/}
{/* {data?.authorities.map((item, index) => (*/}
{/* <li key={index}>*/}
{/* {typeof item === 'object' && 'impact' in item ? (*/}
{/* <>*/}
{/* <h4 className="font-semibold">{item.impact.name}</h4>*/}
{/* <ul className="space-y-2">*/}
{/* {item.impact.list.map((subItem, index) => (*/}
{/* <li key={index}>{renderItem(subItem)}</li>*/}
{/* ))}*/}
{/* </ul>*/}
{/* </>*/}
{/* ) : (*/}
{/* renderItem(item)*/}
{/* )}*/}
{/* </li>*/}
{/* ))}*/}
{/* </ul>*/}
{/* </AccordionContent>*/}
{/*</AccordionItem>*/}
</Accordion>
<div>
<div className="flex flex-col items-start space-y-5 border-t border-t-white py-9">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useCallback, useState } from 'react';

import { useAtomValue } from 'jotai';
import { useSetAtom } from 'jotai/index';
import { HiOutlineTrash, HiOutlineX } from 'react-icons/hi';

Expand All @@ -17,7 +18,8 @@ export default function FiltersContent({
onSetFiltersDone?: () => void;
onClearFiltersDone?: () => void;
}) {
const [filters, setFilters] = useState(INITIAL_FILTERS_STATE);
const globalFilters = useAtomValue(filtersAtom);
const [filters, setFilters] = useState(globalFilters);
const setGlobalFilters = useSetAtom(filtersAtom);

const onClearFilters = useCallback(() => {
Expand Down
Loading