红色催化剂 |
作者 Hg-lab |
发布于 30 Jun 2022 06:02 |
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.
.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; }
/* source: http://ah-sandbox.wikidot.com/component:collapsible-sidebar-x1 */
#top-bar .open-menu a {
position: fixed;
top: 0.5em;
left: 0.5em;
z-index: 5;
font-family: 'Nanum Gothic', san-serif;
font-size: 30px;
font-weight: 700;
width: 30px;
height: 30px;
line-height: 0.9em;
text-align: center;
border: 0.2em solid #888;
background-color: #fff;
border-radius: 3em;
color: #888;
pointer-events: auto;
}
@media not all and (max-width: 767px) {
#top-bar .mobile-top-bar {
display: block;
pointer-events: none;
}
#top-bar .mobile-top-bar li {
display: none;
}
#main-content {
max-width: 708px;
margin: 0 auto;
padding: 0;
transition: max-width 0.2s ease-in-out;
}
#side-bar {
display: block;
position: fixed;
top: 0;
left: -20em;
width: 17.75em;
height: 100%;
margin: 0;
overflow-y: auto;
z-index: 10;
padding: 1em 1em 0 1em;
background-color: rgba(0,0,0,0.1);
transition: left 0.4s ease-in-out;
scrollbar-width: thin;
}
#side-bar:target {
left: 0;
}
#side-bar:focus-within:not(:target) {
left: 0;
}
#side-bar:target .close-menu {
display: block;
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
margin-left: 19.75em;
opacity: 0;
z-index: -1;
visibility: visible;
}
#side-bar:not(:target) .close-menu { display: none; }
#top-bar .open-menu a:hover {
text-decoration: none;
}
/* FIREFOX-SPECIFIC COMPATIBILITY METHOD */
@supports (-moz-appearance:none) {
#top-bar .open-menu a {
pointer-events: none;
}
#side-bar:not(:target) .close-menu {
display: block;
pointer-events: none;
user-select: none;
}
/* This pseudo-element is meant to overlay the regular sidebar button
so the fixed positioning (top, left, right and/or bottom) has to match */
#side-bar .close-menu::before {
content: "";
position: fixed;
z-index: 5;
display: block;
top: 0.5em;
left: 0.5em;
border: 0.2em solid transparent;
width: 30px;
height: 30px;
font-size: 30px;
line-height: 0.9em;
pointer-events: all;
cursor: pointer;
}
#side-bar:focus-within {
left: 0;
}
#side-bar:focus-within .close-menu::before {
pointer-events: none;
}
}
}
红色催化剂 |
作者 Marcelles_Raynes does not match any existing user name |
发布于 2022 年 06 月 11 日 |
Info
Consider donating a +1
Written by Marcelles_Raynes does not match any existing user name
Bloodborne canon by uh, muffins?
男人和吸血鬼坐在大教堂里,沐浴在血月之下。他们曾是兄弟,但数十年的嗜血和不灭的政治野心迫使他们分道扬镳。两人已经许多年没有共处一室了,而死亡却以一种奇妙的方式,将哪怕最破碎的纽带联系在一起。他们坐在主道两侧的长凳上,凝视着祭坛上一动不动的遗体——她双手交叠,放在胸前,手里握着玫瑰。
她在上个月相循环中陷入酣然长眠,却如同新死。这是一名女性,外貌未满三十,黑发垂落在祭坛两侧。她的头发反射着穿过窗棂的月光,将之染成深红。皮肤苍白,布满清晰可见的血管。眼窝深陷,牙齿尖利,颈侧的两个小孔如今已微不可见。
吸血鬼轻抚自己的尖牙,“我应该再多做点什么的。”
政客嗤笑一声,交叠起双臂,“你已经做得够多了。”
微风钻进门缝,妄想将政客的领带解开。政客调整了一下坐位,用鼻孔瞪着天。他的领带纹丝不动。
“你吸了她的血吗?”'政客问,指着遗体颈部的伤口。
吸血鬼身子往里缩了缩,把手塞进了外套口袋。他往右转去,头靠着长凳,耸了耸肩。
“她无力承担治疗费用。”吸血鬼朝地面啐了一口,“你和那些狐朋狗友再清楚不过。”
政客深吸一口气,“经济控制在贵族手中,我和同僚们只是负责管理,你不能把责任推到我们身上。”
“呼,”吸血鬼的拳头在口袋里攥紧了,指甲开始渗血,“一如既往地逃避责任啊,你究竟什么时候才能长大?”
政客正了正衣领。自进入大教堂后,他第一次把目光从祭坛上的尸体上移开,凝视着地面。他咬紧牙关,怒容满面。
“我是这几个世纪以来,旱叶统治阶层中最伟大的成员。仅过去的十年里,我就给这座城市带来了前所未有的繁荣。是我拯救了人们免于猩红之死,而这段时间你在做什么,嗯?”
吸血鬼挪动一下位置,背对着政客。后者的眼睛也随之转动,饱含谴责的目光在他背上烧出一个洞。
“我——”
政客抬起眉头,“让我猜猜。你变成了夜之族?恫吓城里的无辜百姓?不不,我知道了:你宁可把你那肮脏的,嗜血成性的尖牙扎进母亲的身体里,也不愿意抬抬尊腚去帮助她!”
房间寂静无声,只有政客越来越高昂的声音,“你把她同化成了和你一样恶心的东西,从来就没有费过心去保护她,你是个失败的儿子,让她——”
随着目光在遗体上落下,他的音调拉长,而后戛然而止。母亲看上去只是偶然睡着了。他的思绪回到上一个月相循环中:他的兄弟从阴影中现身,请求他对一件“极重要”的事施以援手。政客仍记得河畔那条小巷,新鲜血液的恶臭如何填满了他的鼻腔。
他还记得那些镇民撕碎的躯体四散在城墙和地面,内脏从中大股流出。他看见了折断的干草叉、残缺的火把和破碎的圣水瓶。当他们走近奄奄一息的母亲时,一想到从防火梯上蜂拥而出的吸血鬼们,他便感到不寒而栗。
政客以为自己被带入了一个陷阱。他对吸血鬼发誓,这些怪物肯定会从他身边夺走母亲,并妄图斩草除根。但这些怪物与其他同类不同:四肢残缺,皮焦肉烂,脸部被毁。他们是遭到了袭击?
他又回想起,那些吸血鬼像浣熊一样翻找内脏,忙于进食和疗伤,无暇顾及两人。它们已经饱食受猩红之死影响的村民们,至少他弟弟是这么说的。
一根木桩刺穿了他们母亲的胸腔,那是母亲最后一次和他说话。两个儿子一起将她从巷子里抬到教堂,让她躺在这里,直到现在。
政客无言地落下泪来。
吸血鬼开口了,“贵族手握解药——你很清楚这一点——但他们不愿将其分给平民。我本以为我能救她。和你们不同,猩红之死对我的族人没有影响,可是……”
啜泣变为一声叹息。
“你的恨意就如此之深,以至于连家人都要抛弃吗?”
政客摇头道,“你不是我的家人。”
吸血鬼朝尸体一甩头,“那她呢?”
“别扯上母亲。”
吸血鬼耸耸肩。他站起来,转身,面对着政客。怒意在他琥珀色的瞳仁里一闪而过,而后为某种东西所替代。悲伤?抑或愧疚?
吸血鬼平静地开口,“她的离去是因为猩红之死。这是你一手造成的,哥哥。要骂,要断交,随便你,但不要像对我一样对待她。这种病痛的折磨不是她要求的——”
“成为吸血鬼也不是她要求的。”
吸血鬼皱眉,“至少我尽了我所能。”
兄弟俩的目光彼此对峙,仿佛此刻即为永恒。政客慢慢把手移到腰间,那里藏有一把祝祷过的,上满银弹的手枪。吸血鬼向下瞟了一眼,面露同样的痛苦之色。他垂下双肩。
吸血鬼看着他的母亲,然后看向哥哥,又看向母亲。他叹了口气,伸出手。
“来吧,”他说,从长凳下到过道上。
政客避开了,“我不会碰你的手的。”
吸血鬼皱了皱眉,“那就像兄弟那样走在我身旁吧,为了我们的母亲。”
政客接受了提议。他有足够的准度瞄准吸血鬼,当然也有足够的子弹消灭可能潜伏在门外的更多吸血鬼。他盯着对方琥珀色的眼睛,盘算着这个想法。一件事蓦然闯入脑海。
他想起了许多年前,他们都还是孩子的时候。那时猩红的死神还未用它无情的铁手将旱叶牢牢攥紧。每当礼拜天的布道结束,他们就在这座大教堂附近的河里玩耍,在河面打水漂,互相嬉笑。
短暂的温情悄然流入政客心中。他把手放在吸血鬼的掌中,握住了。他们一起走过过道,走上楼梯,走到死者身旁。
他们默默地站在一起。多年来,第一次不是与此为敌。
“还记得我们小时候吗?”政客开口道,“妈妈从市场回来,带着一大堆小玩意和稀奇古怪的木头车,让我们一起分享。”
吸血鬼微微点头,“我的小火车,我记得很清楚。”
“我还记得她告诉我们这是我们俩的玩具时,你脸上绝望的表情。你那时没有自己的玩具,更没有新玩具,除了让你占有它以外,我能做什么呢?否则,我这哥哥该当成什么样了。”
“所以你就把它给了我?”
政客对上吸血鬼的双眼,点头。“是啊,那对你来说似乎是件大事。我有什么权力夺走你的东西呢,这种玩具我已经够多了。”
“我记不得了。”吸血鬼说,蹙着眉。
“我不指望你能记得,你那时几乎是个小宝宝。”政客耸肩。泪水在他的眼眶里蓄着,须臾,无声流了下来。
吸血鬼戏谑地戳了戳他,“看看,现在谁是小宝宝了。”
两人轻笑一声,夹杂着抽泣。政客露出了笑容。
月色从教堂中褪去,敲门声响了起来,兄弟俩的目光投向了方才走进教堂那个骨瘦如柴,身躯欣长的老人。
“晚好,先生们。”菲利亚先生一如既往的伶俐腔调响起。
政客和吸血鬼注视彼此。无论走到何处,菲利亚都与死亡相随,他们终于到了与母亲分别的时刻了。菲利亚从夹克内袋取出卷尺开始测量,两人从祭坛走向门口,菲利亚的马不耐烦地打了个响鼻。
吸血鬼面向他的胞兄,对方始终看着前方,如视无物。
“谢谢你。”吸血鬼首先开口,对这位兄长露出一个温暖的笑容,“我是说,谢谢你能来。”
政客冷哼一声,一贯皱起的眉头又回到了前额。他抹去脸上的泪痕,“我可不是为你而来的。”