Skip to content

Amnoor/Dice-Roller-Website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dice Roller Website

A tiny, client‑side web app for rolling one or more six‑sided dice. Built with plain HTML, CSS, and JavaScript. Ships with a Dockerfile for easy deployment.

Table of Contents

Features

  • Roll any number of dice (1+)
  • Shows results as numbers and images (1–6)
  • Zero dependencies; static assets only

Quick Start (Local)

  • Option 1: Open index.html directly in your browser
  • Option 2: Run with Docker

Using the App

  1. Enter how many dice to roll
  2. Click "Roll Dice"
  3. View textual results and corresponding images

Docker

Build and run using the included Nginx-based image:

# Build
docker build -t dice-roller:latest .

# Run
docker run --rm -p 8080:80 dice-roller:latest
# Open in your browser
# http://localhost:8080

The image serves static files from /usr/share/nginx/html.

Project Structure

.
├─ index.html          # UI markup
├─ dice_roller.js      # Dice roll logic
├─ Dockerfile          # Nginx static site image
├─ .dockerignore       # Build context excludes
├─ LICENSE             # MIT license
├─ README.md           # This file
├─ style/
│  └─ style.css        # Styles
└─ dice_images/        # Face images 1–6

Development Notes

  • Images are loaded from dice_images/{1..6}.png
  • No build step required
  • Works offline; all logic runs in the browser

Contributing

Contributions are welcome. Please follow these steps:

  1. Fork the repository.
  2. Create a feature branch off develop (e.g., feature/your-topic).
  3. Commit your changes with clear messages.
  4. Add your GitHub Username in the Acknowledgements in this format [GitHub Username](GitHub Profile URL)
  5. Open a pull request to the develop branch in the original repository.

Acknowledgements

A big thanks to all contributors who have helped improve this project.


License

This project is licensed under the MIT License. See LICENSE for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors