mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 11:11:13 +08:00
FEATURE: Add dark mode option for category logos (#18460)
Adds a new upload field for a second dark mode category logo. This alternative will be used when the browser is in dark mode (similar to the global site setting for a dark logo).
This commit is contained in:
@ -69,7 +69,7 @@ class Site
|
||||
# corresponding ActiveRecord callback to clear the categories cache.
|
||||
Discourse.cache.fetch(categories_cache_key, expires_in: 30.minutes) do
|
||||
categories = Category
|
||||
.includes(:uploaded_logo, :uploaded_background, :tags, :tag_groups, category_required_tag_groups: :tag_group)
|
||||
.includes(:uploaded_logo, :uploaded_logo_dark, :uploaded_background, :tags, :tag_groups, category_required_tag_groups: :tag_group)
|
||||
.joins('LEFT JOIN topics t on t.id = categories.topic_id')
|
||||
.select('categories.*, t.slug topic_slug')
|
||||
.order(:position)
|
||||
|
Reference in New Issue
Block a user