Add src/app/species/[slug]/page.tsx
This commit is contained in:
143
src/app/species/[slug]/page.tsx
Normal file
143
src/app/species/[slug]/page.tsx
Normal file
@@ -0,0 +1,143 @@
|
||||
"use client";
|
||||
|
||||
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
|
||||
import ReactLenis from "lenis/react";
|
||||
import NavbarStyleFullscreen from '@/components/navbar/NavbarStyleFullscreen/NavbarStyleFullscreen';
|
||||
import LegalSection from '@/components/legal/LegalSection';
|
||||
import FooterCard from '@/components/sections/footer/FooterCard';
|
||||
import { Twitter, Linkedin, Instagram } from "lucide-react";
|
||||
|
||||
interface SpeciesProfilePageProps {
|
||||
params: {
|
||||
slug: string;
|
||||
};
|
||||
}
|
||||
|
||||
export default function SpeciesProfilePage({ params }: SpeciesProfilePageProps) {
|
||||
const { slug } = params;
|
||||
const speciesName = slug.replace(/-/g, ' ').split(' ').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join(' ');
|
||||
|
||||
// Dummy data for a species profile
|
||||
const speciesData = {
|
||||
scientificName: `Panthera leo (${speciesName})`,
|
||||
classification: "Kingdom: Animalia, Phylum: Chordata, Class: Mammalia, Order: Carnivora, Family: Felidae, Genus: Panthera, Species: P. leo", habitat: "Savannas, grasslands, dense bush, and open woodlands in sub-Saharan Africa and Asia.", distributionMap: "Placeholder for a global distribution map showing populations in Africa and a small population in India.", lifespan: "10-14 years in the wild, up to 20 years in captivity.", diet: "Carnivore, primarily preying on large ungulates like zebra, wildebeest, buffalo, and antelope.", predators: "Adult lions have no natural predators other than humans. Cubs may be preyed upon by hyenas, leopards, and other large predators.", prey: "Zebra, wildebeest, buffalo, antelope, warthogs, and sometimes smaller animals like birds or reptiles.", conservationStatus: "Vulnerable (IUCN Red List)", adaptations: "Powerful jaws, retractable claws, excellent night vision, and social hunting strategies.", evolutionHistory: "Lions evolved in Africa, with evidence suggesting their lineage diverged from other panthera species around 1.9 to 1.4 million years ago.", images: [
|
||||
"http://img.b2bpic.net/free-photo/majestically-roaring-lion-savanna-africa-generated-by-ai_188544-12297.jpg", "http://img.b2bpic.net/free-photo/lioness-with-cubs-savanna-generated-by-ai_188544-12293.jpg"
|
||||
],
|
||||
funFacts: [
|
||||
"A group of lions is called a pride.", "Male lions are known for their impressive manes, which can indicate their health and and age.", "Lions are the only cats that live in groups."
|
||||
]
|
||||
};
|
||||
|
||||
const legalSectionsContent = [
|
||||
{
|
||||
heading: "Scientific Name", content: [{ type: "paragraph", text: speciesData.scientificName }],
|
||||
},
|
||||
{
|
||||
heading: "Classification", content: [{ type: "paragraph", text: speciesData.classification }],
|
||||
},
|
||||
{
|
||||
heading: "Habitat", content: [{ type: "paragraph", text: speciesData.habitat }],
|
||||
},
|
||||
{
|
||||
heading: "Distribution Map", content: [{ type: "paragraph", text: speciesData.distributionMap + " (Image placeholder: " + "http://img.b2bpic.net/free-photo/abstract-polygonal-world-map-geometric-illustration-blue-background_1017-38080.jpg" + ")"}],
|
||||
},
|
||||
{
|
||||
heading: "Lifespan", content: [{ type: "paragraph", text: speciesData.lifespan }],
|
||||
},
|
||||
{
|
||||
heading: "Diet", content: [{ type: "paragraph", text: speciesData.diet }],
|
||||
},
|
||||
{
|
||||
heading: "Predators", content: [{ type: "paragraph", text: speciesData.predators }],
|
||||
},
|
||||
{
|
||||
heading: "Prey", content: [{ type: "paragraph", text: speciesData.prey }],
|
||||
},
|
||||
{
|
||||
heading: "Conservation Status", content: [{ type: "paragraph", text: speciesData.conservationStatus }],
|
||||
},
|
||||
{
|
||||
heading: "Adaptations", content: [{ type: "paragraph", text: speciesData.adaptations }],
|
||||
},
|
||||
{
|
||||
heading: "Evolution History", content: [{ type: "paragraph", text: speciesData.evolutionHistory }],
|
||||
},
|
||||
{
|
||||
heading: "Images", content: [
|
||||
{ type: "paragraph", text: "Image 1: " + speciesData.images[0] },
|
||||
{ type: "paragraph", text: "Image 2: " + speciesData.images[1] }
|
||||
],
|
||||
},
|
||||
{
|
||||
heading: "Fun Facts", content: [{ type: "list", items: speciesData.funFacts }],
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<ThemeProvider
|
||||
defaultButtonVariant="hover-magnetic"
|
||||
defaultTextAnimation="entrance-slide"
|
||||
borderRadius="rounded"
|
||||
contentWidth="mediumSmall"
|
||||
sizing="mediumLargeSizeMediumTitles"
|
||||
background="circleGradient"
|
||||
cardStyle="subtle-shadow"
|
||||
primaryButtonStyle="radial-glow"
|
||||
secondaryButtonStyle="layered"
|
||||
headingFontWeight="extrabold"
|
||||
>
|
||||
<ReactLenis root>
|
||||
<div id="nav" data-section="nav">
|
||||
<NavbarStyleFullscreen
|
||||
navItems={[
|
||||
{ name: "Home", id: "/" },
|
||||
{ name: "About", id: "#about" },
|
||||
{ name: "Features", id: "#features" },
|
||||
{ name: "Explore", id: "#explore" },
|
||||
{ name: "Species", id: "/species/example-species" },
|
||||
{ name: "Metrics", id: "#metrics" },
|
||||
{ name: "Testimonials", id: "#testimonials" },
|
||||
{ name: "Partners", id: "#partners" },
|
||||
{ name: "FAQ", id: "#faq" },
|
||||
{ name: "Contact", id: "#contact" },
|
||||
]}
|
||||
logoSrc="http://img.b2bpic.net/free-vector/gradient-electronics-logos-pack_23-2148971491.jpg"
|
||||
logoAlt="LifeAtlas X Logo"
|
||||
brandName="LifeAtlas X"
|
||||
bottomLeftText="Global Community"
|
||||
bottomRightText="explore@lifeatlasx.com"
|
||||
button={{
|
||||
text: "Begin Your Exploration", href: "#hero"}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div id="species-profile" data-section="species-profile">
|
||||
<LegalSection
|
||||
layout="page"
|
||||
title={`Species Profile: ${speciesName}`}
|
||||
subtitle="Detailed information about this fascinating creature."
|
||||
sections={legalSectionsContent}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div id="footer" data-section="footer">
|
||||
<FooterCard
|
||||
logoText="LifeAtlas X"
|
||||
copyrightText="© 2024 LifeAtlas X. All rights reserved."
|
||||
socialLinks={[
|
||||
{
|
||||
icon: Twitter,
|
||||
href: "#", ariaLabel: "Twitter"},
|
||||
{
|
||||
icon: Linkedin,
|
||||
href: "#", ariaLabel: "LinkedIn"},
|
||||
{
|
||||
icon: Instagram,
|
||||
href: "#", ariaLabel: "Instagram"},
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
</ReactLenis>
|
||||
</ThemeProvider>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user