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

Шаблон:Main page/navigation/styles.css: различия между версиями

Материал из Aavikko
мНет описания правки
Обновление css для навигации заглавной страницы
Метка: отменено
Строка 1: Строка 1:
.home-grid {
/* ============================================
display: grid;
  Главная страница — навигация по секциям
grid: auto-flow dense/repeat( auto-fit, minmax( 9.375rem, 1fr ) );
  ============================================ */
grid-auto-rows: minmax( 3rem, auto );
grid-gap: calc(0.5 * 1rem);
}


.home-grid--col2 {
.home-nav-sections {
grid-template-columns: 1fr 1fr;
    margin-top: 1.5rem;
}
}


.home-grid a.external {
/* Заголовки секций */
background-image: none;
.home-section-title {
    font-family: 'Segoe UI', 'Inter', system-ui, sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff;
    margin: 2rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #1981d5;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
}


.home-card {
.home-section-title::before {
position: relative;
    content: '◆';
padding: 1rem;
    color: #ff6600;
background: hsl(220,25%,12%);
    font-size: 1.2rem;
border: 1px solid rgba(255,255,255,0.05);
border-radius: 8px;
box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.04 ), 0 3px 6px rgba( 0, 0, 0, 0.0575 );
font-size: 0.875rem;
}
}


.home-card table.timeline {
/* Первая секция — без верхнего отступа */
margin-top: 0.2rem;
.home-nav-sections .home-section-title:first-child {
    margin-top: 0;
}
}


.home-card--col2 {
/* ============================================
grid-column: span 2;
  Сетка карточек
}
  ============================================ */


.home-card--row3 {
.home-grid {
grid-row: span 3;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 1rem 0 2rem 0;
}
}


.home-card--row4 {
/* При ширине < 1200px — 3 колонки */
grid-row: span 4;
@media (max-width: 1200px) {
    .home-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
}


.home-card--row8 {
/* При ширине < 900px — 2 колонки */
grid-row: span 8 / auto;
@media (max-width: 900px) {
    .home-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
}


.home-card__label {
/* При ширине < 600px — 1 колонка (мобильные) */
color: #72777d;
@media (max-width: 600px) {
font-size: 0.8125rem;
    .home-grid {
letter-spacing: 0.75px;
        grid-template-columns: 1fr;
        gap: 12px;
    }
}
}


.home-card__header {
/* ============================================
color: #202122;
  Карточка
font-size: 1rem;
  ============================================ */
    font-weight: 600;
    line-height: 1.25;
}


.home-card__header a {
.home-card {
display: flex;
    position: relative;
align-items: center;
    display: flex;
justify-content: space-between;
    flex-direction: column;
    background-color: #1B232A;
    border: 1px solid #2a3641;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
}
}


.home-card__header a:after {
/* Hover-эффект */
content: '▶';
.home-card:hover {
font-size: 0.8125rem;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(25, 129, 213, 0.35), 0 0 0 1px #1981d5;
    border-color: #1981d5;
    z-index: 5;
}
}


/* Фоновое изображение */
.home-card__background {
.home-card__background {
position: absolute;
    position: absolute;
top: 0;
    top: 0; right: 0; bottom: 0; left: 0;
right: 0;
    overflow: hidden;
bottom: 0;
left: 0;
background: #242a31;
border-radius: 8px;
}
}


.home-card__background:after {
position: absolute;
top: 0;
bottom: 0;
left: 0;
    right: 0;
    display: block;
    background: linear-gradient(to right,#000,transparent);
    content: "";
}
.home-card__background picture,
.home-card__background img {
.home-card__background img {
width: 100%;
    width: 100%;
height: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
}


.home-card__background img {
.home-card:hover .home-card__background img {
object-fit: cover;
    transform: scale(1.05);
object-position: center;
}
}


.home-card__foreground {
/* Затемнение фона для читаемости текста */
position: absolute;
.home-card__background::after {
top: 0;
    content: '';
bottom: 0;
    position: absolute;
left: 0;
    top: 0; right: 0; bottom: 0; left: 0;
right: 0;
    background: linear-gradient(
padding: 1rem;
        to bottom,
display: flex;
        rgba(27, 35, 42, 0.1) 0%,
flex-direction: column;
        rgba(27, 35, 42, 0.6) 60%,
justify-content: center;
        rgba(27, 35, 42, 0.9) 100%
gap: calc(0.25 * 1rem);
    );
color: #fff;
    transition: opacity 0.2s ease;
line-height: 1.25;
}
}


.home-card__foreground .home-card__header {
.home-card:hover .home-card__background::after {
color: #fff;
    opacity: 0.85;
}
}


.home-card__foreground .home-card__label {
/* Текст-подпись */
color: #bababa;
.home-card__foreground {
}
    position: relative;
 
    z-index: 2;
.home-card p {
    margin-top: auto;
/* margin-top: calc(0.5 * 1rem); */
    padding: 12px 16px;
margin-top: calc(0 * 1rem);
    color: #ffffff;
font-size: 0.875rem;
    font-family: 'Segoe UI', 'Inter', system-ui, sans-serif;
}
    font-size: 1rem;
 
    font-weight: 600;
.home-card.home-card--button {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
overflow: hidden;
    line-height: 1.3;
padding: 0;
    display: flex;
background: #242a31;
    align-items: center;
border: 0;
    justify-content: flex-start;
}
 
 
.home-card--button a {
display: flex;
height: 100%;
justify-content: center;
align-items: center;
padding: 0 1rem;
background: transparent;
color: #fff;
font-weight: 500;
}
 
.home-card--button--navigation a {
/* display: flex; */
display: contents;
height: 100%;
justify-content: center;
align-items: center;
padding: 0 1rem;
background: transparent;
color: #fff;
font-weight: 500;
}
 
.home-card--button .home-card__background a {
padding: 0;
}
}


.home-card--button img {
.home-card__foreground span {
transition: transform 0.2s ease;
    display: inline-block;
}
}


.home-card--button:hover img {
.home-card:hover .home-card__foreground {
transform: scale(1.1);
    color: #ff9933;
}
}


.home-link {
/* ============================================
display: grid;
  Featured блок — стили (если используется)
margin-top: calc(0.5 * 1rem);
  ============================================ */
font-size: 0.875rem;
font-weight: 500;
grid-gap: calc(0.5 * 1rem);
text-align: center;
}
 
.home-link__button {
display: flex;
}
 
.home-link__button a {
flex-grow: 1;
padding: calc(0.5 * 1rem);
border: 1px solid rgba(255,255,255,0.05);
background: hsl(220,25%,15%);
border-radius: 8px;
color: #fff !important;
    line-height: 1.25;
    text-decoration: none !important;
}
 
.home-link__button a:hover {
background: hsl(220,30%,19%);
}
 
.home-link__button a:active {
background: hsl(220,30%,11%);
}


#home-content {
#home-content {
margin-top: calc(1.25 * 1rem);
    margin-top: 2rem;
}
}


.home-card .template-statsbar {
#home-content .home-grid {
margin: 0;
    grid-template-columns: 1fr;
}
}


#home-card-discord {
/* ============================================
background: #5865f2;
  Анимация появления (опционально)
}
  ============================================ */


#home-card-patreon {
.home-card {
background: #ff424d;
    animation: fadeInUp 0.4s ease backwards;
}
}


#home-card-kofi {
.home-grid .home-card:nth-child(1) { animation-delay: 0.05s; }
background: #ff5e5b;
.home-grid .home-card:nth-child(2) { animation-delay: 0.10s; }
}
.home-grid .home-card:nth-child(3) { animation-delay: 0.15s; }
.home-grid .home-card:nth-child(4) { animation-delay: 0.20s; }
.home-grid .home-card:nth-child(5) { animation-delay: 0.25s; }
.home-grid .home-card:nth-child(6) { animation-delay: 0.30s; }


#home-card-reddit {
@keyframes fadeInUp {
background: #ff4500;
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
}


