СТОРІНКА ШАБЛОНУ
Це сторінка шаблону, який використовується у цієї Wiki.
Будь ласка, не редагуйте цю сторінку
без дозволу адміністрації сайту
Що це таке
Шаблон, який змушує усе на сторінці поступово проявлятися, замість того аби з'явитися одразу після завантаження сторінки.
Проява також може відбуватися у шаховому порядку, коли усі елементи на сторінці з'являються по черзі.
Використання
На будь-якій вікі:
[[include component:fade-in speed=1]]
speed=1: усе проявляється одночасно.
speed=2: усе проявляється поступово з затримкою у пів секунди
speed=3: усе проявляється поступово з затримкою у чверть секунди
Застереження
Ефект прояви застосовуватиметься лише до тих елементів, які є дочірніми до #page-content. Він не пошириться на інтегровані елементи (наприклад, написи всередині блоку цитування або div) або інші частини сторінки (наприклад, бічну панель).
(Ви можете, якщо вам дуже кортить, використовувати його на сторінці разом з іншими анімаціями, які можуть конфліктувати (наприклад: Анімована СКА) просто помістивши проблемне місце у div.)
Також, це стосується тільки перших 35 елементів на сторінці, усі інші будуть показуватися одночасно. Цього достатньо для плавного завантаження, коли читач відкриває сторінку, однак якщо хтось захоче прокрутити сторінку донизу, то він може зробити це, не чекаючи на повільне завантаження.
Джерельний код
#page-title, #breadcrumbs, #page-content > * { animation-name: fadeIn; animation-duration: 1s; animation-iteration-count: 1; animation-timing-function: ease-out; animation-fill-mode: backwards; } #page-title { animation-delay: 0s; } @keyframes fadeIn { from { opacity: 0; transform: translate(0,30px); } to { opacity: 1; transform: translate(0,0); } } :root { --fade-in-delay: 0s; } #page-content > :nth-child(1) { animation-delay: calc(1 * var(--fade-in-delay)); } #page-content > :nth-child(2) { animation-delay: calc(2 * var(--fade-in-delay)); } #page-content > :nth-child(3) { animation-delay: calc(3 * var(--fade-in-delay)); } #page-content > :nth-child(4) { animation-delay: calc(4 * var(--fade-in-delay)); } #page-content > :nth-child(5) { animation-delay: calc(5 * var(--fade-in-delay)); } #page-content > :nth-child(6) { animation-delay: calc(6 * var(--fade-in-delay)); } #page-content > :nth-child(7) { animation-delay: calc(7 * var(--fade-in-delay)); } #page-content > :nth-child(8) { animation-delay: calc(8 * var(--fade-in-delay)); } #page-content > :nth-child(9) { animation-delay: calc(9 * var(--fade-in-delay)); } #page-content > :nth-child(10) { animation-delay: calc(10 * var(--fade-in-delay)); } #page-content > :nth-child(11) { animation-delay: calc(11 * var(--fade-in-delay)); } #page-content > :nth-child(12) { animation-delay: calc(12 * var(--fade-in-delay)); } #page-content > :nth-child(13) { animation-delay: calc(13 * var(--fade-in-delay)); } #page-content > :nth-child(14) { animation-delay: calc(14 * var(--fade-in-delay)); } #page-content > :nth-child(15) { animation-delay: calc(15 * var(--fade-in-delay)); } #page-content > :nth-child(16) { animation-delay: calc(16 * var(--fade-in-delay)); } #page-content > :nth-child(17) { animation-delay: calc(17 * var(--fade-in-delay)); } #page-content > :nth-child(18) { animation-delay: calc(18 * var(--fade-in-delay)); } #page-content > :nth-child(19) { animation-delay: calc(19 * var(--fade-in-delay)); } #page-content > :nth-child(20) { animation-delay: calc(20 * var(--fade-in-delay)); } #page-content > :nth-child(21) { animation-delay: calc(21 * var(--fade-in-delay)); } #page-content > :nth-child(22) { animation-delay: calc(22 * var(--fade-in-delay)); } #page-content > :nth-child(23) { animation-delay: calc(23 * var(--fade-in-delay)); } #page-content > :nth-child(24) { animation-delay: calc(24 * var(--fade-in-delay)); } #page-content > :nth-child(25) { animation-delay: calc(25 * var(--fade-in-delay)); } #page-content > :nth-child(26) { animation-delay: calc(26 * var(--fade-in-delay)); } #page-content > :nth-child(27) { animation-delay: calc(27 * var(--fade-in-delay)); } #page-content > :nth-child(28) { animation-delay: calc(28 * var(--fade-in-delay)); } #page-content > :nth-child(29) { animation-delay: calc(29 * var(--fade-in-delay)); } #page-content > :nth-child(30) { animation-delay: calc(30 * var(--fade-in-delay)); } #page-content > :nth-child(31) { animation-delay: calc(31 * var(--fade-in-delay)); } #page-content > :nth-child(32) { animation-delay: calc(32 * var(--fade-in-delay)); } #page-content > :nth-child(33) { animation-delay: calc(33 * var(--fade-in-delay)); } #page-content > :nth-child(34) { animation-delay: calc(34 * var(--fade-in-delay)); } #page-content > :nth-child(35) { animation-delay: calc(35 * var(--fade-in-delay)); } #page-content > :nth-child(n+35) { animation-delay: calc(36 * var(--fade-in-delay)); }
:root { --fade-in-delay: 0.5s; }
:root { --fade-in-delay: 0.25s; }
Для будь-кого хто дійсно бажає для своїх текстів темний сайдбар від O.G. BHL.
Лише пишіть свій текст ПІСЛЯ директиви include:
[[include component:bhl-dark-sidebar]]
#interwiki, #side-bar { /* ===ДРУГОРЯДНІ ТА ТРЕТЄРЯДНІ КОЛЬОРИ=== */ /* 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); /* ===ЕЛЕМЕНТИ САЙДБАРУ=== */ /* ===ЗАГАЛЬНІ ЕЛЕМЕНТИ=== */ --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-heading-border-color: var(--bright-accent); --sideblock-heading-bg-color: 0, 0, 0, 0; /* Transparent */ --sideblock-heading-text-color: var(--swatch-text-tertiary-color); /* ===МЕНЮ ДЕТАЛІ=== */ --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-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); /*Кольори у розгорнутому стані */ --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); /* Кольори у розгорнутому стані самого напису*/ --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); } /* Поведінка під час наведення */ #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-dark-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:-webkit-any-link { background: rgba(var(--swatch-menubg-light-color), 0.75) !important; } #side-bar .side-block.media a:-moz-any-link { background: rgba(var(--swatch-menubg-light-color), 0.75) !important; } #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[href*="tiktok"]::before, #side-bar .side-block.media a[href*="tiktok"]::after { transition: background 200ms cubic-bezier(0.4, 0, 0.2, 1), background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), background-image 200ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-clip-path 200ms cubic-bezier(0.4, 0, 0.2, 1); transition: clip-path 200ms cubic-bezier(0.4, 0, 0.2, 1), background 200ms cubic-bezier(0.4, 0, 0.2, 1), background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), background-image 200ms cubic-bezier(0.4, 0, 0.2, 1); transition: clip-path 200ms cubic-bezier(0.4, 0, 0.2, 1), background 200ms cubic-bezier(0.4, 0, 0.2, 1), background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), background-image 200ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-clip-path 200ms cubic-bezier(0.4, 0, 0.2, 1); } #side-bar .side-block.media a[href*="tiktok"]:hover::before { --clip-path: polygon(-15% 0, 115% 0, 100% 100%, 0 100% ); } #side-bar .side-block.media a[href*="tiktok"]:hover::before, #side-bar .side-block.media a[href*="tiktok"]:active::before { --clip-path: polygon(-15% 0, 115% 0, 100% 100%, 0 100% ); background-image: var(--tiktok-icon-gradient); background-size: contain; } #side-bar .side-block.media a[href*="tiktok"]:focus-within::before { --clip-path: polygon(-15% 0, 115% 0, 100% 100%, 0 100% ); background-image: var(--tiktok-icon-gradient); background-size: contain; } #side-bar .side-block.media a[href*="tiktok"]::after { --clip-path: polygon(0 0, 0 0, 0 100%, 0 100% ); background: rgba(var(--swatch-menubg-light-color), 0.75) !important; } #side-bar .side-block.media a[href*="tiktok"]:hover::after, #side-bar .side-block.media a[href*="tiktok"]:active::after { --clip-path: polygon(-15% 0, 115% 0, 100% 100%, 0 100% ); background: rgba(var(--swatch-menubg-light-color), 0.75) !important; } #side-bar .side-block.media a[href*="tiktok"]:focus-within::after { --clip-path: polygon(-15% 0, 115% 0, 100% 100%, 0 100% ); background: rgba(var(--swatch-menubg-light-color), 0.75) !important; } #side-bar .side-block.media a img { -webkit-filter: drop-shadow(0 0 0 rgba(var(--swatch-alternate-color), 0)); filter: drop-shadow(0 0 0 rgba(var(--swatch-alternate-color), 0)); transition: -webkit-filter 200ms cubic-bezier(0.4, 0, 0.2, 1); transition: filter 200ms cubic-bezier(0.4, 0, 0.2, 1); transition: filter 200ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-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 { -webkit-filter: drop-shadow(0.1875rem 0.1875rem 0 rgb(var(--swatch-alternate-color))); filter: drop-shadow(0.1875rem 0.1875rem 0 rgb(var(--swatch-alternate-color))); } #side-bar .side-block.media a:focus-within img { -webkit-filter: drop-shadow(0.1875rem 0.1875rem 0 rgb(var(--swatch-alternate-color))); 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; } #side-bar .scpnet-interwiki-wrapper:not(:lang(cn))::before, #side-bar .scpnet-interwiki-wrapper:not(:lang(cn)) p::before, #side-bar .scpnet-interwiki-wrapper:not(:lang(cn)) p::after { background-color: rgb(var(--swatch-menubg-dark-color)); }
На будь-якому сайті:
[[include component:rso]]
Це я зберігаю про запас.