Открыть меню
Переключить меню настроек
Открыть персональное меню
Вы не представились системе
Ваш IP-адрес будет виден всем, если вы внесёте какие-либо изменения.

Шаблон:ТаблицаРолей/Тест/styles.css: различия между версиями

Материал из FIRE STATION WIKI
Нет описания правки
Нет описания правки
Строка 1: Строка 1:
/* Основные стили карточки */
.RoleTable-card {
.RoleTable-card {
     display: inline-flex;
     display: flex;
     flex-direction: column;
     flex-direction: column;
     max-width: 100%;
     max-width: 100%;
    min-width: 300px;
     margin: 0.6em 0;
    width: 100%;
     margin: 0.5em 0 5px 0;
     padding: 2px;
     padding: 2px;
     border-radius: 6px;
     border-radius: 5px;
     box-sizing: border-box;
     box-sizing: border-box;
}
}


/* Заголовок карточки */
.RoleTable-card_header {
.RoleTable-card_header {
     border-radius: 3px;
     border-radius: 3px;
     text-align: center;
     text-align: center;
    cursor: pointer;
}
}


Строка 23: Строка 18:
     justify-content: space-between;
     justify-content: space-between;
     align-items: center;
     align-items: center;
    text-align: left;
     padding: 4px 8px;
    margin: 0 6px;
     padding: 3px 0;
}
}


.RoleTable-header_icon {
.RoleTable-header_icon {
     flex: 0 0 32px;
     display: flex;
    align-items: center;
    justify-content: center;
}
}


