web/_sass/layout/home.scss

234 lines
3.9 KiB
SCSS
Raw Normal View History

2021-01-23 08:20:58 +03:00
/*
Style for Homepage
*/
#post-list {
margin-top: 1.75rem;
a.card-wrapper {
display: block;
&:hover {
text-decoration: none;
}
&:not(:last-child) {
margin-bottom: 1.25rem;
}
}
.card {
%img-radius {
border-radius: $card-radius $card-radius 0 0;
}
.preview-img {
height: 10rem;
@extend %img-radius;
img {
width: 100%;
height: 100%;
-o-object-fit: cover;
object-fit: cover;
@extend %img-radius;
}
}
.card-body {
min-height: 10.5rem;
padding: 1rem;
.card-title {
@extend %text-clip;
@include mt-mb(0.5rem);
font-size: 1.25rem;
}
%muted {
color: var(--text-muted-color) !important;
}
.card-text.post-content {
margin-top: 0;
margin-bottom: 0.5rem;
@extend %muted;
p {
@extend %text-clip;
line-height: 1.5;
margin: 0;
}
}
.post-meta {
@extend %muted;
i {
&:not(:first-child) {
margin-left: 1.5rem;
}
}
em {
@extend %normal-font-style;
color: inherit;
}
> div:first-child {
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
}
} /* #post-list */
2019-11-15 19:01:33 +03:00
.pagination {
color: var(--btn-patinator-text-color);
2022-10-19 21:05:29 +03:00
font-family: Lato, sans-serif;
2020-02-25 12:56:03 +03:00
a:hover {
text-decoration: none;
}
2019-11-15 19:01:33 +03:00
2020-06-06 19:42:21 +03:00
.page-item {
.page-link {
color: inherit;
2020-06-06 19:42:21 +03:00
width: 2.5rem;
height: 2.5rem;
padding: 0;
2020-02-25 12:56:03 +03:00
display: -webkit-box;
2020-06-06 19:42:21 +03:00
-webkit-box-pack: center;
-webkit-box-align: center;
border-radius: 50%;
border: 1px solid var(--btn-paginator-border-color);
background-color: var(--button-bg);
2021-10-25 22:04:15 +03:00
2020-06-17 11:17:03 +03:00
&:hover {
background-color: var(--btn-paginator-hover-color);
2020-06-17 11:17:03 +03:00
}
2020-02-25 12:56:03 +03:00
}
2021-10-25 22:04:15 +03:00
2020-06-06 19:42:21 +03:00
&.active {
.page-link {
2021-09-21 13:00:29 +03:00
background-color: var(--btn-paginator-hover-color);
2020-06-06 19:42:21 +03:00
color: var(--btn-text-color);
}
2020-02-25 12:56:03 +03:00
}
2021-10-25 22:04:15 +03:00
2020-06-06 19:42:21 +03:00
&.disabled {
cursor: not-allowed;
2021-10-25 22:04:15 +03:00
2020-06-06 19:42:21 +03:00
.page-link {
color: rgba(108, 117, 125, 0.57);
border-color: var(--btn-paginator-border-color);
background-color: var(--button-bg);
}
2020-02-25 12:56:03 +03:00
}
2021-10-25 22:04:15 +03:00
2020-06-06 19:42:21 +03:00
&:first-child .page-link,
&:last-child .page-link {
border-radius: 50%;
}
2022-10-19 21:05:29 +03:00
} /* .page-item */
} /* .pagination */
2019-11-15 19:01:33 +03:00
/* Tablet */
@media all and (min-width: 768px) {
#post-list {
%img-radius {
border-radius: 0 $card-radius $card-radius 0;
}
.card {
.preview-img {
width: 20rem;
height: 11.5rem; // can hold 2 lines each for title and content
}
2021-10-25 22:04:15 +03:00
.card-body {
min-height: 10.75rem;
width: 60%;
padding: 1.75rem 1.75rem 1.25rem 1.75rem;
2022-10-19 21:05:29 +03:00
.card-title {
margin-top: 0;
margin-bottom: 0.5rem;
2022-10-19 21:05:29 +03:00
}
.card-text {
display: inherit !important;
2022-10-19 21:05:29 +03:00
}
2021-10-25 22:04:15 +03:00
.post-meta {
i {
&:not(:first-child) {
margin-left: 1.75rem;
}
}
}
}
}
}
}
/* Hide SideBar and TOC */
@media all and (max-width: 830px) {
#post-list .card {
margin-left: -0.5rem;
margin-right: -0.5rem;
}
.pagination {
justify-content: space-evenly;
.page-item {
&:not(:first-child):not(:last-child) {
display: none;
}
}
}
}
2019-11-25 17:01:40 +03:00
/* Sidebar is visible */
2019-11-22 19:27:41 +03:00
@media all and (min-width: 831px) {
#post-list {
margin-top: 2.5rem;
}
2019-11-22 19:27:41 +03:00
.pagination {
2020-10-27 17:08:04 +03:00
font-size: 0.85rem;
.page-item {
&:not(:last-child) {
margin-right: 0.7rem;
}
.page-link {
width: 2rem;
height: 2rem;
}
2020-06-06 19:42:21 +03:00
}
.page-index {
display: none;
}
2022-10-19 21:05:29 +03:00
} /* .pagination */
2019-11-22 19:27:41 +03:00
}
/* Panel is visible */
@media all and (min-width: 1200px) {
2019-11-15 19:01:33 +03:00
#post-list {
padding-right: 0.5rem;
2019-11-15 19:01:33 +03:00
}
2020-10-27 17:08:04 +03:00
}