KPCOFGS / BetBuddy

A free to play sports gambling app where users can place bets using virtual currency
The Unlicense
0 stars 0 forks source link

Added static directory to hold css files and js files #11

Closed MichaelClarkFsu closed 1 month ago

MichaelClarkFsu commented 1 month ago

Moved css files and js files into static directory.

KPCOFGS commented 1 month ago

I see app.py file gets changed, any reason for the change?

MichaelClarkFsu commented 1 month ago

After looking at it I don't think so. I think in order for flask to recognize the css and js files we have to put them in the static file I believe the code you added can stay the same. The changes I made were the the changes after I merged what we currently had and tweaked it to get it to work on my end. When I ran the version without the static file, the style specified in css and the js script would not work properly.

KPCOFGS commented 1 month ago

When I ran the version without the static file, the style specified in css and the js script would not work properly.

To clarify, the .css and .js files are not working if they are not put together in a single static folder?

MichaelClarkFsu commented 1 month ago

Yes. After putting them both in the static folder the application ran just as before with your added dark mode toggle button. I believe its a flask specific problem where we have to specify a static folder.

MichaelClarkFsu commented 1 month ago

I'm unsure about the database changes made. It notified me of a merge conflict when I pulled the changes onto my machine. Maybe because there was a database already there?

KPCOFGS commented 1 month ago

I see the problem now. We have image, css, and scripts folder. I looked up how to format the static folder and you can create a static folder with the following format:

Common Contents of a static Folder:

Images: Icons, logos, or other visual assets like .jpg, .png, .svg, etc.
    Example: static/images/logo.png

CSS Files: Stylesheets that define the appearance of the site.
    Example: static/css/styles.css

JavaScript Files: Client-side JavaScript code for interaction and functionality.
    Example: static/js/main.js

Fonts: Web fonts or other font assets used on the website.
    Example: static/fonts/roboto.woff

Videos: Video files like .mp4, .webm, etc., used in the application.
    Example: static/videos/tutorial.mp4

Other Assets: Any other files that need to be directly served, like PDFs, XML files, or data files.
    Example: static/docs/user-manual.pdf
MichaelClarkFsu commented 1 month ago

Yes, so I believe we just have to move what we have into the static folder.

KPCOFGS commented 1 month ago

You can create the static folder and move css folder inside of it, rename scripts folder to js and move it inside static folder, and move images folder inside static folder as well. After you do that, create a pull request, so Dr. Mills knows your contribution