.home-footer {
/* Уважение к prefers-reduced-motion */
font-size: 0.8125rem;
@media (prefers-reduced-motion: reduce) {
font-family: monospace;
    .home-card,
text-align: center;
    .home-card:hover,
    .home-card__background img,
    .home-card__background::after {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}
}


#home-nav {
/* ============================================
margin-top: 1rem;
  Поддержка светлой темы Citizen
}
  ============================================ */


#home-nav .home-card__foreground {
@media (prefers-color-scheme: light) {
     font-weight: 500;
    .home-card {
        background-color: #f8f9fa;
        border-color: #dee2e6;
    }
   
    .home-section-title {
        color: #1a1a1a;
     }
   
    .home-card__background::after {
        background: linear-gradient(
            to bottom,
            rgba(248, 249, 250, 0.1) 0%,
            rgba(248, 249, 250, 0.6) 60%,
            rgba(248, 249, 250, 0.9) 100%
        );
    }
}
}

Версия от 03:09, 24 августа 2026

/* ============================================
   Главная страница — навигация по секциям
   ============================================ */

.home-nav-sections {
    margin-top: 1.5rem;
}

/* Заголовки секций */
.home-section-title {
    font-family: 'Segoe UI', 'Inter', system-ui, sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff;
    margin: 2rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #1981d5;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.home-section-title::before {
    content: '◆';
    color: #ff6600;
    font-size: 1.2rem;
}

/* Первая секция — без верхнего отступа */
.home-nav-sections .home-section-title:first-child {
    margin-top: 0;
}

/* ============================================
   Сетка карточек
   ============================================ */

.home-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 1rem 0 2rem 0;
}

/* При ширине < 1200px — 3 колонки */
@media (max-width: 1200px) {
    .home-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* При ширине < 900px — 2 колонки */
@media (max-width: 900px) {
    .home-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* При ширине < 600px — 1 колонка (мобильные) */
@media (max-width: 600px) {
    .home-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* ============================================
   Карточка
   ============================================ */

.home-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: #1B232A;
    border: 1px solid #2a3641;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
}

/* Hover-эффект */
.home-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(25, 129, 213, 0.35), 0 0 0 1px #1981d5;
    border-color: #1981d5;
    z-index: 5;
}

/* Фоновое изображение */
.home-card__background {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    overflow: hidden;
}

.home-card__background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.home-card:hover .home-card__background img {
    transform: scale(1.05);
}

/* Затемнение фона для читаемости текста */
.home-card__background::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: linear-gradient(
        to bottom,
        rgba(27, 35, 42, 0.1) 0%,
        rgba(27, 35, 42, 0.6) 60%,
        rgba(27, 35, 42, 0.9) 100%
    );
    transition: opacity 0.2s ease;
}

.home-card:hover .home-card__background::after {
    opacity: 0.85;
}

/* Текст-подпись */
.home-card__foreground {
    position: relative;
    z-index: 2;
    margin-top: auto;
    padding: 12px 16px;
    color: #ffffff;
    font-family: 'Segoe UI', 'Inter', system-ui, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    line-height: 1.3;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.home-card__foreground span {
    display: inline-block;
}

.home-card:hover .home-card__foreground {
    color: #ff9933;
}

/* ============================================
   Featured блок — стили (если используется)
   ============================================ */

#home-content {
    margin-top: 2rem;
}

#home-content .home-grid {
    grid-template-columns: 1fr;
}

/* ============================================
   Анимация появления (опционально)
   ============================================ */

.home-card {
    animation: fadeInUp 0.4s ease backwards;
}

.home-grid .home-card:nth-child(1) { animation-delay: 0.05s; }
.home-grid .home-card:nth-child(2) { animation-delay: 0.10s; }
.home-grid .home-card:nth-child(3) { animation-delay: 0.15s; }
.home-grid .home-card:nth-child(4) { animation-delay: 0.20s; }
.home-grid .home-card:nth-child(5) { animation-delay: 0.25s; }
.home-grid .home-card:nth-child(6) { animation-delay: 0.30s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Уважение к prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .home-card,
    .home-card:hover,
    .home-card__background img,
    .home-card__background::after {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}

/* ============================================
   Поддержка светлой темы Citizen
   ============================================ */

@media (prefers-color-scheme: light) {
    .home-card {
        background-color: #f8f9fa;
        border-color: #dee2e6;
    }
    
    .home-section-title {
        color: #1a1a1a;
    }
    
    .home-card__background::after {
        background: linear-gradient(
            to bottom,
            rgba(248, 249, 250, 0.1) 0%,
            rgba(248, 249, 250, 0.6) 60%,
            rgba(248, 249, 250, 0.9) 100%
        );
    }
}