neatening

This commit is contained in:
IZZY 2025-06-01 16:47:31 +01:00
parent daa50887d6
commit 19253672dc
8 changed files with 279 additions and 295 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 72 KiB

BIN
public/learn1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

1
public/target.png Normal file
View File

@ -0,0 +1 @@
<svg width="96" height="96" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" overflow="hidden"><g transform="translate(-592 -312)"><path d="M667.6 343C677.844 359.098 673.098 380.453 657 390.697 640.902 400.942 619.547 396.196 609.303 380.097 599.058 363.999 603.804 342.644 619.903 332.4 631.22 325.198 645.683 325.198 657 332.4L657 330.054C639.609 319.813 617.209 325.609 606.968 343 596.727 360.391 602.523 382.791 619.914 393.032 637.305 403.273 659.705 397.477 669.946 380.086 676.685 368.642 676.685 354.444 669.946 343Z"/><path d="M652.035 342.307C641.415 334.811 626.729 337.345 619.233 347.965 611.737 358.585 614.271 373.271 624.891 380.767 635.511 388.263 650.197 385.729 657.693 375.109 663.436 366.972 663.436 356.102 657.693 347.965L656.257 349.4C662.957 359.224 660.424 372.62 650.6 379.321 640.776 386.021 627.38 383.488 620.679 373.664 613.979 363.839 616.512 350.443 626.336 343.743 633.654 338.752 643.282 338.752 650.6 343.743Z"/><path d="M638.5 353C639.338 353 640.171 353.125 640.973 353.369L642.534 351.809C637.176 349.576 631.023 352.108 628.789 357.466 626.556 362.824 629.089 368.977 634.446 371.211 639.804 373.444 645.958 370.911 648.191 365.554 649.27 362.966 649.27 360.054 648.191 357.466L646.631 359.027C647.997 363.518 645.463 368.267 640.972 369.632 636.48 370.998 631.732 368.464 630.366 363.973 629.001 359.482 631.534 354.733 636.026 353.368 636.828 353.124 637.662 353 638.5 353Z"/><path d="M679.924 329.617C679.769 329.243 679.404 329 679 329L671 329 671 321C671 320.448 670.552 320 670 320 669.735 320 669.48 320.106 669.293 320.293L660.293 329.293C660.105 329.48 660 329.735 660 330L660 338.586 637.793 360.793C637.396 361.177 637.385 361.81 637.768 362.207 638.152 362.604 638.785 362.615 639.182 362.232 639.191 362.224 639.199 362.215 639.207 362.207L661.414 340 670 340C670.265 340 670.52 339.895 670.707 339.707L679.707 330.707C679.993 330.421 680.079 329.991 679.924 329.617ZM662 330.414 668.983 323.431C668.992 323.422 669 323.425 669 323.438L669 329.586 662 336.586ZM669.586 338 663.414 338 670.414 331 676.562 331C676.575 331 676.578 331.008 676.569 331.017Z"/></g></svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
public/target1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
public/team1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

