* remove /logged_out/ routes
* update sitemap, remove users route, and update header
* cloudflare cookie
* only mess with the cookie whenever we desire auth
* sitemap: (small) improvements
sitemap: fix little bug i introduced
sitemap: fix login redirects for /id/ routes
* sitemap: remove duplicate entry
* contact is auth desired
* imports: don't import what we don't need and bind late to the db
* praying to god this works
* keep yourself safe
* oh i actually need to commit and push lol
* import Sub
* t
* refix cache purger
* 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
Getting the basic hats frontend changes into master so my branch stops
diverging from the templates. Migrates the existing cakeday partyhat
functionality to the new system also.
Establishes a (hopefully) static interface for PFP hat display:
- Hat image assets are 100px w x 130px h and anchored to the bottom-
left corner of pfps.
- User.hat_active provides either empty string or the internal
string identifier for active user hat.
- User.hat_tooltip provides mouseover text. Likely only to be used
for cakeday hats on one's cakeday.
Additionally, per discussion with Carp, PFPs in comments and posts
increased from 25px diameter to 30px.
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.
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.
The header dropdown menu's horizontal positioning depends on the
width of the user pfp/username/currency region to not overflow off
the right side of the page. Therefore, we enforce a minimum width.
There is presumably some way to fix this by right-aligning the right
side of the dropdown menu to the right side of the dropdown header.
I didn't want to risk it given the strange interplay of all of the
Bootstrap styling and the media queries. Also, it does visually
look better to be left-aligned.
Kitchen sink commit of semi-related things:
- `#profile--bio a` tags didn't properly wrap on mobile with some
browsers. Changing overflow-wrap may fix this.
- Userpage markup for mobile tried to place profile_bio inside a
<p> tag. Nesting paragraphs is invalid HTML. It has been made a
<div> to match desktop and even nearby sections on mobile.
- Fedi icon in mobile dropdown had the wrong classes, which broke
consistent styling with its neighbors.
- fa-square-share-nodes improperly wound up with the fa-share-nodes
character code when committed.
Previously, notification bell linking & color logic was interspersed
between templates and the user model. It doesn't _really_ belong in
the user model, but it's been moved out of the templates to there to
at least centralize it. This was also used as an opportunity to make
the modactions inbox color the bell appropriately.
Previously, the three instances of 'Report[s]' and one instance of
'Coin[s]' in the UI templates were always pluralized, even when they
referred to a singular instance. This has been corrected by creating
a `plural` helper macro.
Additionally, this was used as impetus to create `utils/helpers.html`
to eventually move more recurring template logic into macros.
Some users have complained about performance with the backdrop-filter
on .modal-backdrop.show. Partially as a kludge to avoid adding another
toggle, the 'animations' user setting now also disables the backdrop
filter. In practice, this may turn into a more general setting to
remove performance-intensive UI effects.
3106823511 added a chat icon to the navbar on mobile. I forgot that
the bottom navbar on mobile already had one. It has therefore been
removed, thus totally alleviating issues with wrapping when a user
is both an admin and has a high notification count.
Users now have a toggleable can_gamble setting which disables their
ability to use all chance-based gains on the site: viz. slots,
blackjack, the lottery, and treasure chests.
This only applies on invocation of commands that start gambling
games, so it should cause no bugs when toggled with e.g. active
blackjack games.
This was added for the benefit of users with actual problems with
gambling, be they past addiction or religious conviction. All future
gambling features are humbly requested to respect it.
After the recent addition of the Lottershe, some narrow phone screens
caused the header to wrap to two lines. Prompted by this, a more
general rework of the header nav icons was initiated.
Notably: random user, random post, all comments has been moved to
sidebar on all sites, and a .sidebar-link CSS class was created to
support it. Additionally, on rDrama, links for Badges and Marseys
were added, since I believe these are presently inaccessible from
the UI. Further, a Modlog link was added to be more accessible.
Additionally, the icons in the header were rearranged on desktop and
mobile to better fit relative priority.
* fuck u bootstrap
* cleanup
* Improve CSS
* Vote and reply animations
* Fixse
* Fix bugs and add scroll to top thing
* Update themes and sidebar and stuff and such
* Fix mobile arrows
* soy blur
* Fix dramlr or dramalr or tumblr or whatever its called
Assetcache macro improvement: to support assets in folders which are
dynamically referenced by e.g. ID or name, the `asset` macro now
accepts an optional second parameter to be included in the path but
not to be used for versioning the class of assets.
To support recent commits, assetcache now applies for:
- images/badges/*.webp
- js/: award_modal.js, bootstrap.js, header.js
After much debate, the user counter will remain in the top banner for
all non-rDrama sites using the codebase, while on rDrama the journoid
banner will remain there and the counter has been moved back to the
sidebar. This partially reverts some recent commits.
In addition to the sidebar move, the rDrama user counter now has
random flavor text, much as reddit sidebars do, though ours is
cooler because it can randomly select from a list.
Fixes https://rdrama.net/post/18459/-/1969386
The appropriate internal links--viz. profile, settings, changelogs,
bug reporting, discord, archives, and contact--in the header menu
respect the User.newtab setting to open internal links in new tabs.
Removes temporary changes for the Birthgay 2022 event, ending
approximately at 2022-05-23 0600Z. Changes:
- Double XP disabled.
- Lootboxes disabled.
- Three event awards given real descriptions and colors.
- Partyhats: restored to cakeday-only condition and tooltip.
- Header UI: balloons removed, text visibility outline removed,
journoid banner reverted, marseyjam as header icon.
- Birthgay banners: removed from template, moved to new storage dir.
Confetti, though remaining as a permanent award, has been temporarily
removed pending a less performance-intensive implementation and one
that doesn't require maintaining a third-party package in the codebase.
Very strange bug, and I hope this fixes it. User popovers, e.g. on
comments pages when names are clicked, spontaneously stopped working
on my local instance. This parallels occasional reports from others
that their popovers stop working for seemingly no reason.
The primary symptom appeared to be in comments+submission_listing.js
@ popclick(...), which became unable to find any `.popover` elements
in the document, resulting in a console error. Running `bs_trigger(
document)` manually in console after page load always fixed this.
As such, I am assuming this is (hopefully) a timing bug from the
bs_trigger call in header.js running before document ready. The call
now runs on a standard document ready callback boilerplate.
May God have mercy on our souls if this doesn't fix it.
I discovered that running `bs_trigger(document)`
The .srd header banner currently has fixed text. However, there have
been many gayops which have made the news. journoid_banner.html is a
dynamic template which selects a random one to present.
Also, stylesheets and markup for the banner have been unslurred.