فصول CSS لمجموعات المستخدم الحالي

|||
-|-|-|
:discourse2: | ملخص | فئات CSS لمجموعات المستخدم الحالي تضيف المجموعات التي ينتمي إليها العضو كفئات CSS على وسم <body>.
| :eyeglasses: | معاينة | معاينة على theme-creator.discourse.org |
:hammer_and_wrench: | رابط المستودع | https://github.com/discourse/discourse-groups-css-classes-in-body
:open_book: | جديد في سمات Discourse؟ | دليل المبتدئين لاستخدام سمات Discourse

تثبيت مكون السمة هذا

قبل:

image

بعد:

image

يضيف Discourse فقط المجموعة الأساسية للمستخدم الحالي كفئة CSS افتراضيًا. يغير هذا المكون ذلك بحيث تتم إضافة جميع المجموعات التي ينتمي إليها المستخدم الحالي كفئات - بما في ذلك المجموعات المضمنة مثل مستوى الثقة.

يأخذ المكون اسم كل مجموعة ويضيفه كفئة CSS على هذا النحو

group-NAME

بمجرد تثبيت وتفعيل مكون السمة هذا، يمكنك إضافة CSS إلى السمة الخاصة بك تستهدف مجموعات معينة على هذا النحو

.group-NAME {
  .some-selector {
    color: red;
  }
}
27 إعجابًا
Does adding groups to CSS theme component still work?
User profile page / CSS class for groups / how to add it to page?
Change Default Username Color
Discourse groups css classes in body
Staff color by default for group members
CSS classes for current groups who can view topic?
Customized CSS based on user role/groups
Welcome Link Banner
Versatile Banner
How do I enable Discourse signatures only for admin/staff group?
Show component only to a specific group via script?
Display different content within a topic based on user's groups membership?
Adding category description OR text at end of thread
Hide Staff Notices from non-Staff
Disable likes/reaction individual user
MD Composer extras
Silence status to block ability to use reactions as well
Hide some preference sub-tabs under the user profile?
Theme - identify the trust level?
Flagged posts appear to everyone, instead of being hidden for users who aren't logged
Add a link to user profile in the navigation
Bringing popular features to Discourse: Header search, welcome banner, and category icons / emoji
Can I make a theme available to specific user groups only?
Customizing your site with existing theme components
CSS username colors only working for admin/moderators?
How restrict access to button pin/unpin
Copy & Paste Code Button as a Selectable feature per group
Hide parts of a post
Finding all groups of the poster in a topic
Hiding GUI elements for new users (less overwhelming)
Group inboxes and archives are visible even when empty
Limit certain reactions to specific trust levels
CSS username colors only working for admin/moderators?
Copy & Paste Code Button as a Selectable feature per group
Add per-user CSS in a plugin?
User Group class not always being applied to post content's wrapper div
Looking to hide Likes & Decorate Op
Add a specific class to enable targeting Category Moderators
How to create a theme which only administrators can use?
User custom field toggle for sidebar (SFW Mode)
Hide the "Interface" section
Limit Translator use to certain groups only