DJK

注意


此页为于 SCP 维基内部使用的“组件”页。用于在其他页面中引用。

未经组件作者或工作人员允许,请勿修改此页的内容。


评分: +14+x

在任意页面中:

[[include :scp-wiki-cn:component:djk]]

大家好,我是 djkaktus。这是我在使用的一个个人组件,以可减轻对 Elenee FishTruckElenee FishTruck 的折磨,因为他直至今天还在不知疲倦地在每次我将自己的标准格式更新成我喜欢的样子的时候更新我全部总计超过 140 个的页面。这样,我可以直接只编辑一个地方就把它们全部改好。

这个组件干的事:

1)将黑色标记笔添加到页面汇总(愿 Woed 被尊为圣)
2)用半影黑标主题版式修改了黑色标记笔(赞美 Estrella)
3)用一大堆的颜色替换将半影黑标主题版式修改成这种我特别喜欢的复古变体
4)添加了自定义 ACS 以契合半影的修改
5)添加了渐显、折叠侧边栏以及 ACS 动画组件
6)允许我在心血来潮之时修改这里的任何东西

我一直在努力地去寻找最能代表我大部分文章的版式。这实际上能向这个理想更迈进一小步,而不必在每次我修改什么东西的时候都要去更新上百个页面。

:root {
    --header-title: "THE FOUNDATION";
    --header-subtitle: "DEPARTMENT OF CONTAINMENT";
    --lgurl: url(https://scp-wiki.wdfiles.com/local--files/component%3Adjk/scpnewlogo.png);
    --white-monochrome: 15, 15, 15;
    --pale-gray-monochrome: 35, 35, 35;
    --light-pale-gray-monochrome: 35, 35, 35;
    --very-light-gray-monochrome: 50, 50, 52;
    --light-gray-monochrome: 220, 212, 208;
    --gray-monochrome: 229, 223, 220;
    --dark-gray-monochrome: 239, 235, 230;
    --black-monochrome: 248, 246, 244;
 
    --accentColor: 139, 24, 9;
    --background-gradient-color: var(--light-gray-monochrome);
    --swatch-menubg-dark-color: var(--very-light-gray-monochrome);
    --swatch-text-tertiary-color: var(--accentColor);
    --ui-button-hover-txt: var(--black-monochrome);
 
    --body-font: Inter, Verdana, Geneva, "Helvetica Neue", Helvetica, Arial, sans-serif;
 
    /*-- modal --*/
    --modal-header-txt: var(--black-monochrome);
    --modal-header-bg: var(--white-monochrome);
    /*-- footnote --*/
    --hoverblock-header-txt: var(--black-monochrome);
    --hoverblock-bg: var(--black-monochrome);
}
 
:root:lang(cn) {
    --header-title: "基金会";
    --header-subtitle: "收容部门";
}
 
#header {
    --search-icon-hover-color: var(--black-monochrome);
    --search-icon-hover-bg-color: var(--swatch-primary-darkest);
    --login-myaccount-hover-color: var(--black-monochrome);
    --login-dropdown-text-hover-color: var(--black-monochrome);
}
#header h1 a::before,
#header h2 span::before {
    content: none;
}
 
#top-bar {
    --dropdown-bg-color: var(--dark-gray-monochrome), 0.9;
}
 
#side-bar, #interwiki {
    --sidebar-links-hover-text-color: var(--black-monochrome);
    --sidebar-collapsible-fld-link-hover-color: var(--black-monochrome);
    --sidebar-collapsible-fld-arrow-hover-color: var(--sidebar-collapsible-fld-link-hover-color);
}
 
#main-content {
    --tables-header-txt: var(--black-monochrome);
    --footnotes-footer-title-text-color: var(--black-monochrome);
}
 
:is(#breadcrumbs,.pseudocrumbs) a:is(:hover,:active,:focus,:focus-within) {
    color: rgb(var(--black-monochrome));
}
 
#page-content div.warning-top-box>h1 {
    color: rgb(var(--black-monochrome));
}
 
.top-right-box>.level {
    line-height: 0;
}
 
.scp-image-block {
    border: solid 0.5rem rgb(var(--pale-gray-monochrome));
    border-bottom: solid 0rem rgb(var(--pale-gray-monochrome));
    box-shadow: 0rem 0.26rem 0rem 0rem rgb(var(--accentColor));
    box-sizing: border-box;
}
 
