Merge pull request #40 from ifraimka1/fix/layout

Fix/layout
This commit is contained in:
Ifraim Solomonov authored and GitHub committed 2025-04-18 17:45:15 +03:00
commit 4fbe2e6d49
1 file changed
+41 -37
+41 -37
View File
@@ -1,50 +1,61 @@
// Общий стиль
#root { #root {
position: relative; // Убедитесь, что #root имеет relative position: relative;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center bottom; background-position: center bottom;
background-image: url("/assets/images/backround/bg_footer_02.svg");
background-size: 100% auto; background-size: 100% auto;
z-index: 0; // Задний план z-index: 0;
opacity: 0; // Сделаем #root видимым сразу opacity: 0;
min-height: 100vh; // Устанавливаем минимальную высоту для #root min-height: 100vh;
background-image: url("../../shared/assets/images/backround/bg_footer_02.svg");
// Псевдоэлемент для фона в верхней части страницы
&::before { &::before {
content: ""; content: "";
position: absolute; position: absolute;
top: 160px; top: 160px;
left: 0; // Слева left: 0;
width: 100%; // На всю ширину width: 100%;
height: 364px; // Ограничиваем максимальную высоту height: 364px;
background-image: url("../../assets/images/backround/bg_news_block.svg"); // Картинка background-image: url("../../shared/assets/images/backround/bg_news_block.svg");
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: left center; background-position: left center;
background-size: contain; background-size: contain;
z-index: -1; // Картинка на заднем плане, за остальными элементами z-index: -1;
@media (max-width: 768px) { @media (max-width: 768px) {
display: none; // Прячем картинку на мобильных устройствах display: none;
}
} }
} }
// Для главной страницы &.main-page {
#root:has(> #react-page #mainpageheader) { background-image: url("../../shared/assets/images/backround/bg_footer.svg");
background-image: url("/assets/images/backround/bg_footer.svg");
&::before { &::before {
background-image: none; background-image: none;
} }
} }
#react-page:has(> #mainpageheader) {
margin-top: 0; &.inner-page {
background-image: url("../../shared/assets/images/backround/bg_footer_02.svg");
&::before {
background-image: url("../../shared/assets/images/backround/bg_news_block.svg");
} }
}
}
.page-loaded #root { .page-loaded #root {
opacity: 1; opacity: 1;
visibility: visible; visibility: visible;
} }
#layout-wrapper {
display: flex;
flex-direction: column;
min-height: 100vh;
}
#react-page { #react-page {
flex: 1;
margin-top: calc($navbar-height + 5 * $navbar-padding-tb); margin-top: calc($navbar-height + 5 * $navbar-padding-tb);
.header, .header,
@@ -60,21 +71,17 @@
.content { .content {
background: $bg-primary; background: $bg-primary;
//padding: 0 1em;
border-radius: 8px; border-radius: 8px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
//box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.1);
} }
} }
.block .heading a, .block .heading a,
#navbar .nav-link { #navbar .nav-link {
position: relative; position: relative;
}
.block .heading a::after, &::after {
#navbar .nav-link::after {
position: absolute; position: absolute;
content: ""; content: "";
left: 50%; left: 50%;
@@ -85,6 +92,7 @@
height: 1px; height: 1px;
transition: 0.3s; transition: 0.3s;
} }
}
.block .heading a::after { .block .heading a::after {
background: $text-primary; background: $text-primary;
@@ -98,21 +106,21 @@
.scroll-to-top { .scroll-to-top {
position: fixed; position: fixed;
right: 2vw; // Используем vw для адаптивности right: 2vw;
bottom: 7.5vh; // Используем vh для адаптивности bottom: 7.5vh;
background-color: white; background-color: white;
border-radius: 50%; border-radius: 50%;
width: 61px; width: 61px;
height: 61px; height: 61px;
z-index: 10; z-index: 10;
border: none; border: none;
cursor: pointer; cursor: pointer;
opacity: 0; opacity: 0;
transform: scale(0); transform: scale(0);
transition: opacity 0.3s ease, transform 0.3s ease; transition: opacity 0.3s ease, transform 0.3s ease;
animation: scaleIn 0.5s forwards; /* Анимация появления */ animation: scaleIn 0.5s forwards;
box-shadow: 5px 6px 15px rgba(0, 0, 0, 0.05); box-shadow: 5px 6px 15px rgba(0, 0, 0, 0.05);
&.visible { &.visible {
opacity: 1; opacity: 1;
transform: scale(1); transform: scale(1);
@@ -122,15 +130,18 @@
&.hidden { &.hidden {
opacity: 0; opacity: 0;
transform: scale(0); transform: scale(0);
animation: scaleOut 0.5s forwards; /* Анимация исчезновения */ animation: scaleOut 0.5s forwards;
} }
img { img {
height: auto; height: auto;
} }
@media (max-width: 768px) {
display: none;
}
} }
/* Анимация для появления кнопки */
@keyframes scaleIn { @keyframes scaleIn {
0% { 0% {
opacity: 0; opacity: 0;
@@ -142,7 +153,6 @@
} }
} }
/* Анимация для исчезновения кнопки */
@keyframes scaleOut { @keyframes scaleOut {
0% { 0% {
opacity: 1; opacity: 1;
@@ -153,9 +163,3 @@
transform: scale(0); transform: scale(0);
} }
} }
@media (max-width: 768px) {
.scroll-to-top {
display: none; // Скрыть кнопку на мобильных устройствах
}
}