@ -1,6 +1,5 @@
"use client"; "use client";
import BottomFooter from "@components/BottomFooter"; import BottomFooter from "@components/BottomFooter";
export default function LearnPage() { export default function LearnPage() {
return ( return (
<div <div
@ -9,17 +8,12 @@ export default function LearnPage() {
backgroundImage: "url('/earthquakeRelief.jpg')", // adjust path as needed backgroundImage: "url('/earthquakeRelief.jpg')", // adjust path as needed
}} }}
> >
{/* Overlay for readability */}
<div className="absolute inset-0 bg-black bg-opacity-50"></div> <div className="absolute inset-0 bg-black bg-opacity-50"></div>
<main className="flex-1 flex flex-col items-center justify-start pt-16 px-4 relative z-20"> <main className="flex-1 flex flex-col items-center justify-start pt-16 px-4 relative z-20">
{/* Title & subtitle OVER the background (not in the content box) */} <h1 className="text-4xl font-bold mb-4 text-red-700 text-center drop-shadow-lg">Earthquakes</h1>
<h1 className="text-4xl font-bold mb-4 text-white text-center drop-shadow-lg">Earthquakes</h1>
<p className="max-w-2xl text-lg text-white mb-8 text-center font-bold drop-shadow"> <p className="max-w-2xl text-lg text-white mb-8 text-center font-bold drop-shadow">
In this page, you can learn all about what earthquakes are, and how best to keep safe! In this page, you can learn all about what earthquakes are, and how best to keep safe!
</p> </p>
{/* Content box: all following info INSIDE */}
<div className="max-w-4xl w-full bg-white bg-opacity-90 rounded-xl shadow-2xl mx-auto mb-12 p-8 md:p-10"> <div className="max-w-4xl w-full bg-white bg-opacity-90 rounded-xl shadow-2xl mx-auto mb-12 p-8 md:p-10">
{/* Section 1 */} {/* Section 1 */}
<section className="mb-8"> <section className="mb-8">
@ -36,7 +30,25 @@ export default function LearnPage() {
<p> <p>
<span className="font-bold text-black md:text-xl">What are the types of earthquakes?</span> <span className="font-bold text-black md:text-xl">What are the types of earthquakes?</span>
<br /> <br />
Regions near plate boundaries, such as around the Pacific Ocean ("The Ring of Fire"), experience the most activity. There are four main types of earthquakes, each caused by different processes:
</p>
<ul className="list-disc list-inside pl-6 mt-3 space-y-2 text-gray-700">
<li>
<span className="font-bold">Tectonic Earthquakes:</span> These are the most common type and occur when rocks in the Earths crust break or slip along faults, usually due to movement between tectonic plates. The released energy creates seismic waves that shake the ground. Tectonic earthquakes are responsible for the vast majority of damaging quakes.
</li>
<li>
<span className="font-bold">Volcanic Earthquakes:</span> These happen in areas with active volcanoes. They're triggered by magma moving underground, which causes fractured rock and sudden releases of pressure. Volcanic earthquakes often occur before or during eruptions, and are usually smaller than tectonic earthquakes but can signal volcanic hazards.
</li>
<li>
<span className="font-bold">Collapse Earthquakes:</span> These occur when underground caves or mines collapse, causing small, local tremors. The shaking is usually minor and doesnt travel far. Collapse earthquakes are common in regions with extensive mining or karst landscapes (with many caves).
</li>
<li>
<span className="font-bold">Explosion Earthquakes:</span> These are caused by human activities like mining blasts, quarry explosions, or underground nuclear tests. The energy source is artificial (not natural), and the resulting seismic waves can be measured, but these events are usually small and localized.
</li>
</ul>
<p className="mt-4">
<strong>Whats the difference?</strong><br/>
<b>Tectonic</b> and <b>volcanic</b> earthquakes both come from natural Earth movementstectonic are about plate motion, while volcanic are caused by magma activity. <b>Collapse</b> earthquakes arise from ground suddenly falling in on itself, and <b>explosion</b> earthquakes are triggered by human-made blasts. The main difference lies in their cause, size, and frequency: tectonic are most common and strongest, volcanic tend to be local, collapse are small and specific to certain areas, and explosions are human-made.
</p> </p>
</section> </section>
{/* Section 3 */} {/* Section 3 */}
@ -44,13 +56,11 @@ export default function LearnPage() {
<p> <p>
<span className="font-bold text-black md:text-xl">How can I be prepared?</span> <span className="font-bold text-black md:text-xl">How can I be prepared?</span>
</p> </p>
{/* MAIN BULLET POINTS */}
<ul className="list-disc list-inside pl-6 space-y-2"> <ul className="list-disc list-inside pl-6 space-y-2">
<li> <li>
<span className="font-bold text-gray-800 ">Assemble an emergency kit:</span> <span className="font-bold text-gray-800 ">Assemble an emergency kit:</span>
This should be stored in your earthquake emergency zone. It may be useful, as in an earthquake, you may lose This should be stored in your earthquake emergency zone. It may be useful, as in an earthquake, you may lose
electricity or water supplies. electricity or water supplies.
{/* SUB BULLETS */}
<ul className="list-disc list-inside pl-6 mt-1 space-y-1 text-gray-700"> <ul className="list-disc list-inside pl-6 mt-1 space-y-1 text-gray-700">
<li>First aid kit and emergency medication</li> <li>First aid kit and emergency medication</li>
<li>Food (non-perishable)</li> <li>Food (non-perishable)</li>
@ -63,7 +73,6 @@ export default function LearnPage() {
<li> <li>
<span className="font-bold text-gray-800">Practice the Drop, Cover, and Hold On drill!</span> <span className="font-bold text-gray-800">Practice the Drop, Cover, and Hold On drill!</span>
This helps you protect yourself from falling objects during an earthquake. This helps you protect yourself from falling objects during an earthquake.
{/* Embed YouTube video */}
<div className="mt-2 flex justify-center"> <div className="mt-2 flex justify-center">
<iframe <iframe
width="350" width="350"
@ -87,6 +96,23 @@ export default function LearnPage() {
</li> </li>
</ul> </ul>
</section> </section>
{/* Q&A SECTION */}
<section className="mt-12 pt-8 border-t border-gray-300">
<h2 className="font-bold text-black text-xl mb-4">How does Tremor Tracker help?</h2>
<div className="mb-6">
<p className="font-semibold">How do we log earthquakes?</p>
<p>
Our Scientists record earthquakes using instruments called <strong>seismometers</strong>, which detect and measure the vibrations in the ground. When an earthquake occurs, the seismometer produces a trace known as a <strong>seismogram</strong>, showing the strength and duration of the shaking. Information from seismometers around the world is sent to data centers, where experts analyze it to pinpoint the earthquakes location, type, depth, and magnitude. This process is called logging or recording earthquakes, and it helps track seismic activity globally.
</p>
</div>
<div>
<p className="font-semibold">What are observatories?</p>
<p>
An <strong>earthquake observatory</strong> is a specialised facility where scientists monitor and study seismic activity. Observatories collect important data about the strength, location, and timing of each earthquake that can be shared with the general public. Scientists at the observatory use this data to better understand how and why earthquakes occur, track earthquake patterns, and issue warnings if a major quake is detected. The information gathered also helps in designing safer buildings and improving emergency response plans.
</p>
</div>
</section>
</div> </div>
</main> </main>
<BottomFooter /> <BottomFooter />

View File

@ -3,11 +3,9 @@ import Image from "next/image";
import Link from "next/link"; import Link from "next/link";
import { TbHexagon } from "react-icons/tb"; import { TbHexagon } from "react-icons/tb";
import useSWR from "swr"; import useSWR from "swr";
import BottomFooter from "@components/BottomFooter"; import BottomFooter from "@components/BottomFooter";
import { createPoster } from "@utils/axiosHelpers"; import { createPoster } from "@utils/axiosHelpers";
import getMagnitudeColor from "@utils/getMagnitudeColour"; import getMagnitudeColor from "@utils/getMagnitudeColour";
// formats the date // formats the date
function getRelativeDate(dateString: string): string { function getRelativeDate(dateString: string): string {
const date = new Date(dateString); const date = new Date(dateString);
@ -18,7 +16,6 @@ function getRelativeDate(dateString: string): string {
if (diffDays === 1) return "yesterday"; if (diffDays === 1) return "yesterday";
return date.toLocaleDateString(); return date.toLocaleDateString();
} }
// copied from sidebar // copied from sidebar
function MagnitudeNumber({ magnitude }: { magnitude: number }) { function MagnitudeNumber({ magnitude }: { magnitude: number }) {
const magnitudeStr = magnitude.toFixed(1); const magnitudeStr = magnitude.toFixed(1);
@ -36,12 +33,10 @@ function MagnitudeNumber({ magnitude }: { magnitude: number }) {
</div> </div>
); );
} }
export default function Home() { export default function Home() {
const { data, error, isLoading } = useSWR("/api/earthquakes", createPoster({ rangeDaysPrev: 6 })); const { data, error, isLoading } = useSWR("/api/earthquakes", createPoster({ rangeDaysPrev: 6 }));
// Take 5 most recent // Take 5 most recent
const recents = (data?.earthquakes ?? []).sort((a, b) => new Date(b.date).getTime() - new Date(a.date).getTime()).slice(0, 5); const recents = (data?.earthquakes ?? []).sort((a, b) => new Date(b.date).getTime() - new Date(a.date).getTime()).slice(0, 5);
return ( return (
<main className="min-h-screen text-black"> <main className="min-h-screen text-black">
<div className="w-full relative"> <div className="w-full relative">
@ -53,7 +48,18 @@ export default function Home() {
<Image className="mx-auto" height={300} width={1000} alt="Title Image" src="/tremortrackertext.png" /> <Image className="mx-auto" height={300} width={1000} alt="Title Image" src="/tremortrackertext.png" />
</div> </div>
</div> </div>
<p className="mt-2"></p>
{/* ===== New Welcome Section ===== */}
<section className="w-full flex flex-col items-center mt-8 mb-3">
<h1 className="text-4xl md:text-5xl font-sans font-bold text-black drop-shadow-lg mb-2 tracking-tight">
Welcome to Tremor Tracker
</h1>
<p className="text-lg md:text-xl font-sans text-black w-5/6 md:w-4/6 mx-auto drop-shadow-md text-center">
TremorTracker is a non-profit website and research company, that aims to provide seismic education and aid preparation
</p>
</section>
{/* ===== Icons Section ===== */}
<div className="flex flex-col md:flex-row md:justify-evenly gap-6 mt-2"> <div className="flex flex-col md:flex-row md:justify-evenly gap-6 mt-2">
<Link href="/earthquakes" className="icon-link flex flex-col items-center p-6 rounded-xl transition-colors duration-300"> <Link href="/earthquakes" className="icon-link flex flex-col items-center p-6 rounded-xl transition-colors duration-300">
<Image height={100} width={100} src="/earthquake.png" alt="Education Icon" className="h-40 w-40 mb-4" /> <Image height={100} width={100} src="/earthquake.png" alt="Education Icon" className="h-40 w-40 mb-4" />
@ -81,61 +87,12 @@ export default function Home() {
</Link> </Link>
</div> </div>
<p className="mt-18"></p> <p className="mt-18"></p>
<section className="min-h-screen text-black">
<div className="w-full relative z-40"> {/* === REMOVED Middle Info/Image Section === */}
<div> {/* <section className="min-h-screen text-black">
<Image height={2500} width={2000} alt="Background Image" src="/earthquakesMap.jpg" /> ...entire earthquakesMap section removed...
</div> </section> */}
<div className="border absolute top-0 inset-0 bg-gradient-to-b from-transparent via-black/10 to-black/40">
<section className="relative z-10 flex flex-col items-center text-center w-full px-4 py-14 mt-6">
<h1 className="text-4xl md:text-5xl font-sans font-bold text-white drop-shadow-lg mb-4 tracking-tight z-10">
Welcome to Tremor Tracker
</h1>
<p className="text-lg md:text-xl font-sans text-white w-4/6 mx-auto drop-shadow-md z-10">
TremorTracker is a non-profit website and research company, that aims to provide seismic education and aid
preparation
</p>
<p className="mt-10"></p>
<p className="text-lg md:text-3xl font-bold text-white w-4/6 mx-auto drop-shadow-md z-10">What is an earthquake?</p>
<p className="text-lg md:text-xl text-white w-4/6 mx-auto drop-shadow-md z-10">
An earthquake is a sudden shaking of the Earths surface, triggered by a rapid release of energy deep underground.
This usually happens because the Earths outer shell, called the crust, is made up of large pieces known as
tectonic plates. These plates are always moving, but sometimes they get stuck at their edges; when stress builds
up and is finally released, it causes the ground to shakean earthquake. Earthquakes can vary greatly in sizefrom
barely noticeable tremors to powerful quakes capable of causing widespread destruction. There are several types:
Tectonic, Volcanic and Collapse earthquakes. Understanding why and how earthquakes happen helps scientists predict
where they are most likely to occur and how to lessen their impact.
</p>
<p className="mt-10"></p>
<p className="text-lg md:text-3xl font-bold text-white w-4/6 mx-auto drop-shadow-md z-10">
How do we log earthquakes?
</p>
<p className="text-lg md:text-3xl font-bold text-white w-4/6 mx-auto drop-shadow-md z-10">
What information are we interested in?
</p>
<p className="text-lg md:text-xl text-white w-4/6 mx-auto drop-shadow-md z-10">
Scientists record earthquakes using special instruments called seismometers, which detect and measure the
vibrations in the ground. When an earthquake occurs, the seismometer produces a trace known as a seismogram,
showing the strength and duration of the shaking. Information from seismometers around the world is sent to data
centers, where experts analyze it to pinpoint the earthquakes location, type, depth, and magnitude. This process
is called logging or recording earthquakes, and it helps track seismic activity globally.
</p>
<p className="mt-10"></p>
<p className="text-lg md:text-3xl font-bold text-white w-4/6 mx-auto drop-shadow-md z-10">
What are observatories?
</p>
<p className="text-lg md:text-xl text-white w-4/6 mx-auto drop-shadow-md z-10">
An earthquake observatory is a specialized facility where scientists monitor and study seismic activity. These
observatories are equipped with sensitive instruments that can detect and record even the smallest tremors deep
within the Earth. Observatories collect important data about the strength, location, and timing of each earthquake
that can be shared with the general public. Scientists at the observatory use this data to better understand how
and why earthquakes occur, track earthquake patterns, and issue warnings if a major quake is detected. The
information gathered also helps in designing safer buildings and improving emergency response plans.
</p>
</section>
</div>
</div>
</section>
<p className="mt-20"></p> <p className="mt-20"></p>
<section className="relative z-10 flex flex-col items-start text-left w-5/6 mx-auto px-2 -mt-5 mb-2"> <section className="relative z-10 flex flex-col items-start text-left w-5/6 mx-auto px-2 -mt-5 mb-2">
<h1 className="text-3xl md:text-3xl font-bold text-black drop-shadow-lg mb-3 tracking-tight">Recent Earthquake Events</h1> <h1 className="text-3xl md:text-3xl font-bold text-black drop-shadow-lg mb-3 tracking-tight">Recent Earthquake Events</h1>
@ -187,21 +144,21 @@ export default function Home() {
</p> </p>
</Link> </Link>
<Link href="/our-mission" className="icon-link flex flex-col items-center p-6 rounded-xl transition-colors duration-300"> <Link href="/our-mission" className="icon-link flex flex-col items-center p-6 rounded-xl transition-colors duration-300">
<Image height={100} width={100} src="/mission.jpg" alt="Our Mission Icon" className="h-20 w-20 mb-4" /> <Image height={150} width={150} src="/target1.png" alt="Our Mission Icon" className="mb-4" />
<h3 className="text-xl font-bold text-black mb-4">Our Mission</h3> <h3 className="text-xl font-bold text-black mb-4">Our Mission</h3>
<p className="text-md text-black text-center max-w-xs opacity-90"> <p className="text-md text-black text-center max-w-xs opacity-90">
Find out more about our purpose and the features we offer. Find out more about our purpose and the features we offer.
</p> </p>
</Link> </Link>
<Link href="/the-team" className="icon-link flex flex-col items-center p-6 rounded-xl transition-colors duration-300"> <Link href="/the-team" className="icon-link flex flex-col items-center p-6 rounded-xl transition-colors duration-300">
<Image height={100} width={100} src="/team.jpg" alt="Team Icon" className="h-20 w-20 mb-4" /> <Image height={250} width={250} src="/team1.png" alt="Team Icon" className="h-20 w-20 mb-4 relative" />
<h3 className="text-xl font-bold text-black mb-4">Meet the Team</h3> <h3 className="text-xl font-bold text-black mb-4">Meet the Team</h3>
<p className="text-md text-black text-center max-w-xs opacity-90"> <p className="text-md text-black text-center max-w-xs opacity-90">
Learn about our team leads and their responsibilities. Learn about our team leads and their responsibilities.
</p> </p>
</Link> </Link>
<Link href="/the-team" className="icon-link flex flex-col items-center p-6 rounded-xl transition-colors duration-300"> <Link href="/the-team" className="icon-link flex flex-col items-center p-6 rounded-xl transition-colors duration-300">
<Image height={100} width={100} src="/learn.jpg" alt="Learn Icon" className="h-20 w-20 mb-4" /> <Image height={250} width={250} src="/learn1.png" alt="Learn Icon" className="h-20 w-20 mb-4" />
<h3 className="text-xl font-bold text-black mb-4">Learn</h3> <h3 className="text-xl font-bold text-black mb-4">Learn</h3>
<p className="text-md text-black text-center max-w-xs opacity-90"> <p className="text-md text-black text-center max-w-xs opacity-90">
Find out more about earthquakes, what causes them and how to prepare. Find out more about earthquakes, what causes them and how to prepare.