diff options
author | Li Jin <dragon-fly@qq.com> | 2021-04-19 23:41:33 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2021-04-19 23:41:33 +0800 |
commit | 5d3b07801456d16dcc2c75dcccd48d508a6b60cc (patch) | |
tree | 2df1a154bf58d93f2475df02afbd15f1a8ba2963 /doc/docs/.vuepress/theme/styles/index.styl | |
parent | ea82666506b57d6e905b7f2e5fe78498fe5a7abd (diff) | |
download | yuescript-5d3b07801456d16dcc2c75dcccd48d508a6b60cc.tar.gz yuescript-5d3b07801456d16dcc2c75dcccd48d508a6b60cc.tar.bz2 yuescript-5d3b07801456d16dcc2c75dcccd48d508a6b60cc.zip |
first commit for Yuescript document site.
Diffstat (limited to 'doc/docs/.vuepress/theme/styles/index.styl')
-rw-r--r-- | doc/docs/.vuepress/theme/styles/index.styl | 202 |
1 files changed, 202 insertions, 0 deletions
diff --git a/doc/docs/.vuepress/theme/styles/index.styl b/doc/docs/.vuepress/theme/styles/index.styl new file mode 100644 index 0000000..ecef658 --- /dev/null +++ b/doc/docs/.vuepress/theme/styles/index.styl | |||
@@ -0,0 +1,202 @@ | |||
1 | @require './config' | ||
2 | @require './code' | ||
3 | @require './custom-blocks' | ||
4 | @require './arrow' | ||
5 | @require './wrapper' | ||
6 | @require './toc' | ||
7 | |||
8 | html, body | ||
9 | padding 0 | ||
10 | margin 0 | ||
11 | background-color #fff | ||
12 | |||
13 | body | ||
14 | font-family -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif | ||
15 | -webkit-font-smoothing antialiased | ||
16 | -moz-osx-font-smoothing grayscale | ||
17 | font-size 16px | ||
18 | color $textColor | ||
19 | |||
20 | .page | ||
21 | padding-left $sidebarWidth | ||
22 | |||
23 | .navbar | ||
24 | position fixed | ||
25 | z-index 20 | ||
26 | top 0 | ||
27 | left 0 | ||
28 | right 0 | ||
29 | height $navbarHeight | ||
30 | background-color #fff | ||
31 | box-sizing border-box | ||
32 | border-bottom 1px solid $borderColor | ||
33 | |||
34 | .sidebar-mask | ||
35 | position fixed | ||
36 | z-index 9 | ||
37 | top 0 | ||
38 | left 0 | ||
39 | width 100vw | ||
40 | height 100vh | ||
41 | display none | ||
42 | |||
43 | .sidebar | ||
44 | font-size 16px | ||
45 | background-color #fff | ||
46 | width $sidebarWidth | ||
47 | position fixed | ||
48 | z-index 10 | ||
49 | margin 0 | ||
50 | top $navbarHeight | ||
51 | left 0 | ||
52 | bottom 0 | ||
53 | box-sizing border-box | ||
54 | border-right 1px solid $borderColor | ||
55 | overflow-y auto | ||
56 | |||
57 | {$contentClass}:not(.custom) | ||
58 | @extend $wrapper | ||
59 | > *:first-child | ||
60 | margin-top $navbarHeight | ||
61 | |||
62 | a:hover | ||
63 | text-decoration underline | ||
64 | |||
65 | p.demo | ||
66 | padding 1rem 1.5rem | ||
67 | border 1px solid #ddd | ||
68 | border-radius 4px | ||
69 | |||
70 | img | ||
71 | max-width 100% | ||
72 | |||
73 | {$contentClass}.custom | ||
74 | padding 0 | ||
75 | margin 0 | ||
76 | |||
77 | img | ||
78 | max-width 100% | ||
79 | |||
80 | a | ||
81 | font-weight 500 | ||
82 | color $accentColor | ||
83 | text-decoration none | ||
84 | |||
85 | p a code | ||
86 | font-weight 400 | ||
87 | color $accentColor | ||
88 | |||
89 | kbd | ||
90 | background #eee | ||
91 | border solid 0.15rem #ddd | ||
92 | border-bottom solid 0.25rem #ddd | ||
93 | border-radius 0.15rem | ||
94 | padding 0 0.15em | ||
95 | |||
96 | blockquote | ||
97 | font-size 1rem | ||
98 | color #999; | ||
99 | border-left .2rem solid #dfe2e5 | ||
100 | margin 1rem 0 | ||
101 | padding .25rem 0 .25rem 1rem | ||
102 | |||
103 | & > p | ||
104 | margin 0 | ||
105 | |||
106 | ul, ol | ||
107 | padding-left 1.2em | ||
108 | |||
109 | strong | ||
110 | font-weight 600 | ||
111 | |||
112 | h1, h2, h3, h4, h5, h6 | ||
113 | font-weight 600 | ||
114 | line-height 1.25 | ||
115 | |||
116 | {$contentClass}:not(.custom) > & | ||
117 | margin-top (0.5rem - $navbarHeight) | ||
118 | padding-top ($navbarHeight + 1rem) | ||
119 | margin-bottom 0 | ||
120 | |||
121 | &:first-child | ||
122 | margin-top -1.5rem | ||
123 | margin-bottom 1rem | ||
124 | |||
125 | + p, + pre, + .custom-block | ||
126 | margin-top 2rem | ||
127 | |||
128 | &:focus .header-anchor, | ||
129 | &:hover .header-anchor | ||
130 | opacity: 1 | ||
131 | |||
132 | h1 | ||
133 | font-size 2.2rem | ||
134 | |||
135 | h2 | ||
136 | font-size 1.65rem | ||
137 | padding-bottom .3rem | ||
138 | border-bottom 1px solid $borderColor | ||
139 | |||
140 | h3 | ||
141 | font-size 1.35rem | ||
142 | |||
143 | a.header-anchor | ||
144 | font-size 0.85em | ||
145 | float left | ||
146 | margin-left -0.87em | ||
147 | padding-right 0.23em | ||
148 | margin-top 0.125em | ||
149 | opacity 0 | ||
150 | |||
151 | &:focus, | ||
152 | &:hover | ||
153 | text-decoration none | ||
154 | |||
155 | code, kbd, .line-number | ||
156 | font-family Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace | ||
157 | |||
158 | p, ul, ol | ||
159 | line-height 1.7 | ||
160 | |||
161 | hr | ||
162 | border 0 | ||
163 | border-top 1px solid $borderColor | ||
164 | |||
165 | table | ||
166 | border-collapse collapse | ||
167 | margin 1rem 0 | ||
168 | display: block | ||
169 | overflow-x: auto | ||
170 | |||
171 | tr | ||
172 | border-top 1px solid #dfe2e5 | ||
173 | |||
174 | &:nth-child(2n) | ||
175 | background-color #f6f8fa | ||
176 | |||
177 | th, td | ||
178 | border 1px solid #dfe2e5 | ||
179 | padding .6em 1em | ||
180 | |||
181 | .theme-container | ||
182 | &.sidebar-open | ||
183 | .sidebar-mask | ||
184 | display: block | ||
185 | |||
186 | &.no-navbar | ||
187 | {$contentClass}:not(.custom) > h1, h2, h3, h4, h5, h6 | ||
188 | margin-top 1.5rem | ||
189 | padding-top 0 | ||
190 | |||
191 | .sidebar | ||
192 | top 0 | ||
193 | |||
194 | @media (min-width: ($MQMobile + 1px)) | ||
195 | .theme-container.no-sidebar | ||
196 | .sidebar | ||
197 | display none | ||
198 | |||
199 | .page | ||
200 | padding-left 0 | ||
201 | |||
202 | @require 'mobile.styl' | ||