* start html head refactor
this is a bit of a doozy tbh and will probably take a while. the templates are very highly duplicated but not duplicated enough to be an easy little thing
oh well, so it goes.
* some easier html head ones
* add chat, html_head, sign_up_failed_ref, sign_up, submit
* CSP: put it in const.py instead of this weird thing we did before
* fix syntax error
* better call the actual macros
* fix prev commit
* import into settings2
* fix prev commit
* set CSP properly if localhost
* some title fixes i think
* login page
* fix prev commit
* hacky thing to get titles to work i think
* {{stylesheets()}}
* fix prev commit
* title stuff
* cries uncontrollably
* submission fixes i think
* fix prev commit i think
* submission fixes ekfjdhfkdjf
* submission fixes 4
* this may fix submissions idk tbh
* default template: make it a little better on post pages
* default template: some efficiency
Adds the files.helpers.assetcache module, which runs on worker startup
to compute CRC digests of files in given asset directories and provides
a Jinja filter to create cachebusted URLs based on those hashes.
This alleviates the need to increment cachebusting counters in query
strings entirely for files it is applied to.
* Add new /casino route and template
* Consolidate lottery into casino and add initial template for slots
* Change /lottery route to /casino and replace icon with usd symbol and change sitewide const to reflect change
* Hook up new slots method to casino
* Enable Marseybux spending in casino slots
* Add UI for playing blackjack in casino
* First connection of blackjack UI to backend
* Add protective clause thanks to help from carpathianflorist.
* Create new Casino_Game relation and persist inside of blackjack
* Connect new slots behavior to Casino_Game table
* Create UI action management logic
* Add blackjack game status checker which adds persistence for blackjack
* Gonna handle this better, hold on
* Reorganize blackjack helper methods
* Reorganize casino.js to account for new changes
* Connect up to frontend
* Little changes ya know
* Display a message when winning in Blackjack
* Fix some issues with double down and insure
* Revert "remove owoify-py from requirements"
This reverts commit 4454648ea2.
* A little casino styling change
* Reorganize into a casino block
* Smallenize the card'
* Remove references to old game data on comments
* Add sql migration file
* Remove logic to drop old columns
* Fix two forgotten conflicts
In anticipation of adding about a dozen more features flags to support
work for LGB, PIN_ENABLED and PROCOINS_ENABLED have been moved to the
FEATURES dict in const.py. More generally looking to create a unified
interface for logically-related constants, perhaps to support e.g.
later moving these settings from hardcoded constants to data.
Original work started for WPD and LGB, who wish to restrict flags
visibility in the UI based on admin_level. To support this change and
upcoming changes, `const.PERMS: string -> int` was created.
Potentially targetting a future design where Permissions is a proper
business object integrated with the User model; however, for now just
looking toward getting admin_level magic numbers centralized.
This commit applies PERMS to: create_hole, flags visibility in UI,
flag removal in UI & backend. Flag visibility in Comment & Submission
json_raw methods is unaffected to avoid needing a user object to
build the JSON.
Commit began by changing the duplicated SITE_NAME conditional in the
header to use a `has_logo` param, much like the recent `has_sidebar`.
From there, a need to include site-specific assets in assetcache was
revealed, adding the `asset_siteimg(...)` macro. This was applied
quite broadly, though not comprehensively.