lm2doc 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
@@ -10,7 +10,7 @@ module Lm2doc
10
10
  end
11
11
 
12
12
  def theme
13
- Lm2doc.theme("bootstrap")
13
+ Lm2doc.theme("simple")
14
14
  end
15
15
 
16
16
  def parse_argv
@@ -23,7 +23,7 @@ Gem::Specification.new do |gem|
23
23
  gem.add_dependency "pygments.rb", "~> 0.2.13"
24
24
 
25
25
  gem.add_dependency "compass"
26
- gem.add_dependency "bootstrap-sass", "~> 2.2.1.1"
26
+ gem.add_dependency "bootstrap-sass", "~> 2.2.2.0"
27
27
 
28
28
 
29
29
  # Test & Development
@@ -1,12 +1,112 @@
1
1
  @import "compass";
2
2
 
3
- $baseFontSize: 16px;
3
+ $baseFontSize: 15px;
4
4
  $baseLineHeight: $baseFontSize * 1.5;
5
- @import "bootstrap";
5
+ // Core variables and mixins
6
+ @import "bootstrap/variables"; // Modify this for custom colors, font-sizes, etc
7
+ @import "bootstrap/mixins";
8
+
9
+ // CSS Reset
10
+ // @import "bootstrap/reset";
11
+
12
+ // @media print {
13
+ // * {
14
+ // text-shadow: inherit !important;
15
+ // color: inherit !important; // Black prints faster: h5bp.com/s
16
+ // background: inherit !important;
17
+ // box-shadow: inherit !important;
18
+ // }
19
+ // }
20
+
21
+
22
+ // Grid system and page structure
23
+ @import "bootstrap/scaffolding";
24
+ @import "bootstrap/grid";
25
+ @import "bootstrap/layouts";
26
+
27
+ // Base CSS
28
+ @import "bootstrap/type";
29
+ @import "bootstrap/code";
30
+ @import "bootstrap/forms";
31
+ @import "bootstrap/tables";
32
+
33
+ // Components: common
34
+ @import "bootstrap/sprites";
35
+ @import "bootstrap/dropdowns";
36
+ @import "bootstrap/wells";
37
+ @import "bootstrap/component-animations";
38
+ @import "bootstrap/close";
39
+
40
+ // Components: Buttons & Alerts
41
+ @import "bootstrap/buttons";
42
+ @import "bootstrap/button-groups";
43
+ @import "bootstrap/alerts"; // Note: alerts share common CSS with buttons and thus have styles in buttons
44
+
45
+ // Components: Nav
46
+ @import "bootstrap/navs";
47
+ @import "bootstrap/navbar";
48
+ @import "bootstrap/breadcrumbs";
49
+ @import "bootstrap/pagination";
50
+ @import "bootstrap/pager";
51
+
52
+ // Components: Popovers
53
+ @import "bootstrap/modals";
54
+ @import "bootstrap/tooltip";
55
+ @import "bootstrap/popovers";
56
+
57
+ // Components: Misc
58
+ @import "bootstrap/thumbnails";
59
+ @import "bootstrap/media";
60
+ @import "bootstrap/labels-badges";
61
+ @import "bootstrap/progress-bars";
62
+ @import "bootstrap/accordion";
63
+ @import "bootstrap/carousel";
64
+ @import "bootstrap/hero-unit";
65
+
66
+ // Utility classes
67
+ @import "bootstrap/utilities"; // Has to be last to override when necessary
68
+
69
+
70
+
71
+
72
+ html, body {
73
+ margin: 0;
74
+ padding: 0;
75
+ }
76
+
77
+ @media print {
78
+ @page {
79
+ margin: 1cm;
80
+ }
81
+
82
+ body {
83
+ width: 19cm;
84
+ min-width: 19cm;
85
+ max-width: 19cm;
86
+ }
87
+
88
+ img, .thumbnail {
89
+ page-break-inside: avoid;
90
+ }
91
+ }
92
+
93
+ @media screen {
94
+ html, body {
95
+ background: gray;
96
+ }
97
+
98
+ body {
99
+ margin: 1cm auto;
100
+ width: 21cm;
101
+ min-height: 29.7cm;
102
+ @include box-sizing(border-box);
103
+ padding: 1cm;
104
+ background: white;
105
+ box-shadow: 0px 0px 0.5cm black;
106
+ }
107
+ }
6
108
 
7
109
  body {
8
- margin: 10px 30px;
9
- width: 800px;
10
110
  }