.scp-image-block .scp-image-caption {
    background-color: rgb(var(--pale-gray-monochrome));
    border: solid 0.25rem rgb(var(--pale-gray-monochrome));
    color: rgb(var(--black-monochrome));
    font-size: 0.875rem;
}
 
.anchor {
  z-index: 1;
}
 
#page-content .collapsible-block-folded,
#page-content .collapsible-block-unfolded-link {
    margin: 0;
    background: transparent;
}
 
sup {
    vertical-align: top;
    position: relative;
    top: -0.5em;
}
 
.anom-bar-container {
    --five-color: var(--accentColor);
    --four-color: var(--accentColor);
    --three-color: var(--accentColor);
    --two-color: var(--accentColor);
    --one-color: var(--accentColor);
}
 
.page-tags {
    --pagetags-title-text: var(--black-monochrome);
}
 
div[id*=page-options-bottom]>a {
    --ui-icon-color: var(--black-monochrome);
    --ui-icon-hover-color: var(--black-monochrome);
}
 
#action-area {
    --swatch-text-secondary-color: var(--black-monochrome);
}
 
#revision-list span {
    --pager-selected-link: var(--swatch-text-secondary-color);
    --pager-link-hover: var(--pager-selected-link);
}
 
#footer,
#license-area {
    --hover-link-color: var(--link-color);
    --swatch-text-secondary-color: var(--black-monochrome);
    --white-monochrome: var(--black-monochrome);
}
 
.code pre, .code p, .code {
    background-color: rgb(var(--pale-gray-monochrome));
    color: rgb(var(--black-monochrome));
}
 
/*---- AYERS INFO BAR MOD ----*/
#page-content .info-container .translation_block {
    display: none;
}
#page-content .info-container .collapsible-block-link,
#page-content .info-container:hover .collapsible-block-link {
    line-height: 1.6em;
}
#page-content .info-container .collapsible-block-folded,
#page-content .info-container .collapsible-block-unfolded-link {
    display: grid;
    background: rgb(var(--bright-accent));
}
#page-content .info-container .collapsible-block-folded .collapsible-block-link,
#page-content .info-container .collapsible-block-link {
    -webkit-mask: unset;
    mask: unset;
    background: transparent;
    grid-column: 1;
    grid-row: 1;
    opacity: 0;
}
#page-content .info-container .collapsible-block-folded::before,
#page-content .info-container .collapsible-block-unfolded-link::before {
    --wght: 800;
    content: "DJK";
    color: #fff;
    font-family: var(--body-font);
    display: block;
    pointer-events: none;
    grid-column: 1;
    grid-row: 1;
}
 
/* CODE BLOCK */
.hl-default, .hl-code, .hl-brackets {
    color: rgb(var(--swatch-text-dark));
}

这是一个给ACS版头加上加载动画的组件。

如何使用:

把这个放在文章的任意位置:

[[include :scp-wiki-cn:component:acs-animation]]

然后就完成了!

例子:SCP-5935


注意

- 有两个变量,--timeScale--timeDelay,控制着动画的时序。举例:

[[module CSS]]
:root {
--timeScale: 2;
--timeDelay: 0.5s;
}
[[/module]]

--timeScale能把整个动画速度放慢至原来的½,而--timeDelay会将动画的起始点延迟半秒。默认的值分别为1和0秒。

若需改变默认值,需将以上的代码放到[[include]]的后面。若ACS不是第一个页面元素,或者你想要与其它动画模组(仿照渐显)一同使用,则推荐设置一个--timeDelay

- 似乎与其它种类的ACS版头*不兼容。

*若要与PeppersGhostPeppersGhost小型化ACS一同使用,在[[include]]后面加上如下补丁:

[[module CSS]]
/*-- 小型化ACS动画适应性补丁 --*/
.anom-bar > .bottom-box::before { display: none; }
.anom-bar > .bottom-box { box-shadow: none!important; }
div.diamond-part { clip-path: none; animation: none; box-shadow: none!important; }
@media (max-width: 480px) {
div.top-right-box { clip-path: polygon(0% -30%, 100% -30%, 100% 130%, 0% 130%); }
}
[[/module]]

- 作品灵感来自于AnAnomalousWriterAnAnomalousWriter


源代码:

:root {
    --timeScale: 1;
    --timeDelay: 0s;
}
 
