docjs 0.1

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.
Files changed (109) hide show
  1. data/CONCEPT.md +80 -0
  2. data/DOCUMENTATION.md +41 -0
  3. data/LICENSE.md +19 -0
  4. data/README.md +19 -0
  5. data/RENDERING.md +8 -0
  6. data/bin/docjs +190 -0
  7. data/docjs.gemspec +32 -0
  8. data/lib/boot.rb +34 -0
  9. data/lib/code_object/base.rb +48 -0
  10. data/lib/code_object/converter.rb +48 -0
  11. data/lib/code_object/exceptions.rb +5 -0
  12. data/lib/code_object/function.rb +84 -0
  13. data/lib/code_object/object.rb +18 -0
  14. data/lib/code_object/type.rb +43 -0
  15. data/lib/configs.rb +53 -0
  16. data/lib/document/document.rb +25 -0
  17. data/lib/dom/dom.rb +188 -0
  18. data/lib/dom/exceptions.rb +12 -0
  19. data/lib/dom/no_doc.rb +26 -0
  20. data/lib/dom/node.rb +415 -0
  21. data/lib/helper/helper.rb +120 -0
  22. data/lib/helper/linker.rb +130 -0
  23. data/lib/logger.rb +49 -0
  24. data/lib/parser/comment.rb +69 -0
  25. data/lib/parser/comment_parser.rb +90 -0
  26. data/lib/parser/exceptions.rb +6 -0
  27. data/lib/parser/meta_container.rb +20 -0
  28. data/lib/parser/parser.rb +269 -0
  29. data/lib/processor.rb +123 -0
  30. data/lib/renderer.rb +108 -0
  31. data/lib/tasks/render_task.rb +112 -0
  32. data/lib/thor.rb +27 -0
  33. data/lib/token/container.rb +84 -0
  34. data/lib/token/exceptions.rb +6 -0
  35. data/lib/token/handler.rb +242 -0
  36. data/lib/token/token.rb +46 -0
  37. data/templates/application.rb +14 -0
  38. data/templates/helpers/template.rb +66 -0
  39. data/templates/resources/css/.sass-cache/98c121fba905284c2c8ca6220fe3c590e5c9ec19/application.scssc +0 -0
  40. data/templates/resources/css/application.css +836 -0
  41. data/templates/resources/img/arrow_down.png +0 -0
  42. data/templates/resources/img/arrow_right.png +0 -0
  43. data/templates/resources/img/arrow_up.png +0 -0
  44. data/templates/resources/img/bullet_toggle_minus.png +0 -0
  45. data/templates/resources/img/bullet_toggle_plus.png +0 -0
  46. data/templates/resources/img/constructor.png +0 -0
  47. data/templates/resources/img/function.png +0 -0
  48. data/templates/resources/img/object.png +0 -0
  49. data/templates/resources/img/page.png +0 -0
  50. data/templates/resources/img/prototype.png +0 -0
  51. data/templates/resources/img/tag.png +0 -0
  52. data/templates/resources/js/application.js +318 -0
  53. data/templates/resources/js/jcore.js +129 -0
  54. data/templates/resources/js/jquery.cookie.js +92 -0
  55. data/templates/resources/js/jquery.js +16 -0
  56. data/templates/resources/js/jquery.tooltip.js +77 -0
  57. data/templates/resources/js/jquery.treeview.js +238 -0
  58. data/templates/resources/scss/_footer.scss +10 -0
  59. data/templates/resources/scss/_header.scss +184 -0
  60. data/templates/resources/scss/_helpers.scss +91 -0
  61. data/templates/resources/scss/_print.scss +20 -0
  62. data/templates/resources/scss/_resets.scss +132 -0
  63. data/templates/resources/scss/_tooltip.scss +26 -0
  64. data/templates/resources/scss/application.scss +442 -0
  65. data/templates/tasks/api_index_task.rb +26 -0
  66. data/templates/tasks/docs_task.rb +33 -0
  67. data/templates/tasks/json_data_task.rb +55 -0
  68. data/templates/tasks/typed_task.rb +54 -0
  69. data/templates/tokens/tokens.rb +22 -0
  70. data/templates/types/prototype.rb +20 -0
  71. data/templates/views/api_index.html.erb +21 -0
  72. data/templates/views/doc_page.html.erb +11 -0
  73. data/templates/views/function/_detail.html.erb +8 -0
  74. data/templates/views/function/index.html.erb +53 -0
  75. data/templates/views/index.html.erb +0 -0
  76. data/templates/views/layout/application.html.erb +73 -0
  77. data/templates/views/layout/json.html.erb +3 -0
  78. data/templates/views/object/index.html.erb +63 -0
  79. data/templates/views/tokens/_default.html.erb +11 -0
  80. data/templates/views/tokens/_default_token.html.erb +19 -0
  81. data/templates/views/tokens/_example.html.erb +2 -0
  82. data/templates/views/tokens/_examples.html.erb +1 -0
  83. data/test/code_object/converter.rb +78 -0
  84. data/test/code_object/prototype.rb +70 -0
  85. data/test/configs.rb +65 -0
  86. data/test/docs/README.CONCEPT.md +83 -0
  87. data/test/docs/README.md +14 -0
  88. data/test/dom/dom.absolute_nodes.rb +40 -0
  89. data/test/dom/dom.rb +72 -0
  90. data/test/dom/node.rb +53 -0
  91. data/test/integration/converter.rb +72 -0
  92. data/test/integration/parser_factory.rb +28 -0
  93. data/test/interactive.rb +7 -0
  94. data/test/js-files/absolute.js +11 -0
  95. data/test/js-files/comments_in_strings.js +31 -0
  96. data/test/js-files/core-doc-relative.js +77 -0
  97. data/test/js-files/core-doc.js +145 -0
  98. data/test/js-files/nested.js +34 -0
  99. data/test/js-files/nested_with_strings.js +35 -0
  100. data/test/js-files/prototype.js +33 -0
  101. data/test/js-files/simple.js +17 -0
  102. data/test/js-files/tokens.js +32 -0
  103. data/test/parser/comments_in_strings.rb +51 -0
  104. data/test/parser/intelligent_skip_until.rb +110 -0
  105. data/test/parser/parser.rb +273 -0
  106. data/test/rspec_helper.rb +23 -0
  107. data/test/token/handler.rb +136 -0
  108. data/test/token/tokens.rb +52 -0
  109. metadata +184 -0
