위키 게시글 스타일 변경

위키 게시물의 스타일을 변경하는 간단한 가이드:

배경색 변경:

/admin/customize/themes에서 Common > CSS 아래에 다음 CSS를 추가하세요.

.wiki .topic-body .cooked {
  background-color: #dcffdc; /*light green*/
}

텍스트 크기 변경

원하는 경우 사용 중인 글꼴이나 텍스트 크기, 심지어 색상도 변경할 수 있습니다.

.wiki .topic-body .cooked p {
  font-size: 18px;
  color: green;
}

텍스트 추가

사용자가 현재 보고 있는 것이 위키 게시물임을 명확히 하기 위해 텍스트를 추가할 수 있습니다.

.post-info.edits .wiki::before {
  content: "EDIT THIS WIKI POST";
  color: green;
  background-color: #d2e2d2;
  margin-right: 3px;
  font-weight: bold;
  border: 1px solid green;
  padding: 3px;
}


이 문서는 버전 관리됩니다 - 변경 사항을 github에서 제안해 주세요.

22개의 좋아요

Hey, we just changed the background color of wikis on the Fairphone forum, but like all other posts each wiki starts out as staff-blue when you load it, then slowly turns white and only then turns green.
Is there a way to disable this animation for wiki posts?

I believe this should do the trick:

.wiki .topic-body {animation: none;}

6개의 좋아요

Here’s a Theme Component which makes Wikified posts pale green again, and incorporates @Kris’s animation: none tweak. (I chose an essentially random pale green as I did this surreptitiously while I was supposed to be paying attention in a meeting. But you can change the RGB value in the Theme Component CSS after installation)

Improvements always welcome by pull request.

4개의 좋아요

라이트 테마와 다크 테마에 따라 배경을 조건부로 설정할 수 있는 방법이 있을까요? 답변해 주시면 감사하겠습니다.

1개의 좋아요

가장 간단한 방법은 라이트 테마용과 다크 테마용 두 개의 테마 컴포넌트를 만들어 추가적인 CSS를 작성할 필요가 없게 하는 것입니다.

2개의 좋아요

위키 커스터마이징이 새로운 변경 사항과 함께 개인 메시지에서도 잘 작동하려면, .cooked를 대상으로 하도록 CSS를 약간 조정하는 것을 제안합니다:

// 위키 게시물 커스터마이징
.wiki .topic-body .cooked {
    background-color: #e8f9fd;
    animation: none;
}
.post-info.edits .wiki::before {
    content: "위키 게시물";
    margin-right: 5px;
    font-weight: bold;
}

이 내용도 원문(OP)에 추가하겠습니다.


나중에…
그리고 그냥 재미로 배경색과 텍스트를 커스터마이징할 수 있는 테마 컴포넌트로 만들었습니다.

2개의 좋아요