/* Converting middle divider from box-shadow to ::before pseudo-element */
.anom-bar > div.bottom-box { box-shadow: none; position: relative; }
.anom-bar > div.bottom-box::before {
    position: absolute;
    content: " ";
    width: 100%;
    height: 0.5rem;
    bottom: 100%; left: 0;
    background-color: rgb(var(--swatch-menubg-black-color, 12, 12, 12));
}
 
/* DIVIDER */
.anom-bar > .bottom-box::before {
    animation-name: divider;
    animation-duration: calc(0.74s * var(--timeScale));
    animation-delay: calc(0.1s * var(--timeScale) + var(--timeDelay));
    animation-iteration-count: 1;
    animation-timing-function: cubic-bezier(.32,.38,.39,.94);
    animation-fill-mode: backwards;
}
 
/* CLASSIFIED LEVEL BARS */
div.top-center-box  > * {
    animation-name: bar;
    animation-duration: calc(0.45s * var(--timeScale));
    animation-iteration-count: 1;
    animation-timing-function: ease-out;
    animation-fill-mode: backwards;
}
div.top-center-box > :nth-child(1) { animation-delay: calc(0.2s * var(--timeScale) + var(--timeDelay)); }
div.top-center-box > :nth-child(2) { animation-delay: calc(0.32s * var(--timeScale) + var(--timeDelay)); }
div.top-center-box > :nth-child(3) { animation-delay: calc(0.45s * var(--timeScale) + var(--timeDelay)); }
div.top-center-box > :nth-child(4) { animation-delay: calc(0.61s * var(--timeScale) + var(--timeDelay)); }
div.top-center-box > :nth-child(5) { animation-delay: calc(0.75s * var(--timeScale) + var(--timeDelay)); }
div.top-center-box > :nth-child(6) { animation-delay: calc(0.95s * var(--timeScale) + var(--timeDelay)); }
 
/* TOP TEXT */
div.top-left-box, div.top-right-box {
    clip-path: polygon( 0% -50%, 150% -50%, 150% 100%, 0% 100%);
}
 
div.top-left-box > *, div.top-right-box > * {
    position: relative;
    animation-name: bottomup;
    animation-duration: calc(0.65s * var(--timeScale));
    animation-delay: calc(0.5s * var(--timeScale) + var(--timeDelay));
    animation-iteration-count: 1;
    animation-timing-function: ease-out;
    animation-fill-mode: backwards;
}
 
/*-----------------------------------*/
/*-----------------------------------*/
 
/* CONTAINMENT, DISRUPTION, RISK CLASSES */
div.text-part > * {
    clip-path: polygon( 0% 0%, 100% 0%, 100% 100%, 0% 100%);
    animation-name: expand2;
    animation-duration: calc(0.5s * var(--timeScale));
    animation-iteration-count: 1;
    animation-timing-function: cubic-bezier(.12,.41,.27,.99);
    animation-fill-mode: backwards;
}
div.text-part > :nth-child(1) {
    animation-name: expand1;
}
div.text-part > :nth-child(1) { animation-delay: calc(0.6s * var(--timeScale) + var(--timeDelay)); }
div.text-part > :nth-child(2) { animation-delay: calc(0.75s * var(--timeScale) + var(--timeDelay)); }
div.text-part > :nth-child(3) { animation-delay: calc(0.86s * var(--timeScale) + var(--timeDelay)); }
 
div.main-class::before, div.main-class::after {
    animation-name: iconslide;
    animation-duration: calc(0.45s * var(--timeScale));
    animation-delay: calc(0.8s * var(--timeScale) + var(--timeDelay));
    animation-iteration-count: 1;
    animation-timing-function: cubic-bezier(.12,.41,.27,.99);
    animation-fill-mode: backwards;
}
 /* BOTTOM TEXT */
div.main-class > *,  div.disrupt-class > *, div.risk-class > * {
    white-space: nowrap;
    animation-name: flowIn;
    animation-duration: calc(0.42s * var(--timeScale));
    animation-delay: calc(0.75s * var(--timeScale) + var(--timeDelay));
    animation-iteration-count: 1;
    animation-timing-function: ease-out;
    animation-fill-mode: backwards;
}
 
/*-----------------------------------*/
/*-----------------------------------*/
 
/* DIAMOND */
div.arrows {
    animation-name: arrowspin;
    animation-duration: calc(0.65s * var(--timeScale));
    animation-delay: calc(0.55s * var(--timeScale) + var(--timeDelay));
    animation-iteration-count: 1;
    animation-timing-function: cubic-bezier(.12,.41,.27,.99);
    animation-fill-mode: backwards;
}
 
