Шаблон:CategoryMenu/styles.css: различия между версиями
Материал из Space Station 14 Вики
Pok (обсуждение | вклад) мНет описания правки |
Pok (обсуждение | вклад) Нет описания правки |
||
Строка 1: | Строка 1: | ||
/* Весь блок */ | /* Весь блок */ | ||
. | .navigation { | ||
display: grid; | display: grid; | ||
grid-template-columns: 1fr 5fr; | grid-template-columns: 1fr 5fr; | ||
grid-template-rows: auto auto; | grid-template-rows: auto auto; | ||
gap: 10px; | gap: 10px; | ||
border: 2px solid #494959; | border: 2px solid #494959; | ||
border-radius: 0.3em; | border-radius: 0.3em; | ||
padding: 12px 10px; | padding: 12px 10px; | ||
box-sizing: border-box; | box-sizing: border-box; | ||
overflow: hidden; | |||
background-color: #34343f; | |||
color: #e1e1e1; | color: #e1e1e1; | ||
} | } | ||
. | .navigation p { | ||
color: #e1e1e1; | color: #e1e1e1; | ||
} | } | ||
/* Категории */ | /* Категории */ | ||
. | .navigation__switcher { | ||
display: flex; | display: flex; | ||
justify-content: space-between; | justify-content: space-between; | ||
align-items: center; | align-items: center; | ||
padding: 8px 12px; | |||
border-bottom: 3px solid #202029; | border-bottom: 3px solid #202029; | ||
border-radius: 0.2em; | border-radius: 0.2em; | ||
font-family: "noto sans"; | font-family: "noto sans"; | ||
background: #2b2b35; | |||
} | } | ||
/* Стрелки */ | /* Стрелки */ | ||
. | .navigation__arrow { | ||
cursor: pointer; | cursor: pointer; | ||
color: #c3c3c9; | color: #c3c3c9; | ||
Строка 38: | Строка 41: | ||
} | } | ||
. | .navigation__arrow.disabled { | ||
color: #7d7d81; | color: #7d7d81; | ||
cursor: default; | cursor: default; | ||
} | } | ||
. | /* Категории */ | ||
.navigation__categories { | |||
position: relative; | position: relative; | ||
width: 100%; | width: 100%; | ||
Строка 53: | Строка 57: | ||
} | } | ||
. | .navigation__categories > div { | ||
display: none; | display: none; | ||
font-weight: bold; | font-weight: bold; | ||
Строка 59: | Строка 63: | ||
} | } | ||
. | .navigation__categories div.active { | ||
display: block; /* Отображаем активную категорию */ | display: block; /* Отображаем активную категорию */ | ||
} | } | ||
/* Меню */ | /* Меню */ | ||
. | .navigation__menu { | ||
grid-column: 1; | grid-column: 1; | ||
grid-row: 2; | grid-row: 2; | ||
Строка 73: | Строка 77: | ||
} | } | ||
. | .navigation__menu > div { | ||
cursor: pointer; | cursor: pointer; | ||
padding: 14px 12px; | padding: 14px 12px; | ||
border-radius: 0.4em; | border-radius: 0.4em; | ||
font-size: 15px; | font-size: 15px; | ||
font-family: 'noto sans'; | 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 2px 4px 0px rgba(0,0,0,0.3); | box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.3); | ||
background-color: #4d4d5d; | |||
color: #e7e6e6; | |||
} | } | ||
. | .navigation__menu > div:not(:last-child) { | ||
margin-bottom: 8px; | margin-bottom: 8px; | ||
} | } | ||
. | .navigation__menu > div:hover { | ||
background-color: #525263; | background-color: #525263; | ||
} | } | ||
. | .navigation__menu > div.active { | ||
border-left: 5px solid #6d6d7f; | border-left: 5px solid #6d6d7f; | ||
} | } | ||
. | .navigation__menu { | ||
display: none; /* Скрываем меню, если категория не выбрана */ | display: none; /* Скрываем меню, если категория не выбрана */ | ||
} | } | ||
. | .navigation__menu.active { | ||
display: block; /* Отображаем активное меню */ | display: block; /* Отображаем активное меню */ | ||
} | } | ||
. | /* Контент */ | ||
.navigation__content { | |||
grid-column: 2; | grid-column: 2; | ||
grid-row: 1 / 3; | grid-row: 1 / 3; | ||
Строка 113: | Строка 119: | ||
padding: 12px; | padding: 12px; | ||
width: 100%; | width: 100%; | ||
min-height: 400px; | min-height: 400px; | ||
overflow: auto; | overflow: auto; | ||
box-sizing: border-box; | box-sizing: border-box; | ||
overflow-x: hidden; | |||
border-radius: 0.3em; | |||
background-color: #4b4b59; | |||
box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.5); | box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.5); | ||
} | } | ||
. | .navigation__content > div { | ||
display: none; | display: none; | ||
} | } | ||
. | .navigation__content .active { | ||
display: block; | display: block; | ||
} | } | ||
. | .navigation__menu-toggle { | ||
display: none; | display: none; | ||
} | } | ||
@media (max-width: 900px) { | @media (max-width: 900px) { | ||
. | .navigation { | ||
grid-template-columns: 1fr 1fr; | grid-template-columns: 1fr 1fr; | ||
position: relative; | |||
padding: 12px 10px; | |||
overflow: hidden; | |||
box-sizing: border-box; | |||
} | } | ||
/* Кнопка отображения меню */ | /* Кнопка отображения меню */ | ||
. | .navigation__menu-toggle { | ||
position: absolute; | position: absolute; | ||
display: block; | display: block; | ||
top: | top: 75px; | ||
left: 15px; | left: 15px; | ||
padding: 6px 10px; | padding: 6px 10px; | ||
z-index: 2; | z-index: 2; | ||
cursor: pointer; | cursor: pointer; | ||
font-size: 1em; | font-size: 1em; | ||
font-weight: bold; | font-weight: bold; | ||
color: #d0d0d0; | color: #d0d0d0; | ||
margin: 4px; | margin: 4px; | ||
box-shadow: 0px 1px 1px 0px rgba(0,0,0,0.7); | |||
background-color: #323241; | |||
border-radius: 0.2em; | |||
box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.7); | |||
transition: left 0.3s; | transition: left 0.3s; | ||
} | } | ||
. | .navigation__menu-toggle.active { | ||
left: 72%; | left: 72%; | ||
} | } | ||
. | .navigation__switcher { | ||
grid-column: 1 / 3; | grid-column: 1 / 3; | ||
padding: 10px 12px; | padding: 10px 12px; | ||
} | } | ||
. | .navigation__categories > div { | ||
font-size: 0.9em; | font-size: 0.9em; | ||
} | } | ||
. | .navigation__arrow { | ||
font-size: 1.1em; | font-size: 1.1em; | ||
} | } | ||
. | .navigation__menu { | ||
grid-column: 1 / 3; | grid-column: 1 / 3; | ||
grid-row: 2; | grid-row: 2; | ||
width: calc(70%); | |||
height: max-content; | |||
padding: 10px; | |||
top: 8px; | |||
left: 8px; | |||
max-height: 350px; | max-height: 350px; | ||
position: absolute; | position: absolute; | ||
transform: translateX(-200%); | transform: translateX(-200%); | ||
background: #353541; | |||
border: 2px solid #494959; | border: 2px solid #494959; | ||
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); | ||
Строка 204: | Строка 207: | ||
} | } | ||
. | .navigation__menu.active { | ||
transform: translateX(0); | transform: translateX(0); | ||
} | } | ||
. | .navigation__menu > div { | ||
padding: 10px 8px; | padding: 10px 8px; | ||
font-size: 14px; | font-size: 14px; | ||
Строка 214: | Строка 217: | ||
} | } | ||
. | .navigation__content { | ||
grid-row: 2; | grid-row: 2; | ||
grid-column: 1 / 3; | grid-column: 1 / 3; |
Версия от 21:09, 4 октября 2024
/* Весь блок */ .navigation { display: grid; grid-template-columns: 1fr 5fr; grid-template-rows: auto auto; gap: 10px; border: 2px solid #494959; border-radius: 0.3em; padding: 12px 10px; box-sizing: border-box; overflow: hidden; background-color: #34343f; color: #e1e1e1; } .navigation p { color: #e1e1e1; } /* Категории */ .navigation__switcher { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-bottom: 3px solid #202029; border-radius: 0.2em; font-family: "noto sans"; background: #2b2b35; } /* Стрелки */ .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 { grid-column: 1; grid-row: 2; height: 450px; overflow-y: auto; box-sizing: border-box; padding: 0 2px 4px 2px; } .navigation__menu > div { cursor: pointer; padding: 14px 12px; 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 2px 4px 0px rgba(0, 0, 0, 0.3); background-color: #4d4d5d; color: #e7e6e6; } .navigation__menu > div:not(:last-child) { margin-bottom: 8px; } .navigation__menu > div:hover { background-color: #525263; } .navigation__menu > div.active { border-left: 5px solid #6d6d7f; } .navigation__menu { display: none; /* Скрываем меню, если категория не выбрана */ } .navigation__menu.active { display: block; /* Отображаем активное меню */ } /* Контент */ .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: #4b4b59; box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.5); } .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: 6px 10px; z-index: 2; cursor: pointer; font-size: 1em; font-weight: bold; color: #d0d0d0; margin: 4px; background-color: #323241; border-radius: 0.2em; box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.7); 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 { grid-column: 1 / 3; grid-row: 2; width: calc(70%); height: max-content; padding: 10px; top: 8px; left: 8px; max-height: 350px; position: absolute; transform: translateX(-200%); background: #353541; border: 2px solid #494959; border-radius: 0.5em; box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.8); z-index: 1; transition: transform 0.3s; } .navigation__menu.active { transform: translateX(0); } .navigation__menu > 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; } }