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

Материал из Space Station 14 Вики
мНет описания правки
мНет описания правки
(не показано 46 промежуточных версий этого же участника)
Строка 1: Строка 1:
.category-menu {
.category-menu {
border: 2px solid #464a59;
border: 2px solid #494959;
border-radius: 0.3em;
border-radius: 0.3em;
background-color: #33333d;
background-color: #34343f;
overflow: hidden;
overflow: hidden;
padding: 12px 10px;
padding: 12px 10px;
box-sizing: border-box;
box-sizing: border-box;
color: #e1e0e0;
color: #e1e1e1;
}
}


.category-menu p {
.category-menu p {
color: #e1e0e0;
color: #e1e1e1;
}
}


/* Категории */
.main-container {
.main-container {
display: flex;
display: flex;
Строка 19: Строка 18:
}
}


/* Общие стили для категорий */
.categories {
.categories {
position: relative;
width: 100%;
height: 100%;
display: flex;
display: flex;
justify-content: center;
justify-content: center;
padding: 6px;
align-items: center;
overflow: hidden;
}
 
.categories div {
display: none;
display: none;
font-weight: bold;
font-size: 1em;
}
/* Отображаем активную категорию */
.categories div.active {
display: block;
}
}


.categories div {
.arrow {
cursor: pointer;
cursor: pointer;
padding: 10px 20px;
color: #d9d9d9;
margin: 0 8px;
font-size: 1.4em;
background-color: #43434d;
border-radius: 0.3em;
}
}


.categories .active {
.category-switcher {
background-color: #717483; /* Выделение активного пункта меню */
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 8px;
background: #2d2d37;
border-bottom: 3px solid #22222b;
border-radius: 0.2em;
padding: 10px 12px;
}
}


/* Меню слева */
/* Меню */
.menu-container {
.menu-container {
width: 300px;
width: 300px;
max-height: 500px;
overflow-y: auto;
overflow-y: auto;
padding: 2px;
padding: 2px;
padding-right: 5px;
padding-right: 5px;
box-sizing: border-box;
}
}


.menu div {
.menu div {
cursor: pointer;
cursor: pointer;
padding: 12px 10px;
padding: 14px 12px;
background-color: #515161;
background-color: #4a4a59;
color: #d7d7d7;
border-radius: 0.3em;
border-radius: 0.3em;
font-size: 15px;
font-size: 15.5px;
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 5px 0px rgba(0, 0, 0, 0.3);
box-shadow: 0px 2px 4px 0px rgba(0,0,0,0.4);
}
}
.menu div:not(:last-child) {
.menu div:not(:last-child) {
margin-bottom: 8px;
margin-bottom: 8px;
}
.menu div:hover {
background-color: #4d4d5d;
}
.menu div.active {
border-left: 4px solid #6b6b7d;
}
}


.menu {
.menu {
display: none; /* Скрываем меню, если категория не выбрана */
display: none; /* Скрываем меню, если категория не выбрана */
}
.menu div:hover {
background-color: #575767;
}
}


Строка 76: Строка 100:
}
}


.menu .active {
outline: 2px solid #7b7e8f;
}
/* Контент */
.content {
.content {
padding: 10px;
padding: 12px;
width: 100%;
width: 100%;
background-color: #494957;
background-color: #4b4b59;
border-radius: 0.3em;
border-radius: 0.3em;
min-height: 150px;
min-height: 400px;
max-height: 500px;
overflow: auto;
overflow: auto;
box-sizing: border-box;
box-sizing: border-box;
margin-left: 12px;
margin-left: 12px;
box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.4);
box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.5);
overflow-x: hidden;
overflow-x: hidden;
}
.content, .menu-container {
max-height: 500px;
}
}


Строка 108: Строка 130:


