VUM Athletes ITRA is a web application built with Next.js that showcases information about athletes participating in trail running events, particularly those affiliated with the International Trail Running Association (ITRA).
- Athlete Directory: Browse a list of trail running athletes.
- Athlete Profiles: View detailed information about each athlete, including:
- Bib number
- Age
- Nationality
- Gender
- Club affiliation
- ITRA Performance Index (PI)
- Country flag
- Profile picture
- Responsive Design: The application adapts to various screen sizes, providing an optimal experience on both mobile and desktop devices.
- Modern Design: Tailwind CSS was used to create the design.
- Next.js: A React framework for building web applications.
- React: A JavaScript library for building user interfaces.
- TypeScript: A typed superset of JavaScript for improved code quality.
- JSON: Used for storing static athlete data.
- Tailwind CSS: A utility-first CSS framework for styling.
Athlete information is sourced from the data/runners.json
file. This file contains an array of athletes, with each athlete represented as an array: [athleteName, athleteDetails]
.
- Node.js: Make sure you have Node.js (version 18 or later recommended) and npm (or yarn) installed.
- Clone the repository:
git clone <repository-url> cd vum-athletes-itra
- Install dependencies:
npm install # or yarn
- Start the development server:
npm run dev # or yarn dev
- Open your browser: Navigate to
http://localhost:3000
to view the application.
The useIsMobile
hook is a custom React hook that detects whether the user is on a mobile device. It is defined in hooks/use-mobile.tsx
.
- Mobile Breakpoint: The breakpoint for mobile devices is set to 768px (screen width less than 768px is considered mobile).
- Functionality:
- Uses
window.matchMedia
to listen for changes in screen size. - Returns a boolean indicating whether the device is mobile.
- Uses
Contributions are welcome! If you'd like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch for your changes.
- Make your changes and commit them.
- Push your changes to your fork.
- Submit a pull request.