🎉 Initial commit

This commit is contained in:
Jimmy Cai
2020-08-22 13:20:08 +02:00
commit c698d944e6
69 changed files with 3781 additions and 0 deletions
+254
View File
@@ -0,0 +1,254 @@
/* Default article style */
.article-list {
display: flex;
flex-direction: column;
article {
display: flex;
flex-direction: column;
margin-bottom: 40px;
background-color: var(--card-background);
@include box_shadow(1);
border-radius: var(--card-border-radius);
overflow: hidden;
.article-image {
img {
width: 100%;
height: 250px;
object-fit: cover;
@media (max-width: $on-tablet) {
height: 150px;
}
@media (max-width: $on-desktop) {
height: 200px;
}
}
}
@for $i from 1 through length($defaultTagBackgrounds) {
&:nth-child(#{length($defaultTagBackgrounds)}n + #{$i}) {
.article-category a {
background: nth($defaultTagBackgrounds, $i);
color: nth($defaultTagColors, $i);
}
}
}
}
}
.article-details {
display: flex;
flex-direction: column;
justify-content: center;
padding: 25px 20px;
@media (max-width: $on-desktop) {
padding: 20px;
}
}
.article-category {
margin-bottom: 10px;
a {
display: inline-block;
text-decoration: none;
padding: 8px 16px;
font-size: 1.4rem;
background: nth($defaultTagBackgrounds, 1);
color: nth($defaultTagColors, 1);
border-radius: var(--tag-border-radius);
@media (max-width: $on-phone) {
font-size: 1.25rem;
padding: 8px 14px;
}
}
}
.article-title {
font-size: 2.4rem;
font-weight: 600;
margin: 10px 0;
a {
color: var(--card-text-color-main);
&:hover {
color: var(--card-text-color-main);
}
}
@media (max-width: $on-desktop) {
font-size: 1.5em;
}
}
.article-subtitle {
font-weight: lighter;
font-size: 2rem;
color: var(--card-text-color-secondary);
margin: 5px 0;
line-height: 1.5;
@media (max-width: $on-desktop) {
font-size: 1.8rem;
}
}
.article-time {
display: flex;
align-items: center;
color: var(--card-text-color-tertiary);
margin-top: 10px;
svg {
vertical-align: middle;
margin-right: 8px;
}
time {
font-size: 16px;
@media (max-width: $on-desktop) {
font-size: 14px;
}
}
}
.article-tags {
& + .article-copyright {
margin-top: 30px;
}
a {
color: var(--accent-color-text);
background-color: var(--accent-color);
padding: 8px 18px;
border-radius: var(--tag-border-radius);
display: inline-block;
font-size: 1.4rem;
margin-right: 10px;
margin-bottom: 10px;
transition: background-color 0.5s ease;
&:hover {
color: var(--accent-color-text);
background-color: var(--accent-color-darker);
}
}
}
/* Compact style article list */
.article-list--compact {
border-radius: var(--card-border-radius);
@include box_shadow(1);
background-color: var(--card-background);
padding: 0 15px;
& + .pagination {
margin-top: 40px;
}
article {
display: flex;
align-items: center;
padding: 25px 10px;
&:not(:last-of-type) {
border-bottom: 2px solid var(--card-separator-color);
}
.article-details {
flex-grow: 1;
padding: 0;
padding-right: 15px;
}
.article-title {
margin: 0;
font-size: 2rem;
@media (max-width: $on-phone) {
font-size: 1.6rem;
}
}
.article-image {
img {
width: 60px;
height: 60px;
}
}
}
}
/* Tile style article list */
.article-list--tile {
article {
border-radius: var(--card-border-radius);
overflow: hidden;
position: relative;
height: 350px;
width: 250px;
@include box_shadow(1);
transition: box-shadow 0.3s ease;
background-color: var(--card-background);
&:hover {
@include box_shadow(2);
}
&.has-image {
.article-details {
background-color: rgba(#000, 0.25);
}
.article-title {
color: #fff;
}
}
.article-image {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
img {
width: 100%;
height: 100%;
object-fit: cover;
}
}
.article-details {
border-radius: var(--card-border-radius);
position: relative;
height: 100%;
width: 100%;
display: flex;
flex-direction: column;
justify-content: flex-end;
z-index: 2;
padding: 20px;
@media (max-width: $on-phone) {
padding: 15px;
}
}
.article-title {
font-size: 2.2rem;
font-weight: 500;
color: var(--card-text-color-main);
@media (max-width: $on-phone) {
font-size: 2rem;
}
}
}
}
+17
View File
@@ -0,0 +1,17 @@
html {
font-size: 62.5%;
font-display: swap;
}
* {
box-sizing: border-box;
}
body {
background: var(--body-background);
margin: 0;
font-family: $base-font-family;
font-size: 1.6rem;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
+30
View File
@@ -0,0 +1,30 @@
footer.site-footer {
padding: 20px 0 40px 0;
font-size: 1.4rem;
line-height: 1.75;
&:before {
content: "";
display: block;
height: 3px;
width: 50px;
background: var(--body-text-color);
margin-bottom: 20px;
}
.copyright {
color: var(--accent-color);
font-weight: bold;
margin-bottom: 5px;
}
.powerby {
color: var(--body-text-color);
font-weight: normal;
font-size: 1.2rem;
a {
color: var(--body-text-color);
}
}
}
+6
View File
@@ -0,0 +1,6 @@
.not-found-card {
background-color: var(--card-background);
@include box_shadow(1);
border-radius: var(--card-border-radius);
padding: 30px;
}
+32
View File
@@ -0,0 +1,32 @@
.archive-group {
margin-bottom: 40px;
.archive-date {
text-transform: uppercase;
margin-bottom: 10px;
font-size: 1.6rem;
font-weight: 500;
a {
color: var(--body-text-color);
}
}
}
.template-archive {
.category-list {
margin-bottom: 40px;
overflow-x: auto;
.article-list--tile {
display: flex;
padding-bottom: 15px;
article {
width: 250px;
height: 150px;
margin-right: 20px;
flex-shrink: 0;
}
}
}
}
+303
View File
@@ -0,0 +1,303 @@
@import "variables.scss";
.article-page {
.left-sidebar {
@media (max-width: $on-tablet) {
display: none;
}
}
.article-sidebar {
position: sticky;
top: 50px;
flex-shrink: 0;
@media (max-width: $on-tablet) {
display: none;
}
@media (min-width: $on-tablet) {
padding-left: 15px;
margin-left: 1%;
}
@media (min-width: $on-tablet) {
width: 25%;
margin-right: 1%;
}
@media (min-width: $on-desktop) {
width: 30%;
}
}
article {
background: var(--card-background);
border-radius: var(--card-border-radius);
@include box_shadow(1);
overflow: hidden;
&.main-article {
margin-bottom: 40px;
}
.article-header {
.article-image {
img {
height: auto;
width: 100%;
max-height: 500px;
width: 100%;
object-fit: cover;
}
}
.article-details {
padding: 30px 30px 0 30px;
@media (max-width: $on-tablet) {
padding: 20px 20px 0 20px;
}
}
}
.article-content {
margin: 30px 0;
padding: 0 30px;
line-height: 1.75;
color: var(--card-text-color-main);
@media (max-width: $on-tablet) {
padding: 0 20px;
font-size: 1.6rem;
}
img {
max-width: 100%;
height: auto;
}
}
.article-footer {
padding: 30px;
@media (max-width: $on-phone) {
padding: 20px;
}
.article-copyright {
color: var(--card-text-color-tertiary);
text-transform: uppercase;
display: flex;
align-items: center;
svg {
margin-right: 15px;
stroke-width: 1.33;
}
}
}
}
}
#TableOfContents {
background: var(--card-background);
border-radius: var(--card-border-radius);
@include box_shadow(1);
ul {
padding: 0;
margin: 0;
list-style: none;
li {
padding: 15px 30px;
padding-right: 50px;
position: relative;
&:not(:last-of-type) {
border-bottom: 1px solid var(--card-separator-color);
}
a {
color: var(--accent-color);
}
ul {
border-top: 1px solid var(--card-separator-color);
margin-top: 15px;
}
}
}
}
#article-toolbar {
background: var(--card-background);
@include box_shadow(1);
border-radius: var(--card-border-radius);
margin-bottom: 20px;
padding: 15px 20px;
display: flex;
align-items: center;
@media (max-width: $on-phone) {
margin-top: 15px;
}
@media (min-width: $on-tablet) {
display: none;
}
.back-home {
color: var(--card-text-color-secondary);
margin-right: 30px;
display: inline-flex;
align-items: center;
svg {
margin-right: 5px;
}
span {
font-weight: 500;
}
}
}
.related-contents--wrapper {
margin-bottom: 40px;
.widget-title {
//padding-left: 15px;
}
}
.related-contents {
overflow-x: auto;
//padding: 0 15px;
padding-bottom: 15px;
& > .flex {
float: left;
}
article {
margin-right: 15px;
flex-shrink: 0;
overflow: hidden;
@media (max-width: $on-phone) {
height: 250px;
width: 200px;
}
@media (min-width: $on-phone) {
height: 200px;
width: 300px;
}
.article-title {
font-size: 1.8rem;
}
.article-details {
transition: background-color 0.5s ease;
}
}
}
.article-content {
font-family: -apple-system, BlinkMacSystemFont, "noto-sans", "Segoe UI", "Droid Sans", "Helvetica Neue",
"PingFang SC", "Hiragino Sans GB", "Droid Sans Fallback", "Microsoft YaHei", sans-serif;
p {
margin: 1.5em 0;
}
figure {
margin: 0 auto;
text-align: center;
figcaption {
font-size: 1.6rem;
}
}
blockquote {
position: relative;
margin: 10px 0;
border-left: 4px solid var(--card-separator-color);
padding-left: 20px;
}
hr {
width: 100px;
margin: 40px 0;
background: var(--card-text-color-tertiary);
height: 4px;
border: 0;
}
code {
color: #808080;
font-size: 0.96em;
background-color: #f9f9f7;
padding: 1px 2px;
border: 1px solid #eee;
border-radius: 3px;
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
word-wrap: break-word;
}
.gallery {
position: relative;
display: flex;
flex-direction: row;
justify-content: center;
margin: 20px 0;
figure {
margin: 0 5px;
a:after {
display: none;
}
img {
//width: 100%;
}
}
}
pre {
overflow-x: auto;
display: block;
background-color: #fafafa;
color: #999;
font-family: Consolas, monospace;
line-height: 1.428571429;
word-break: break-all;
padding: 20px;
border-radius: var(--card-border-radius);
code {
color: unset;
border: none;
background: none;
padding: 0;
}
}
a {
position: relative;
&:after {
content: "";
display: block;
position: absolute;
bottom: -3px;
left: 0;
width: 100%;
background-color: var(--accent-color);
opacity: 0.2;
height: 3px;
}
}
}
+56
View File
@@ -0,0 +1,56 @@
.taxonomy-type {
text-transform: uppercase;
color: var(--body-text-color);
font-weight: 500;
margin-bottom: 5px;
font-size: 1.6rem;
}
.taxonomy-card {
border-radius: var(--card-border-radius);
background-color: var(--card-background);
padding: 20px 20px;
@include box_shadow(1);
margin-bottom: 40px;
display: flex;
align-items: center;
.taxonomy-term {
font-size: 2.2rem;
margin: 0;
margin-top: 15px;
color: var(--card-text-color-main);
& + .taxonomy-description {
margin-top: 15px;
}
}
.taxonomy-description {
font-weight: normal;
color: var(--card-text-color-secondary);
font-size: 1.8rem;
margin: 0;
}
.taxonomy-details {
flex-grow: 1;
padding: 10px 0;
margin-right: 20px;
}
.taxonomy-image {
img {
width: 60px;
height: 60px;
}
}
.taxonomy-count {
color: var(--card-text-color-tertiary);
font-size: 1.4rem;
margin: 0;
font-weight: 500;
text-transform: uppercase;
}
}
+214
View File
@@ -0,0 +1,214 @@
/*!
* Hamburgers
* @description Tasty CSS-animated hamburgers
* @author Jonathan Suh @jonsuh
* @site https://jonsuh.com/hamburgers
* @link https://github.com/jonsuh/hamburgers
*/
.hamburger {
padding-top: 10px;
display: inline-block;
cursor: pointer;
transition-property: opacity, filter;
transition-duration: 0.15s;
transition-timing-function: linear;
font: inherit;
color: inherit;
text-transform: none;
background-color: transparent;
border: 0;
margin: 0;
overflow: visible;
}
.hamburger:hover {
opacity: 0.7;
}
.hamburger.is-active:hover {
opacity: 0.7;
}
.hamburger.is-active .hamburger-inner,
.hamburger.is-active .hamburger-inner::before,
.hamburger.is-active .hamburger-inner::after {
background-color: #000;
}
.hamburger-box {
width: 30px;
height: 24px;
display: inline-block;
position: relative;
}
.hamburger-inner {
display: block;
top: 50%;
margin-top: -2px;
}
.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
width: 30px;
height: 2px;
background-color: var(--card-text-color-main);
border-radius: 4px;
position: absolute;
transition-property: transform;
transition-duration: 0.15s;
transition-timing-function: ease;
}
.hamburger-inner::before,
.hamburger-inner::after {
content: "";
display: block;
}
.hamburger-inner::before {
top: -10px;
}
.hamburger-inner::after {
bottom: -10px;
}
.hamburger--spin .hamburger-inner {
transition-duration: 0.22s;
transition-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
}
.hamburger--spin .hamburger-inner::before {
transition: top 0.1s 0.25s ease-in, opacity 0.1s ease-in;
}
.hamburger--spin .hamburger-inner::after {
transition: bottom 0.1s 0.25s ease-in, transform 0.22s cubic-bezier(0.55, 0.055, 0.675, 0.19);
}
.hamburger--spin.is-active .hamburger-inner {
transform: rotate(225deg);
transition-delay: 0.12s;
transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}
.hamburger--spin.is-active .hamburger-inner::before {
top: 0;
opacity: 0;
transition: top 0.1s ease-out, opacity 0.1s 0.12s ease-out;
}
.hamburger--spin.is-active .hamburger-inner::after {
bottom: 0;
transform: rotate(-90deg);
transition: bottom 0.1s ease-out, transform 0.22s 0.12s cubic-bezier(0.215, 0.61, 0.355, 1);
}
#toggle-menu {
background: none;
border: none;
position: absolute;
right: 30px;
top: 30px;
z-index: 2;
cursor: pointer;
@media (min-width: $on-phone + 1) {
display: none;
}
outline: none;
&.is-active {
.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
background-color: var(--accent-color);
}
}
}
/* Menu style */
.menu {
list-style: none;
display: flex;
flex-direction: column;
margin: 30px 0;
@media (max-width: $on-phone) {
background-color: var(--card-background);
margin-top: 0;
padding: 15px 0;
@include box_shadow(1);
display: none;
&.show {
display: block;
}
}
@media (min-width: $on-phone + 1) {
align-items: flex-end;
}
li {
position: relative;
vertical-align: middle;
padding: 10px 0;
&:not(:last-of-type) {
margin-bottom: 20px;
@media (max-width: $on-desktop) {
margin-bottom: 10px;
}
}
@media (max-width: $on-phone) {
padding: 10px 30px;
}
@media (min-width: $on-phone + 1) and (max-width: ($on-desktop - 1)) {
padding: 10px 0;
}
@media (min-width: $on-phone + 1) {
width: 100%;
}
svg {
width: 32px;
height: 32px;
stroke-width: 1.33;
margin-right: 40px;
@media (max-width: $on-desktop) {
width: 30px;
height: 30px;
}
}
a {
height: 100%;
display: inline-flex;
align-items: center;
color: var(--body-text-color);
@media (max-width: $on-desktop) {
font-size: 1.5rem;
}
}
span {
flex: 1;
}
&.current {
a {
color: var(--accent-color);
font-weight: bold;
}
}
}
}
@media (max-width: $on-phone) {
.show-menu {
.site-info {
//@include box_shadow(2);
}
}
}
+21
View File
@@ -0,0 +1,21 @@
.pagination {
display: flex;
background-color: var(--card-background);
@include box_shadow(1);
border-radius: var(--card-border-radius);
overflow: hidden;
flex-wrap: wrap;
margin-bottom: 40px;
.page-link {
padding: 16px 32px;
display: inline-flex;
&.current {
font-weight: bold;
background-color: var(--card-background-selected);
color: var(--card-text-color-main);
}
color: var(--card-text-color-secondary);
}
}
+150
View File
@@ -0,0 +1,150 @@
.sidebar {
padding: 0 15px;
&.sticky {
@media (min-width: ($on-phone + 1)) {
position: sticky;
}
}
}
.left-sidebar {
display: flex;
flex-direction: column;
flex-shrink: 0;
@media (max-width: $on-phone) {
width: 100%;
padding: 30px 0;
max-width: none;
}
&.sticky {
top: 30px;
}
@media (min-width: $on-phone + 1) {
//justify-content: right;
//text-align: right;
width: 25%;
margin-right: 1%;
}
@media (min-width: $on-tablet) {
width: 25%;
margin-right: 1%;
}
@media (min-width: $on-desktop) {
width: 20%;
}
@media (min-width: $on-desktop-large) {
width: 15%;
}
}
.right-sidebar {
flex-shrink: 0;
&.sticky {
top: 30px;
}
@media (max-width: $on-desktop - 1) {
display: none;
}
@media (min-width: $on-tablet) {
width: 25%;
margin-left: 1%;
}
@media (min-width: $on-desktop + 1) {
width: 25%;
}
}
.site-info {
z-index: 1;
transition: box-shadow 0.5s ease;
@media (max-width: $on-phone) {
padding: 15px 30px;
}
.site-avatar {
position: relative;
margin: 0;
margin-bottom: 30px;
width: 150px;
height: 150px;
@media (min-width: $on-phone + 1) {
//margin-left: auto;
}
@media (max-width: $on-desktop) {
height: 120px;
width: 120px;
}
.site-logo {
width: 100%;
height: 100%;
border-radius: 100%;
@include box_shadow(1);
}
.emoji {
position: absolute;
width: 50px;
height: 50px;
line-height: 50px;
border-radius: 100%;
bottom: 0;
right: 0;
text-align: center;
font-size: 20px;
background-color: var(--card-background);
@include box_shadow(2);
@media (max-width: $on-desktop) {
width: 40px;
height: 40px;
line-height: 40px;
}
}
}
.site-name {
color: var(--accent-color);
font-size: 2.4rem;
margin: 0;
}
.site-description {
color: var(--body-text-color);
font-weight: lighter;
margin: 10px 0;
font-size: 2rem;
@media (max-width: $on-desktop) {
font-size: 1.8rem;
}
}
}
.sidebar {
.widget {
&:not(:last-of-type) {
margin-bottom: 40px;
&:after {
content: "";
width: 100px;
height: 2px;
background-color: var(--body-text-color);
display: block;
margin-top: 40px;
}
}
}
}
+79
View File
@@ -0,0 +1,79 @@
.widget {
.widget-title {
text-transform: uppercase;
color: var(--body-text-color);
font-weight: normal;
margin: 0;
margin-bottom: 10px;
font-size: 1.6rem;
}
.widget-icon {
svg {
width: 32px;
height: 32px;
stroke-width: 1.33px;
color: var(--body-text-color);
}
}
}
/* Tag cloud widget */
.tagCloud {
.tagCloud-tags {
display: flex;
flex-wrap: wrap;
a {
background: var(--card-background);
@include box_shadow(1);
border-radius: var(--tag-border-radius);
padding: 8px 20px;
color: var(--card-text-color-main);
margin-bottom: 10px;
margin-right: 5px;
font-size: 1.4rem;
}
}
}
/* Tweet widget */
.tweet-container {
.tweet--item {
.tweet--text {
font-size: 1.6rem;
color: var(--accent-color);
line-height: 1.75;
}
.tweet--time {
text-transform: uppercase;
a {
color: var(--body-text-color);
}
}
}
}
.widget.archive {
.archive-year {
margin-bottom: 10px;
a {
background-color: var(--card-background);
padding: 15px 25px;
border-radius: var(--card-border-radius);
@include box_shadow(1);
display: flex;
span.year {
flex: 1;
color: var(--card-text-color-main);
}
span.count {
color: var(--card-text-color-tertiary);
}
}
}
}