Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
chore: update docs and style (#269)
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonzq authored Apr 27, 2020
1 parent b46c810 commit 6805d69
Show file tree
Hide file tree
Showing 69 changed files with 540 additions and 454 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Hugo default output directory
public/
/exampleSite/resources/
/resources/_gen/assets/scss/temp

node_modules/
build/
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ English README | [简体中文说明](https://github.com/dillonzq/LoveIt/blob/ma

> **LoveIt** is a **clean**, **elegant** but **advanced** blog theme for [Hugo](https://gohugo.io/).
It is based on the original [LeaveIt Theme](https://github.com/liuzc/LeaveIt/) and [KeepIt Theme](https://github.com/liuzc/LeaveIt/).
It is based on the original [LeaveIt Theme](https://github.com/liuzc/LeaveIt) and [KeepIt Theme](https://github.com/liuzc/LeaveIt).

Since the three themes have a similar look, if you have questions about their differences,
read [Why choose LoveIt](#why-choose-loveit) so that you can choose the one that works best for you.
Expand Down
2 changes: 1 addition & 1 deletion README.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

> [LoveIt](https://github.com/dillonzq/LoveIt) 是一个**简洁****优雅****高效**[Hugo](https://gohugo.io/) 博客主题。
它的原型基于 [LeaveIt 主题](https://github.com/liuzc/LeaveIt/)[KeepIt 主题](https://github.com/liuzc/LeaveIt/)
它的原型基于 [LeaveIt 主题](https://github.com/liuzc/LeaveIt)[KeepIt 主题](https://github.com/liuzc/LeaveIt)

由于三个主题外观的相似性,如果你对于它们的不同之处有疑问,请阅读 [为什么选择 LoveIt](#为什么选择-LoveIt),以便你能选择最适合你的一个。

Expand Down
4 changes: 2 additions & 2 deletions assets/css/_core/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ html {
::selection {
background-color: $selection-color;

.dark & {
[theme=dark] & {
background-color: $selection-color-dark;
}
}
Expand All @@ -35,7 +35,7 @@ body {
overflow-wrap: break-word;
scrollbar-color: auto;

&.dark {
&[theme=dark] {
color: $global-font-color-dark;
background-color: $global-background-color-dark;
}
Expand Down
16 changes: 6 additions & 10 deletions assets/css/_core/_media.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@
.page {
width: 56%;
}

#header-desktop .header-wrapper {
padding: 0 8vw;
}

.search-dropdown.desktop {
right: 8vw;
}
}

@media only screen and (max-width: 1200px) {
Expand All @@ -18,11 +10,11 @@
}

#header-desktop .header-wrapper {
padding: 0 4vw;
padding-right: 1rem;
}

.search-dropdown.desktop {
right: 4vw;
right: 1rem;
}
}

Expand All @@ -38,6 +30,10 @@
.page {
width: 80%;
}

#header-desktop .header-wrapper {
padding-left: 1rem;
}
}

@media only screen and (max-width: 680px) {
Expand Down
7 changes: 7 additions & 0 deletions assets/css/_mixin/_details.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@mixin details-transition-open {
@include transition(max-height 0.8s cubic-bezier(0, 1, 0, 1) -0.1s);
}

@mixin details-transition-close {
@include transition(max-height 0.8s cubic-bezier(0.5, 0, 1, 0) 0s);
}
1 change: 1 addition & 0 deletions assets/css/_mixin/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
@import "_link";
@import "_blur";
@import "_summary";
@import "_details";
4 changes: 2 additions & 2 deletions assets/css/_mixin/_link.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
a {
color: if($light, $global-link-color, $single-link-color);

.dark & {
[theme=dark] & {
color: if($dark, $global-link-color-dark, $single-link-color-dark);
}

&:active,
&:hover {
color: if($light, $global-link-hover-color, $single-link-hover-color);

.dark & {
[theme=dark] & {
color: if($dark, $global-link-hover-color-dark, $single-link-hover-color-dark);
}
}
Expand Down
8 changes: 4 additions & 4 deletions assets/css/_mixin/_summary.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
color: $global-font-color;
border-bottom: 1px dashed $global-border-color;

.dark & {
[theme=dark] & {
color: $global-font-color-dark;
border-bottom: 1px dashed $global-border-color-dark;
}
Expand Down Expand Up @@ -47,7 +47,7 @@
overflow-wrap: break-word;
color: $global-font-secondary-color;

.dark & {
[theme=dark] & {
color: $global-font-secondary-color-dark;
}

Expand Down Expand Up @@ -78,7 +78,7 @@
margin-right: .3125rem;
color: $global-link-color;

.dark & {
[theme=dark] & {
color: $global-link-color-dark;
}
}
Expand All @@ -95,7 +95,7 @@
@include link(true, true);

b, strong {
.dark & {
[theme=dark] & {
color: $global-font-secondary-color-dark;
}
}
Expand Down
2 changes: 1 addition & 1 deletion assets/css/_page/_home.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
padding: .4rem;
color: $global-font-secondary-color;

.dark & {
[theme=dark] & {
color: $global-font-secondary-color-dark;
}
}
Expand Down
38 changes: 21 additions & 17 deletions assets/css/_page/_single.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
display: inline-block;
}

.dark & {
[theme=dark] & {
color: $global-font-secondary-color-dark;
}

Expand Down Expand Up @@ -88,7 +88,7 @@
font-weight: bold;
margin: 1.2rem 0;

.dark & {
[theme=dark] & {
font-weight: bolder;
}
}
Expand All @@ -103,7 +103,7 @@
margin-right: .3125rem;
color: $single-link-color;

.dark & {
[theme=dark] & {
color: $single-link-color-dark;
}
}
Expand All @@ -120,7 +120,7 @@
b, strong {
font-weight: bold;

.dark & {
[theme=dark] & {
color: #ddd;
}
}
Expand All @@ -131,18 +131,21 @@
word-break: break-all;
word-break: break-word;

.dark & b, .dark & strong {
[theme=dark] & b, [theme=dark] & strong {
color: $single-link-color-dark;
}
}

.dark a:hover b, .dark a:hover strong {
[theme=dark] a:hover b, [theme=dark] a:hover strong {
color: $single-link-hover-color-dark;
}

ul {
ul, ol {
margin: .5rem 0;
padding-left: 2rem;
padding-left: 2.5rem;
}

ul {
list-style-type: disc;
}

Expand All @@ -153,7 +156,7 @@
color: $global-font-secondary-color;
}

.dark & {
[theme=dark] & {
background: $code-background-color-dark;

rt {
Expand All @@ -168,7 +171,7 @@
&::-webkit-scrollbar {
background-color: $table-background-color;

.dark & {
[theme=dark] & {
background-color: $table-background-color-dark;
}
}
Expand All @@ -181,14 +184,14 @@
background: $table-background-color;
border-collapse: collapse;

.dark & {
[theme=dark] & {
background: $table-background-color-dark;
}

thead {
background: $table-thead-color;

.dark & {
[theme=dark] & {
background-color: $table-thead-color-dark;
}
}
Expand All @@ -197,7 +200,7 @@
padding: .3rem 1rem;
border: 1px solid darken($table-thead-color, 2%);

.dark & {
[theme=dark] & {
border-color: darken($table-thead-color-dark, 2%);
}
}
Expand Down Expand Up @@ -241,7 +244,7 @@
padding: .25rem .75rem;
margin: 1rem 0;

.dark & {
[theme=dark] & {
border-left-color: $blockquote-color-dark;
background-color: rgba($blockquote-color-dark, .2);
}
Expand All @@ -250,7 +253,7 @@
.footnotes {
color: $global-font-secondary-color;

.dark & {
[theme=dark] & {
color: $global-font-secondary-color-dark;
}

Expand All @@ -273,7 +276,7 @@
border-top: 1px dashed $global-border-color;
border-bottom: none;

.dark & {
[theme=dark] & {
border-top: 1px dashed $global-border-color-dark;
}
}
Expand All @@ -290,7 +293,7 @@
font-family: $code-font-family;
color: $code-color;

.dark & {
[theme=dark] & {
background-color: $global-background-color-dark;
border: 1px solid $global-border-color-dark;
border-bottom-color: $global-border-color-dark;
Expand All @@ -311,6 +314,7 @@

.version {
height: 1.25em;
vertical-align: text-bottom;
}
}

Expand Down
2 changes: 1 addition & 1 deletion assets/css/_partial/_archive/_tags.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
sup {
color: $global-font-secondary-color;

.dark & {
[theme=dark] & {
color: $global-font-secondary-color-dark;
}
}
Expand Down
4 changes: 2 additions & 2 deletions assets/css/_partial/_archive/_terms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
background-color: transparent;
}

.dark & {
[theme=dark] & {
color: $global-link-color-dark;

&:hover {
Expand All @@ -72,7 +72,7 @@
text-align: right;
color: $global-font-secondary-color;

.dark & {
[theme=dark] & {
color: $global-font-secondary-color-dark;
}
}
Expand Down
8 changes: 4 additions & 4 deletions assets/css/_partial/_details.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,25 @@
color: $global-font-secondary-color;
@include transition(transform 0.2s ease);

.dark & {
[theme=dark] & {
color: $global-font-secondary-color-dark;
}
}

.details-content {
max-height: 0;
overflow-y: hidden;
@include transition(max-height 0.8s cubic-bezier(0, 1, 0, 1) -0.1s);
@include details-transition-open;
}

&.open {
i.details-icon {
@include transform(rotate(180deg));
@include transform(rotate(90deg));
}

.details-content {
max-height: $MAX_LENGTH;
@include transition(max-height 0.8s cubic-bezier(0.5, 0, 1, 0) 0s);
@include details-transition-close;
}
}
}
2 changes: 1 addition & 1 deletion assets/css/_partial/_fixed-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
outline: none;
}

.dark & {
[theme=dark] & {
color: $global-font-secondary-color-dark;
background: $header-background-color-dark;

Expand Down
Loading

0 comments on commit 6805d69

Please sign in to comment.