discourse-rewind/plugin.rb
Kris 972cc6e5d9
UX: restyling for 2025 (#28)
This generally updates the styles for the 2025 version. I also made more
features work in development environments (so it's easier to test) and
fixed an issue with invites that was causing the report to not show.


<img width="400" alt="image"
src="https://github.com/user-attachments/assets/69a62b79-12e3-4539-a82c-9bbf9673abe2"
/>

<img width="1554" height="896" alt="image"
src="https://github.com/user-attachments/assets/60fabac5-6f20-4e01-9679-fd228c6850c2"
/>

<img width="754" height="459" alt="image"
src="https://github.com/user-attachments/assets/6725c6e2-1bac-417e-b4ee-190841ab656b"
/>

<img width="1472" height="490" alt="image"
src="https://github.com/user-attachments/assets/87c95e6a-5d78-4fb6-9f2d-dad13bcc9788"
/>

<img width="1480" height="702" alt="image"
src="https://github.com/user-attachments/assets/67bec8f9-dce5-4077-a07d-fe9e13696958"
/>
2025-11-18 09:03:41 -05:00

35 lines
967 B
Ruby

# frozen_string_literal: true
# name: discourse-rewind
# about: A fun end-of-year summary for members' activity in the community.
# meta_topic_id: https://meta.discourse.org/t/discourse-rewind-2024/348063
# version: 0.0.1
# authors: Discourse
# url: https://github.com/discourse/discourse-rewind
# required_version: 2.7.0
enabled_site_setting :discourse_rewind_enabled
register_svg_icon "repeat"
register_asset "stylesheets/common/_index.scss"
register_asset "stylesheets/mobile/_index.scss", :mobile
module ::DiscourseRewind
PLUGIN_NAME = "discourse-rewind"
def self.public_asset_path(name)
File.expand_path(File.join(__dir__, "public", name))
end
end
require_relative "lib/discourse_rewind/engine"
after_initialize do
add_to_serializer(:current_user, :is_rewind_active) do
Rails.env.development? || Date.today.month == 1 || Date.today.month == 12
end
add_to_serializer(:current_user, :is_development_env) { Rails.env.development? }
end