Update src/app/species/[slug]/page.tsx
This commit is contained in:
@@ -3,120 +3,91 @@
|
||||
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 LegalSection from '@/components/legal/LegalSection';
|
||||
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 }],
|
||||
},
|
||||
export default function SpeciesSlugPage() {
|
||||
const navItems = [
|
||||
{ name: "Home", id: "/" },
|
||||
{ name: "About", id: "/about-us" },
|
||||
{ name: "Features", id: "#features" },
|
||||
{ name: "Explore", id: "#explore" },
|
||||
{ name: "AI Species Comparison", id: "/ai-species-comparison" },
|
||||
{ name: "Metrics", id: "#metrics" },
|
||||
{ name: "Testimonials", id: "#testimonials" },
|
||||
{ name: "Partners", id: "#partners" },
|
||||
{ name: "FAQ", id: "#faq" },
|
||||
{ name: "Contact", id: "/contact-us" },
|
||||
];
|
||||
|
||||
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"
|
||||
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" },
|
||||
]}
|
||||
navItems={navItems}
|
||||
logoSrc="http://img.b2bpic.net/free-vector/gradient-electronics-logos-pack_23-2148971491.jpg"
|
||||
logoAlt="LifeAtlas X Logo"
|
||||
logoAlt="LifeAtlas X"
|
||||
brandName="LifeAtlas X"
|
||||
bottomLeftText="Global Community"
|
||||
bottomRightText="explore@lifeatlasx.com"
|
||||
button={{
|
||||
text: "Begin Your Exploration", href: "#hero"}}
|
||||
text: "Begin Your Exploration", href: "#hero"
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div id="species-profile" data-section="species-profile">
|
||||
<div id="species-details" data-section="species-details">
|
||||
<LegalSection
|
||||
layout="page"
|
||||
title={`Species Profile: ${speciesName}`}
|
||||
subtitle="Detailed information about this fascinating creature."
|
||||
sections={legalSectionsContent}
|
||||
title="Species Details: The Majestic Dragon"
|
||||
subtitle="In-depth analysis of the Draco Volans species."
|
||||
sections={[
|
||||
{
|
||||
heading: "Taxonomy and Classification", content: [
|
||||
{ type: "paragraph", text: "The Draco Volans, commonly known as the Flying Dragon, belongs to the Agamidae family. Its scientific classification is as follows: Kingdom: Animalia, Phylum: Chordata, Class: Reptilia, Order: Squamata, Family: Agamidae, Genus: Draco, Species: D. volans." },
|
||||
{ type: "list", items: [
|
||||
"Kingdom: Animalia", "Phylum: Chordata", "Class: Reptilia", "Order: Squamata", "Family: Agamidae", "Genus: Draco", "Species: D. volans"
|
||||
]}
|
||||
],
|
||||
},
|
||||
{
|
||||
heading: "Habitat and Distribution", content: [
|
||||
{ type: "paragraph", text: "Draco Volans is native to Southeast Asia, particularly found in tropical rainforests of Indonesia, Malaysia, Thailand, and the Philippines. They are arboreal, spending most of their lives in trees." },
|
||||
{ type: "list", items: [
|
||||
"Tropical rainforests", "Indonesia", "Malaysia", "Thailand", "Philippines"
|
||||
]}
|
||||
],
|
||||
},
|
||||
{
|
||||
heading: "Physical Characteristics", content: [
|
||||
{ type: "paragraph", text: "These small lizards are distinguished by their extendable patagia, skin flaps supported by elongated ribs that allow them to glide between trees. They typically measure around 20 cm in length, including their long tails. Males often display a vibrant gular flap, used for courtship and territorial displays." },
|
||||
{ type: "numbered-list", items: [
|
||||
"Extendable patagia for gliding", "Length: ~20 cm", "Vibrant gular flap in males", "Arboreal adaptations"
|
||||
]}
|
||||
],
|
||||
},
|
||||
{
|
||||
heading: "Diet and Behavior", content: [
|
||||
{ type: "paragraph", text: "Their diet primarily consists of insects, such as ants and termites, which they catch on tree trunks. Draco Volans are diurnal, active during the day, and use their gliding ability to escape predators and move between feeding grounds." },
|
||||
{ type: "list", items: [
|
||||
"Primary diet: Insects (ants, termites)", "Diurnal activity pattern", "Gliding for predation escape and movement"
|
||||
]}
|
||||
],
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -125,19 +96,13 @@ export default function SpeciesProfilePage({ params }: SpeciesProfilePageProps)
|
||||
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"},
|
||||
{ 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