yard_klippstein_template 0.0.13 → 0.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.rdoc CHANGED
@@ -4,7 +4,9 @@ http://bklippstein.github.com/yard_klippstein_template/frames.html
4
4
 
5
5
  == Features
6
6
  Just some small improvements
7
- * clear visual grouping
7
+ * clear visual grouping (headlines, lists)
8
+ * method summary: show as table
9
+ * rdoc def list: show as table
8
10
  * source code is always visible
9
11
 
10
12
  == Usage
@@ -2,4 +2,40 @@
2
2
  YARD::Templates::Engine.register_template_path File.dirname(__FILE__) + '/../templates'
3
3
 
4
4
 
5
+ # patch rdoc markup for table-like definition lists
6
+ require 'rdoc'
7
+ require 'rdoc/markup'
8
+ require 'rdoc/markup/to_html'
5
9
 
10
+ class RDoc::Markup::ToHtml
11
+
12
+ ##
13
+ # Returns the HTML tag for +list_type+, possible using a label from
14
+ # +list_item+
15
+
16
+ def list_item_start(list_item, list_type)
17
+ case list_type
18
+ when :BULLET, :LALPHA, :NUMBER, :UALPHA then
19
+ "<li>"
20
+ when :LABEL, :NOTE then
21
+ "<div class=""rdoc-dl-row""> <dt>#{to_html list_item.label}\n<dd>"
22
+ else
23
+ raise RDoc::Error, "Invalid list type: #{list_type.inspect}"
24
+ end
25
+ end
26
+
27
+ ##
28
+ # Returns the HTML end-tag for +list_type+
29
+
30
+ def list_end_for(list_type)
31
+ case list_type
32
+ when :BULLET, :LALPHA, :NUMBER, :UALPHA then
33
+ "</li>"
34
+ when :LABEL, :NOTE then
35
+ "</dd> </div>"
36
+ else
37
+ raise RDoc::Error, "Invalid list type: #{list_type.inspect}"
38
+ end
39
+ end
40
+
41
+ end
@@ -1,13 +1,19 @@
1
1
 
2
2
 
3
3
  /* Headlines */
4
+
4
5
  h2 {
5
- padding: 10px 0 3px 0;
6
+ margin: 3em 0 0.5em 0;
7
+ font-size: 1.7em;
6
8
  border-top: 1px #555 solid;
7
9
  border-bottom: 0px;
8
- margin: 3em 0 0.5em;
9
- font-size: 1.7em;
10
+ padding: 10px 0 3px 0; /*f�r die Linie */
10
11
  }
12
+
13
+ .docstring h3 {
14
+ margin: 1.5em 0 0.3em 0;
15
+ font-size: 1.2em;
16
+ }
11
17
 
12
18
  p.signature, h3.signature {
13
19
  font-family: Monaco,Consolas,Courier,monospace;
@@ -27,35 +33,43 @@
27
33
 
28
34
 
29
35
 
30
- /* method summary */
36
+ /* method summary: show as table */
31
37
 
32
38
  ul.summary {
33
- border-bottom: 1px #ccc dotted;
34
- margin-left:0px; padding-left:0px;
39
+ display: table;
40
+ border-top: 1px #c6c6c6 dotted;
41
+ margin: 2px 0 5px 0;
42
+ padding-left:0px;
43
+ width: 100%;
35
44
  }
36
45
 
37
46
  ul.summary li {
38
- border-top: 1px #ccc dotted;
47
+ display: table-row;
39
48
  margin: 0px;
40
49
  padding: 1px 0px 1px 0px;
41
-
42
50
  }
43
51
 
44
52
 
45
53
  ul.summary a:link, ul.summary a:visited {
46
- font-size: 0.9em;
54
+ font-size: 1.0em;
47
55
  font-weight:normal !important;
48
56
  }
49
57
 
50
58
  .summary .summary_signature {
59
+ display: table-cell;
51
60
  background: none;
52
61
  border: 0px;
53
62
  padding: 1px 10px;
63
+ border-bottom: 1px #c6c6c6 dotted;
64
+ white-space:nowrap;
54
65
  }
55
66
 
56
67
  .summary .summary_desc {
57
- display: inline;
68
+ display: table-cell;
58
69
  margin:0px;
70
+ border-bottom: 1px #c6c6c6 dotted;
71
+ font-family: "Lucida Sans","Lucida Grande",Verdana,Arial,sans-serif;
72
+ font-size: 13px;
59
73
  }
60
74
 
61
75
  p.signature, h3.signature {
@@ -66,6 +80,7 @@
66
80
 
67
81
 
68
82
  /* method details */
83
+
69
84
  .note.returns_void {
70
85
  display :none;
71
86
  }
@@ -83,36 +98,65 @@
83
98
  }
84
99
 
85
100
  /* rdoc def list as table */
101
+
86
102
  dl.rdoc-list {
87
- overflow: hidden;
88
- background: white;
89
- width: 100%;
103
+ display: table;
90
104
  border: none;
91
- border-top: 1px dotted #CCCCCC;
92
- margin:0;
93
-
105
+ border-top: 1px #c6c6c6 dotted;
106
+ padding-left:0px;
107
+ margin: 2px 0 5px 0;
108
+ width: 100%;
109
+ }
110
+
111
+ div.rdoc-dl-row {
112
+ display: table-row;
113
+ margin: 0px;
114
+ padding: 2px 0px 2px 0px;
115
+ line-height:1.5em;
94
116
  }
95
117
 
118
+
96
119
  dl.rdoc-list dt {
97
- clear: left;
98
- float: left;
99
- background: white;
100
- width: 40%;
120
+ display: table-cell;
121
+ background: none;
122
+ border: 0px;
123
+ padding: 1px 10px;
124
+ border-bottom: 1px #c6c6c6 dotted;
125
+ white-space:nowrap;
101
126
  font-family:monospace;
102
127
  font-weight: normal !important;
103
- font-size:1.1em;
104
- white-space:nowrap;
105
- margin:0;
106
- padding: 5px 3px;
107
-
128
+
108
129
  }
109
130
 
110
131
  dl.rdoc-list dd {
111
-
132
+ display: table-cell;
112
133
  background: white;
113
- white-space:nowrap;
114
- border-bottom: 1px dotted #CCCCCC;
134
+ border-bottom: 1px #c6c6c6 dotted;
115
135
  margin:0;
116
- padding: 5px 3px;
136
+ padding: 1px 0px 1px 3px;
117
137
  }
138
+
139
+ /* bullet lists */
140
+ .docstring ul {
141
+ margin: 2px 0 5px 0;
142
+ }
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+
118
162
 
data/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  module YardKlippsteinTemplate
3
3
 
4
- VERSION = '0.0.13'
4
+ VERSION = '0.0.14'
5
5
 
6
6
  end
7
7
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yard_klippstein_template
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.14
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: