ميزة الصفحة الرئيسية

:discourse2: ملخص ميزة العنصر الرئيسي في الصفحة الرئيسية تعرض ما يصل إلى 5 مواضيع مع صور في الصفحة الرئيسية لمجتمعك.
:eyeglasses: معاينة معاينة في منشئ مواضيع Discourse
:hammer_and_wrench: رابط المستودع https://github.com/discourse/discourse-homepage-feature-component
:open_book: جديد على مواضيع Discourse؟ دليل المبتدئين لاستخدام مواضيع Discourse

تثبيت مكون هذا الموضوع

الميزات

بشكل افتراضي، سيعرض الموضوع أحدث 3 مواضيع وُسمت بـ featured وسيجلب الصورة الأولى من الموضوع. في الإعدادات، يمكنك اختيار وسم مخصص، إخفاء الوسم، تعيين عنوان مخصص، وتكوين مكان ظهور المكون.

:iphone: الهواتف المحمولة والشاشات الصغيرة

بشكل افتراضي، سيتم تقليل عدد المواضيع المعروضة حتى يتبقى موضوع واحد فقط على الشاشات المحمولة.

يمكنك تغيير هذا السلوك الافتراضي بتفعيل خيار إظهار الكل دائمًا. سيؤدي ذلك إلى جعل المكون قابلًا للتمرير أفقيًا على الشاشات الأصغر (< 1000px).
على الشاشات الأصغر جدًا (< 600px)، يمكنك اختيار تراكم المواضيع بدلاً من ذلك عن طريق تغيير إعداد نمط الجوال.

الإعدادات

الاسم الوصف
featured tag
number of topics عرض ما يصل إلى 5 مواضيع كحد أقصى للعرض
hide featured tag عند التفعيل، سيكون الوسم “featured tag” المحدد أعلاه غير مرئي للمستخدمين العاديين عند عرض المواضيع.
show on
show for
make collapsible جعل المكون بالكامل قابلًا للطي
show title يعرض النص المحدد أدناه (يُعرض العنوان دائمًا عند تفعيل make_collapsible)
title text sort by created
show all always بشكل افتراضي، يقل عدد المواضيع المعروضة مع حجم الشاشة، وصولاً إلى موضوع واحد فقط على الجوال. تفعيل هذا الإعداد سيظهر جميع المواضيع على أي حجم شاشة.
hide closed topics إخفاء المواضيع المغلقة من قائمة المواضيع المميزة
always link to first post دائمًا الرابط إلى المنشور الأول في الموضوع، حتى لو تم قراءته من قبل
mobile style إذا تم تفعيل show_all_always، فسيتم عرض المواضيع عبر تمرير أفقي بشكل افتراضي. يمكنك تغيير هذا السلوك على الشاشات الأصغر، واختيار تراكمها على أي شاشة أصغر من 600 بكسل.
featured content position تطوير مواضيع متقدم: هذا يغير منفذ الإدخال للإضافة للمكون
الترجمة الافتراضي
featured_topic_title

:discourse2: مستضاف لدينا؟ مكونات المواضيع متاحة للاستخدام في خططنا القياسية، والأعمال، والمؤسسات.

89 إعجابًا

guys this is epic! Huge thx. It would be amazing addition to core

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

“Featured Topics” in the mobile version shouldn’t be plural.

3 إعجابات

This is lovely. Although I already use the Featured Topic Component, but this is not a bad idea too.

A suggestion, though: How about you make this component work with links too and not just tag? Maybe then can we link the contents to be sourced from maybe categories and/or top (to stand for trending) IMHO. With this, one can have the Trending topics feature on the homepage; like Reddit has. What do you think about this @awesomerobot?

Great component, thank you! A little feature request: It would be great, if you could adjust the number of topics on desktop/mobile and also show the author of the post beneath the image…

4 إعجابات

I thing is add slide for ship topic because in mobile we can see one topic only.

To button for ship topic.

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

Maybe your topics don’t have a image?

Amazing component.It gives a nice look to homepage. Would it be possible to showcase also 3 topics on mobile? Maybe with a slider? And also,would it be possible to showcase also featured topics by category?

3 إعجابات

Very nice component :+1:.

I second the suggestion of having the author somewhere. Would also be nice to:

  • have the link on the image to always go to the most recent post (like the one in the title)
  • able to choose an alternative layout like the variant in one of the posts above, the latest created topic on the left with smaller ones on the right
  • able to hide the component title when an empty title is chosen
  • having an horizontal scrolling on mobile (either by small icons below or side arrows) to be able to have the three or four topics available
3 إعجابات

I found a bug with how this component interacts with user cards.

For some reason, the user cards don’t seem to be aware that the component is adding page height.

Here is a screenshot from the theme previewer, when I click on a user profile the card comes up. As you can see the user card seems to be unaware of the featured topics:

I’ve taken several stabs at fixing this but I’m not sure why the height of the component isn’t being taken into account when calculating user card positioning.

Thanks!

إعجابَين (2)

I’ve just made an update that fixes it.

The way I had it previously was interfering with some margin collapse… which threw off our top positioning calculation for user-cards… it’s briefly covered here: Mastering margin collapsing - CSS | MDN, this was related to “No content separating parent and descendants.”

9 إعجابات

Awesome theme add-on!

Would it be possible to randomize the rotation? I’ve set it to display 2, and it show the two threads that have the most recent activity.

Hi @awesomerobot this theme component is amazing. However, I would like to know if it’s possible that in the mobile version it doesn’t appear just 1, but a slider of the 3 featured themes that you can see in the main page. i think it gives a nice look to the main page. It would also be great if it was possible to add featured themes on each category page? Hopefully you can give some feedback and thanks a lot for this!

3 إعجابات

I’ve managed to do some CSS tricks and now in mobile I can scroll it! but only vertical, i don’t know how it could be in horizontal :smiley:

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

Awesome component!
Only thing is that on my forum, on mobile, it appears to have too much space below featured content.

So, can I fix that somehow or is it way to at least disable it on the mobile view?
Thanks!

إعجابَين (2)

Thanks for this, it is really nice.
Is there anyway we can actually make the mobile show the 3 in a slider mode?|

Another awesome feature might be if you go inside a category or tag it can actually filter your “featured” tags and show them particularly for that tag or category.

Either way this is really awesome. Thank you.

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

That’s strange, I don’t see that much space on my end… is it possible you have other themes installed that could be causing it? (also as a side note that looks like desktop view at mobile with, not mobile view)

Here’s my test with no other themes enabled:

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

Hi,
Yesterday we had some thumbnails show up very nicely from 3 posts (2 of the post did not include images but rather a YouTube video) the system however had extracted the thumbnail and all was good.

Suddenly today the thumbnails are no longer appearing for the two posts that had the YouTube video. Is there a known problem here?

I’m not aware of an issue, but I did not test this component with embedded video. I’ll take a look and see if there’s anything obvious happening.