.RoleTable-card_title {
.RoleTable-card_title {
     margin: 6px 0;
     margin: 0 !important;
     color: white;
     color :white;
     font-size: 16px;
     font-size: 14px;
    font-weight: bold;
     text-align: center;
     text-align: center;
     flex-grow: 1;
     flex-grow: 1;
Строка 41: Строка 37:


.RoleTable-card_title a {
.RoleTable-card_title a {
color: white !important;
    color: white !important;
}
}


/* Основное содержимое */
.RoleTable-card_content {
.RoleTable-card_content {
     margin-top: 3px;
     margin-top: 3px;
Строка 52: Строка 47:
.RoleTable-content_main {
.RoleTable-content_main {
     padding: 8px;
     padding: 8px;
     display: grid;
     display: flex;
     grid-template-columns: repeat(5, 1fr); /* Ровно 5 равных колонок в ряд */
     flex-wrap: wrap;
     gap: 8px;              
    justify-content: center;                        
     gap: 8px;                                        
     border-radius: 3px;
     border-radius: 3px;
    box-sizing: border-box;
     width: 100%;
     width: 100%;
     box-sizing: border-box;
     background-color: rgba(0, 0, 0, 0.15);  
}
 
/* ИСПРАВЛЕНО: Безопасные размеры для карточек ролей внутри Grid */
.cardRole {
    width: 100% !important;   
    max-width: 100% !important;
    min-width: 0 !important;   
    box-sizing: border-box;
}
 
/* ФИШКА: Если во втором ряду остается одна карточка (например, 6-я), она автоматически встанет по центру */
.RoleTable-content_main > .cardRole:last-child:nth-child(5n+1) {
    grid-column: 3;
}
}


/* Вторичное содержимое */
.RoleTable-content_secondary {
.RoleTable-content_secondary {
     display: grid;
     display: grid;
Строка 89: Строка 72:
.RoleTable-content_block {
.RoleTable-content_block {
     border-radius: 3px;
     border-radius: 3px;
     padding: 0 5px;
     padding: 6px;
     min-width: 0;
    font-size: 12px;
     background-color: rgba(0, 0, 0, 0.1);
}
}


.RoleTable-block_title {
.RoleTable-block_title {
     font-weight: bold;
     font-weight: bold;
     white-space: nowrap;
     font-size: 12px;
    margin-bottom: 2px;
}
 
.RoleTable-block_content {
    padding: 0;
    line-height: 1.3;
}
 
.RoleTable-content_main > p,
.RoleTable-content_secondary > p {
    display: contents !important;
}
 
.RoleTable-content_main > br,
.RoleTable-content_main > p > br,
.RoleTable-content_secondary > br,
.RoleTable-content_secondary > p > br {
    display: none !important;
}
 
.cardRole {
    display: flex;
    flex-direction: column;
    width: 120px !important;     
    max-width: 120px !important;
    min-width: 120px !important;
    border-radius: 4px;
    box-sizing: border-box;
    height: 125px !important;               
     overflow: hidden;
     overflow: hidden;
     text-overflow: ellipsis;
     background-color: rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}
 
.card_headerRole {
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 4px;
    box-sizing: border-box;
}
}


.RoleTable-block_content {
.card_header_titleRole p {
     padding: 2px 0;
    margin: 0 !important;
     padding: 0 !important;
    font-size: 11px;
    font-weight: bold;
    line-height: 1.1;
    text-align: center;
}
}


.RoleTable-block_content p {
.title_textRole {
margin: 0;
    color: white;
}
}


/* Полная гибкость для любых картинок */
.card_imageRole {
.card_imageRole {
     width: 100%;
     flex-grow: 1;
     display: flex;
     display: flex;
    align-items: center;
     justify-content: center;
     justify-content: center;
     align-items: center;
     background-color: transparent;
     padding: 5px;
     padding: 4px;
     box-sizing: border-box;
     box-sizing: border-box;
}
}


.card_imageRole img {
.card_imageRole img {
     width: 100% !important;    
     max-width: 64px !important;
     height: auto !important;  
     max-height: 64px !important;
    max-width: 128px;         
     object-fit: contain;
     object-fit: contain;      
}
}


/* Адаптация для мобильных телефонов */
.fixed_imageRole {
@media (max-width: 768px) {
     padding: 2px !important;
    .RoleTable-content_main {
        grid-template-columns: repeat(3, 1fr); /* На планшетах по 3 в ряд */
    }
     .RoleTable-content_main > .cardRole:last-child:nth-child(5n+1) {
        grid-column: auto;  
    }
}
}


@media (max-width: 480px) {
@media (max-width: 480px) {
     .RoleTable-content_main {
     .RoleTable-content_main {
         grid-template-columns: repeat(2, 1fr); /* На телефонах по 2 в ряд */
         justify-content: center;
     }
     }
    .cardRole {
        width: calc(50% - 8px) !important;
        max-width: 100% !important;
        min-width: 100px !important;
            }
     .RoleTable-content_secondary {
     .RoleTable-content_secondary {
         grid-template-columns: 1fr;
         grid-template-columns: 1fr;
     }
     }
}
}

Версия от 17:51, 23 июня 2026

.RoleTable-card {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    margin: 0.6em 0;
    padding: 2px;
    border-radius: 5px;
    box-sizing: border-box;
}

.RoleTable-card_header {
    border-radius: 3px;
    text-align: center;
}

.RoleTable-card_header_title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 8px;
}

.RoleTable-header_icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.RoleTable-card_title {
    margin: 0 !important;
    color :white;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    flex-grow: 1;
}

.RoleTable-card_title a {
    color: white !important;
}

.RoleTable-card_content {
    margin-top: 3px;
    width: 100%;
}

.RoleTable-content_main {
    padding: 8px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;                          
    gap: 8px;                                         
    border-radius: 3px;
    box-sizing: border-box; 
    width: 100%;
    background-color: rgba(0, 0, 0, 0.15); 
}

.RoleTable-content_secondary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3px;
    margin-top: 3px;
    width: 100%;
    box-sizing: border-box;
}

.RoleTable-content_secondary > .RoleTable-content_block:only-child {
    grid-column: 1 / -1;
}

.RoleTable-content_block {
    border-radius: 3px;
    padding: 6px;
    font-size: 12px;
    background-color: rgba(0, 0, 0, 0.1);
}

.RoleTable-block_title {
    font-weight: bold;
    font-size: 12px;
    margin-bottom: 2px;
}

.RoleTable-block_content {
    padding: 0;
    line-height: 1.3;
}

.RoleTable-content_main > p,
.RoleTable-content_secondary > p {
    display: contents !important;
}

.RoleTable-content_main > br,
.RoleTable-content_main > p > br,
.RoleTable-content_secondary > br,
.RoleTable-content_secondary > p > br {
    display: none !important;
}

.cardRole {
    display: flex;
    flex-direction: column;
    width: 120px !important;      
    max-width: 120px !important;
    min-width: 120px !important;
    border-radius: 4px;
    box-sizing: border-box;
    height: 125px !important;                
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.2); 
    flex-shrink: 0;
}

.card_headerRole {
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 4px;
    box-sizing: border-box;
}

.card_header_titleRole p {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 11px;
    font-weight: bold;
    line-height: 1.1;
    text-align: center;
}

.title_textRole {
    color: white;
}

.card_imageRole {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    padding: 4px;
    box-sizing: border-box;
}

.card_imageRole img {
    max-width: 64px !important;  
    max-height: 64px !important;
    object-fit: contain;
}

.fixed_imageRole {
    padding: 2px !important;
}

@media (max-width: 480px) {
    .RoleTable-content_main {
        justify-content: center;
    }
    .cardRole {
        width: calc(50% - 8px) !important;
        max-width: 100% !important;
        min-width: 100px !important;
            }
    .RoleTable-content_secondary {
        grid-template-columns: 1fr;
    }
}