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

Материал из Space Station 14 Вики
мНет описания правки
мНет описания правки
 
(не показано 56 промежуточных версий этого же участника)
Строка 1: Строка 1:
<div class="rules__container"
<div class="rules-box__block" style="background-color:{{{background-color|#282831}}};box-shadow:{{{box-shadow|0 2px 4px rgba(0, 0, 0, 0.3)}}};margin:{{{margin|12px 2px}}};border-left:{{{border-size|5px}}} solid {{{border-color|#404051}}};padding:{{{padding|10px 12px}}};color:{{{color|lightgrey}}};>
style="
<div class="rules-box__container">
margin: {{{margin|14px 2px}}};
{{#if: {{{title|}}}  | <div class="rules-box__title" style="margin-bottom:{{{margin-bottom-title|8px}}};>'''{{{title}}}'''</div>}}
text-align: {{{text-align|left}}};
{{#if: {{{content|}}} | <div class="rules-box__content list-reset-margin">{{{content}}}</div>}}
border-left: 4px solid {{{border-color|#2B30BD}}};
</div>
">
{{#ifeq: {{{1|}}} | addition |
<div class="rules__title"
<div class="rules-box__container--addition mw-collapsible mw-collapsed">
style="
<div class="rules-box__title--addition"><span style="white-space: nowrap;">'''{{{title-addition}}}'''</span></div>
color: {{{color|white}}};
<div class="rules-box__content--addition mw-collapsible-content no-margin-edges short-scrollbar">{{{content-addition}}}</div>
">'''{{{title}}}'''</div>
</div>
<div class="rules__content"
}}
style="
</div><!--
color: {{{color|white}}};
 
">{{{content}}}</div>
-->{{#css:
</div>
.rules-box__block {
<!-- Не изменяемый CSS -->
position: relative;
<div class="customCSS" style="display:none">
display: flex;
.rules__container {
justify-content: space-between;
padding: 12px;
text-align: left;
background: #27272e;
border-radius: 0.3em;
border-radius: 0.3em;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
}
.rules__container:hover {
 
background-color: #26262C;
.rules-box__container {
}
}
.rules__title {
 
font-size: 1.3em;
.rules-box__title {
font-size: 1.2em;
}
}
.rules__content {
 
.rules-box__content {
 
}
 
.rules-box__title--addition {
font-size: 1em;
display: flex;
align-items: center;
}
 
.rules-box__container--addition {
position: absolute;
display: flex;
flex-direction: column;
max-height: 85%;
top: 0;
right: 0;
width: min(35%, 300px);
padding: 10px 12px;
border-radius: 0.3em;
background-color: #34343f;
border-left: 4px solid #434353;
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2);
transition: background-color 0.3s ease;
}
 
.rules-box__content--addition {
flex-grow: 1;
overflow-y: auto;
margin-top: 10px;
margin-top: 10px;
}
}
.rules__content li {
 
margin-bottom: 15px;
.mw-collapsible-toggle {
position: absolute;
top: 12px;
right: 12px;
}
 
@media (max-width: 700px) {
.rules-box__block {
flex-direction: column;
margin: 20px 0;
}
.rules-box__container--addition {
position: static;
display: block;
box-sizing: border-box;
width: 100%;
border-left: none;
box-shadow: none;
margin-top: 20px;
}
.rules-box__container--addition:hover {
background-color: #33333b;
}
.rules-box__block:hover {
background-color: #27272e;
box-shadow: 0 4px 2px rgba(0, 0, 0, 0.15);
}
.mw-collapsible-toggle {
position: static;
top: 12px;
right: 12px;
}
}
}
</div>
}}

Текущая версия от 00:53, 19 января 2025