web/_sass/layout/archives.scss

138 lines
2.7 KiB
SCSS
Raw Normal View History

2021-01-23 08:20:58 +03:00
/*
Style for Archives
*/
2019-11-15 19:01:33 +03:00
2020-02-25 12:56:03 +03:00
%date-timeline {
2019-11-15 19:01:33 +03:00
content: "";
width: 4px;
left: 75px;
display: inline-block;
float: left;
position: relative;
background-color: var(--timeline-color);
2019-11-15 19:01:33 +03:00
}
2020-02-25 12:56:03 +03:00
#archives {
letter-spacing: 0.03rem;
li {
font-size: 1.1rem;
line-height: 3rem;
&:nth-child(odd) {
background-color: var(--main-wrapper-bg, #fff);
background-image: linear-gradient(
to left, #fff, #fbfbfb, #fbfbfb, #fbfbfb, #fff);
2020-02-25 12:56:03 +03:00
}
2020-10-27 17:08:04 +03:00
> div {
2020-02-25 12:56:03 +03:00
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
2019-11-15 19:01:33 +03:00
2020-02-25 12:56:03 +03:00
span.lead {
font-size: 1.5rem;
position: relative;
left: 8px;
&:not(:first-child) {
position: relative;
left: 4px;
&::after {
left: 67px;
}
}
&::after { /* Year dot */
2020-02-25 12:56:03 +03:00
content: "";
display: block;
position: relative;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
width: 12px;
height: 12px;
top: -26px;
left: 63px;
border: 3px solid;
background-color: var(--timeline-year-dot-color);
border-color: var(--timeline-node-bg);
box-shadow: 0 0 2px 0 #c2c6cc;
2020-02-25 12:56:03 +03:00
z-index: 1;
}
} // #archives span.lead
.date {
white-space: nowrap;
display: inline-block;
&.month {
width: 1.4rem;
text-align: center;
~ a::before {
2020-02-25 12:56:03 +03:00
/* A dot for Month and Day */
content: "";
display: inline-block;
position: relative;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
width: 8px;
height: 8px;
float: left;
top: 1.35rem;
left: 69px;
background-color: var(--timeline-node-bg);
box-shadow: 0 0 3px 0 #c2c6cc;
2020-02-25 12:56:03 +03:00
z-index: 1;
}
}
&.day {
font-size: 85%;
2020-04-07 15:23:57 +03:00
font-family: 'Lato', sans-serif;
2020-02-25 12:56:03 +03:00
text-align: center;
margin-right: -2px;
width: 1.2rem;
position: relative;
left: -.15rem;
}
} // #archives .date
ul {
2020-10-27 17:08:04 +03:00
> li {
> div > a {
2020-02-25 12:56:03 +03:00
/* post title in Archvies */
margin-left: 2.5rem;
position: relative;
2020-10-27 17:08:04 +03:00
top: 0.1rem;
2020-02-25 12:56:03 +03:00
}
&::after {
@extend %date-timeline;
height: 2.8rem;
top: -1.3rem;
}
&:first-child::before {
@extend %date-timeline;
height: 3.06rem;
top: -1.61rem;
}
}
2020-10-27 17:08:04 +03:00
&:not(:last-child) > li:last-child::after {
2020-02-25 12:56:03 +03:00
height: 3.4rem;
}
2020-10-27 17:08:04 +03:00
&:last-child > li:last-child::after {
2020-02-25 12:56:03 +03:00
display: none;
}
} // #archives ul
} // #archives
2019-11-15 19:01:33 +03:00
@media all and (max-width: 576px) {
#archives {
margin-top: -1rem;
2020-02-25 12:56:03 +03:00
ul {
letter-spacing: 0;
}
2019-11-15 19:01:33 +03:00
}
}