From 6e2ab0a88b60ba73da440a55da178cdf955f2792 Mon Sep 17 00:00:00 2001 From: Dave Date: Wed, 17 Sep 2025 11:27:35 +0200 Subject: [PATCH] Added MenuContext for handling navigation --- postcss.config.mjs | 2 +- src/app/(site)/page.tsx | 528 +---------------------- src/contexts/MenuContext.tsx | 61 +++ src/{ => lib}/postcss/functions/index.ts | 0 4 files changed, 66 insertions(+), 525 deletions(-) create mode 100644 src/contexts/MenuContext.tsx rename src/{ => lib}/postcss/functions/index.ts (100%) diff --git a/postcss.config.mjs b/postcss.config.mjs index 1d3a37e..364ddaf 100644 --- a/postcss.config.mjs +++ b/postcss.config.mjs @@ -10,7 +10,7 @@ import postcssNesting from 'postcss-nesting'; import postcssPresetEnv from 'postcss-preset-env'; import postcssUtilities from 'postcss-utilities'; import postcssFunctions from 'postcss-functions'; -import customFunctions from './src/postcss/functions'; +import customFunctions from './src/lib/postcss/functions'; const plugins = [ postcssGlobalData({ diff --git a/src/app/(site)/page.tsx b/src/app/(site)/page.tsx index d3ad46a..16bcdde 100644 --- a/src/app/(site)/page.tsx +++ b/src/app/(site)/page.tsx @@ -1,532 +1,12 @@ import styles from './page.module.css'; +import { MenuProvider } from '@/contexts/MenuContext'; export default function Home() { return ( -
-

Rods pursued studies dearer dangers Mellon spears lodgings.

+

- Language Sméagol where? Forest cesspits talked reclaim verse dungeon - Envenom 60 then venerable prolonging! There is only one Lord of the - Ring. + DAVE! DAVE! Do Not Let Us Die In The Dark Night Of This Cold Winter!

-

Breeding job clothing talks caught Freda trust.

-

- East dry because slinker deeper quarry knocks Sit. Treachery Front whim. - Even the smallest person can change the course of the future. -

-

Fence Toby reaction greed fired parting!

-

- Do not take me for some conjurer of cheap tricks. Room aged Hobbitses! - Wall odds force simply shield hmm Tuckborough pearl privilege grows. - Ride amazing seeps lake guardian pretty Arwen retrieve stroke steps? -

-
    -
  • - Primary Equipment Loadout - Every adventurer must carry essential gear - including weapons, armor, survival tools, and emergency supplies that - could mean the difference between life and death in the depths of - forgotten dungeons and abandoned ruins. -
  • -
  • - Weapon Categories and Combat Applications -
      -
    • - Melee Weapons - Close combat instruments ranging from simple clubs - and daggers to sophisticated swords and war hammers, each designed - for specific tactical situations and requiring different skill - sets to master effectively. -
    • -
    • - Ranged Weapons and Projectile Systems -
        -
      • - Bows and Crossbows - Traditional projectile weapons that rely - on mechanical tension to launch arrows and bolts with deadly - accuracy across considerable distances, favored by hunters and - scouts. -
      • -
      • - Firearms and Explosive Devices -
          -
        • - Pistols - Compact handheld firearms suitable for - close-quarters combat and as backup weapons when primary - armaments fail or become unusable in tight spaces. -
        • -
        • - Rifles - Long-barreled precision weapons designed for - accuracy at extended ranges, ideal for eliminating threats - before they can close to melee distance. -
        • -
        • - Heavy Weapons - Devastating armaments including cannons, - siege engines, and experimental warpstone-powered devices - that can breach fortifications and eliminate multiple - enemies. -
        • -
        -
      • -
      • - Thrown Weapons - Projectiles designed for manual deployment - including knives, axes, and specialized implements that - require significant skill and practice to use effectively in - combat situations. -
      • -
      -
    • -
    • - Magic Items and Enchanted Artifacts - Supernatural implements that - harness arcane energies to produce effects beyond the capabilities - of mundane equipment, often requiring specific knowledge or - bloodlines to activate safely. -
    • -
    -
  • -
  • - Protective Gear and Defensive Equipment - Armor systems, shields, and - other defensive measures designed to reduce incoming damage and - improve survival chances against the horrors that lurk in the darkness - below. -
  • -
-
    -
  • Helm's Deep saws rip outer special bowl determined.
  • -
  • - Breached forgive Hornblowers galumphing drums respectable wretched. -
  • -
  • Mellon slightest uttermost Isildur's sakes em.
  • -
  • Degree bone rift where sleep judgment Mordor.
  • -
  • - Tickle watchful lightest dry very teaching pushes picking Shire root. -
  • -
-

Maggot devils tea resisted person Sauron the White mist.

-

- You shall not pass! Pelennor squash least crunchable feel faithless - years well-done fun. Rock ending almost shared extend crooked alliances - possible nightfall Dwarf fine risky. -

-
    -
  1. - Character Creation Process - The systematic approach to developing a - playable character including attribute generation, skill selection, - equipment procurement, and background development that establishes the - foundation for all future adventures. -
  2. -
  3. - Combat Rules and Tactical Systems -
      -
    1. - Initiative Phase Determination - The method by which turn order is - established at the beginning of combat encounters, typically - involving dice rolls modified by relevant characteristics and - environmental factors. -
    2. -
    3. - Action Resolution Mechanics and Probability Systems -
        -
      1. - Roll percentile dice against relevant skill values - The core - mechanic requiring players to generate random numbers between - 1 and 100 and compare the result to their character's - applicable skill rating. -
      2. -
      3. - Compare results to skill values and apply situational - modifiers -
          -
        1. - Success conditions require rolling under the target skill - value after applying all relevant bonuses and penalties - from equipment, positioning, and environmental conditions. -
        2. -
        3. - Failure occurs when the dice result exceeds the modified - skill value, resulting in missed attacks, failed attempts, - or other negative outcomes depending on the specific - action attempted. -
        4. -
        5. - Critical results happen on natural rolls of 01-05 for - automatic success or 96-00 for catastrophic failure, - regardless of skill levels or modifiers applied to the - attempt. -
        6. -
        -
      4. -
      5. - Apply environmental modifiers, equipment bonuses, and - situational penalties that reflect the current tactical - situation and the character's preparation level for the - specific challenge being attempted. -
      6. -
      -
    4. -
    5. - Damage Resolution and Wound Tracking - The system for determining - injury severity, applying armor protection values, and tracking - the cumulative effects of combat damage on character performance - and survival. -
    6. -
    -
  4. -
  5. - Experience and Advancement Systems - The mechanisms by which - characters improve their capabilities over time through successful - completion of adventures, skill usage, and deliberate training between - expeditions. -
  6. -
-
    -
  1. Spent begins Saruman become interrupt thing arts wide.
  2. -
  3. Barad-dûr gives forest worm closer.
  4. -
  5. - Comings mission province Haleth character chill special service? -
  6. -
  7. - Fine mean hours triumph loyal jelly league someone's raze - Bagshot! -
  8. -
  9. Bars ostler crack spreads should spring too dissuade s World.
  10. -
-

Else ah Bolger torment minutes hours.

-

- Possibly Moon effect utterly tipsy overcrowd next misplaced? Covet - parting Brandybuck hungers crevice hours pork haven't tempted - clothing. All right, then. Keep your secrets. -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
UnfoldGrumblingAgoLifetimePillaged
Ladwhiparrowsfairerbeggedstabs
Appreciationtrouble-makingalonehorridprovethey'll
Filthytombsvesttorchesbarrelspowerful
Insteadforetoldranksstarejoyunequaled
Knewrelationsfightingspiritsgongsbears
Seasoningnutone'sapprovegrayblessing
beheadingdisturberlaidforthwatchingdomains
-

Sodding tongue Elros leaves perceived south pocket.

-

- Born revenge utterly that'll Goblin-town gladness. Chips sustained - times apocalypse closest Alfrid grow. I can cut across country easily - enough. Clearing toss unhappy Smeagol's gifted? -

-
-

Sam... I'm glad you are with me.

-
- —Ravens, shore wizards skin harpoon -
-
-
-
- Industrial machinery in abandoned factory -
- Rusted conveyor systems in the former Blackwater Manufacturing - plant, photographed during demolition in 2023. -
-
-
-
-
-

- More glad painted Sauron the White troop holidays captive has. Many - pierced repel bathroom absence glimpse Tom. All right, then. Keep - your secrets. -

-
-
- Common saying among veteran adventurers in the Undercity. -
-
-
- Equipment Requirements -

- All adventurers must carry a minimum of: one weapon (melee or ranged), - basic armor or protective gear, emergency rations for 3 days, torch or - light source, 50 feet of rope, and a first aid kit. -

-

- Optional but recommended: lockpicks, crowbar, grappling hook, healing - potions, and backup weapon. -

-
- -
- Combat Mechanics Overview -

Initiative System

-

Roll 1d10 + Initiative characteristic. Highest goes first.

- -

Attack Resolution

-

- Roll percentile dice under your relevant skill. Success means you hit, - failure means you miss. -

- -
    -
  • Melee combat uses Weapon Skill
  • -
  • Ranged combat uses Ballistic Skill
  • -
  • Damage equals weapon damage + Strength bonus
  • -
-
- -
- Currently Expanded Section -

- This details element starts open to test the expanded state styling. -

-
-
- Raised Morgoth powerless roaming sing fire-breather regurgitation was. -
-

- More glad painted Sauron the White troop holidays captive has. Many - pierced repel bathroom absence glimpse Tom. All right, then. Keep your - secrets. -

-
-        Prepared Tilda adventure characters crush. Wilds overlook blessed walk
-        requested. Ligulas sat eavesdropping breathes exceeding dim. Deeper
-        clever becomes regain Dimholt fronts.
-      
-
Resilient closest regret vile birthright innards Middle-earth.
-

- Shire herald dear hard army carry without proposition. - Thranduil faint me chiefest{' '} - middle hey-diddle-diddle squeaked sawed landlord.{' '} - Hallway clot-head's injury journey Minas Morgul hasty? - Ring sight fit Boffins S. Manage Bifur ways{' '} - pity's swarming doubt. Wilderness breathing woe liege - Khazad-dum King's handy! Join corpses{' '} - rack tongs knockers gongs four-day Théoden's idiot.{' '} - Hooded Kingsfoil biding may. Extra{' '} - passion cutting skinned. Hurry problem{' '} - delays Bucklebury. Corks hell hundred deal{' '} - Barahir unprepared. What'll Dwarvish down - bought haunted steps. Master's given Hobbit{' '} - afterwards bodies gibbet. Towers stars productive{' '} - Baggins. Juicy opinion note Déagol tough books spreads. - Decide imaginable Goblin-mutant Silvan fellow.{' '} - Sit Agreed thick drink pearl tale. Legolas approve - night's - retrieve endless. -

-
-
-
How
-
- Looks resilient eggs Tauriel higher supplant evisceration idiot - barely. -
-
Names
-
Slugs play Dwalin late parapet ending how morning?
-
- Holidays even disease thunder-battle nice irregular cooked - trouble'll Minas Tirith mistaken! -
-
Mice
-
- Productive Sit mend ones raiding hutch couldn't thirty-four. -
-
- Facing others act doing lives usually pity Legolas laws daughter. -
-
- Lords embalmed nature we'd grievances Thror shelter tragedy. -
-
-
-
- Need bandy council -
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
- Wring moments -
- - -
-
- -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - - - -
-
- - -
-
- -
-
- -
-
- -
- -
- - -
-
-
-
+ ); } diff --git a/src/contexts/MenuContext.tsx b/src/contexts/MenuContext.tsx new file mode 100644 index 0000000..8d4729c --- /dev/null +++ b/src/contexts/MenuContext.tsx @@ -0,0 +1,61 @@ +'use client'; + +import React, { useContext, useEffect } from 'react'; + +interface MenuContextType { + isMenuOpen: boolean; + toggleMenu: () => void; + closeMenu: () => void; + openMenu: () => void; +} + +const MenuContext = React.createContext(undefined); + +interface MenuProviderProps { + children: React.ReactNode; +} + +export const MenuProvider = ({ children }: MenuProviderProps) => { + const [isMenuOpen, setIsMenuOpen] = React.useState(false); + + const toggleMenu = () => setIsMenuOpen(!isMenuOpen); + const closeMenu = () => setIsMenuOpen(false); + const openMenu = () => setIsMenuOpen(true); + + useEffect(() => { + if (isMenuOpen) { + document.body.style.overflow = 'hidden'; + } else { + document.body.style.overflow = 'unset'; + } + return () => { + document.body.style.overflow = 'unset'; + }; + }, [isMenuOpen]); + + useEffect(() => { + const handleEscape = (e: KeyboardEvent) => { + if (e.key === 'Escape' && isMenuOpen) { + closeMenu(); + } + }; + document.addEventListener('keydown', handleEscape); + return () => document.removeEventListener('keydown', handleEscape); + }, [isMenuOpen]); + + return ( + + {children} + + ); +}; + +export const useMenu = () => { + const context = useContext(MenuContext); + if (context === undefined) { + throw new Error('useMenu must be used within a MenuProvider'); + } + return context; +}; diff --git a/src/postcss/functions/index.ts b/src/lib/postcss/functions/index.ts similarity index 100% rename from src/postcss/functions/index.ts rename to src/lib/postcss/functions/index.ts