@@ -0,0 +1,91 @@
1
+ $golden_ratio: 1.618;
2
+
3
+ @mixin transition($property, $time) {
4
+ -webkit-transition: $property $time ease-in-out;
5
+ -moz-transition: $property $time ease-in-out;
6
+ -o-transition: $property $time ease-in-out;
7
+ -ms-transition: $property $time ease-in-out;
8
+ transition: $property $time ease-in-out;
9
+ }
10
+
11
+ /* Kudos to http://www.colorzilla.com/gradient-editor/ */
12
+ @mixin gradient($from, $to, $from_pos: 0%, $to_pos: 100%, $fallback: $to) {
13
+ background: $fallback; /* Old browsers */
14
+ background: -moz-linear-gradient(top, $from $from_pos, $to $to_pos); /* FF3.6+ */
15
+ background: -webkit-gradient(linear, left top, left bottom, color-stop($from_pos, $from), color-stop($to_pos, $to)); /* Chrome,Safari4+ */
16
+ background: -webkit-linear-gradient(top, $from $from_pos,$to $to_pos); /* Chrome10+,Safari5.1+ */
17
+ background: -o-linear-gradient(top, $from $from_pos,$to $to_pos); /* Opera11.10+ */
18
+ background: -ms-linear-gradient(top, $from $from_pos,$to $to_pos); /* IE10+ */
19
+ background: linear-gradient(top, $from $from_pos,$to $to_pos); /* W3C */
20
+ }
21
+
22
+ @mixin gradient-horizontal($from, $to, $from_pos: 0%, $to_pos: 100%) {
23
+ background: $from; /* Old browsers */
24
+ background: -moz-linear-gradient(left, $from $from_pos, $to $to_pos); /* FF3.6+ */
25
+ background: -webkit-gradient(linear, left top, right top, color-stop($from_pos, $from), color-stop($to_pos, $to)); /* Chrome,Safari4+ */
26
+ background: -webkit-linear-gradient(left, $from $from_pos,$to $to_pos); /* Chrome10+,Safari5.1+ */
27
+ background: -o-linear-gradient(left, $from $from_pos,$to $to_pos); /* Opera11.10+ */
28
+ background: -ms-linear-gradient(left, $from $from_pos,$to $to_pos); /* IE10+ */
29
+ background: linear-gradient(left, $from $from_pos,$to $to_pos); /* W3C */
30
+ }
31
+
32
+ /* inspired by http://docs.sencha.com/ext-js/4-0/ */
33
+ @mixin scrollbars() {
34
+ &::-webkit-scrollbar { width: 7px; height: 9px; }
35
+ &::-webkit-scrollbar-button:start:decrement, .iScroll ::-webkit-scrollbar-button:end:increment { display: block; height: 0; background-color: transparent; }
36
+ &::-webkit-scrollbar-track-piece { -webkit-border-radius: 0; -webkit-border-bottom-right-radius: 4px; -webkit-border-bottom-left-radius: 4px; }
37
+ &::-webkit-scrollbar-thumb:vertical { height: 50px; background-color: rgba(0, 0, 0, 0.15); -webkit-border-radius: 4px; }
38
+ &::-webkit-scrollbar-thumb:horizontal { width: 50px; background-color: rgba(0, 0, 0, 0.15); -webkit-border-radius: 4px; }
39
+ }
40
+
41
+ @mixin columns($count: 2, $gap: 20px) {
42
+ -moz-column-count: $count;
43
+ -moz-column-gap: $gap;
44
+ -webkit-column-count: $count;
45
+ -webkit-column-gap: $gap;
46
+ column-count: $count;
47
+ column-gap: $gap;
48
+ }
49
+
50
+ @mixin center() {
51
+ display: block;
52
+ margin: 0 auto;
53
+ }
54
+
55
+ @mixin clearfix() {
56
+ display: block;
57
+ overflow: hidden;
58
+ }
59
+
60
+ @mixin reset-list() {
61
+ list-style: none;
62
+ margin: 0;
63
+ padding: 0;
64
+ }
65
+
66
+ @mixin double-border($size, $color1, $color2, $position:all) {
67
+ @if $position == all {
68
+ box-shadow: inset 0px 0px 0px $size $color1;
69
+ border: $size solid $color2;
70
+ } @else {
71
+ border-#{$position}: $size solid $color2;
72
+
73
+ @if $position == bottom {
74
+ box-shadow: inset 0 $size*-1 0 $color1;
75
+ }
76
+ @if $position == top {
77
+ box-shadow: inset 0 $size 0 $color1;
78
+ }
79
+ @if $position == left {
80
+ box-shadow: inset $size 0 0 $color1;
81
+ }
82
+ @if $position == right {
83
+ box-shadow: inset $size*-1 0 0 $color1;
84
+ }
85
+ }
86
+ }
87
+
88
+ @mixin float($direction) {
89
+ display: block;
90
+ float: $direction;
91
+ }
@@ -0,0 +1,20 @@
1
+ /*
2
+ * Print styles.
3
+ *
4
+ * Inlined to avoid required HTTP connection: www.phpied.com/delay-loading-your-print-css/
5
+ */
6
+ @media print {
7
+ * { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important;
8
+ -ms-filter: none !important; } /* Black prints faster: sanbeiji.com/archives/953 */
9
+ a, a:visited { color: #444 !important; text-decoration: underline; }
10
+ a[href]:after { content: " (" attr(href) ")"; }
11
+ abbr[title]:after { content: " (" attr(title) ")"; }
12
+ .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } /* Don't show links for images, or javascript/internal links */
13
+ pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
14
+ thead { display: table-header-group; } /* css-discuss.incutio.com/wiki/Printing_Tables */
15
+ tr, img { page-break-inside: avoid; }
16
+ img { max-width: 100% !important; }
17
+ @page { margin: 0.5cm; }
18
+ p, h2, h3 { orphans: 3; widows: 3; }
19
+ h2, h3{ page-break-after: avoid; }
20
+ }
@@ -0,0 +1,132 @@
1
+ /**
2
+ * HTML5 ✰ Boilerplate
3
+ *
4
+ * style.css contains a reset, font normalization and some base styles.
5
+ *
6
+ * Credit is left where credit is due.
7
+ * Much inspiration was taken from these projects:
8
+ * - yui.yahooapis.com/2.8.1/build/base/base.css
9
+ * - camendesign.com/design/
10
+ * - praegnanz.de/weblog/htmlcssjs-kickstart
11
+ */
12
+
13
+
14
+ /**
15
+ * html5doctor.com Reset Stylesheet (Eric Meyer's Reset Reloaded + HTML5 baseline)
16
+ * v1.6.1 2010-09-17 | Authors: Eric Meyer & Richard Clark
17
+ * html5doctor.com/html-5-reset-stylesheet/
18
+ */
19
+
20
+ html, body, body div, span, object, iframe,
21
+ h1, h2, h3, h4, h5, h6, p, blockquote, pre,
22
+ abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp,
23
+ small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li,
24
+ fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td,
25
+ article, aside, canvas, details, figcaption, figure,
26
+ footer, header, hgroup, menu, nav, section, summary,
27
+ time, mark, audio, video {
28
+ margin: 0;
29
+ padding: 0;
30
+ border: 0;
31
+ font-size: 100%;
32
+ vertical-align: baseline;
33
+ }
34
+
35
+ article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
36
+ display: block;
37
+ }
38
+
39
+ blockquote, q { quotes: none; }
40
+
41
+ blockquote:before, blockquote:after,
42
+ q:before, q:after { content: ""; content: none; }
43
+
44
+ ins { background-color: #ff9; color: #000; text-decoration: none; }
45
+
46
+ mark { background-color: #ff9; color: #000; font-style: italic; font-weight: bold; }
47
+
48
+ del { text-decoration: line-through; }
49
+
50
+ abbr[title], dfn[title] { border-bottom: 1px dotted; cursor: help; }
51
+
52
+ table { border-collapse: collapse; border-spacing: 0; }
53
+
54
+ hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: $element-margin 0; padding: 0; }
55
+
56
+
57
+ /* Font normalization inspired by YUI Library's fonts.css: developer.yahoo.com/yui/ */
58
+ body { font:13px/1.231 $default-fonts; *font-size:small; } /* Hack retained to preserve specificity */
59
+
60
+ /* Normalize monospace sizing: en.wikipedia.org/wiki/MediaWiki_talk:Common.css/Archive_11#Teletype_style_fix_for_Chrome */
61
+ pre, code, kbd, samp {
62
+ font-family: monospace, sans-serif;
63
+ white-space: pre-wrap;
64
+ }
65
+
66
+ /* 1) Always force a scrollbar in non-IE
67
+ 2) Remove iOS text size adjust without disabling user zoom: www.456bereastreet.com/archive/201012/controlling_text_size_in_safari_for_ios_without_disabling_user_zoom/ */
68
+ html { overflow-y: scroll; -webkit-text-size-adjust:100%; -ms-text-size-adjust:100%; }
69
+
70
+ /* j.mp/webkit-tap-highlight-color */
71
+ a:link { -webkit-tap-highlight-color: #FF5E99; }
72
+
73
+ /* Accessible focus treatment: people.opera.com/patrickl/experiments/keyboard/test */
74
+ a:hover, a:active { outline: none; }
75
+
76
+ ul, ol {
77
+ margin-left: 2em;
78
+ margin-bottom: $element-margin;
79
+ }
80
+ ol { list-style-type: decimal; }
81
+
82
+ dl {
83
+ margin-bottom: $element-margin;
84
+ }
85
+
86
+ /* Remove margins for navigation lists */
87
+ nav ul, nav li { margin: 0; list-style:none; list-style-image: none; }
88
+
89
+ small { font-size: 85%; }
90
+ b, strong, th { font-weight: bold; }
91
+
92
+ td { vertical-align: top; }
93
+
94
+ /* Set sub, sup without affecting line-height: gist.github.com/413930 */
95
+ sub, sup { font-size: 75%; line-height: 0; position: relative; }
96
+ sup { top: -0.5em; }
97
+ sub { bottom: -0.25em; }
98
+
99
+ pre {
100
+ /* www.pathf.com/blogs/2008/05/formatting-quoted-code-in-blog-posts-css21-white-space-pre-wrap/ */
101
+ white-space: pre; white-space: pre-wrap; word-wrap: break-word;
102
+ padding: 15px;
103
+ }
104
+
105
+ .oldie legend { *margin-left: -7px; }
106
+
107
+ /* 1) Make inputs and buttons play nice in IE: www.viget.com/inspire/styling-the-button-element-in-internet-explorer/
108
+ 2) WebKit browsers add a 2px margin outside the chrome of form elements.
109
+ Firefox adds a 1px margin above and below textareas
110
+ 3) Set font-size to match <body>'s, and font-family to sans-serif
111
+ 4) Align to baseline */
112
+ button, input, select, textarea { width: auto; overflow: visible; margin: 0; font-size: 100%; font-family: sans-serif; vertical-align: baseline; }
113
+
114
+ /* 1) Remove default scrollbar in IE: www.sitepoint.com/blogs/2010/08/20/ie-remove-textarea-scrollbars/
115
+ 2) Align to text-top */
116
+ textarea { overflow: auto; vertical-align:text-top; }
117
+
118
+ /* Hand cursor on clickable input elements */
119
+ label, input[type="button"], input[type="submit"], input[type="image"], button { cursor: pointer; }
120
+
121
+ /* Remove extra padding and inner border in Firefox */
122
+ input::-moz-focus-inner,
123
+ button::-moz-focus-inner { border: 0; padding: 0; }
124
+
125
+ /* Colors for form validity */
126
+ input:valid, textarea:valid { }
127
+ input:invalid, textarea:invalid { border-radius: 1px; -moz-box-shadow: 0px 0px 5px red; -webkit-box-shadow: 0px 0px 5px red; box-shadow: 0px 0px 5px red; }
128
+ .no-boxshadow input:invalid, .no-boxshadow textarea:invalid { background-color: #f0dddd; }
129
+
130
+ /* Bicubic resizing in IE7 for non-native sized IMG:
131
+ code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/ */
132
+ .oldie img { -ms-interpolation-mode: bicubic; }
@@ -0,0 +1,26 @@
1
+ .tooltip {
2
+ /*@include double-border(1px, #fff, #ccc);*/
3
+ @include gradient(#333, #555);
4
+ @include reset-fonts;
5
+
6
+ display: none;
7
+ position: absolute;
8
+ padding: 0.5em;
9
+ max-width: 200px;
10
+ z-index: 50;
11
+
12
+ font-size: 9pt;
13
+ color: #eee;
14
+ border: 1px solid #fff;
15
+ border-radius: $radius/2;
16
+ box-shadow: 0 0 10px rgba(0,0,0,0.15);
17
+
18
+ a {
19
+ color: lighten($blue, 20%);
20
+ }
21
+
22
+ .types {
23
+ @include terminal;
24
+ padding: 0 0.2em;
25
+ }
26
+ }
@@ -0,0 +1,442 @@
1
+ $default-fonts: Arial, sans-serif;
2
+ $font-size: 10pt;
3
+
4
+
5
+ /* Global Colors */
6
+ $blue: #4183C2;
7
+ $orange: #D84B0F;
8
+ $grey: #333;
9
+ $lightgrey: #a0a0a0;
10
+ $codegrey: #F3F3F3;
11
+
12
+ /* Header-colors */
13
+ $button-color-from: #88B5E2;
14
+ $button-color-to: darken($button-color-from, 15%); /*#4096ee;*/
15
+
16
+ /* Content-colors */
17
+ $signature-color: lighten($blue,45%);
18
+ $flag-color: lighten($orange,45%);
19
+
20
+ /* Dimensions */
21
+ $pagesize: 1000px;
22
+ $page-indent: 20px;
23
+ $page-padding: 20px;
24
+ $box-spacing: 12px;
25
+ $radius: 10px;
26
+ $element-margin: 1.33em;
27
+
28
+ @import 'resets';
29
+ @import 'print';
30
+ @import 'helpers';
31
+
32
+ @mixin terminal() {
33
+ font-family: "Consolas", "monospace";
34
+ }
35
+
36
+ @mixin page-center() {
37
+ @include center;
38
+ max-width: $pagesize;
39
+ }
40
+
41
+ @mixin headline() {
42
+ font-family: 'Terminal Dosis Light', 'Helvetica', 'Arial', 'sans-serif';
43
+ font-weight: normal;
44
+ text-shadow: 1px 1px #fff;
45
+ }
46
+
47
+ @mixin page-padding() {
48
+ padding-left: $page-padding;
49
+ padding-right: $page-padding;
50
+ }
51
+
52
+ @mixin typography() {
53
+ h1 {
54
+ font-size: 24pt;
55
+ color: $orange;
56
+ }
57
+ h2 {
58
+ font-size: 16pt;
59
+ margin: 1.25em 0 0.25em;
60
+ border-bottom: 1px solid #EFEFEF;
61
+ }
62
+ h3 {
63
+ font-size: $font-size;
64
+ font-weight: bold;
65
+ }
66
+ p {
67
+ line-height: $golden_ratio*1em;
68
+ margin: 0.5em 0 1.33em;
69
+ }
70
+ }
71
+
72
+
73
+ @mixin reset-fonts() {
74
+ font-family: $default-fonts;
75
+ font-size: $font-size;
76
+ }
77
+
78
+ @mixin code-box() {
79
+ @include double-border(1px, #ffffff, darken($codegrey, 10%));
80
+ @include terminal;
81
+ background: $codegrey;
82
+ }
83
+
84
+ @mixin signature-box($color:$signature-color, $fontcolor:$signature-color, $terminal:true) {
85
+ @if $terminal == true {
86
+ @include terminal;
87
+ }
88
+ display: block;
89
+ background: $color;
90
+ border: 1px solid darken($color, 8%);
91
+ color: darken($fontcolor, 40%);
92
+ border-radius: $radius/2;
93
+ padding: 0.4em 1em;
94
+ }
95
+
96
+ @import 'header';
97
+ @import 'footer';
98
+ @import 'tooltip';
99
+
100
+ body, select, input, textarea {
101
+ @include reset-fonts;
102
+ background-color: #FBFBFB;
103
+ color: #444;
104
+ }
105
+
106
+ h1, h2, h3, h4, h5, h6 { font-weight: normal; }
107
+
108
+ /* No text-shadow: twitter.com/miketaylr/status/12228805301 */
109
+ ::-moz-selection { background: $orange; color:#fff; text-shadow: none; }
110
+ ::selection { background: $orange; color:#fff; text-shadow: none; }
111
+
112
+ a {
113
+ color: $blue;
114
+ text-decoration: none;
115
+
116
+ &:active, &:visited { color: $blue; }
117
+ &:hover { color: $blue; text-decoration: underline; }
118
+ }
119
+
120
+ .icon {
121
+ @each $icon in function, object, constructor, prototype, arrow_right, arrow_up, arrow_down {
122
+ &.#{$icon} {
123
+ background: url(../img/#{$icon}.png) no-repeat left center;
124
+ padding-left: 24px;
125
+ }
126
+ }
127
+ }
128
+
129
+ .level-one-heading {
130
+ @include headline;
131
+ padding-top: $page-padding;
132
+ margin-bottom: $box-spacing;
133
+ font-size: 40pt;
134
+ }
135
+
136
+ div#main {
137
+ @include gradient(#f2f2f2, #ffffff, 0px, 40px);
138
+ @include page-center;
139
+ @include typography;
140
+ @include clearfix;
141
+
142
+ margin-top: -$page-indent;
143
+
144
+ border-radius: 10px 10px 0 0;
145
+ box-shadow: 0px -0px 5px rgba(0,0,0,0.1);
146
+
147
+ border-top: 1px solid #eee;
148
+
149
+ > * {
150
+ @include page-padding;
151
+ }
152
+
153
+ header h1 {
154
+ @extend .level-one-heading;
155
+
156
+ .flag {
157
+ @include signature-box($flag-color);
158
+ @include float(right);
159
+ font-size: 8pt;
160
+ text-shadow: none;
161
+ }
162
+ }
163
+ }
164
+
165
+
166
+ div#main nav.sidebar {
167
+
168
+ @include float(right);
169
+ @include code-box;
170
+
171
+ margin: 2*$page-padding 0 $box-spacing $box-spacing;
172
+ padding: 0;
173
+ border-radius: 5px;
174
+ font-size: 8pt;
175
+ color: #999;
176
+
177
+ > * {
178
+ padding: 8px;
179
+ margin: 0;
180
+ }
181
+
182
+ > * + * {
183
+ @include double-border(1px, #ffffff, darken($codegrey, 10%), top);
184
+ }
185
+
186
+ h3 {
187
+ text-transform: uppercase;
188
+ padding-bottom: 0.5em;
189
+ font-size: 8pt;
190
+ }
191
+
192
+ .hierarchy {
193
+ list-style: none;
194
+
195
+ ul {
196
+ @include reset-list;
197
+ padding-left: 1em;
198
+ }
199
+
200
+ /* first node */
201
+ > ul {
202
+ padding-left: 0;
203
+ }
204
+
205
+ .this > a { font-weight: bold; }
206
+ }
207
+
208
+ .method-list ul {
209
+ @include reset-list;
210
+ }
211
+
212
+ .subsection {
213
+ p {
214
+ margin: 0;
215
+ }
216
+ }
217
+ }
218
+
219
+
220
+ div#main .body {
221
+
222
+ > section {
223
+ margin-bottom: $box-spacing;
224
+
225
+ > h2 {
226
+ margin-top: $box-spacing;
227
+ margin-bottom: $box-spacing / $golden_ratio;
228
+ font-size: 14pt;
229
+ }
230
+ }
231
+
232
+ .summary {
233
+ @include reset-list;
234
+ @include clearfix;
235
+
236
+ margin-bottom: $element-margin;
237
+
238
+ li { @include float(left); }
239
+
240
+ a {
241
+ @include signature-box;
242
+ margin: 0.25em;
243
+
244
+ &:hover {
245
+ text-decoration: none;
246
+ color: darken($signature-color, 50%);
247
+ }
248
+ }
249
+ }
250
+
251
+ code.block {
252
+ @include code-box;
253
+ display: block;
254
+ padding: 0.5em;
255
+ color: #555;
256
+ margin-bottom: $element-margin;
257
+ }
258
+
259
+ .section {
260
+ padding-bottom: $box-spacing;
261
+ }
262
+
263
+ .subsection {
264
+
265
+ > ul {
266
+ margin-left: 0;
267
+ border: 1px solid #efefef;
268
+
269
+ li {
270
+ list-style: none;
271
+ padding: 5px 15px;
272
+ }
273
+
274
+ /* all but first li */
275
+ > * + li {
276
+ border-top: 1px solid #efefef;
277
+ }
278
+
279
+ ul, p {
280
+ margin: 0;
281
+ }
282
+ }
283
+
284
+ h4 {
285
+ font-weight: bold;
286
+ display: inline;
287
+ }
288
+
289
+ .types {
290
+ @include terminal;
291
+ padding: 0 0.2em;
292
+ }
293
+ }
294
+
295
+ .source {
296
+ @extend .icon.arrow_down;
297
+ cursor: pointer;
298
+ &.collapsed {
299
+ @extend .icon.arrow_right;
300
+ border-bottom: 1px solid darken($codegrey, 10%);
301
+ margin-bottom: $element-margin;
302
+ }
303
+ }
304
+
305
+ .signature {
306
+ @include signature-box;
307
+ color: #000;
308
+ font-size: 12pt;
309
+ font-weight: normal;
310
+ margin-bottom: $element-margin;
311
+
312
+ &.constructor {
313
+ @include signature-box($flag-color);
314
+ color: #000;
315
+ }
316
+
317
+ .name {
318
+ font-weight: bold;
319
+ padding-left: 0.2em;
320
+ }
321
+
322
+ .params {
323
+ padding: 0 0.2em;
324
+
325
+ .param {
326
+ cursor: help;
327
+ }
328
+ }
329
+ }
330
+ }
331
+
332
+ div#main .notification {
333
+
334
+ display: table;
335
+
336
+ section {
337
+ @include signature-box(#f3f3f3, #ccc, false);
338
+
339
+ margin-bottom: 0.5em;
340
+
341
+ &.deprecated {
342
+ @include signature-box(#ccc, #ccc, false);
343
+ }
344
+
345
+ &.todo {
346
+ @include signature-box(#fef377, #ee3, false);
347
+ }
348
+
349
+ &.warn {
350
+ @include signature-box(#f54, #e63, false);
351
+ }
352
+
353
+ ul {
354
+ @include reset-list;
355
+ }
356
+
357
+ p {
358
+ margin: 0 0 0.25em;
359
+ }
360
+
361
+ pre {
362
+ padding-top: 0;
363
+ padding-bottom: 0;
364
+ margin-bottom: 0.25em;
365
+ }
366
+ }
367
+
368
+ }
369
+
370
+
371
+ div#main .documentation {
372
+
373
+ h1 { @extend .level-one-heading; }
374
+
375
+ nav {
376
+
377
+ .table-of-contents {
378
+
379
+ @include reset-fonts;
380
+
381
+ ul {
382
+ @include reset-list;
383
+ padding-left: 2em;
384
+ margin: 0.25em 0 0.5em;
385
+ }
386
+
387
+ ul ul li {
388
+ list-style: decimal-leading-zero;
389
+ }
390
+
391
+ > ul { padding-left: 0; }
392
+
393
+ li {
394
+ margin-bottom: 0.25em;
395
+ }
396
+ }
397
+
398
+ }
399
+ }
400
+
401
+ .api-index {
402
+ .api-list {
403
+ @include columns(2);
404
+
405
+ ul {
406
+ @include reset-list;
407
+ }
408
+ }
409
+ }
410
+
411
+ /* API-Treebrowser */
412
+ $iconsize: 16px;
413
+ .treeview {
414
+
415
+ ul {
416
+ @include reset-list;
417
+ margin: 4px 0 0 0;
418
+ }
419
+
420
+ li {
421
+ margin: 0;
422
+ padding: 3px 0pt 3px $iconsize;
423
+ a {
424
+
425
+ display: block;
426
+ padding-left: $iconsize + 5px;
427
+ height: $iconsize;
428
+ }
429
+ }
430
+ li.function > a { @extend .icon.function }
431
+ li.object > a { @extend .icon.object }
432
+
433
+ .hitarea {
434
+ @include float(left);
435
+ height: $iconsize;
436
+ width: $iconsize;
437
+ margin-left: -$iconsize;
438
+ cursor: pointer;
439
+ background: url(../img/bullet_toggle_minus.png) no-repeat left center;
440
+ }
441
+ .expandable-hitarea { background-image: url(../img/bullet_toggle_plus.png); }
442
+ }