Mudar o estilo de uma postagem de wiki

Um guia rápido para alterar o estilo das suas publicações wiki:

Alterar a cor de fundo:

Em seu /admin/customize/themes, adicione este CSS em Common > CSS

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

Alterar o tamanho do texto

Se desejar, você também pode alterar a fonte usada ou o tamanho do texto, inclusive a cor

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

Adicionar texto

Você pode adicionar um texto para deixar claro aos usuários que o que eles estão vendo é uma publicação wiki

.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;
}


Este documento tem controle de versão - sugira alterações no github.

22 curtidas

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 curtidas

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 curtidas

Existe alguma forma de tornar o fundo condicional ao tema claro e escuro? Agradeço sua resposta.

1 curtida

A coisa mais simples a fazer é criar dois componentes de tema diferentes, um para o tema Claro e outro para o tema Escuro, para que você não precise escrever mais CSS.

2 curtidas

Para que as personalizações da Wiki funcionem bem em Mensagens Privadas com as novas alterações, sugiro um pequeno ajuste no CSS para que ele aponte para .cooked:

// personaliza posts da Wiki
.wiki .topic-body .cooked {
    background-color: #e8f9fd;
    animation: none;
}
.post-info.edits .wiki::before {
    content: "Post da Wiki";
    margin-right: 5px;
    font-weight: bold;
}

Vou adicionar isso também no OP.


Mais tarde…
E, só por diversão, transformei isso em um Componente de Tema com a capacidade de personalizar a cor de fundo e o texto.

2 curtidas