11
111
 
12
112
 
@@ -74,8 +174,6 @@ article {
74
174
  // border: 1px solid #999;
75
175
  // padding: 0.5em;
76
176
  // }
77
-
78
- //
79
177
  // }
80
178
 
81
179
  table {
@@ -86,6 +184,20 @@ article {
86
184
  white-space: nowrap;
87
185
  }
88
186
  }
187
+
188
+ pre {
189
+ font-size: $baseFontSize * 0.8;
190
+ white-space: pre;
191
+ word-break: normal;
192
+ word-wrap: normal;
193
+ overflow-x: auto;
194
+ line-height: 1.5;
195
+
196
+ code {
197
+ font-size: inherit;
198
+ @include experimental(tab-size, 4);
199
+ }
200
+ }
89
201
  }
90
202
 
91
203
 
@@ -124,22 +236,11 @@ article {
124
236
  }
125
237
 
126
238
  pre {
127
- font-size: $baseFontSize * 0.8;
128
- line-height: 1.5;
129
239
  @include border-radius(0px);
130
240
  border: none;
131
241
  margin: 0;
132
242
  padding: 0;
133
- white-space: pre;
134
243
  background: transparent;
135
- overflow-x: auto;
136
- word-break: normal;
137
- word-wrap: normal;
138
-
139
- code {
140
- font-size: inherit;
141
- tab-size: 4;
142
- }
143
244
  }
144
245
 
