fix: update layout and import Chirpy template files

This commit is contained in:
Rubens Jean Simon
2024-08-13 04:48:24 +00:00
parent b0c003ba2e
commit b9caf8eedb
128 changed files with 8636 additions and 34 deletions

144
_sass/layout/archives.scss Normal file
View File

@ -0,0 +1,144 @@
/*
Style for Archives
*/
#archives {
letter-spacing: 0.03rem;
$timeline-width: 4px;
%timeline {
content: '';
width: $timeline-width;
position: relative;
float: left;
background-color: var(--timeline-color);
}
.year {
height: 3.5rem;
font-size: 1.5rem;
position: relative;
left: 2px;
margin-left: -$timeline-width;
&::before {
@extend %timeline;
height: 72px;
left: 79px;
bottom: 16px;
}
&:first-child::before {
@extend %timeline;
height: 32px;
top: 24px;
}
/* Year dot */
&::after {
content: '';
display: inline-block;
position: relative;
border-radius: 50%;
width: 12px;
height: 12px;
left: 21.5px;
border: 3px solid;
background-color: var(--timeline-year-dot-color);
border-color: var(--timeline-node-bg);
box-shadow: 0 0 2px 0 #c2c6cc;
z-index: 1;
}
}
ul {
li {
font-size: 1.1rem;
line-height: 3rem;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
&:nth-child(odd) {
background-color: var(--main-bg, #ffffff);
background-image: linear-gradient(
to left,
#ffffff,
#fbfbfb,
#fbfbfb,
#fbfbfb,
#ffffff
);
}
&::before {
@extend %timeline;
top: 0;
left: 77px;
height: 3.1rem;
}
}
&:last-child li:last-child::before {
height: 1.5rem;
}
} /* #archives ul */
.date {
white-space: nowrap;
display: inline-block;
position: relative;
right: 0.5rem;
&.month {
width: 1.4rem;
text-align: center;
}
&.day {
font-size: 85%;
font-family: Lato, sans-serif;
}
}
a {
/* post title in Archvies */
margin-left: 2.5rem;
position: relative;
top: 0.1rem;
&:hover {
border-bottom: none;
}
&::before {
/* the dot before post title */
content: '';
display: inline-block;
position: relative;
border-radius: 50%;
width: 8px;
height: 8px;
float: left;
top: 1.35rem;
left: 71px;
background-color: var(--timeline-node-bg);
box-shadow: 0 0 3px 0 #c2c6cc;
z-index: 1;
}
}
} /* #archives */
@media all and (max-width: 576px) {
#archives {
margin-top: -1rem;
ul {
letter-spacing: 0;
}
}
}

View File

