ORIENT/themes/modern2/assets/new/styles/main/_aside.scss

190 lines
3.1 KiB
SCSS
Raw Normal View History

2022-12-06 15:33:01 +00:00
.aside {
position: sticky;
height: fit-content;
top: 4.6rem;
right: 0;
width: 100%;
// max-width: 35rem;
@include flex(column);
gap: 3.4rem;
}
.aside-content-wrapper {
display: grid;
grid-template-columns: 1fr;
gap: 2.5rem;
overflow: hidden;
}
.aside-title {
@include sectionTitle;
}
.aside-btns {
list-style-type: disc;
@include grid(false, 1fr 1fr);
button {
text-align: left;
position: relative;
padding: 0.6rem;
padding-left: 1.7rem;
cursor: pointer;
width: 100%;
border: 0.1rem solid $base-green;
color: $base-green;
background: $base-white;
@include transition-std;
&::before {
content: "";
border-radius: 50%;
display: block;
width: 0.4rem;
height: 0.4rem;
background: $base-green;
position: absolute;
left: 0.6rem;
top: 50%;
transform: translateY(-50%);
@include transition-std;
}
&.active {
color: $base-white;
background: $base-green;
@include transition-std;
&::before {
background: $base-white;
@include transition-std;
}
}
}
}
.aside-content {
z-index: 1;
grid-column: 1/1;
grid-row: 3/3;
@include flex(column);
gap: 1rem;
top: 12rem;
transform: translate(-100%, -20%) scale(0.7);
opacity: 0;
width: 100%;
@include transition-std(0.5s);
&.active {
z-index: 2;
transform: translate(0%, 0%) scale(1);
opacity: 1;
@include transition-std(0.5s);
}
}
.aside-content-item {
@include flex(column);
gap: 1.8rem;
&:not(:last-child) {
padding-bottom: 2rem;
}
}
.aside-content-item-title {
@include flex;
align-items: center;
gap: 0.4rem;
h3 {
color: $base-red;
font-size: 1.2rem;
letter-spacing: 0.1em;
}
h4,
span {
color: $mild-gray;
font-size: 1.2rem;
font-weight: normal;
}
}
.aside-content-item-info {
font-size: 1.3rem;
line-height: 1.77rem;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
.aside-content-more {
@include flex;
align-items: center;
justify-content: center;
gap: 1rem;
font-size: 1.3rem;
border: 0.1rem solid $base-green;
padding: 0.6rem 1rem;
background: transparent;
color: $base-black;
@include transition-std;
img {
opacity: 1;
@include transition-std;
}
&:hover {
color: $base-white;
background: $base-green;
@include transition-std;
img {
opacity: 0;
@include transition-std;
}
}
}
.aside-ad-wrapper {
@include imgStyle($objFit: cover);
}
.aside-container {
width: 100%;
padding: 0 4rem 0 0;
max-width: unset;
}
// Media
@media screen and (max-width: 1070px) {
.aside {
max-width: unset;
}
.aside-ad-wrapper {
a {
@include stretch;
@include flex;
justify-content: center;
}
}
.aside-container {
max-width: 174rem;
padding: 0 3rem;
margin: 0 auto;
}
}
@media screen and (max-width: 800px) {
.aside-title {
text-align: center;
font-size: 1.8rem;
}
.aside-content-wrapper {
gap: 2.2rem;
}
}