-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: tailwindcss 升级为 2.0 && 支持深色模式手动切换
- Loading branch information
Showing
24 changed files
with
3,622 additions
and
228 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
.DS_Store | ||
.idea/ | ||
.idea/ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const themeDir = __dirname + '/../../'; | ||
|
||
module.exports = { | ||
plugins: [ | ||
require('postcss-import')({ path: [themeDir] }), | ||
require('tailwindcss')(themeDir + 'assets/css/tailwind.config.js'), | ||
require('autoprefixer')(), | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,162 @@ | ||
.post-content { | ||
line-height: 1.625; | ||
color: #424242; | ||
} | ||
|
||
.post-content h2 { | ||
font-size: 140%; | ||
} | ||
|
||
.post-content h3 { | ||
font-size: 120%; | ||
} | ||
|
||
.post-content h2, | ||
.post-content h3 { | ||
margin: 2rem 0 0.3rem; | ||
font-weight: 700; | ||
} | ||
|
||
.post-content h2:target, | ||
.post-content h3:target { | ||
padding-top: 5rem; | ||
} | ||
|
||
.post-content ul, | ||
.post-content ol { | ||
list-style-type: initial; | ||
padding: 0.5rem 0 1rem 1.5rem; | ||
} | ||
|
||
.post-content ul.list-none { | ||
padding: 0 0 0 1rem; | ||
} | ||
|
||
.post-content ul ul { | ||
list-style-type: circle; | ||
padding-left: 1.5rem; | ||
} | ||
|
||
.post-content ul ul ul { | ||
list-style-type: square; | ||
margin-bottom: 0px; | ||
} | ||
|
||
.post-content ul.list-none { | ||
list-style-type: none; | ||
} | ||
|
||
.post-content p code, | ||
.post-content li code { | ||
background-color: #f0f3f3; | ||
padding: 0.1rem 0.4rem; | ||
border-radius: 3px; | ||
color: #805ad5; | ||
} | ||
|
||
.post-content p { | ||
margin: 0.5rem 0 1rem; | ||
} | ||
|
||
.post-content img { | ||
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); | ||
margin: 1.5rem auto; | ||
} | ||
|
||
.post-content a { | ||
color: #0e7490; | ||
text-decoration: none; | ||
font-weight: 500; | ||
box-shadow: inset 0 -0.125em 0 0 #fff, inset 0 -0.375em 0 0 rgb(165 243 252 / 40%); | ||
} | ||
|
||
.post-content a:hover { | ||
color: #0b4657; | ||
} | ||
|
||
.dark .post-content a:hover { | ||
color: #0e7490; | ||
} | ||
|
||
.dark .post-content a { | ||
color: #2fbfe7; | ||
box-shadow: inset 0 -0.125em 0 0 #000, inset 0 -0.375em 0 0 rgb(165 243 252 / 40%); | ||
} | ||
|
||
.post-content blockquote { | ||
color: #9e9e9e; | ||
padding-left: 1rem; | ||
border-left-width: 4px; | ||
border-color: #9e9e9e; | ||
font-style: italic; | ||
} | ||
|
||
.post-content pre, | ||
.post-content .highlight { | ||
padding-top: 0.5rem; | ||
padding-bottom: 0.5rem; | ||
font-size: 0.875rem; | ||
} | ||
|
||
::selection { | ||
background: #e9d8fd; | ||
color: #202684; | ||
/* WebKit/Blink Browsers */ | ||
} | ||
|
||
::-moz-selection { | ||
background: #e9d8fd; | ||
color: #202684; | ||
/* Gecko Browsers */ | ||
} | ||
|
||
a:focus { | ||
outline: none; | ||
background: #e9d8fd; | ||
} | ||
|
||
.dark a:focus { | ||
outline: none; | ||
background: #000000; | ||
} | ||
|
||
|
||
/* 侧边导航 */ | ||
|
||
#menu-content > ul { | ||
padding: none; | ||
} | ||
|
||
#TableOfContents > ul { | ||
list-style-type: none; | ||
padding-left: 0; | ||
} | ||
|
||
#TableOfContents li { | ||
padding-top: 0.5em; | ||
} | ||
|
||
#TableOfContents > ul > li ul { | ||
list-style-type: none; | ||
padding-left: 1.5em; | ||
} | ||
|
||
#TableOfContents a { | ||
transition: all 0.2s ease !important; | ||
} | ||
#TableOfContents a:hover { | ||
color: #1a202c !important; | ||
transform: translateX(2px) !important; | ||
} | ||
|
||
.dark #TableOfContents a:hover { | ||
color: #fdfdfd !important; | ||
transform: translateX(2px) !important; | ||
} | ||
|
||
.my-iconfont { | ||
font-family: "iconfont" !important; | ||
font-style: normal; | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* Tailwind base - put variables under: tailwind.config.js */ | ||
@import "node_modules/tailwindcss/base"; | ||
/* Tailwind component classes registered by plugins*/ | ||
@import "node_modules/tailwindcss/components"; | ||
/* Site Specific */ | ||
@import "assets/css/site"; | ||
/* Tailwind's utility classes - generated based on config file */ | ||
@import "node_modules/tailwindcss/utilities"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
const themeDir = __dirname + '/../../'; | ||
|
||
module.exports = { | ||
purge: { | ||
content: [ | ||
'./layouts/**/*.html', | ||
'./content/**/*.md', | ||
'./content/**/*.html', | ||
themeDir + 'layouts/**/*.html', | ||
themeDir + 'exampleSite/content/**/*.html', | ||
themeDir + 'exampleSite/content/**/*.md', | ||
], | ||
}, | ||
theme: { | ||
fontFamily: { | ||
sans: [ | ||
'Inter', | ||
'system-ui', | ||
'-apple-system', | ||
'BlinkMacSystemFont', | ||
'Segoe UI', | ||
'Roboto', | ||
'Helvetica Neue', | ||
'Arial', | ||
'Noto Sans', | ||
'sans-serif', | ||
'Apple Color Emoji', | ||
'Segoe UI Emoji', | ||
'Segoe UI Symbol', | ||
'Noto Color Emoji', | ||
], | ||
serif: [ | ||
'Georgia', | ||
'Cambria', | ||
'Times New Roman', | ||
'Times', | ||
'serif', | ||
], | ||
mono: [ | ||
'Menlo', | ||
'Monaco', | ||
'Consolas', | ||
'Liberation Mono', | ||
'Courier New', | ||
'monospace' | ||
] | ||
}, | ||
}, | ||
darkMode: 'class', | ||
variants: {}, | ||
plugins: [], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.