Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 2013887

Browse files
committedDec 5, 2019
feat: add tailwindcss & update color
1 parent 68af24b commit 2013887

13 files changed

+733
-23
lines changed
 

‎.eslintrc.js

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ module.exports = {
5252
'no-irregular-whitespace': 0,
5353
'consistent-return': 0,
5454
'import/no-extraneous-dependencies': 0,
55+
'global-require': 0,
5556
},
5657
parserOptions: {
5758
parser: '@typescript-eslint/parser',

‎package.json

+2
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@
103103
"less-loader": "^4.1.0",
104104
"lint-staged": "^8.1.5",
105105
"markdown-it-task-lists": "^2.1.1",
106+
"postcss-import": "^12.0.1",
107+
"tailwindcss": "^1.1.4",
106108
"typescript": "^3.0.0",
107109
"vue-cli-plugin-electron-builder": "^1.4.0",
108110
"vue-template-compiler": "^2.6.10"

‎postcss.config.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
module.exports = {
2-
plugins: {
3-
autoprefixer: {},
4-
},
2+
plugins: [
3+
require('postcss-import'),
4+
require('tailwindcss'),
5+
require('autoprefixer'),
6+
],
57
}

‎src/App.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default class App extends Vue {
3232
/* Global CSS */
3333
body {
3434
background: #fff;
35-
color: #41464b;
35+
color: #555;
3636
}
3737
3838
::-webkit-scrollbar{

‎src/assets/logo.png

6.85 KB
Loading

‎src/assets/styles/custom.less

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.ant-table {
22
background: #fff;
3-
color: #41464b;
3+
color: #555;
44
}
55
.ant-table-tbody {
66
.ant-table-row:nth-of-type(2n) {

‎src/assets/styles/tailwind.css

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;

‎src/assets/styles/var.less

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
@primary-color: #41464b;
2-
@primary-bg: #F9F7F3;
1+
@primary-color: #555;
2+
@primary-bg: #f7f6f6;
33
@danger-color: #fa5252;
44

55
@border-radius-base : 2px;
66
@link-color: #1067de;
77
@border-color: #e8e8e88a;
88

9-
@btn-default-border: #eaeaea;
9+
@btn-default-border: #eaeaea;
10+
11+
@label-color: #555;

‎src/components/Main.vue

+39-8
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,35 @@
66
>
77
<div class="top-container">
88
<div class="logo">
9-
<img class="img" src="@/assets/logo-hey.png">
9+
<img class="img" src="@/assets/logo.png">
1010
</div>
1111
<a-menu mode="inline" :defaultSelectedKeys="['articles']" @click="clickMenu">
1212
<a-menu-item key="articles">
13-
<i class="zwicon-document menu-icon"></i>
14-
<span class="nav-text">{{ $t('article') }}</span>
13+
<div class="menu-item">
14+
<div>
15+
<i class="zwicon-document menu-icon"></i>
16+
<span class="nav-text">{{ $t('article') }}</span>
17+
</div>
18+
<span class="number">{{ site.posts.length }}</span>
19+
</div>
1520
</a-menu-item>
1621
<a-menu-item key="menu">
17-
<i class="zwicon-grid menu-icon"></i>
18-
<span class="nav-text">{{ $t('menu') }}</span>
22+
<div class="menu-item">
23+
<div>
24+
<i class="zwicon-grid menu-icon"></i>
25+
<span class="nav-text">{{ $t('menu') }}</span>
26+
</div>
27+
<span class="number">{{ site.menus.length }}</span>
28+
</div>
1929
</a-menu-item>
2030
<a-menu-item key="tags">
21-
<i class="zwicon-price-tag menu-icon"></i>
22-
<span class="nav-text">{{ $t('tag') }}</span>
31+
<div class="menu-item">
32+
<div>
33+
<i class="zwicon-price-tag menu-icon"></i>
34+
<span class="nav-text">{{ $t('tag') }}</span>
35+
</div>
36+
<span class="number">{{ site.tags.length }}</span>
37+
</div>
2338
</a-menu-item>
2439
<a-menu-item key="theme">
2540
<i class="zwicon-palette menu-icon"></i>
@@ -253,7 +268,11 @@ export default class App extends Vue {
253268
254269
/deep/ .ant-menu {
255270
background: @primary-bg;
256-
color: @primary-color;
271+
@apply text-gray-500;
272+
}
273+
274+
/deep/ .ant-menu-item {
275+
padding-left: 16px !important;
257276
}
258277
259278
/deep/ .ant-menu-vertical .ant-menu-item:after, .ant-menu-vertical-left .ant-menu-item:after, .ant-menu-vertical-right .ant-menu-item:after, .ant-menu-inline .ant-menu-item:after {
@@ -344,6 +363,18 @@ export default class App extends Vue {
344363
}
345364
}
346365
366+
.nav-text {
367+
font-weight: normal;
368+
}
369+
370+
.menu-item {
371+
display: flex;
372+
justify-content: space-between;
373+
.number {
374+
font-weight: lighter;
375+
}
376+
}
377+
347378
.menu-icon {
348379
font-size: 17px;
349380
margin-right: 8px;

‎src/components/MarkdownEditor.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -347,12 +347,12 @@ export default {
347347
padding: 0;
348348
}
349349
.editor-toolbar button.active, .editor-toolbar button:hover {
350-
border-color: #41464b;
350+
border-color: #555;
351351
background: #f8d65f;
352352
border-style: dashed;
353353
}
354354
.editor-toolbar button {
355-
color: #41464b !important;
355+
color: #555 !important;
356356
width: 32px;
357357
height: 32px;
358358
border-radius: 2px;

‎src/main.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import Vue from 'vue'
22
import moment from 'moment'
33
import Antd from 'ant-design-vue'
4+
import '@/assets/styles/tailwind.css'
45
import '@/assets/styles/main.less'
56
import VueI18n from 'vue-i18n'
67
import Prism from 'prismjs'

‎tailwind.config.js

+491
Large diffs are not rendered by default.

‎yarn.lock

+182-5
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)
Please sign in to comment.