icelam / random-name-picker

Simple HTML5 random name picker for picking lucky draw winner using Web Animations and AudioContext API.
https://pinkylam.me/playground/random-name-picker
MIT License
115 stars 141 forks source link

Is there a way to customize the background to an image, and make the draw start and stop when button is pressed? #12

Open itjomglobal opened 11 months ago

itjomglobal commented 11 months ago

We had the opportunity to use it for a physical event in the past and found it incredibly useful.

We were wondering if you offer paid customization services for your project. We have specific requirements that align with our upcoming events

keoToto commented 11 months ago

It is my first time using this App and i am interest in Random Name Picker Game. How much is the fee for changing the background? Thank you

itjomglobal commented 11 months ago

@icelam Is there an option to do this?

icelam commented 11 months ago

@itjomglobal, thank you for reaching out and providing positive feedback on this random name picker. I'm glad to hear that it was incredibly useful for your previous physical event. @keoToto, I also want to express my gratitude for your interest in our random name picker.

Regarding both of your inquiries about paid customization services, I regret to inform you that, at the moment, I do not offer any paid services for customization. However, I would be more than happy to guide you on the relevant code that you can customize to meet your specific requirements.

To customize the background, you can modify the following CSS code: https://github.com/icelam/random-name-picker/blob/44481db7c72bc20e2251534f46170234b30e53b5/src/assets/scss/_base.scss#L43-L50

To make the slot stop only when the button is clicked, you will need to modify how the button responds to the click event and also the core logic of the slot itself: https://github.com/icelam/random-name-picker/blob/44481db7c72bc20e2251534f46170234b30e53b5/src/assets/js/app.ts#L120-L128

https://github.com/icelam/random-name-picker/blob/44481db7c72bc20e2251534f46170234b30e53b5/src/assets/js/Slot.ts#L158-L228

If you have any further questions, feel free to ask. Thank you again for your support and interest in this random name picker.

itjomglobal commented 11 months ago

@icelam thank you for the guidance. Can you provide more guidance on how we can deploy the project ourselves too?

I have tried to deploy the the project as web service in Render but have not succussed yet, is there any helpful link that might help us following to deploy your project?

icelam commented 11 months ago

@itjomglobal I don't have experience with using Web Service in Render, so my advice may be limited. However, I can provide some general guidance on how you can configure your pipeline to work with any CI/CD tools that supports Node.js with yarn / npm installed.

This app should work fine under common static web hosting choices. I do have experience on deploying it to AWS S3 Bucket / Azure Blob Storage using GitHub Actions / CircleCI. Here's a general outline of the steps you can follow:

  1. First, install project dependencies. You can do this by running the command yarn install. This will ensure that all the necessary npm packages are installed and ready for the build process. To optimize costs and improve the efficiency of CI/CD pipeline, you can consider adding a cache for the node_modules directory. Check the documentation of your specific CI/CD tool to determine the cache configuration options available.

  2. Next, you'll need to build the project. Use the command yarn build to initiate the build process. This command will compile and bundle the source code, generating the necessary assets used for hosting.

  3. Once the build process is complete, you'll need to copy all the generated assets located under the /dist directory. The specific command to accomplish this may vary depending on the CI/CD tool and OS you're using. Typically, you'll need to include a step in your pipeline that copies the contents of the /dist directory to a storage accessible by your chosen static web hosting service.