@ -0,0 +1,83 @@
/*
Style for Tab Categories
*/
%category-icon-color {
color: gray;
}
.categories {
margin-bottom: 2rem;
border-color: var(--categories-border);
&.card,
.list-group {
@extend %rounded;
}
.card-header {
$radius: calc($base-radius - 1px);
padding: 0.75rem;
border-radius: $radius;
border-bottom: 0;
&.hide-border-bottom {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
}
i {
@extend %category-icon-color;
font-size: 86%; /* fontawesome icons */
}
.list-group-item {
border-left: none;
border-right: none;
padding-left: 2rem;
&:first-child {
border-top-left-radius: 0;
border-top-right-radius: 0;
}
&:last-child {
border-bottom: 0;
}
}
} /* .categories */
.category-trigger {
width: 1.7rem;
height: 1.7rem;
border-radius: 50%;
text-align: center;
color: #6c757d !important;
i {
position: relative;
height: 0.7rem;
width: 1rem;
transition: transform 300ms ease;
}
&:hover {
i {
color: var(--categories-icon-hover-color);
}
}
}
/* only works on desktop */
@media (hover: hover) {
.category-trigger:hover {
background-color: var(--categories-hover-bg);
}
}
.rotate {
transform: rotate(-90deg);
}

View File

@ -0,0 +1,72 @@
/*
Style for page Category and Tag
*/
.dash {
margin: 0 0.5rem 0.6rem 0.5rem;
border-bottom: 2px dotted var(--dash-color);
}
#page-category,
#page-tag {
ul > li {
line-height: 1.5rem;
padding: 0.6rem 0;
/* dot */
&::before {
background: #999999;
width: 5px;
height: 5px;
border-radius: 50%;
display: block;
content: '';
position: relative;
top: 0.6rem;
margin-right: 0.5rem;
}
/* post's title */
> a {
@extend %no-bottom-border;
font-size: 1.1rem;
}
}
}
/* tag icon */
#page-tag h1 > i {
font-size: 1.2rem;
}
#page-category h1 > i {
font-size: 1.25rem;
}
#page-category,
#page-tag,
#access-lastmod {
a:hover {
@extend %link-hover;
margin-bottom: -1px; /* Avoid jumping */
}
}
@media all and (max-width: 576px) {
#page-category,
#page-tag {
ul > li {
&::before {
margin: 0 0.5rem;
}
> a {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
}

189
_sass/layout/home.scss Normal file
View File

@ -0,0 +1,189 @@
/*
Style for Homepage
*/
#post-list {
margin-top: 2rem;
.card-wrapper {
&:hover {
text-decoration: none;
}
&:not(:last-child) {
margin-bottom: 1.25rem;
}
}
.card {
border: 0;
background: none;
%img-radius {
border-radius: $base-radius $base-radius 0 0;
}
.preview-img {
@extend %img-radius;
img {
@extend %img-radius;
}
}
.card-body {
height: 100%;
padding: 1rem;
.card-title {
@extend %text-clip;
color: var(--heading-color) !important;
font-size: 1.25rem;
}
%muted {
color: var(--text-muted-color) !important;
}
.card-text.content {
@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 */
.pagination {
color: var(--text-color);
font-family: Lato, sans-serif;
justify-content: space-evenly;
a:hover {
text-decoration: none;
}
.page-item {
.page-link {
color: var(--btn-patinator-text-color);
padding: 0 0.6rem;
display: -webkit-box;
-webkit-box-pack: center;
-webkit-box-align: center;
border-radius: 0.5rem;
border: 0;
background-color: inherit;
}
&.active {
.page-link {
background-color: var(--btn-paginator-hover-color);
}
}
&:not(.active) {
.page-link {
&:hover {
box-shadow: inset var(--btn-border-color) 0 0 0 1px;
}
}
}
&.disabled {
cursor: not-allowed;
.page-link {
color: rgba(108, 117, 125, 0.57);
}
}
} /* .page-item */
} /* .pagination */
/* Tablet */
@media all and (min-width: 768px) {
%img-radius {
border-radius: 0 $base-radius $base-radius 0;
}
#post-list {
.card {
.card-body {
padding: 1.75rem 1.75rem 1.25rem 1.75rem;
.card-text {
display: inherit !important;
}
.post-meta {
i {
&:not(:first-child) {
margin-left: 1.75rem;
}
}
}
}
}
}
}
/* Hide SideBar and TOC */
@media all and (max-width: 830px) {
.pagination {
.page-item {
&:not(:first-child):not(:last-child) {
display: none;
}
}
}
}
/* Sidebar is visible */
@media all and (min-width: 831px) {
#post-list {
margin-top: 2.5rem;
}
.pagination {
font-size: 0.85rem;
justify-content: center;
.page-item {
&:not(:last-child) {
margin-right: 0.7rem;
}
}
.page-index {
display: none;
}
} /* .pagination */
}

370
_sass/layout/post.scss Normal file
View File

@ -0,0 +1,370 @@
/*
Post-specific style
*/
%btn-post-nav {
width: 50%;
position: relative;
border-color: var(--btn-border-color);
}
@mixin dot($pl: 0.25rem, $pr: 0.25rem) {
content: '\2022';
padding-left: $pl;
padding-right: $pr;
}
header {
.post-desc {
@extend %heading;
font-size: 1.125rem;
line-height: 1.6;
}
.post-meta {
span + span::before {
@include dot;
}
em,
time {
@extend %text-highlight;
}
em {
a {
color: inherit;
}
}
}
h1 + .post-meta {
margin-top: 1.5rem;
}
}
.post-tail-wrapper {
@extend %text-sm;
margin-top: 6rem;
border-bottom: 1px double var(--main-border-color);
.license-wrapper {
line-height: 1.2rem;
> a {
@extend %text-highlight;
&:hover {
@extend %link-hover;
}
}
span:last-child {
@extend %text-sm;
}
} /* .license-wrapper */
.post-meta a:not(:hover) {
@extend %link-underline;
}
.share-wrapper {
vertical-align: middle;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
%icon-size {
font-size: 1.125rem;
}
.share-icons {
display: flex;
i {
color: var(--btn-share-color);
@extend %icon-size;
}
> * {
@extend %icon-size;
margin-left: 0.5rem;
&:hover {
i {
@extend %btn-share-hovor;
}
}
}
button {
padding: 0;
border: none;
line-height: inherit;
@extend %cursor-pointer;
}
} /* .share-icons */
} /* .share-wrapper */
}
.share-mastodon {
/* See: https://github.com/justinribeiro/share-to-mastodon#properties */
--wc-stm-font-family: $font-family-base;
--wc-stm-dialog-background-color: var(--card-bg);
--wc-stm-form-button-border: 1px solid var(--btn-border-color);
--wc-stm-form-submit-background-color: var(--sidebar-btn-bg);
--wc-stm-form-cancel-background-color: var(--sidebar-btn-bg);
--wc-stm-form-button-background-color-hover: #007bff;
--wc-stm-form-button-color-hover: white;
font-size: 1rem;
}
.post-tags {
line-height: 2rem;
.post-tag {
&:hover {
@extend %link-hover;
@extend %tag-hover;
@extend %no-bottom-border;
}
}
}
.post-navigation {
.btn {
@extend %btn-post-nav;
&:not(:hover) {
color: var(--link-color);
}
&:hover {
&:not(.disabled)::before {
color: whitesmoke;
}
}
&.disabled {
@extend %btn-post-nav;
pointer-events: auto;
cursor: not-allowed;
background: none;
color: gray;
}
&.btn-outline-primary.disabled:focus {
box-shadow: none;
}
&::before {
color: var(--text-muted-color);
font-size: 0.65rem;
text-transform: uppercase;
content: attr(aria-label);
}
&:first-child {
border-radius: $base-radius 0 0 $base-radius;
left: 0.5px;
}
&:last-child {
border-radius: 0 $base-radius $base-radius 0;
right: 0.5px;
}
}
p {
font-size: 1.1rem;
line-height: 1.5rem;
margin-top: 0.3rem;
white-space: normal;
}
} /* .post-navigation */
@media (hover: hover) {
.post-navigation {
.btn,
.btn::before {
transition: all 0.35s ease-in-out;
}
}
}
@-webkit-keyframes fade-up {
from {
opacity: 0;
position: relative;
top: 2rem;
}
to {
opacity: 1;
position: relative;
top: 0;
}
}
@keyframes fade-up {
from {
opacity: 0;
position: relative;
top: 2rem;
}
to {
opacity: 1;
position: relative;
top: 0;
}
}
#toc-wrapper {
border-left: 1px solid rgba(158, 158, 158, 0.17);
position: -webkit-sticky;
position: sticky;
top: 4rem;
transition: top 0.2s ease-in-out;
-webkit-animation: fade-up 0.8s;
animation: fade-up 0.8s;
ul {
list-style: none;
font-size: 0.85rem;
line-height: 1.25;
padding-left: 0;
li {
&:not(:last-child) {
margin: 0.4rem 0;
}
a {
padding: 0.2rem 0 0.2rem 1.25rem;
}
}
/* Overwrite TOC plugin style */
.toc-link {
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
&:hover {
color: var(--toc-highlight);
text-decoration: none;
}
&::before {
display: none;
}
}
.is-active-link {
color: var(--toc-highlight) !important;
font-weight: 600;
&::before {
display: inline-block;
width: 1px;
left: -1px;
height: 1.25rem;
background-color: var(--toc-highlight) !important;
}
}
ul {
padding-left: 0.75rem;
}
}
}
/* --- Related Posts --- */
#related-posts {
> h3 {
@include label(1.1rem, 600);
}
time {
@extend %normal-font-style;
@extend %text-xs;
color: var(--text-muted-color);
}
p {
font-size: 0.9rem;
margin-bottom: 0.5rem;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.card {
h4 {
@extend %text-clip;
}
}
}
/* stylelint-disable-next-line selector-id-pattern */
#disqus_thread {
min-height: 8.5rem;
}
.utterances {
max-width: 100%;
}
%btn-share-hovor {
color: var(--btn-share-hover-color) !important;
}
.share-label {
@include label(inherit, 400, inherit);
&::after {
content: ':';
}
}
@media all and (max-width: 576px) {
.post-tail-bottom {
flex-wrap: wrap-reverse !important;
> div:first-child {
width: 100%;
margin-top: 1rem;
}
}
}
@media all and (max-width: 768px) {
.content > p > img {
max-width: calc(100% + 1rem);
}
}
/* Hide SideBar and TOC */
@media all and (max-width: 849px) {
.post-navigation {
padding-left: 0;
padding-right: 0;
margin-left: -0.5rem;
margin-right: -0.5rem;
}
}

19
_sass/layout/tags.scss Normal file
View File

@ -0,0 +1,19 @@
/*
Styles for Tab Tags
*/
.tag {
border-radius: 0.7em;
padding: 6px 8px 7px;
margin-right: 0.8rem;
line-height: 3rem;
letter-spacing: 0;
border: 1px solid var(--tag-border) !important;
box-shadow: 0 0 3px 0 var(--tag-shadow);
span {
margin-left: 0.6em;
font-size: 0.7em;
font-family: Oswald, sans-serif;
}
}