145
246
  .c { color: #999988; font-style: italic } /* Comment */
@@ -204,3 +305,9 @@ article {
204
305
  .il { color: #009999 } /* Literal.Number.Integer.Long */
205
306
  }
206
307
 
308
+
309
+ @media print {
310
+ .highlight pre {
311
+ overflow-x: hidden;
312
+ }
313
+ }
@@ -0,0 +1,63 @@
1
+ $baseSize: 12pt;
2
+ $baseLineHeight: $baseSize * 1.4;
3
+
4
+ $normalText: #333;
5
+ $normalBackground: #f5f5f5;
6
+ $normalBorder: darken(adjust-hue($normalBackground, -10), 7%) !default;
7
+
8
+ $warningText: #c09853 !default;
9
+ $warningBackground: #fcf8e3 !default;
10
+ $warningBorder: darken(adjust-hue($warningBackground, -10), 3%) !default;
11
+
12
+ $errorText: #b94a48 !default;
13
+ $errorBackground: #f2dede !default;
14
+ $errorBorder: darken(adjust-hue($errorBackground, -10), 3%) !default;
15
+
16
+ $successText: #468847 !default;
17
+ $successBackground: #dff0d8 !default;
18
+ $successBorder: darken(adjust-hue($successBackground, -10), 5%) !default;
19
+
20
+ $infoText: #3a87ad !default;
21
+ $infoBackground: #d9edf7 !default;
22
+ $infoBorder: darken(adjust-hue($infoBackground, -10), 7%) !default;
23
+
24
+ .box {
25
+ padding: ($baseSize * 0.5) ($baseSize * 1);
26
+ border-radius: 0.3em;
27
+ background-color: $normalBackground;
28
+ border: 1px solid $normalBorder;
29
+ }
30
+
31
+ .box-warning {
32
+ @extend .box;
33
+ background-color: $warningBackground;
34
+ border-color: $warningBorder;
35
+ color: $warningText;
36
+ }
37
+
38
+ .box-success {
39
+ @extend .box;
40
+ background-color: $successBackground;
41
+ border-color: $successBorder;
42
+ color: $successText;
43
+ }
44
+
45
+ .box-info {
46
+ @extend .box;
47
+ background-color: $infoBackground;
48
+ border-color: $infoBorder;
49
+ color: $infoText;
50
+ }
51
+
52
+ .box-normal {
53
+ @extend .box;
54
+ background-color: $normalBackground;
55
+ border-color: 1px solid $normalBorder;
56
+ }
57
+
58
+ .box-error, .box-danger {
59
+ @extend .box;
60
+ background-color: $errorBackground;
61
+ border-color: $errorBorder;
62
+ color: $errorText;
63
+ }
@@ -0,0 +1,11 @@
1
+ require "compass"
2
+ require 'compass/exec'
3
+
4
+ class SimpleTheme < Lm2doc::Theme
5
+ def initialize
6
+ self.dir = Pathname.new(__FILE__).dirname
7
+ end
8
+ end
9
+
10
+ Lm2doc::Theme.register("simple", SimpleTheme.new)
11
+
@@ -0,0 +1,325 @@
1
+ @import "compass";
2
+ @import "mixin";
3
+
4
+ html, body {
5
+ margin: 0;
6
+ padding: 0;
7
+ }
8
+
9
+ @media print {
10
+ @page {
11
+ margin: 1cm;
12
+ }
13
+
14
+ body {
15
+ width: 19cm;
16
+ min-width: 19cm;
17
+ max-width: 19cm;
18
+ }
19
+
20
+ img, .thumbnail {
21
+ page-break-inside: avoid;
22
+ }
23
+ }
24
+
25
+ @media screen {
26
+ html, body {
27
+ background: gray;
28
+ }
29
+
30
+ body {
31
+ margin: 1cm auto;
32
+ width: 21cm;
33
+ min-height: 29.7cm;
34
+ @include box-sizing(border-box);
35
+ padding: 1cm;
36
+ background: white;
37
+ box-shadow: 0px 0px 0.5cm black;
38
+ }
39
+ }
40
+
41
+ body {
42
+ font-size: $baseSize;
43
+ line-height: 1.4;
44
+ color: $normalText;
45
+ }
46
+
47
+ article {
48
+ /* ---------------------
49
+ * Basic Elements
50
+ * --------------------- */
51
+ h1, h2, h3, h4, h5, h6 {
52
+ margin: 1em 0 0.5em 0;
53
+ font-size: 1em;
54
+ }
55
+
56
+ h1 {
57
+ font-size: 2.5em;
58
+ margin-top: 0;
59
+ }
60
+
61
+ h2 {
62
+ font-size: 2em;
63
+ }
64
+
65
+ h3 {
66
+ font-size: 1.5em;
67
+ }
68
+
69
+ h4, h5, h6 {
70
+ margin-top: 1.5em;
71
+ }
72
+
73
+ dl, ul, ol, p, table, pre, blockquote {
74
+ margin-top: 0;
75
+ margin-bottom: 1em;
76
+ }
77
+
78
+ img, video {
79
+ max-width: 100%;
80
+ }
81
+
82
+ a {
83
+ color: #0088cc;
84
+ }
85
+
86
+ blockquote {
87
+ margin-left: 0.3em;
88
+ padding: 0 0 0 1em;
89
+ border-left: 5px solid #eeeeee;
90
+ }
91
+
92
+ dl {
93
+ dt {
94
+ margin: 0.8em 0 0.5em 0;
95
+ }
96
+
97
+ dd {
98
+ margin-left: 1.5em;
99
+ display: block;
100
+
101
+ > code {
102
+ @extend .box;
103
+ display: inline-block;
104
+ line-height: $baseLineHeight;
105
+ font-size: 0.9em;
106
+ }
107
+ }
108
+ }
109
+
110
+ ul, ol {
111
+ padding-left: 2.5em;
112
+
113
+ li {
114
+ margin: 0.5em 0;
115
+ }
116
+ }
117
+
118
+ p, li, td {
119
+ > code {
120
+ @extend .box;
121
+ color: rgb(221, 17, 68);
122
+ padding: 0.05em 0.5em;
123
+ white-space: nowrap;
124
+ font-size: 0.85em;
125
+ }
126
+ }
127
+
128
+ p + pre {
129
+ margin-top: -0.5em;
130
+ }
131
+
132
+ code {
133
+ @include experimental(tab-size, 4);
134
+ }
135
+
136
+
137
+
138
+ pre {
139
+ white-space: pre;
140
+ background-color: rgb(247, 247, 249);
141
+ border: 1px solid rgb(225, 225, 232);
142
+ padding: 0.5em 1em;
143
+ border-radius: 0.3em;
144
+ overflow-x: auto;
145
+
146
+ code {
147
+ font-size: 0.8em;
148
+ background-color: transparent;
149
+ border: none;
150
+ padding: 0;
151
+ white-space: inherit;
152
+ color: inherit;
153
+ }
154
+ }
155
+
156
+ table {
157
+ border-spacing: 0;
158
+ border: 1px solid #ddd;
159
+ border-radius: 0.3em;
160
+ width: 100%;
161
+
162
+ td, th {
163
+ border-top: 1px solid #ddd;
164
+ border-left: 1px solid #ddd;
165
+ padding: 0.5em;
166
+ text-align: left;
167
+
168
+
169
+ &:first-child {
170
+ border-left-width: 0;
171
+ }
172
+ }
173
+
174
+ tr:first-child {
175
+ td, th {
176
+ border-top-width: 0;
177
+ }
178
+ }
179
+
180
+ thead + tbody {
181
+ tr:first-child {
182
+ td, th {
183
+ border-top-width: 1px;
184
+ }
185
+ }
186
+ }
187
+ }
188
+
189
+ /* ---------------------
190
+ * Class Elements
191
+ * --------------------- */
192
+ .thumbnail {
193
+ margin: 1em 2em;
194
+ display: block;
195
+ padding: 0.3em;
196
+ border: 1px solid #ddd;
197
+ border-radius: 0.3em;
198
+ text-align: center;
199
+
200
+ figcaption {
201
+ margin-top: 0.2em;
202
+ // text-align: center;
203
+ font-style: italic;
204
+ }
205
+ }
206
+
207
+ .highlight {
208
+ margin-bottom: 1em;
209
+
210
+ table {
211
+ border: none;
212
+ margin: 0;
213
+
214
+ td, th {
215
+ border: none;
216
+ }
217
+ }
218
+
219
+ .lines {
220
+ width: 33px;
221
+ background-color: #fbfbfc;
222
+ border: 1px solid #e1e1e8;
223
+ border-right-color: #ececf0;
224
+ border-radius: 0.3em 0 0 0.3em;
225
+
226
+ pre {
227
+ color: #bebec5;
228
+ }
229
+
230
+ .line-number:after {
231
+ content: ".";
232
+ }
233
+ }
234
+
235
+ .code {
236
+ border: 1px solid #e1e1e8;
237
+ border-left: 0;
238
+ background-color: #f7f7f9;
239
+ border-radius: 0 0.3em 0.3em 0;
240
+ }
241
+
242
+ pre {
243
+ border: none;
244
+ margin: 0;
245
+ padding: 0;
246
+ background: transparent;
247
+
248
+ code {
249
+ span {
250
+ font-family: monospace !important;
251
+ }
252
+ }
253
+ }
254
+
255
+ .c { color: #999988; font-style: italic } /* Comment */
256
+ .err { color: #a61717; background-color: #e3d2d2 } /* Error */
257
+ .k { color: #000000; /* font-weight: bold */ } /* Keyword */
258
+ .o { color: #000000; /* font-weight: bold */ } /* Operator */
259
+ .cm { color: #999988; font-style: italic } /* Comment.Multiline */
260
+ .cp { color: #999999; /* font-weight: bold */; font-style: italic } /* Comment.Preproc */
261
+ .c1 { color: #999988; font-style: italic } /* Comment.Single */
262
+ .cs { color: #999999; /* font-weight: bold */; font-style: italic } /* Comment.Special */
263
+ .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
264
+ .ge { color: #000000; font-style: italic } /* Generic.Emph */
265
+ .gr { color: #aa0000 } /* Generic.Error */
266
+ .gh { color: #999999 } /* Generic.Heading */
267
+ .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
268
+ .go { color: #888888 } /* Generic.Output */
269
+ .gp { color: #555555 } /* Generic.Prompt */
270
+ .gs { /* font-weight: bold */ } /* Generic.Strong */
271
+ .gu { color: #aaaaaa } /* Generic.Subheading */
272
+ .gt { color: #aa0000 } /* Generic.Traceback */
273
+ .kc { color: #000000; /* font-weight: bold */ } /* Keyword.Constant */
274
+ .kd { color: #000000; /* font-weight: bold */ } /* Keyword.Declaration */
275
+ .kn { color: #000000; /* font-weight: bold */ } /* Keyword.Namespace */
276
+ .kp { color: #000000; /* font-weight: bold */ } /* Keyword.Pseudo */
277
+ .kr { color: #000000; /* font-weight: bold */ } /* Keyword.Reserved */
278
+ .kt { color: #445588; /* font-weight: bold */ } /* Keyword.Type */
279
+ .m { color: #009999 } /* Literal.Number */
280
+ .s { color: #d01040 } /* Literal.String */
281
+ .na { color: #008080 } /* Name.Attribute */
282
+ .nb { color: #0086B3 } /* Name.Builtin */
283
+ .nc { color: #445588; /* font-weight: bold */ } /* Name.Class */
284
+ .no { color: #008080 } /* Name.Constant */
285
+ .nd { color: #3c5d5d; /* font-weight: bold */ } /* Name.Decorator */
286
+ .ni { color: #800080 } /* Name.Entity */
287
+ .ne { color: #990000; /* font-weight: bold */ } /* Name.Exception */
288
+ .nf { color: #990000; /* font-weight: bold */ } /* Name.Function */
289
+ .nl { color: #990000; /* font-weight: bold */ } /* Name.Label */
290
+ .nn { color: #555555 } /* Name.Namespace */
291
+ .nt { color: #000080 } /* Name.Tag */
292
+ .nv { color: #008080 } /* Name.Variable */
293
+ .ow { color: #000000; /* font-weight: bold */ } /* Operator.Word */
294
+ .w { color: #bbbbbb } /* Text.Whitespace */
295
+ .mf { color: #009999 } /* Literal.Number.Float */
296
+ .mh { color: #009999 } /* Literal.Number.Hex */
297
+ .mi { color: #009999 } /* Literal.Number.Integer */
298
+ .mo { color: #009999 } /* Literal.Number.Oct */
299
+ .sb { color: #d01040 } /* Literal.String.Backtick */
300
+ .sc { color: #d01040 } /* Literal.String.Char */
301
+ .sd { color: #d01040 } /* Literal.String.Doc */
302
+ .s2 { color: #d01040 } /* Literal.String.Double */
303
+ .se { color: #d01040 } /* Literal.String.Escape */
304
+ .sh { color: #d01040 } /* Literal.String.Heredoc */
305
+ .si { color: #d01040 } /* Literal.String.Interpol */
306
+ .sx { color: #d01040 } /* Literal.String.Other */
307
+ .sr { color: #009926 } /* Literal.String.Regex */
308
+ .s1 { color: #d01040 } /* Literal.String.Single */
309
+ .ss { color: #990073 } /* Literal.String.Symbol */
310
+ .bp { color: #999999 } /* Name.Builtin.Pseudo */
311
+ .vc { color: #008080 } /* Name.Variable.Class */
312
+ .vg { color: #008080 } /* Name.Variable.Global */
313
+ .vi { color: #008080 } /* Name.Variable.Instance */
314
+ .il { color: #009999 } /* Literal.Number.Integer.Long */
315
+ }
316
+
317
+ .alert-error {
318
+ @extend .box-danger;
319
+ }
320
+
321
+ .alert-info {
322
+ @extend .box-info;
323
+ }
324
+ }
325
+
@@ -0,0 +1,7 @@
1
+ <!DOCTYPE html>
2
+ <meta charset="utf-8" />
3
+ <link rel="stylesheet" type="text/css" href="style.css" />
4
+
5
+ <article>
6
+ <%= @body %>
7
+ </article>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lm2doc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-20 00:00:00.000000000 Z
12
+ date: 2013-01-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -114,7 +114,7 @@ dependencies:
114
114
  requirements:
115
115
  - - ~>
116
116
  - !ruby/object:Gem::Version
117
- version: 2.2.1.1
117
+ version: 2.2.2.0
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
@@ -122,7 +122,7 @@ dependencies:
122
122
  requirements:
123
123
  - - ~>
124
124
  - !ruby/object:Gem::Version
125
- version: 2.2.1.1
125
+ version: 2.2.2.0
126
126
  - !ruby/object:Gem::Dependency
127
127
  name: rake
128
128
  requirement: !ruby/object:Gem::Requirement
@@ -216,6 +216,10 @@ files:
216
216
  - themes/bootstrap/init.rb
217
217
  - themes/bootstrap/style.scss
218
218
  - themes/bootstrap/template.html.erb
219
+ - themes/simple/_mixin.scss
220
+ - themes/simple/init.rb
221
+ - themes/simple/style.scss
222
+ - themes/simple/template.html.erb
219
223
  homepage: https://github.com/sunteya/lm2doc
220
224
  licenses: []
221
225
  post_install_message:
@@ -230,7 +234,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
230
234
  version: '0'
231
235
  segments:
232
236
  - 0
233
- hash: 1074557977306794039
237
+ hash: 933138184940954341
234
238
  required_rubygems_version: !ruby/object:Gem::Requirement
235
239
  none: false
236
240
  requirements:
@@ -239,7 +243,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
239
243
  version: '0'
240
244
  segments:
241
245
  - 0
242
- hash: 1074557977306794039
246
+ hash: 933138184940954341
243
247
  requirements: []
244
248
  rubyforge_project:
245
249
  rubygems_version: 1.8.24