Skip to content

Commit cca03ae

Browse files
committed
enhance typo
1 parent 51f003a commit cca03ae

19 files changed

+302
-181
lines changed

themes/lattice/layout/post.swig

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{% block main %}
66
<div class="mod-container">
77
<div class="grid">
8-
<div class="mod-main">
8+
<div class="mod-main typo">
99
{% set author = page.author|default({github_name:config.github.user, nick:config.author}) %}
1010
{{ partial('_partial/post/main', {post:page, author: author}) }}
1111
</div>

themes/lattice/source/css/_about/about.styl

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
margin-bottom: 15px
3535
&-tit
3636
font-size: 20px
37-
font-weight: bold
37+
font-weight: 300
3838

3939
.contact
4040
&-item

themes/lattice/source/css/_base/_config.styl

-3
This file was deleted.

themes/lattice/source/css/_base/_extend.styl

-63
This file was deleted.

themes/lattice/source/css/_base/_variables.styl renamed to themes/lattice/source/css/_base/_vars.styl

+18-14
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
2-
3-
41
// Colors
52
color-default = #646464
6-
color-accent = #2ebaae
3+
color-accent = #1abc9c
74
color-grey = #999
85
color-border = #ddd
9-
color-link = #258fb8
6+
color-link = #333
7+
color-dark = #000
108
color-background = #eee
119
color-sidebar-text = #777
12-
color-widget-background = #ddd
10+
color-widget-background = color-border
1311
color-widget-border = #ccc
1412
color-footer-background = #262a30
1513
color-mobile-nav-background = #191919
@@ -19,22 +17,28 @@ color-pinterest = #cb2027
1917
color-google = #dd4b39
2018
$color-theme = #6190e8
2119
$gainsboro = #eee
20+
color-primary = $color-theme
2221

23-
bg-primary = #6190e8
22+
bg-primary = $color-theme
23+
bg-block = #f8f8f8
24+
bg-table-th = #fbfbfb
25+
bg-table-hd = #f1f1f1
2426

2527
// Fonts
2628
$font-family-monospace = "Input Mono", "PT Mono", Consolas, Monaco, Menlo, monospace
27-
font-family = Tahoma, Helvetica, Arial, "Hiragino Sans GB", "Microsoft YaHei", sans-serif
28-
font-family2 = "Lantinghei SC", Helvetica, Arial, "Hiragino Sans GB", "Microsoft YaHei", sans-serif
29+
font-family = "PingFang SC", "Lantinghei SC", "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans
30+
font-family-title = "PingFang SC", Verdana, "Helvetica Neue", "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif
2931
font-sans = "Helvetica Neue", Helvetica, Arial, sans-serif
30-
font-serif = Georgia, "Times New Roman", serif
31-
font-mono = "Source Code Pro", Consolas, Monaco, Menlo, Consolas, monospace
32+
font-serif = Palatino, Optima, Georgia, serif
33+
font-mono = $font-family-monospace
3234
font-icon = FontAwesome
3335
font-icon-path = "fonts/fontawesome-webfont"
3436
font-icon-version = "4.0.3"
35-
font-size = 14px
36-
line-height = 1.5
37-
line-height-title = 1.1em
37+
font-size = 1em
38+
font-weight = 300
39+
font-weight-title = 100
40+
line-height = 1.8
41+
line-height-title = 1.35
3842

3943

4044
$fa-var-twitter = "\f099"

themes/lattice/source/css/_base/backtop.styl

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@
1010
color: #fff
1111
text-align: center
1212
line-height: 40px
13-
font-size: 20px
13+
font-size: 20px
14+
+mobile()
15+
border-radius: 50%

themes/lattice/source/css/_base/footer.styl

+1-5
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,4 @@
2222
margin: 10px 0
2323
font-size: 12px
2424
& p
25-
margin-bottom: 5px
26-
27-
28-
29-
25+
margin-bottom: 5px

themes/lattice/source/css/_base/header.styl

