رأس الأقسام المميزة

:bookmark_tabs: Summary Feature categories on select views.
:hammer_and_wrench: Repository Link Manuel Kostka / Discourse / Components / Featured Categories · GitLab
:open_book: New to Discourse Themes? Beginner’s guide to using Discourse Themes

Install this theme component

Cards view

List view

Settings

You can switch between the two above layouts or choose none and declare your own styles. You can also pick a route and set an outlet for the component.

Template

.featured-categories {
  &__container {
  }
  &__heading {
  }
  &__list-container {
  }
  &__category-container {
  }
  &__category-link {
    .category-logo {}
    .category-name {}
    .category-description {}
}
28 إعجابًا

Handy TC, thank you.

A toggle to display only on homepage, display site logo, and display site description under logo would be desirable additions I imagine.

إعجابَين (2)

Right now it shows on global lists (latest/new/unread/top). I was thinking of adding a drop-down to settings to select the global pages it should show. So, yes, on my roadmap when I have time for this again!

What would be the use case for having the logo? On the global pages you’re almost “home” anyways?

What I’d actually be most interested in adding is a mobile view. I didn’t have an idea for that so far, so it’s just not shown on mobile. Thanks for sharing If you’d have an idea for that!

4 إعجابات

Personalized aesthetics, and combined with a short description, would be quick insight about a community for new visitors, and serve as a reminder for existing users about the mission of the community. Positioned above or left of the links.

Displaying this on global links by default, as well as optionally per category (and tag pages?), would serve as a convenient navigation menu for prioritized areas - this would be my primary intended use. (By the way, the ability to include custom links - not only categories - would be another desirable feature.)

Personally, I find that most Discourse sites tend to be on the vague side especially upon initial visit, and by default I think Discourse navigation can be confusing for the average user. Generally my sites are designed to prioritize only a few areas (of many), and these proposed additions would make it very clear to the average user what those areas are, as well as easy to access.

Good component,
We have installed Versatile Banner, how can we move this component UNDER Versatile Banner?
So that the component Versatile Banner is shown first and then yours.
Thank you.

Yes, both components are rendered on the same outlet. I don’t know what causes the order of elements in that case? On my site it shows under the banner by default…

But you should be able to target the order with CSS declarations:

.below-site-header-outlet.categories-header {
  order: -1 !important;
}
.below-site-header-outlet.banner-themes {
  order: -2 !important ;
}
إعجابَين (2)

This sounds like many custom options though. I wouldn’t want to add that much logic to this component.
Building a featured navigation sounds more like a use case for a custom html banner to me? You’d just need some links with images and titles.

I agree with that! I think dedicated banners for visitors and for newly-signed-up users can be helpful and welcoming.

إعجابَين (2)

There’s a ‘swap default positioning’ in the Versatile Banner settings, if that’s any good to you?

swap default positioning

If there is another banner-related component active, use this to swap its position with the Versatile Banner

3 إعجابات

Try this setting, it didn’t help me :frowning:

لقد قمت بتثبيت مكون سمة ولكنه لا يتناسب مع المحتوى الرئيسي، مما يجعله يبدو في غير محله (قبيحًا)، أستخدم سمة air.
هل يمكنك مساعدتي من فضلك أين يمكنني جعل المكون يظهر داخل الحاوية ذات اللون الداكن؟

يبدو هكذا:

أود أن يبدو هكذا:

مرحباً،
أنا فقط أبدأ مع discourse والتصميم..
أريد أن يكون لدي نوع من البطاقات في الأعلى كما يمكنك رؤيته هنا: Secret World Legends - Funcom Forums
يبدو أن مكون السمة هذا يساعد في هذا الاتجاه..
لقد قمت بتثبيته وتمكنت من تحديد الفئات التي أريد أن تظهر ولكنني حصلت فقط على العناوين..
وهذا منطقي لأنني لم أقم بتعيين أي صورة بعد..

سؤالي (وهو على الأرجح سؤال غبي حيث لم يسأله أحد آخر بعد) هو كيف يمكنني تعيين صورة الفئات..؟
وكيف “أقوم بتحميلها”؟

شكراً لأي مساعدة..

انتقل إلى إعدادات الفئات التي استخدمتها لإنشاء فئة وحدد علامة التبويب “صورة”.

تحميل صورة

إعجابَين (2)

مرحباً، أنا جديد على Discourse ولدي سؤال حول رأس الفئات المميزة

أحاول تحقيق هذا ولكن لا أستطيع

لقد قدموا بضعة أسطر من التعليمات البرمجية

html.categories-header{
  .below-site-header-outlet.categories-header {
    .wrap {
      .categories-header-item {
        [رابط كل عنصر وشعاره واسمه..]
      }
    }
  }
}

كيف يمكنني تحديد رابط العنصر وشعاره واسمه؟

هل يمكن لأحد أن يوضح هذا؟

شكراً

أهلاً بك :wave:

إذا كنت ترغب في عرض صورة مثل الصورة الموجودة في المثال، فأنت بحاجة إلى تحديد الفئات ذات الصلة في إعداد مكون السمة والتأكد من تعيين صورة لكل منها (إعدادات الفئة → الصور → شعار الفئة).

3 إعجابات


هذه هي إعدادات مكون سمة الفئات المميزة ولا يمكنني العثور على أي شيء :frowning:

يجب عليك تعديل إعدادات الفئة الخاصة بك:

انقر فوق علامة التبويب Images:

… وقم بتحميل صورة شعار الفئة!

إعجاب واحد (1)

لدي صف من المنتجات، كيف يمكنني تقسيم المنتجات إلى أعمدة متعددة؟

شيء كهذا؟

إذا كان الأمر كذلك، فجرب هذا الـ CSS. أضفه إلى الـ CSS الخاص بالمظهر الخاص بك أو في مكون.

بالداخل، يمكنك رؤية المتغيرات التي يمكنك التحكم فيها.
يمكنك اختيار عدد الأعمدة، والفجوة بين العناصر، وعرض كل عنصر.
العناصر تتكدس تلقائيًا.

.below-site-header-outlet.categories-header > div.wrap {
    --ch-columns: 6;
    --ch-gap: 2.5em;
    --ch-width: 110px;
    
    display: grid !important;
    
    grid-template-columns: repeat(auto-fill, minmax(var(--ch-width), 0fr));
    gap: var(--ch-gap) !important;
    
    max-width: calc(var(--ch-columns) * var(--ch-width) + ((var(--ch-columns) - 1) * var(--ch-gap))) !important;
}
3 إعجابات

شكرا للمساعدة.

هل يمكنني طلب مساعدة أخرى؟


هذا ما أحاول تحقيقه

هل يمكنك مساعدتي في ذلك؟

جرب شيئًا كهذا:

.below-site-header-outlet.categories-header > div.wrap {
    --ch-columns: 4;
    --ch-gap-row: 2em;
    --ch-gap-col: 6em;
    --ch-width: 120px;
    
     > div {
        width: var(--ch-width);
    }
    
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    
    max-width: calc(var(--ch-columns) * var(--ch-width) + ((var(--ch-columns) - 1) * var(--ch-gap-col))) !important;
}
4 إعجابات