Шаблон:ModernTitle: различия между версиями

Материал из Space Station 14 Вики
мНет описания правки
Нет описания правки
Строка 1: Строка 1:
<h2 class="modern-title" style="--background-color:{{{background-color|#363649}}};color:{{{color|#fff}}};margin:{{{margin|1.25em 0 0.7em 0}}};><span class="modern-title-h2">{{{1}}}</span></h2><!--
{{#switch: {{{2|}}}
|h1|#default = <h1 class="modern-title__h1" style="--background-color:{{{background-color|#363649}}};color:{{{color|#fff}}};margin:{{{margin|1.25em 0 0.7em 0}}};><span class="modern-title-h2">{{{1}}}</span></h1>
|h2         = <h2 class="modern-title__h2" style="--background-color:{{{background-color|linear-gradient(90deg, #33333f -10%, #212126 80%)}}};color:{{{color|#fff}}};margin:{{{margin|1.1em 0 0.7em 0}}};><span class="modern-title-h2">{{{1}}}</span></h2>
|h3          = <h3 class="modern-title__h3" style="color:{{{color|#fff}}};margin:{{{margin|0.9em 0 0.5em 0}}};><span class="modern-title-h2">{{{1}}}</span></h3>
}}<!--


-->{{#css:
-->{{#css:
.modern-title .mw-headline {
<!-- Заголовок h1 -->
.modern-title__h1 .mw-headline {
     min-width: clamp(50px, 20vw, 300px);
     min-width: clamp(50px, 20vw, 300px);
     padding: 2px 3%;
     padding: 2px 3%;
Строка 9: Строка 14:
}
}


.modern-title::before,
.modern-title__h1::before,
.modern-title::after {
.modern-title__h1::after {
content: "";
content: "";
flex-grow: 1;
flex-grow: 1;
Строка 16: Строка 21:
border-radius: 1px;
border-radius: 1px;
}
}
.modern-title::after {
.modern-title__h1::after {
     background: linear-gradient(90deg, var(--background-color) 85%, #ffffff00);
     background: linear-gradient(90deg, var(--background-color) 85%, #ffffff00);
     margin-left: 10px;
     margin-left: 10px;
}
}


.modern-title::before {
.modern-title__h1::before {
     background: linear-gradient(270deg, var(--background-color) 85%, #ffffff00);
     background: linear-gradient(270deg, var(--background-color) 85%, #ffffff00);
margin-right: 10px;
margin-right: 10px;
}
}


.modern-title .mw-headline {
.modern-title__h1 .mw-headline {
background-color: var(--background-color);
background-color: var(--background-color);
border-radius: 5px;
border-radius: 5px;
Строка 32: Строка 37:


@media (max-width: 600px) {
@media (max-width: 600px) {
.modern-title .mw-headline {
.modern-title__h1 .mw-headline {
width: 100% !important;
width: 100% !important;
padding: 0 !important;
padding: 0 !important;
}
}
.modern-title::before {
.modern-title__h1::before {
margin-right: 0;
margin-right: 0;
}
}
.modern-title::after {
.modern-title__h1::after {
margin-left: 0;
margin-left: 0;
}
}
Строка 45: Строка 50:


<!-- Сброс стилей -->
<!-- Сброс стилей -->
.modern-title {
.modern-title__h1 {
     border-bottom: none !important;
     border-bottom: none !important;
     font-family: 'Montserrat', sans-serif !important;
     font-family: "noto sans" !important;
font-weight: bold !important;
font-weight: bold !important;
     line-height: unset !important;
     line-height: unset !important;
     display: flex !important;
     display: flex !important;
}
}
.modern-title {
 
.modern-title__h1 {
align-items: center;
align-items: center;
justify-content: center;
justify-content: center;
Строка 58: Строка 64:


}
}
<!-- Заголовок h2 -->
.modern-title__h2 {
    font-size: 1.15rem !important;
    font-family: "noto sans" !important;
    font-weight: bold !important;
    padding: 6px;
    background: var(--background-color);
    border-radius: 0.2em;
}
<!-- Сброс стилей -->
.modern-title__h2 {
    border-bottom: none !important;
    line-height: unset !important;
}
<!-- Заголовок h3 -->
.modern-title__h3 {
    font-size: 1rem !important;
    font-weight: bold !important;
    font-family: "noto sans" !important;
}
<!-- Сброс стилей -->
}}
}}

Версия от 05:14, 29 января 2025

{{{1}}}