-3
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
height: 100%
4040
margin: 0 10px
4141
line-height: 60px
42-
font-size: 16px
4342
& a
4443
padding: 0 15px
4544
height: 100%
@@ -67,7 +66,6 @@
6766
width: 30px
6867
line-height: 30px
6968
text-align: center
70-
font-size: 16px
7169
&-form
7270
overflow:hidden
7371
opacity: 0
@@ -129,7 +127,6 @@
129127
float: none
130128
height: 30px
131129
line-height: 30px
132-
font-size: 14px
133130
}
134131
& .active:after {
135132
height: 100%
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
@import "_mixins"
2+
@import "_vars"
3+
@import "reset"
4+
@import "typo"
5+
@import "layout"
6+
@import "backtop"
7+
@import "duoshuo"
8+
@import "footer"
9+
@import "header"
10+
@import "loading"
11+
@import "pagination"
12+
@import "sidebar"
+159-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
1+
/**
2+
* aotu.reset inspired by http://typo.sofi.sh/
3+
*/
4+
5+
*, *:before, *:after
6+
box-sizing: border-box
7+
18
html,body
9+
display: block
210
height: 100%
311

12+
/* 内外边距通常让各个浏览器样式的表现位置不同 */
413
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td
514
margin: 0
615
padding: 0
@@ -11,25 +20,166 @@ html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abb
1120
font-size: 100%
1221
vertical-align: baseline
1322

14-
ul,li
23+
/* 重设 HTML5 标签, IE 需要在 js 中 createElement(TAG) */
24+
article, aside, details, figcaption, figure, footer, header, menu, nav, section
25+
display: block
26+
27+
/* HTML5 媒体文件跟 img 保持一致 */
28+
audio, canvas, video
29+
display: inline-block
30+
31+
/* 要注意表单元素并不继承父级 font 的问题 */
32+
body, button, input, select, textarea
33+
font: font-weight font-size/line-height font-family
34+
35+
button::-moz-focus-inner,
36+
input::-moz-focus-inner
37+
padding: 0
38+
border: 0
39+
40+
/* 去掉各Table cell 的边距并让其边重合 */
41+
table
42+
border-collapse: collapse
43+
border-spacing: 0
44+
45+
/* 去除默认边框 */
46+
fieldset, img
47+
border: 0
48+
49+
/* 块/段落引用 */
50+
blockquote
51+
position: relative
52+
color: color-grey
53+
font-weight: 400
54+
border-left: 1px solid color-accent
55+
padding-left: 1em
56+
margin: 1em 3em 1em 2em
57+
& p
58+
margin-bottom: 0.3em
59+
& *:last-child
60+
margin-bottom: 0
61+
62+
@media only screen and ( max-width: 640px )
63+
blockquote
64+
margin: 1em 0
65+
66+
/* Firefox 以外,元素没有下划线,需添加 */
67+
acronym, abbr
68+
border-bottom: 1px dotted
69+
font-variant: normal
70+
71+
/* 添加鼠标问号,进一步确保应用的语义是正确的(要知道,交互他们也有洁癖,如果你不去掉,那得多花点口舌) */
72+
abbr
73+
cursor: help
74+
75+
/* 一致的 del 样式 */
76+
del
77+
text-decoration: line-through
78+
79+
address, caption, cite, code, dfn, em, th, var
80+
font-style: normal
81+
font-weight: 400
82+
83+
/* 去掉列表前的标识, li 会继承,大部分网站通常用列表来很多内容,所以应该当去 */
84+
ul, ol
1585
list-style: none
1686

87+
/* 对齐是排版最重要的因素, 别让什么都居中 */
88+
caption, th
89+
text-align: left
90+
91+
q:before, q:after
92+
content: ''
93+
94+
/* 统一上标和下标 */
95+
sub, sup
96+
font-size: 75%
97+
line-height: 0
98+
position: relative
99+
100+
:root sub, :root sup
101+
vertical-align: baseline; /* for ie9 and other modern browsers */
102+
103+
sup
104+
top: -0.5em
105+
106+
sub
107+
bottom: -0.25em
108+
17109
body
18-
font: font-size/line-height font-family
19110
background: #fff
20111
color: color-default
21112
-webkit-font-smoothing: antialiased
22113
-webkit-text-size-adjust: 100%
114+
-ms-text-size-adjust: 100%;
115+
text-rendering: optimizelegibility
23116

24117
a
25-
color: color-default
118+
color: color-link
26119
text-decoration: none
27120
&:hover
28121
color: color-accent
29122

30-
sup
31-
vertical-align: super
32-
font-size: smaller
33-
34-
.container-bg
35-
background: #fff
123+
/* 标记,类似于手写的荧光笔的作用 */
124+
mark
125+
background: #fffdd1
126+
border-bottom: 1px solid #ffedce
127+
padding: 2px
128+
margin: 0 5px
129+
130+
/* 代码片断 */
131+
pre, code, pre tt
132+
font-family: font-mono
133+
word-break: break-all
134+
pre
135+
background: bg-block
136+
border: 1px solid color-border
137+
padding: 1em 1.5em
138+
display: block
139+
-webkit-overflow-scrolling: touch
140+
code
141+
background: bg-block
142+
text-shadow: 0 1px #fff
143+
padding: 0 0.3em
144+
145+
/* 一致化 horizontal rule */
146+
hr
147+
border: none
148+
border-bottom: 1px solid #cfcfcf
149+
margin-bottom: 0.8em
150+
height: 10px
151+
152+
/* 底部印刷体、版本等标记 */
153+
small,
154+
/* 图片说明 */
155+
figcaption
156+
font-size: 0.9em
157+
color: color-grey
158+
159+
strong, b
160+
font-weight: bold
161+
color: color-dark
162+
163+
/* 可拖动文件添加拖动手势 */
164+
[draggable]
165+
cursor: move
166+
167+
/* clearfix */
168+
.clearfix
169+
zoom: 1
170+
&:before, &:after
171+
content: ""
172+
display: table
173+
&:after
174+
clear: both
175+
176+
/* basic title styles */
177+
h1, h2, h3, h4, h5, h6
178+
font-weight: font-weight-title
179+
line-height: line-height-title
180+
font-family: font-family-title
181+
color: color-dark
182+
183+
/* responsive img */
184+
img
185+
max-width: 100%

0 commit comments

Comments
 (0)