@media (max-width: 800px) {
@media (max-width: 800px) {
    .menu-container {
.menu div{
        position: absolute;
padding: 10px 6px;
        left: -300px;
font-size: 13px;
        top: 0;
}
        width: 300px;
        height: 100%;
.category-menu {
        background-color: #33333d;
position: relative;
        transition: left 0.3s ease;
padding: 12px 10px;
        z-index: 1;
overflow: hidden;
    }
box-sizing: border-box;
}


    .menu-container.active {
.menu-container {
        left: 0;
position: absolute;
    }
width: calc(50% - 20px);
transform: translateX(-400px);
transition: transform 0.3s ease;
z-index: 1;
}


    .menu-toggle {
.menu-toggle {
        display: block;
position: absolute;
        cursor: pointer;
display: block;
        padding: 10px;
left: 10px;  
        background-color: #333;
padding: 6px 10px;
        color: #fff;
background-color: #323241;
        border: none;
z-index: 2;
        font-size: 24px;
cursor: pointer;
        position: absolute;
border-radius: 0.2em;
        top: 10px;
font-size: 1em;
        left: 10px;
font-weight: bold;
        z-index: 2;
color: #d0d0d0;
    }
margin: 4px;
box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.7);
transition: left 0.3s ease;  
}


    .category-menu {
.menu-toggle.active {
        position: relative;
left: 50%;  
        overflow: hidden;
}
    }


    .content {
.menu-container.active {
        position: relative;
transform: translateX(0); /* Меню плавно сдвигается в поле зрения */
        z-index: 0;  
}
        margin-left: 0px;
 
    }
.content {
width: 100%;
margin-left: 0;
transition: margin-left 0.3s ease;
}
 
.menu-container.active ~ .content {
margin-left: 50%;
}
.category-switcher {
    padding: 8px 10px;
}
.categories div {
font-size: 0.9em;
}
.arrow {
font-size: 1.1em;
}
}
}

Версия от 21:34, 28 сентября 2024

.category-menu {
	border: 2px solid #494959;
	border-radius: 0.3em;
	background-color: #34343f;
	overflow: hidden;
	padding: 12px 10px;
	box-sizing: border-box;
	color: #e1e1e1;
}

.category-menu p {
	color: #e1e1e1;
}

.main-container {
	display: flex;
	width: 100%;
}

/* Общие стили для категорий */
.categories {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	overflow: hidden;
}

.categories div {
	display: none;
	font-weight: bold;
	font-size: 1em;
}

/* Отображаем активную категорию */
.categories div.active {
	display: block;
}

.arrow {
	cursor: pointer;
	color: #d9d9d9;
	font-size: 1.4em;
}

.category-switcher {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
	background: #2d2d37;
	border-bottom: 3px solid #22222b;
	border-radius: 0.2em;
	padding: 10px 12px;
}

/* Меню */
.menu-container {
	width: 300px;
	overflow-y: auto;
	padding: 2px;
	padding-right: 5px;
	box-sizing: border-box;
}

.menu div {
	cursor: pointer;
	padding: 14px 12px;
	background-color: #4a4a59;
	color: #d7d7d7;
	border-radius: 0.3em;
	font-size: 15.5px;
	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.4);
}

.menu div:not(:last-child) {
	margin-bottom: 8px;
}

.menu div:hover {
	background-color: #4d4d5d;
}

.menu div.active {
	border-left: 4px solid #6b6b7d;
}

.menu {
	display: none; /* Скрываем меню, если категория не выбрана */
}

.menu.active {
	display: block; /* Отображаем активное меню */
}

.content {
	padding: 12px;
	width: 100%;
	background-color: #4b4b59;
	border-radius: 0.3em;
	min-height: 400px;
	overflow: auto;
	box-sizing: border-box;
	margin-left: 12px;
	box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.5);
	overflow-x: hidden;
}

.content, .menu-container {
	max-height: 500px;
}

.content > div {
	display: none;
}

.content .active {
	display: block;
}

.menu-toggle {
	display: none;
}

@media (max-width: 800px) {
	.menu div{
		padding: 10px 6px;
		font-size: 13px;
	}
	
	.category-menu {
		position: relative;
		padding: 12px 10px;
		overflow: hidden;
		box-sizing: border-box;
	}

	.menu-container {
		position: absolute;
		width: calc(50% - 20px);
		transform: translateX(-400px);
		transition: transform 0.3s ease;
		z-index: 1;
	}

	.menu-toggle {
		position: absolute;
		display: block;
		left: 10px; 
		padding: 6px 10px;
		background-color: #323241;
		z-index: 2;
		cursor: pointer;
		border-radius: 0.2em;
		font-size: 1em;
		font-weight: bold;
		color: #d0d0d0;
		margin: 4px;
		box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.7);
		transition: left 0.3s ease; 
	}

	.menu-toggle.active {
		left: 50%; 
	}

	.menu-container.active {
		transform: translateX(0); /* Меню плавно сдвигается в поле зрения */
	}

	.content {
		width: 100%;
		margin-left: 0;
		transition: margin-left 0.3s ease;
	}

	.menu-container.active ~ .content {
		margin-left: 50%;
	}
	
	.category-switcher {
	    padding: 8px 10px;
	}
	
	.categories div {
		font-size: 0.9em;
	}
	
	.arrow {
		font-size: 1.1em;
	}
}