krata/_sass/layout/home.scss

234 lines
3.9 KiB
SCSS
Raw Normal View History

2021-01-23 06:20:58 +01: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: $base-radius $base-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 17:01:33 +01:00
.pagination {
color: var(--btn-patinator-text-color);
2022-10-19 20:05:29 +02:00
font-family: Lato, sans-serif;
2020-02-25 10:56:03 +01:00
a:hover {
text-decoration: none;
}
2019-11-15 17:01:33 +01:00
2020-06-06 18:42:21 +02:00
.page-item {
.page-link {
color: inherit;
2020-06-06 18:42:21 +02:00
width: 2.5rem;
height: 2.5rem;
padding: 0;
2020-02-25 10:56:03 +01:00
display: -webkit-box;
2020-06-06 18:42:21 +02: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 21:04:15 +02:00
2020-06-17 10:17:03 +02:00
&:hover {
background-color: var(--btn-paginator-hover-color);
2020-06-17 10:17:03 +02:00
}
2020-02-25 10:56:03 +01:00
}
2021-10-25 21:04:15 +02:00
2020-06-06 18:42:21 +02:00
&.active {
.page-link {
2021-09-21 12:00:29 +02:00
background-color: var(--btn-paginator-hover-color);
2020-06-06 18:42:21 +02:00
color: var(--btn-text-color);
}
2020-02-25 10:56:03 +01:00
}
2021-10-25 21:04:15 +02:00
2020-06-06 18:42:21 +02:00
&.disabled {
cursor: not-allowed;
2021-10-25 21:04:15 +02:00
2020-06-06 18:42:21 +02: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 10:56:03 +01:00
}
2021-10-25 21:04:15 +02:00
2020-06-06 18:42:21 +02:00
&:first-child .page-link,
&:last-child .page-link {
border-radius: 50%;
}
2022-10-19 20:05:29 +02:00
} /* .page-item */
} /* .pagination */
2019-11-15 17:01:33 +01:00
/* Tablet */
@media all and (min-width: 768px) {
#post-list {
%img-radius {
border-radius: 0 $base-radius $base-radius 0;
}
.card {
.preview-img {
width: 20rem;
height: 11.5rem; // can hold 2 lines each for title and content
}
2021-10-25 21:04:15 +02:00
.card-body {
min-height: 10.75rem;
width: 60%;
padding: 1.75rem 1.75rem 1.25rem 1.75rem;
2022-10-19 20:05:29 +02:00
.card-title {
margin-top: 0;
margin-bottom: 0.5rem;
2022-10-19 20:05:29 +02:00
}
.card-text {
display: inherit !important;
2022-10-19 20:05:29 +02:00
}
2021-10-25 21:04:15 +02: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 15:01:40 +01:00
/* Sidebar is visible */
2019-11-22 17:27:41 +01:00
@media all and (min-width: 831px) {
#post-list {
margin-top: 2.5rem;
}
2019-11-22 17:27:41 +01:00
.pagination {
2020-10-27 15:08:04 +01:00
font-size: 0.85rem;
.page-item {
&:not(:last-child) {
margin-right: 0.7rem;
}
.page-link {
width: 2rem;
height: 2rem;
}
2020-06-06 18:42:21 +02:00
}
.page-index {
display: none;
}
2022-10-19 20:05:29 +02:00
} /* .pagination */
2019-11-22 17:27:41 +01:00
}
/* Panel is visible */
@media all and (min-width: 1200px) {
2019-11-15 17:01:33 +01:00
#post-list {
padding-right: 0.5rem;
2019-11-15 17:01:33 +01:00
}
2020-10-27 15:08:04 +01:00
}