비로그인 사용자에게 사이드바 숨기기

이 TC는 비추천(deprecated) 상태이며, 다음을 대체합니다:

:information_source: 요약 비로그인 사용자에게 #sidebar를 숨깁니다. 공개적으로 표시되는 콘텐츠가 적은 대부분 비공개 사이트에서 유용합니다.
:hammer_and_wrench: 레포지토리 GitHub - nathan-nz/discourse-hide-sidebar-from-anon: Hides the sidebar from anonymous users · GitHub
:question: 설치 가이드 테마 또는 테마 컴포넌트 설치 방법
:open_book: 디스코ourse 테마를 처음 사용하시나요? 디스코ourse 테마 사용 입문 가이드

이 테마 컴포넌트 설치

이 간단한 테마 컴포넌트는 CSS를 추가하여 #sidebar를 숨김으로써 비로그인 사용자에게 더 깔끔한 경험을 제공합니다.

(우리처럼) 대부분 비공개 사이트이면서 everyone(즉, 인터넷에 노출됨)으로 설정된 카테고리가 하나나 두 개인 경우 이 설정을 원할 수 있습니다. 이를 통해 일반 방문자는 그들이 보는 소량의 콘텐츠와 일치하는 매우 단순한 인터페이스를 보게 되며, 로그인한 사용자는 전체 경험을 누릴 수 있습니다.

이것은 여기에서 친절하게 제공해 주신 @Don 님의 코드를 기반으로 작성되었습니다:

18개의 좋아요

Thank you! It’s really useful and I’ll give it a try.

Do you know if there is a way to show only some things on the sidebar and don’t show others? For instance, I don’t wanna show to anon the Community tabs, but I do wanna show them categories and tags.

3개의 좋아요

That is pretty straightforward with a bit of CSS targetting .anon:

.anon div.sidebar-section-community {
     display: none;
}

If I get the chance I’ll roll that functionality into this TC.

3개의 좋아요

Thank you! :sparkles: That’s great!!

2개의 좋아요

thanks @nathank. i thought about adding your theme’s functionality to mine but i’ve left it out because it seems like a special case component for forums with private small membership, and yours works just fine. cheers! :slight_smile:

Nah, I think that it is time to depreciate this one now that it’s functionality has been rolled into yours:

https://github.com/Lillinator/Sidebar-Modifier/pull/1

4개의 좋아요