Frank Schwenk 209df5d9f2 refactor: apply Astro, Preact, and general best practices to src
- Refactored all components in src/components to:
  - Use arrow function components and prop destructuring
  - Add JSDoc for all exported components
  - Improve accessibility (aria-labels, roles, etc.)
  - Use correct key usage in lists
  - Add comments for non-obvious logic
  - Use modern event handler patterns and memoization where appropriate
- Refactored src/pages/index.astro:
  - Removed <html>, <head>, and <body> (should be in layout)
  - Used semantic <main> for main content
  - Kept only necessary imports and markup
- Refactored src/styles/index.css:
  - Removed duplicate rules
  - Ensured only global resets/utilities are present
  - Added comments for clarity
  - Ensured no component-specific styles are present
  - Used consistent formatting

Brings the codebase in line with modern Astro and Preact best practices, improves maintainability, accessibility, and code clarity.
2025-06-06 16:28:57 +02:00
2025-06-05 18:08:47 +02:00
2025-04-03 14:53:16 +02:00

BSC Score

A modern, responsive web application for tracking billiards scores. Built with vanilla JavaScript and designed for mobile-first usage.

Features

  • Track scores for different billiards game types (8-Ball, 9-Ball, 10-Ball, 14/1)
  • Support for "Race to X" games
  • Real-time score tracking
  • Game history with active and completed games
  • Player name history and quick selection
  • Mobile-optimized touch interface
  • Offline support with local storage
  • Dark theme design

Usage

  1. Open index.html in your web browser
  2. Create a new game by clicking "Neues Spiel"
  3. Select or enter player names
  4. Choose game type and optional "Race to X" setting
  5. Use the score buttons to track points during the game
  6. Complete the game when finished
  7. View game history and filter by status

Development

The application is built using:

  • Vanilla JavaScript (ES6+)
  • HTML5
  • CSS3
  • LocalStorage for data persistence

No build process or dependencies required. Simply clone the repository and open index.html in a web browser.

Project Structure

The project consists of the following key files:

  • index.html: Main application file containing HTML, CSS, and JavaScript
  • README.md: Project documentation and setup instructions
  • LICENSE: GNU GPLv3 license text
  • TODO.md: Roadmap and planned features

Features in Detail

Core Features

  • Score tracking for multiple billiards game types
  • Player name history with quick selection
  • Game status management (active/completed)
  • Local storage for offline functionality
  • Mobile-optimized interface

User Interface

  • Dark theme design
  • Touch-friendly controls
  • Responsive layout
  • Game type selection
  • Player name management

Data Management

  • Local storage persistence
  • Game history tracking
  • Player name history
  • Status filtering

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Roadmap

See TODO.md for a list of proposed features and known issues.

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.

Description
A modern, responsive web application for tracking billiards scores. Built with vanilla JavaScript and designed for mobile-first usage.
Readme 1.5 MiB
Languages
HTML 71.6%
TypeScript 21.8%
CSS 6%
Astro 0.5%
JavaScript 0.1%