hugo-theme-zzo/assets/sass/pages/_archive.scss

149 lines
3.1 KiB
SCSS
Raw Normal View History

2019-11-04 13:09:44 +00:00
.archive {
position: relative;
padding: 2rem 2rem 0;
2019-11-04 13:09:44 +00:00
width: 100%;
@include flexbox();
2019-11-17 16:44:04 +00:00
@include flex-direction(column);
2019-11-04 13:09:44 +00:00
@include justify-content(flex-start);
&__container {
width: 100%;
}
2019-11-04 13:09:44 +00:00
&__ul {
position: relative;
&::before {
content: '';
position: absolute;
left: 3rem;
2019-11-04 13:09:44 +00:00
top: 0;
width: 0.25rem;
2019-11-04 13:09:44 +00:00
height: 100%;
@include themify($themes) {
background-color: themed('toc-vertical-line');
}
}
2019-12-08 14:29:02 +00:00
@media only screen and (max-width: 769px) {
2019-11-04 13:09:44 +00:00
&::before {
content: none;
}
}
2019-12-08 14:29:02 +00:00
2019-11-04 13:09:44 +00:00
}
&__li {
margin-bottom: 0.5rem;
margin-left: 4rem;
z-index: 0;
2019-11-04 13:09:44 +00:00
@include transition(margin-left, 0.1s, ease);
@include flexbox();
@include align-items(center);
2019-12-08 14:29:02 +00:00
@media only screen and (max-width: 769px) {
2019-11-04 13:09:44 +00:00
margin-left: 0;
position: relative;
2019-12-08 14:29:02 +00:00
}
2019-11-04 13:09:44 +00:00
}
&__key {
margin-right: 0.5rem;
border-radius: 0.25rem;
height: 32px;
width: 100px;
padding: 0.125rem;
font-size: 0.95rem;
font-weight: 700;
2019-11-04 13:09:44 +00:00
@include flexbox();
@include align-items(center);
@include justify-content(center);
@include themify($themes) {
color: themed('archive-key-color');
background-color: themed('archive-key-background-color');
}
2019-11-25 13:53:34 +00:00
@include animation('slide-in-down .4s .2s 1 ease both');
2019-11-04 13:09:44 +00:00
&:not(:first-child) {
margin: 4rem 0 1rem 0;
}
&:first-child {
margin: 1rem 0;
}
}
&__meta {
border-radius: 0.25rem;
min-width: 100px;
max-width: 100px;
@include flexbox();
@include align-items(center);
2019-11-25 13:53:34 +00:00
@include animation('slide-in-left .2s .5s 1 ease both');
}
2019-11-04 13:09:44 +00:00
&__type {
border-top-left-radius: 0.25rem;
border-bottom-left-radius: 0.25rem;
2019-11-04 13:09:44 +00:00
font-size: 0.8rem;
width: 50%;
height: 20px;
2019-12-31 02:26:57 +00:00
line-height: 20px;
text-align: center;
@include truncate(50px);
2019-11-04 13:09:44 +00:00
@include themify($themes) {
color: themed('archive-type-color');
background-color: themed('archive-type-background-color');
2019-12-08 14:29:02 +00:00
@media only screen and (max-width: 769px) {
border-right: 2px solid themed('toc-vertical-line');
}
}
}
&__date {
border-top-right-radius: 0.25rem;
border-bottom-right-radius: 0.25rem;
font-size: 0.8rem;
width: 50%;
height: 20px;
2019-12-31 02:26:57 +00:00
line-height: 20px;
text-align: center;
@include truncate(50px);
@include themify($themes) {
color: themed('archive-meta-color');
background-color: themed('archive-type-background-color');
2019-12-08 14:29:02 +00:00
@media only screen and (max-width: 769px) {
border-left: 2px solid themed('toc-vertical-line');
2019-12-08 14:29:02 +00:00
}
2019-11-04 13:09:44 +00:00
}
}
&__title {
margin-right: 0.5rem;
margin-left: 1rem;
2019-11-04 13:09:44 +00:00
@include truncate($grid-max-width);
@include on-event {
2019-11-04 13:09:44 +00:00
&::before {
content: '';
position: absolute;
left: 3rem;
width: 0.25rem;
height: 20px;
2019-11-04 13:09:44 +00:00
@include themify($themes) {
background-color: themed('archive-hover-line-color');
}
2019-12-08 14:29:02 +00:00
@media only screen and (max-width: 769px) {
top: 50%;
@include translateY(-50%);
2019-11-04 13:09:44 +00:00
}
}
}
}
}