Шаблон:CategoryMenu/styles.css
Материал из Space Station 14 Вики
/* Весь блок */ .navigation { display: grid; grid-template-columns: 1fr 5fr; grid-template-rows: auto auto; gap: 8px; border: 2px solid #494959; border-radius: 0.3em; padding: 12px 10px; box-sizing: border-box; overflow: hidden; background-color: #32323d; color: #e1e1e1; } .navigation p { color: #e1e1e1; } /* Категории */ .navigation__switcher { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-bottom: 3px solid #1f1f27; border-radius: 0.2em; font-family: "noto sans"; background: #292933; } /* Стрелки */ .navigation__arrow { cursor: pointer; color: #c3c3c9; font-size: 1.4em; } .navigation__arrow.disabled { color: #7d7d81; cursor: default; } /* Категории */ .navigation__categories { position: relative; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; overflow: hidden; } .navigation__categories > div { display: none; font-weight: bold; font-size: 1em; } .navigation__categories div.active { display: block; /* Отображаем активную категорию */ } /* Меню */ .navigation__menu-container { grid-column: 1; grid-row: 2; height: 460px; overflow-y: auto; box-sizing: border-box; padding: 0 2px 2px 2px; } .navigation__menu-item { display: none; /* Скрытие меню, если категория не выбрана */ } .navigation__menu-item.active { display: grid; /* Отображение активное меню */ gap: 0.5em; } .navigation__menu-item > div { cursor: pointer; padding: 12px 10px; border-radius: 0.4em; font-size: 15px; font-family: "noto sans"; font-weight: bold; box-sizing: border-box; transition: all 0.05s; box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.3); background-color: #484857; color: #e7e6e6; border-top: 1px solid #5f5f6b; border-left: 1px solid #5f5f6b; border-bottom: 1px solid #2d2d37; border-right: 1px solid #2d2d37; } .navigation__menu-item > div:hover { background-color: #4d4d5d; } .navigation__menu-item > div.active { border-left: 5px solid #606073; } /* Контент */ .navigation__content { grid-column: 2; grid-row: 1 / 3; height: 515px; padding: 12px; width: 100%; min-height: 400px; overflow: auto; box-sizing: border-box; overflow-x: hidden; border-radius: 0.3em; background-color: #494957; box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.3); } .navigation__content > div { display: none; } .navigation__content .active { display: block; } .navigation__menu-toggle { display: none; } @media (max-width: 900px) { .navigation { grid-template-columns: 1fr 1fr; position: relative; padding: 12px 10px; overflow: hidden; box-sizing: border-box; } /* Кнопка отображения меню */ .navigation__menu-toggle { position: absolute; display: block; top: 75px; left: 15px; padding: 5px 10px; z-index: 2; cursor: pointer; margin: 4px; background-color: #2b2b35; border-bottom: 3px solid #202029; border-radius: 0.2em; transition: left 0.3s; } .navigation__menu-toggle.active { left: 72%; } .navigation__switcher { grid-column: 1 / 3; padding: 10px 12px; } .navigation__categories > div { font-size: 0.9em; } .navigation__arrow { font-size: 1.1em; } .navigation__menu-container { grid-column: 1 / 3; grid-row: 2; width: calc(70%); height: max-content; padding: 8px 6px; top: 8px; left: 8px; max-height: 340px; position: absolute; transform: translateX(-200%); background: #353541; border: 2px solid #5c5c6d; border-radius: 0.5em; box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.8), inset 0px 2px 4px 0px rgba(0, 0, 0, 0.3); z-index: 1; transition: transform 0.3s; } .navigation__menu-container.active { transform: translateX(0); } .navigation__menu-item > div { padding: 10px 8px; font-size: 14px; box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.3); } .navigation__content { grid-row: 2; grid-column: 1 / 3; width: 100%; margin-left: 0; } }