추천 카테고리

:discourse2: 요약 Showcased Categories를 사용하면 두 개의 다른 카테고리에서 선택한 두 개의 “추천” 주제 목록을 포럼 홈 페이지 상단에 추가할 수 있습니다.
:eyeglasses: 미리보기 Discourse Theme Creator에서 미리보기
:hammer_and_wrench: 저장소 링크 https://github.com/discourse/discourse-showcased-categories
:open_book: Discourse 테마가 처음이신가요? Discourse 테마 사용 입문 가이드

이 테마 컴포넌트 설치

기능

테마 컴포넌트 설정에서 각 열의 이름을 사용자 지정하고, 주제를 가져올 카테고리를 선택하며, 해당 카테고리에서 표시할 최대 주제 수를 설정할 수 있습니다.

설정:

이름 설명
show as sidebar 활성화되면, 추천 카테고리는 최신 페이지의 사이드바에서만 렌더링됩니다.
feed one title 첫 번째 주제 피드의 제목
feed one category 주제를 가져올 단일 카테고리
feed one tag 선택적으로 여러 태그에서 주소를 가져올 수 있으며, 카테고리와 결합할 수 있습니다
feed two title 두 번째 주제 피드의 제목
feed two category 주제를 가져올 단일 카테고리
feed two tag 선택적으로 여러 태그에서 주소를 가져올 수 있으며, 카테고리와 결합할 수 있습니다
max list length 사용자 지정 목록에 몇 개의 주제가 표시되어야 하나요?
plugin outlet 추가 사용자 지정을 위한 고급 설정
번역 기본값
showcased_categories.new_post 게시
showcased_categories.view_more 더 보기

크레딧

이 컴포넌트의 원래 구조를 구축해 주신 @awesomerobot님께 감사드립니다. :+1:


:discourse2: 우리가 호스팅하나요? 테마 컴포넌트는 Standard, Business, Enterprise 플랜에서 사용할 수 있습니다.

45개의 좋아요

That’s great! I was recently thinking about something like that.
Thanks Jordan!

8개의 좋아요

Thanks, Jordan!
Looks really interesting!

3개의 좋아요

Suggestions to improve this component:

  • User customized or group customized. For example, we have different groups for which certain categories are more important than others. Of course, they change according to the group. So, it would be great if the component could be either user customized or at least that the admins could choose which categories to showcase according to group
  • To have the option for a sidebar instead of upfront, at least in the Latest view would be great.
5개의 좋아요

Thanks for the feedback here!

This is an interesting suggestion :+1:. I wonder how we would handle a user who takes part in multiple groups? This could get a bit complicated but I do like the idea.

A sidebar could be nice as well :grinning_face_with_smiling_eyes:

5개의 좋아요

You can now choose to display the lists in a sidebar in the latest view :grinning_face_with_smiling_eyes:

Thanks for the suggestion.

5개의 좋아요

Really great!! :+1: Will try and leave feedback.

3개의 좋아요

Ok, so… the sidebar doens’t seem to work out of the box with non-default themes. We have a custom version of the Material Design theme and the featured categories appear above the latest list even in sidebar mode (and it actually breaks the margins layout). I’ll try to check if there’s a way around it.

2개의 좋아요

Jordan, hi, thanks for such a great compoment, but I still have a question, namely, is it possible to make the color of the blue bar customizable? Is there a way to change it in the plugin’s settings or to show the category’s design color?

1개의 좋아요

Sure!

To do so, you will need to do so either in your custom theme, or theme-component (probably the easier route).

What you want to target is .custom-homepage-columns .header-wrapper.

Something like this should work:

.custom-homepage-columns .header-wrapper { 
    background-color: `your color here`;
}
3개의 좋아요

Hi, Is it possible to make the entire block 2 times smaller in height, so that as a result, 2 times more news would be placed in the block, with the same block size as now.
Thank you.

2개의 좋아요

We have a max of 5 topics to be shown in each list currently. As far as spacing goes though, you should be able to target the css classes in the block to get the desired affect you want. :+1:

1개의 좋아요

Hi, can you post an example? Thank you.

1개의 좋아요

Sorry, new to theme editing. Does this mean I have to duplicate the component to be able to edit the colors? Is there another way to pull up the HTML/CSS?

1개의 좋아요

Sure!

To change the height of the topic-list items you would target this:

.custom-homepage-columns .topic-list .main-link { height: ??? }

Other than this though, the minimum allowed to show is 1 and the max is 5.

2개의 좋아요

Understandable!

You do not need to duplicate the component in order to customize the look of this theme component.

Here’s what you will need to do:

  1. Navigate to /admin/customize/themes and click on components
  2. Click on install then create new and make sure you select component, you can name it whatever you wish!

It will then appear in the unused components area:

You will then need to enable it on your currently selected theme on this same page:

Once that is done you can click edit CSS/HTML

From there, you can add the customization css on the commoncss tab. You can add the code I shared earlier in there.

.custom-homepage-columns .header-wrapper { 
    background-color: `your color here`;
}
3개의 좋아요

Thank you! Seems so simple now :man_facepalming:

2개의 좋아요

Hey guys! The idea with different showcased categories based on group membership is exactly what I am looking for. And when a user is in multiple groups which have showcased categories configured, the TC could go by the primary group of the user.

In my case we have private categories for advertisement clients. We are looking for a way to display their individual category on top of the home page. That way they don’t have to dig through the forum to search for it.

3개의 좋아요

Hey guys @jordan.vidrine I do not see this component working for me… alongside the discourse Air theme.
Here are my settings.


But I do not see a sidebar… and I am assuming because of the search bar I can not have this in the banner section.

2개의 좋아요

did you ever find the fix for this?? I am using the Air theme

2개의 좋아요