Шаблон:CategoryMenu/styles.css: различия между версиями
Материал из Space Station 14 Вики
Pok (обсуждение | вклад) мНет описания правки |
Pok (обсуждение | вклад) мНет описания правки |
||
(не показаны 4 промежуточные версии этого же участника) | |||
Строка 4: | Строка 4: | ||
grid-template-columns: 1fr 5fr; | grid-template-columns: 1fr 5fr; | ||
grid-template-rows: auto auto; | grid-template-rows: auto auto; | ||
gap: | gap: 8px; | ||
border: 2px solid #494959; | border: 2px solid #494959; | ||
border-radius: 0.3em; | border-radius: 0.3em; | ||
Строка 11: | Строка 11: | ||
box-sizing: border-box; | box-sizing: border-box; | ||
overflow: hidden; | overflow: hidden; | ||
background-color: # | background-color: #32323d; | ||
color: #e1e1e1; | color: #e1e1e1; | ||
} | } | ||
Строка 25: | Строка 25: | ||
justify-content: space-between; | justify-content: space-between; | ||
align-items: center; | align-items: center; | ||
padding: 8px | padding: 8px 10px; | ||
border-bottom: 3px solid # | border-bottom: 3px solid #1f1f27; | ||
border-radius: 0.2em; | border-radius: 0.2em; | ||
font-family: "noto sans"; | font-family: "noto sans"; | ||
background: # | background: #292933; | ||
} | } | ||
Строка 71: | Строка 71: | ||
grid-column: 1; | grid-column: 1; | ||
grid-row: 2; | grid-row: 2; | ||
height: | height: 460px; | ||
overflow-y: auto; | overflow-y: auto; | ||
box-sizing: border-box; | box-sizing: border-box; | ||
padding: 0 2px | padding: 0 2px 2px 2px; | ||
} | } | ||
.navigation__menu-item { | .navigation__menu-item { | ||
display: none; /* | display: none; /* Скрытие меню, если категория не выбрана */ | ||
} | } | ||
.navigation__menu-item.active { | .navigation__menu-item.active { | ||
display: | display: grid; /* Отображение активное меню */ | ||
gap: 0.5em; | |||
} | } | ||
.navigation__menu-item > div { | .navigation__menu-item > div { | ||
cursor: pointer; | cursor: pointer; | ||
padding: | padding: 12px 10px; | ||
border-radius: 0.4em; | border-radius: 0.4em; | ||
font-size: 15px; | font-size: 15px; | ||
font-family: | font-family: "noto sans"; | ||
font-weight: bold; | font-weight: bold; | ||
box-sizing: border-box; | box-sizing: border-box; | ||
transition: all 0.05s; | transition: all 0.05s; | ||
box-shadow: 0px | box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.3); | ||
background-color: # | background-color: #484857; | ||
color: #e7e6e6; | 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 { | .navigation__menu-item > div:hover { | ||
background-color: # | background-color: #4d4d5d; | ||
} | } | ||
.navigation__menu-item > div.active { | .navigation__menu-item > div.active { | ||
border-left: 5px solid # | border-left: 5px solid #606073; | ||
} | } | ||
Строка 124: | Строка 125: | ||
overflow-x: hidden; | overflow-x: hidden; | ||
border-radius: 0.3em; | border-radius: 0.3em; | ||
background-color: # | background-color: #494957; | ||
box-shadow: 0px 2px | box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.3); | ||
} | } | ||
Строка 156: | Строка 157: | ||
top: 75px; | top: 75px; | ||
left: 15px; | left: 15px; | ||
padding: | padding: 5px 10px; | ||
z-index: 2; | z-index: 2; | ||
cursor: pointer; | cursor: pointer; | ||
margin: 4px; | margin: 4px; | ||
background-color: # | background-color: #2b2b35; | ||
border-bottom: 3px solid #202029; | |||
border-radius: 0.2em; | border-radius: 0.2em; | ||
transition: left 0.3s; | transition: left 0.3s; | ||
} | } | ||
Строка 192: | Строка 190: | ||
width: calc(70%); | width: calc(70%); | ||
height: max-content; | height: max-content; | ||
padding: | padding: 8px 6px; | ||
top: 8px; | top: 8px; | ||
left: 8px; | left: 8px; | ||
max-height: | max-height: 340px; | ||
position: absolute; | position: absolute; | ||
transform: translateX(-200%); | transform: translateX(-200%); | ||
background: #353541; | |||
border: 2px solid # | border: 2px solid #5c5c6d; | ||
border-radius: 0.5em; | border-radius: 0.5em; | ||
box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.8); | 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; | z-index: 1; | ||
transition: transform 0.3s; | transition: transform 0.3s; |
Текущая версия от 18:24, 19 октября 2024
/* Весь блок */ .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; } }