[[iftags +tema -nobhl]]
Uso
Em qualquer wiki:
[[include :scp-pt-br:theme:black-highlighter-theme]]
Temas Black Highlighter
Addons Opcionais
Barra Lateral Negra
[[include :scp-pt-br:component:bhl-dark-sidebar]]
Barra Lateral Colapsável
[[include :scp-pt-br:component:collapsible-sidebar]]
Barra Lateral Desativável
[[include :scp-pt-br:component:toggle-sidebar-bhl]]
Cabeçalho Centralizado
[[include :scp-wiki:component:centered-header-bhl]]
O que é isso
Um componente que aplica o tema Black Highlighter a seu artigo.
Este componente aplica uma versão estável do tema Black Highlighter, mas pode quebras às vezes conforme é atualizado.
Relatando problemas
Se você possui uma conta no Github, crie uma Issue aqui detalhando seu problema (seja ele técnico, estético ou algo assim).
Se você não tiver uma conta no Github, ou se você preferir discutir seus problemas com alguém diretamente, se junte ao canal do #black-highlighter no SkipIRC, ou envie uma mensagem privada a Woedenaz ou
Croquembouche.1
Cores do Tema
Exemplos
Logo da Fundação SCP
Uma linha horizontal pode ser criada com 5 hifens "-----" e se estende por toda a página se não estiver dentro de nada (como uma citação). As linhas separando este documento em seções são linhas horizontais.
Títulos podem ser criados colocando de um a seis sinais de mais "+" no começo da linha
Primeiro Título
Segundo Título
Terceiro Título
Quarto Título
Quinto Título
Sexto Título
- Abalador
- Abalação
- Aba Longa
- Essa aba vazia tem um nome bem longo por algum motivo estranho. Me pergunto qual seja? É bem estranho.
- Aba Vazia
- Aba Vazia
- Aba Vazia
- Aba Vazia
- Aba Vazia
Esta é uma tab view.
Ei, olhe, mais texto aqui.
Que chique.
Esta é uma aba longa. Ela contém muito texto.
Esta é uma aba longa. Ela contém muito texto.
Esta é uma aba longa. Ela contém muito texto.
Esta é uma aba longa. Ela contém muito texto.
Esta é uma aba longa. Ela contém muito texto.
Esta é uma aba longa. Ela contém muito texto.
Esta é uma aba longa. Ela contém muito texto.
Esta é uma aba longa. Ela contém muito texto.
Esta é uma aba longa. Ela contém muito texto.
Esta é uma aba longa. Ela contém muito texto.
Esta é uma aba longa. Ela contém muito texto.
Esta é uma aba longa. Ela contém muito texto.
Esta é uma citação, criada ao colocar "> " no começo de cada linha.
Mais texto
Isso é uma linha horizontal
Citação dentro de citação
Esta é uma | tabela |
---|---|
Você já deveria | saber como |
fazer uma |
A fonte do corpo é Raleway.
A fonte do cabeçalho e de título é Poppins.
A fonte monoespaçada é Recursive.
[[/iftags]]
[[iftags +componente]]
Para aqueles que realmente quiserem a barra lateral negra do BHL (Black Highlighter) original em seus artigos.
Só adicionar esta include DEPOIS da include do BHL:
[[include :scp-pt-br:component:bhl-dark-sidebar]]
[[/iftags]]
#side-bar { /* ===SECONDARY & TERTIARY COLORS=== */ /* Editing these will edit a vast majority of theme elements. Useful for making dark themes */ /* Colors for Secondary & Tertiary items like Blockquote and YUI Tabs */ --swatch-secondary-color: var(--swatch-menubg-dark-color); --swatch-tertiary-color: var(--swatch-menubg-medium-color); --swatch-alternate-color: var(--swatch-menubg-light-color); /* Text Colors for Secondary & Tertiary items like Sidebar Headers and Top-Bar Menu Text */ --swatch-text-secondary-color: var(--swatch-menutxt-dark-color); --swatch-text-tertiary-color: var(--swatch-menutxt-light-color); /* ===SIDE-BAR ELEMENTS=== */ /* ===SIDE-BAR GENERAL=== */ --sidebar-bg-color: var(--swatch-menubg-dark-color); --sidebar-resources-bg-color: 0,0,0,0; --sidebar-media-bg-color: 0,0,0,0; /* ===SIDEBLOCK MENU=== */ --sideblock-heading-border-color: var(--bright-accent); --sideblock-heading-bg-color: 0,0,0,0; /* Transparent */ --sideblock-heading-text-color: var(--swatch-text-tertiary-color); /* ===MENU-ITEMS=== */ --sidebar-border-color: var(--swatch-primary), 0.08; --sidebar-subtest-color: var(--swatch-text-tertiary-color); --sidebar-links-text: var(--swatch-text-tertiary-color); --sidebar-links-hover-bg-color: var(--bright-accent); --sidebar-links-hover-text-color: var(--swatch-text-tertiary-color); /* ===SIDEBAR COLLAPSIBLES=== */ /*Folded Colors */ --sidebar-collapsible-fld-link-bg: var(--swatch-primary), 0.25; --sidebar-collapsible-fld-link-color: var(--swatch-text-tertiary-color); --sidebar-collapsible-fld-link-hover-color: var(--swatch-text-tertiary-color); --sidebar-collapsible-fld-arrow-hover-color: var(--swatch-text-tertiary-color); /*Unfolded Colors */ --sidebar-collapsible-ufld-link-bg: var(--swatch-primary-darker), 0.25; --sidebar-collapsible-ufld-link-color: var(--swatch-text-tertiary-color); --sidebar-collapsible-ufld-link-hover-color: var(--swatch-text-tertiary-color); --sidebar-collapsible-ufld-arrow-hover-color: var(--swatch-text-tertiary-color); /* Unfolded Body Colors */ --sidebar-collapsible-link-color: var(--swatch-text-tertiary-color); --sidebar-collapsible-link-hover-color: var(--swatch-text-tertiary-color); scrollbar-color: rgba(var(--swatch-primary-darker), 0.1) /* Thumb */ rgba(var(--swatch-secondary-color), 0.05); /* Track */ border-color: rgba(var(--swatch-secondary-color), 0.4); } /* Hover Scrollbar Behavior */ #side-bar:hover, #side-bar:active { scrollbar-color: rgb(var(--swatch-primary-darker), 1) /* Thumb */ rgb(var(--swatch-menubg-dark-color), 1); /* Track */ } #side-bar:focus-within { scrollbar-color: rgb(var(--swatch-primary-darker), 1) /* Thumb */ rgb(var(--swatch-menubg-color), 1); /* Track */ } #side-bar::-webkit-scrollbar-track { background-color: rgba(var(--swatch-tertiary-color), 0.8); } #side-bar::-webkit-scrollbar, #side-bar::-webkit-scrollbar-thumb, #side-bar::-webkit-scrollbar-corner { background-color: rgba(var(--swatch-menubg-dark-color), 0); } #side-bar .side-block.media a:any-link { background: rgba(var(--swatch-menubg-light-color),0.75) !important; } #side-bar .side-block.media a::before { background: rgb(var(--social-color)); } #side-bar .side-block.media a img { filter: drop-shadow(0 0 0 rgba(var(--swatch-alternate-color),0)); transition: filter 200ms cubic-bezier(0.4, 0, 0.2, 1); } #side-bar .side-block.media a:hover img, #side-bar .side-block.media a:active img { filter: drop-shadow(0.1875rem 0.1875rem 0 rgb(var(--swatch-alternate-color))); } #side-bar .side-block.media a:focus-within img { filter: drop-shadow(0.1875rem 0.1875rem 0 rgb(var(--swatch-alternate-color))); } html:not(:lang(cn)) div.scpnet-interwiki-wrapper p::before { box-shadow: inherit; } .scpnet-interwiki-wrapper { -webkit-filter: invert(0.8) hue-rotate(180deg) saturate(0.8); filter: invert(0.8) hue-rotate(180deg) saturate(0.8); }
What this is
A bunch of miscellaneous CSS 'improvements' that I, Croquembouche, use on a bunch of pages because I think it makes them easier to deal with.
The changes this component makes are bunch of really trivial modifications to ease the writing experience and to make documenting components/themes a bit easier (which I do a lot). It doesn't change anything about the page visually for the reader — the changes are for the writer.
I wouldn't expect translations of articles that use this component to also use this component, unless the translator likes it and would want to use it anyway.
This component probably won't conflict with other components or themes, and even if it does, it probably won't matter too much.
Usage
On any wiki:
[[include :scp-wiki:component:croqstyle]]
This component is designed to be used on other components. When using on another component, be sure to add this inside the component's [[iftags]] block, so that users of your component are not forced into also using Croqstyle.
Related components
Other personal styling components (which change just a couple things):
Personal styling themes (which are visual overhauls):
CSS changes
Reasonably-sized footnotes
Stops footnotes from being a million miles wide, so that you can actually read them.
.hovertip { max-width: 400px; }
Monospace edit/code
Makes the edit textbox monospace, and also changes all monospace text to Fira Code, the obviously superior monospace font.
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;700&display=swap'); :root { --mono-font: "Fira Code", Cousine, monospace; } #edit-page-textarea, .code pre, .code p, .code, tt, .page-source { font-family: var(--mono-font); } .code pre * { white-space: pre; } .code *, .pre * { font-feature-settings: unset; }
Teletype backgrounds
Adds a light grey background to <tt> elements ({{text}}), so code snippets stand out more.
tt { background-color: var(--swatch-something-bhl-idk-will-fix-later, #f4f4f4); font-size: 85%; padding: 0.2em 0.4em; margin: 0; border-radius: 6px; }
No more bigfaces
Stops big pictures from appearing when you hover over someone's avatar image, because they're stupid and really annoying and you can just click on them if you want to see the big version.
.avatar-hover { display: none !important; }
Breaky breaky
Any text inside a div with class nobreak has line-wrapping happen between every letter.
.nobreak { word-break: break-all; }
Code colours
Add my terminal's code colours as variables. Maybe I'll change this to a more common terminal theme like Monokai or something at some point, but for now it's just my personal theme, which is derived from Tomorrow Night Eighties.
Also, adding the .terminal class to a fake code block as [[div class="code terminal"]] gives it a sort of pseudo-terminal look with a dark background. Doesn't work with [[code]], because Wikidot inserts a bunch of syntax highlighting that you can't change yourself without a bunch of CSS. Use it for non-[[code]] code snippets only.
Quick tool to colourise a 'standard' Wikidot component usage example with the above vars: link
:root { --c-bg: #393939; --c-syntax: #e0e0e0; --c-comment: #999999; --c-error: #f2777a; --c-value: #f99157; --c-symbol: #ffcc66; --c-string: #99cc99; --c-operator: #66cccc; --c-builtin: #70a7df; --c-keyword: #cc99cc; } .terminal, .terminal > .code { color: var(--c-syntax); background: var(--c-bg); border: 0.4rem solid var(--c-comment); border-radius: 1rem; }
Debug mode
Draw lines around anything inside .debug-mode. The colour of the lines is red but defers to CSS variable --debug-colour.
You can also add div.debug-info.over and div.debug-info.under inside an element to annotate the debug boxes — though you'll need to make sure to leave enough vertical space that the annotation doesn't overlap the thing above or below it.
…like this!
.debug-mode, .debug-mode *, .debug-mode *::before, .debug-mode *::after { outline: 1px solid var(--debug-colour, red); position: relative; } .debug-info { position: absolute; left: 50%; transform: translateX(-50%); font-family: 'Fira Code', monospace; font-size: 1rem; white-space: nowrap; } .debug-info.over { top: -2.5rem; } .debug-info.under { bottom: -2.5rem; } .debug-info p { margin: 0; }
Este é o tema Swirlnig Ashes, feito para uso por artigos no cânone do Ninho do Rato.
Feito por Croquembouche e nomeado segundo a descrição de
faminepulse dos céus no Oregon, EUA em setembro de 2020.
O cabeçalho passa por um ciclo de dia/noite de um minuto de duração. A cada terceira noite, a neblina brevemente se dissipa.
Uso
Para colocar este tema em sua página, inclua o Black Highlighter e, opcionalmente, a Barra Lateral Escura do BHL:
[[include :scp-pt-br:theme:black-highlighter-theme]]
[[include :scp-pt-br:component:bhl-dark-sidebar]]
[[include :scp-pt-br:theme:swirling-ashes]]
Para ajustar o texto do cabeçalho:
[[module CSS]]
:root:lang(pt-br) {
--header-title: "Fundação SCP";
--header-subtitle: "Segurança, Contenção, Proteção";
}
[[/module]]
Cores do Tema
Código Fonte
/* - == === VARIÁVEIS DO BHL === == - */ /* Este é um tema BHL, que se baseia nas configurações, então o elemento root * contem variáveis que afetarão todo o tema */ :root:lang(pt-br) { /* integração S-CSS-P */ --theme-base: "black-highlighter"; --theme-id: "swirling-ashes"; --theme-name: "Swirling Ashes Theme"; /* Cores */ --dark-gray-monochrome: 26, 24, 26; --swatch-topmenu-bg-color: var(--dark-gray-monochrome); --dark-accent: 63, 9, 143; --medium-accent: 81, 13, 181; --bright-accent: 105, 49, 186; --pale-accent: 128, 80, 200; /* Céu */ --sky-at-dawn: 236, 112, 99; --sky-at-morning: 174, 214, 241; --sky-at-daytime: 249, 231, 159; --sky-at-evening: 248, 196, 113; --sky-at-dusk: 140, 50, 70; --sky-at-night: 50, 40, 67; --sky-length: 15; --sky-time: 60s; /* Ajustes do cabeçalho */ --header-title: "Ninho do Rato"; --header-subtitle: "vamos começar pelo fim"; /* Deletar o fundo padrão do cabeçalho */ --gradient-header: linear-gradient(transparent, transparent); --diagonal-stripes: linear-gradient(transparent, transparent); } /* - == === FUNDOS DO CABEÇALHO === == - */ /* O cabeçalho é feito de milhões de fundos diferentes empilhados. * Em vez de fazer traquinagens com o z-index, adicionei fundos ao * ::before e ::after de vários elementos que ocupam a página inteira em * sua ordem natural. */ /* Os pseudoelementos a seguir contem partes diferentes do * fundo do cabeçalho. Eles precisam ser renderizados precisamente sobre o cabeçalho * e tornados inclicáveis de modo a não interferir com os links lá * Eles aparecem na página nesta ordem, então eles também serão renderizados * um sobre o outro nesta ordem. */ body::before, div#container-wrap-wrap::before, div#container-wrap::before, div#container-wrap-wrap::after, body::after { content: ""; position: absolute; height: var(--header-height-on-desktop); width: 100%; top: 0; left: 0; pointer-events: none; } /* O céu, que passa por uma série de cores para remeter a * imparável passagem do tempo */ body::before { background: linear-gradient( to top, rgb(var(--sky-at-morning)) 0%, rgb(var(--sky-at-morning)) 11%, rgb(var(--sky-at-daytime)) 22%, rgb(var(--sky-at-daytime)) 33%, rgb(var(--sky-at-evening)) 44%, rgb(var(--sky-at-dusk)) 55%, rgb(var(--sky-at-night)) 66%, rgb(var(--sky-at-night)) 77%, rgb(var(--sky-at-dawn)) 88%, rgb(var(--sky-at-morning)) 100% ); background-size: 100% calc(var(--header-height-on-desktop) * var(--sky-length)); animation: sky linear var(--sky-time) infinite; } @keyframes sky { from { background-position: 0 0; } to { background-position: 0 calc(var(--header-height-on-desktop) * var(--sky-length)); } } /* A paisagem de cidade */ div#container-wrap-wrap::before { background: url('https://scp-wiki.wdfiles.com/local--files/theme%3Aswirling-ashes/skyline.png'); background-size: auto var(--header-height-on-desktop); } /* Dois fundos: um brilho branco e desfocado nos edifícios, * obtido de um ponto inicial de brilho da imagem da paisagem * original; e um gradiente de branco para transparente que usa a * paisagem original como um modo de mesclagem. Eles aparecem * no dia e desaparecem na noite para representar a reflexão do sol * nos edifícios. */ div#container-wrap::before { background: url('https://scp-wiki.wdfiles.com/local--files/theme%3Aswirling-ashes/skyline-whitewash.png'), url('https://scp-wiki.wdfiles.com/local--files/theme%3Aswirling-ashes/skyline-highlight.png'); background-size: auto var(--header-height-on-desktop); animation: shine ease-in-out var(--sky-time) infinite; } @keyframes shine { 0%, 40%, 100% { opacity: 0.2; } 55%, 77% { opacity: 0; } } /* Os dois pseudoelementos finais contem as cinzas: nuvens que * passam pela cidade à altura do solo. Dois elementos são necessários porque as duas camadas de nuvens possuem larguras diferentes e se * movem em velocidades diferentes. * A animação de fade fornece uma vista sem obstruções da cidade * a cada terceira noite. */ div#container-wrap-wrap::after, body::after { background-size: var(--ashes-width) var(--header-height-on-desktop); background-repeat: repeat-x; animation: ashes-move linear var(--ashes-move-duration), ashes-fade ease calc(var(--sky-time) * 3); animation-iteration-count: infinite; animation-fill-mode: both; } div#container-wrap-wrap::after { background-image: url('https://scp-wiki.wdfiles.com/local--files/theme%3Aswirling-ashes/ashes-large.png'); --ashes-move-duration: 27s; --ashes-width: 500px; --ashes-opacity: 0.5; } body::after { background-image: url('https://scp-wiki.wdfiles.com/local--files/theme%3Aswirling-ashes/ashes-small.png'); --ashes-move-duration: 20s; --ashes-width: 800px; --ashes-opacity: 0.4; } @keyframes ashes-move { from { background-position: 0 0; } to { background-position: var(--ashes-width) 0; } } @keyframes ashes-fade { 0%, 85%, 96%, 100% { opacity: var(--ashes-opacity); } 88.66%, 92.33% { opacity: 0.1; } } /* - == === PLANOS DE FUNDO DO CORPO === == - */ /* Este pseudoelemento contem a leve poluição roxa na página * logo abaixo do cabeçalho, como uma transição temática do escuro para a luz. */ #content-wrap { position: relative; } #content-wrap::before { content: ""; position: absolute; height: 100%; width: 100%; top: 0; left: 0; background-repeat: repeat-x; pointer-events: none; background-image: url('https://scp-wiki.wdfiles.com/local--files/theme%3Aswirling-ashes/purple-smoke.png'); opacity: 0.2; } /* - == === MISCELÂNEO === == - */ /* Interwiki */ .scpnet-interwiki-wrapper { filter: brightness(0.86) invert(1) hue-rotate(73deg) saturate(10); } /* Adicionar um pouco de contraste extra nas informações de login */ #login-status { background: rgba(var(--dark-accent), 0.3); padding-left: 0.5rem; } /* Respeitar as configurações de movimento do usuário */ @media screen and (prefers-reduced-motion: reduce) { body::before, div#container-wrap::before, div#container-wrap-wrap::after, body::after { animation: none; } } /* L2 has been here */ @media (max-width: 767px) { #side-bar .side-bar-container { background-color: unset !important; padding: 0 !important; } }