虫群 |
By: tiger1218 |
Published on 05 Aug 2021 13:01 |
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; }
CartneyStar 6/25/2021 (Fri) 21:34:07 #61295191
我上初中的时候,认识一个叫Sam的孩子。
Sam是一个典型的古板书呆子:金发,大眼镜,皮包骨且不运动,而且非常的聪明。我们不是真正的朋友————因为我们是“最铁的兄弟”并且经常邀请对方到自己家里面来玩。大部分时间我们只是坐在同一张桌子边,讨论漫画或电子游戏。
从他关于他父母非常少的言语中我知道了他父亲是一个酒鬼,以及他母亲在他五六岁时就离开了。虽然我不认为存在任何身体虐待,但是对子女的忽视几乎肯定有。有一次,我看到了他父亲在街上昏了过去。
至于虫叮咬的痕迹,那又是一个让我百思不得其解的东西。他房屋里面的窗户,门和车库总是关着的,而且Sam又是那种永远不会出去冒险的人。
不过那时我十四岁,所以我对此并没有想太多。在那个学年结束后,我再没有那么多的见到Sam了,除了有时我骑自行车外出时看到的:他带着一壶牛奶或一些食品袋子回家。我向他挥手,他挥手回应。这就是我们这几个月交流的结束。
然后是八月十五日那天。当门铃响时,我正在客厅中玩任天堂64。外面的人是Sam,他身上被叮咬的痕迹比任何时候都要多————此时此刻他看起来就像有着糟透了的粉刺。他跑得上气不接下气。
我邀请他进来,然后他进来了,坐在沙发上,盯着他的脚。我非常困惑,但是我母亲教我要礼貌,所以我还是给他倒了一杯水,然后坐在了他的对面。他放下杯子,然后开始谈起了他父亲被在森林中待了三天的事情,而且就在五分钟前,他房门口出现了一张纸条,上面写着:“来小木屋。”
他问我是否能帮他一起找到他父亲。我此时已经非常疑惧了;我愿意做出许多愚蠢的事情,但是在森林中游荡,寻找一个喝醉了的成年人绝对不是我想做的事情。但他看向我,如此无助、害怕,所以我还是同意了。
最后我们走时已经是晚上了————因为天马上就要黑了,我们不得不到处寻找手电筒。我告诉父母我要去朋友家过夜,然后我们就出发了。
大概二十分钟后,我们到达了森林边上,这时Sam开始变得越来越安静,脸色越来越来苍白,虫咬的痕迹也越来越显眼。他毫不犹豫地走进漆黑的森林,我也跟了上去。
Sam似乎知道他要去哪儿:他走得很快,表情严肃沉重。手电筒的光在黑暗中十分显眼,我确信如果有人在森林里,一英里外就能看到我们。不过我陷得太深了,没有勇气再出去,Sam脸上有些东西奇怪又可怕。
大约三十分钟后,Sam停下了。他扶了扶他笨重的眼镜,转向我。他告诉我我必须关掉手电筒:它们正在接近。我记得我那时问他:“什么东西正在接近?”但是他不理我,继续走入黑暗。
我非常想要离开,不过我记不清回去的路,而且我不想在接下来的几个小时中在森林里游荡,所以我关掉手电筒,跟上他。森林的地表上覆盖这落叶和细枝————至少,根据它们发出的嘎吱声,我认为它们是落叶和细枝;太黑了,看不清。
现在我能听到奇怪的响声。非常像蜜蜂的嗡嗡声。越接近小木屋,这种不舒服的声音听上去就越接近。透过微弱到甚至不足以覆盖树枝的月光,我能看到甲虫和苍蝇在木屋上空飞舞。
在几分钟————或是几小时,我不确定————Sam转过身,他苍白的脸闪闪发光。“我们就要到了,别发出一点声音。”我向前走着,心快要跳出喉咙。
突然,一道亮眼的光出现。我眯起眼睛,看到Sam和他父亲站在老木屋旁边。木屋被苔藓和腐烂的木头覆盖。嗡嗡声变得更加强烈,当我完全睁开眼睛时,我看到一个巨大的灯光网格在我面前。
我记得我转向Sam,他现在面无表情地盯着我,尽管他父亲看上去一团糟。他的胡子和头发凌乱,衣服破烂。污垢和垃圾覆盖了他的皮肤,他身上也散发出了粪便和垃圾的味道。
但是最显眼的是他身上无数的叮咬痕迹。这似乎比上次我见到他还多了十倍。在笑的时候,他的牙齿又黄又黑。我记得他对Sam说了一句:“干的不错”,然后拍了拍他的肩膀。
当我看向后方时,我以为的,并且踩过去的那些落叶和细枝并不是落叶和细枝:他们是骨头。一个人类头骨盯着我,它的眼睛大而凹陷进去,头骨裂开。更多骨头围绕着它。回想起来,那应该是失踪的人的骨头。
我记得他举起双手,就像在指挥乐队,然后他开始用某种怪异的喉咙语言进行吟唱。这比任何东西都像呼噜声。那个时候我已经试图逃跑了。不过他抓住了我衬衫的领子,把我扔到地上。
他围绕我转了一圈,那可怕的嗡嗡越来越大,然后我突然看见了源头。
千万只虫子,像巨大的黑云,从森林里飞到了小空地上。它的嗡嗡声越来越大,难闻的味道也越来越大。虫群来了,它们包围着我。然后它们开始爬到我身上。
甲虫,有些有六英尺长,开始吃我的手臂。巨大的蚊子把我的血吸出来。我无法呼吸,因为无论何时我呼吸,我都会吸入几十只虫子,被他们呛到窒息。
然后一切都黑下来了,我记得我在我家对面的人行道上醒来。在这些发生后,我听说Sam和他父亲消失了。我身上虫群的咬痕又大又红,所以走到哪儿我都穿着长袖衬衫和长裤。
在几个月后,那些痕迹几乎都消失了。只有一个还在我手臂上。现在,我是一名高中生,和我说话的每个人都说他不知道什么“Sam”。我甚至去看了几个心理医生,他们都说这是一场梦。当我展示我的咬痕时,他们说他们什么都没看到,并说我是一个骗子。
不过我知道这些不是真的,因为昨天,一只甲虫从我的咬痕中钻了出来。