div.quadrants > * {
    animation-name: fade;
    animation-duration: calc(0.3s * var(--timeScale));
    animation-delay: calc(1.4s * var(--timeScale) + var(--timeDelay));
    animation-iteration-count: 1;
    animation-timing-function: cubic-bezier(.12,.41,.27,.99);
    animation-fill-mode: backwards;
}
 
div.top-icon, div.right-icon, div.left-icon, div.bottom-icon {
    animation-name: nodegrow;
    animation-duration: calc(0.4s * var(--timeScale));
    animation-delay: calc(1.4s * var(--timeScale) + var(--timeDelay));
    animation-iteration-count: 1;
    animation-timing-function: cubic-bezier(.12,.41,.27,.99);
    animation-fill-mode: backwards;
}
.bottom-box > div.diamond-part {
    box-shadow: none;
}
.bottom-box > div.diamond-part::before {
    content: "";
    position: absolute;
    width: 0.5rem; height: 100%;
    top: 0; right: 100%;
    background-color: rgb(var(--swatch-menubg-black-color, 12, 12, 12));
    animation-name: diamondBorder;
    animation-duration: calc(0.475s * var(--timeScale));
    animation-delay: calc(0.775s * var(--timeScale) + var(--timeDelay));
    animation-iteration-count: 1;
    animation-timing-function: cubic-bezier(.28,.72,.55,.91);
    animation-fill-mode: backwards;
}
 
/* MOBILE QUERY */
@media (max-width: 480px ) {
    .anom-bar > div.bottom-box { position: initial; }
    .anom-bar > div.bottom-box::before { bottom: initial; top: 40vw; }
    div.top-center-box  > * {
        animation-name: bar-mobile;
        animation-duration: calc(0.9s * var(--timeScale));
    }
    div.top-center-box > :nth-child(1) { animation-delay: calc(0.1s * var(--timeScale) + var(--timeDelay)); }
    div.top-center-box > :nth-child(2) { animation-delay: calc(0.2s * var(--timeScale) + var(--timeDelay)); }
    div.top-center-box > :nth-child(3) { animation-delay: calc(0.3s * var(--timeScale) + var(--timeDelay)); }
    div.top-center-box > :nth-child(4) { animation-delay: calc(0.4s * var(--timeScale) + var(--timeDelay)); }
    div.top-center-box > :nth-child(5) { animation-delay: calc(0.5s * var(--timeScale) + var(--timeDelay)); }
    div.top-center-box > :nth-child(6) { animation-delay: calc(0.6s * var(--timeScale) + var(--timeDelay)); }
 
}
 
/*--- Motion Accessibility ---*/
@media screen and (prefers-reduced-motion: reduce) {
    div.anom-bar-container { --timeScale: 0!important; }
}
 
/*-------------------------*/
 
@keyframes divider {
    from { max-width: 0%;  }
    to { max-width: 100%; }
}
 
@keyframes bar {
    from { max-width: 0%; }
    to { max-width: 100%; }
}
@keyframes bar-mobile {
    from { max-height: 0%; }
    to { max-height: 100%; }
}
 
@keyframes bottomup {
    from { top: 100px; }
    to { top: 0; }
}
 
@keyframes expand1 {
    from { opacity: 0; clip-path: inset(0 calc(100% - 0.75rem) 0 0); }
    to { opacity: 1; clip-path: inset(0); }
}
@keyframes iconslide {
    from { opacity: 0; transform: translateX(-5rem); }
    to { opacity: 1; transform: translateX(0); }
}
 
@keyframes expand2 {
    from { opacity: 0; width: 1%; }
    to { opacity: 1; width: calc(100% - 0.25rem); }
}
@keyframes fade {
    from { opacity: 0; }
    to { opacity: 1; }
}
 
@keyframes flowIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
 
@keyframes arrowspin {
    from { clip-path: circle(0%); transform: rotate(135deg); }
    to { clip-path: circle(75%); transform: rotate(0deg); }
}
@keyframes nodegrow {
    from { transform: scale(0);}
    to {  transform: scale(1);}
}
@keyframes diamondBorder {
    from { height: 0; }
    to { height: 100%; }
}

除非特别注明,本页内容采用以下授权方式: Creative Commons Attribution-ShareAlike 3.0 License