Almirah 0.2.5 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/bin/almirah +4 -4
  3. data/lib/almirah/doc_fabric.rb +65 -65
  4. data/lib/almirah/doc_items/blockquote.rb +21 -21
  5. data/lib/almirah/doc_items/code_block.rb +26 -26
  6. data/lib/almirah/doc_items/controlled_paragraph.rb +112 -112
  7. data/lib/almirah/doc_items/controlled_table.rb +224 -224
  8. data/lib/almirah/doc_items/controlled_table_row.rb +22 -22
  9. data/lib/almirah/doc_items/doc_footer.rb +16 -16
  10. data/lib/almirah/doc_items/doc_item.rb +22 -22
  11. data/lib/almirah/doc_items/frontmatter.rb +9 -9
  12. data/lib/almirah/doc_items/heading.rb +93 -93
  13. data/lib/almirah/doc_items/image.rb +27 -27
  14. data/lib/almirah/doc_items/markdown_list.rb +156 -156
  15. data/lib/almirah/doc_items/markdown_table.rb +97 -61
  16. data/lib/almirah/doc_items/paragraph.rb +25 -25
  17. data/lib/almirah/doc_items/text_line.rb +296 -296
  18. data/lib/almirah/doc_items/todo_block.rb +21 -21
  19. data/lib/almirah/doc_parser.rb +379 -378
  20. data/lib/almirah/doc_types/base_document.rb +64 -64
  21. data/lib/almirah/doc_types/coverage.rb +95 -80
  22. data/lib/almirah/doc_types/index.rb +173 -173
  23. data/lib/almirah/doc_types/persistent_document.rb +17 -17
  24. data/lib/almirah/doc_types/protocol.rb +24 -24
  25. data/lib/almirah/doc_types/specification.rb +67 -67
  26. data/lib/almirah/doc_types/traceability.rb +142 -142
  27. data/lib/almirah/dom/doc_section.rb +25 -25
  28. data/lib/almirah/dom/document.rb +78 -78
  29. data/lib/almirah/navigation_pane.rb +16 -16
  30. data/lib/almirah/project.rb +287 -287
  31. data/lib/almirah/project_configuration.rb +41 -41
  32. data/lib/almirah/project_template.rb +298 -298
  33. data/lib/almirah/project_utility.rb +52 -0
  34. data/lib/almirah/search/specifications_db.rb +79 -79
  35. data/lib/almirah/templates/css/main.css +300 -300
  36. data/lib/almirah/templates/css/search.css +40 -40
  37. data/lib/almirah/templates/page.html +42 -42
  38. data/lib/almirah/templates/scripts/main.js +111 -111
  39. data/lib/almirah/templates/scripts/orama_search.js +138 -138
  40. data/lib/almirah.rb +93 -58
  41. metadata +4 -3
@@ -1,301 +1,301 @@
1
- body {
2
- font-family: Verdana, sans-serif;
3
- font-size: 12px;
4
- color: #333;
5
- margin: 0;
6
- padding: 0;
7
- min-width: 900px;
8
- }
9
- #main {
10
- flex-grow: 2;
11
- display: flex;
12
- flex-direction: row;
13
- }
14
- #content {
15
- flex-grow: 1;
16
- background-color: #fff;
17
- margin-top: 30px;
18
- padding: 10px 16px 10px 16px;
19
- overflow-x: auto;
20
- }
21
- #content h1, h2, h3, h4, h5, h6 {
22
- color: #555;
23
- font-family: "Trebuchet MS", Verdana, sans-serif;
24
- padding: 2px 10px 1px 0px;
25
- margin: 0 0 10px 0;
26
- }
27
- h1 {
28
- font-size: 2em;
29
- }
30
- h2 {
31
- font-size: 1.8em;
32
- }
33
- h3 {
34
- font-size: 1.5em;
35
- }
36
- h4 {
37
- font-size: 1.2em;
38
- border: none;
39
- font-weight: bold;
40
- }
41
- h5 {
42
- font-size: 1em;
43
- }
44
- h6 {
45
- font-size: 1em; color: #8e8e8e;
46
- }
47
- a.heading_anchor {
48
- display: none;
49
- margin-left: 6px;
50
- text-decoration: none;
51
- }
52
- table.markdown_table{
53
- border: 1px solid #bbb;
54
- border-collapse: collapse;
55
- padding: 4px;
56
- margin-bottom: 4px;
57
- overflow: hidden;
58
- }
59
- table.markdown_table th{
60
- border: 1px solid #bbb;
61
- padding: 4px;
62
- display: table-cell;
63
- vertical-align: inherit;
64
- background-color:#EEEEEE;
65
- }
66
- table.markdown_table td{
67
- border: 1px solid #bbb;
68
- padding: 4px;
69
- display: table-cell;
70
- vertical-align: inherit;
71
- }
72
- table.controlled{
73
- border: 1px solid #e4e4e4;
74
- border-collapse: collapse;
75
- width: 100%;
76
- margin-bottom: 4px;
77
- border-spacing: 0px;
78
- border-radius: 3px;
79
- overflow: hidden;
80
- }
81
- table.controlled th {
82
- background-color:#e1f1fa;
83
- padding: 4px;
84
- white-space:nowrap;
85
- font-weight:normal;
86
- border: 1px solid #bbb;
87
- }
88
- table.controlled td {
89
- padding: 4px;
90
- text-align:center;
91
- vertical-align:middle;
92
- padding-right:10px;
93
- border: 1px solid #bbb;
94
- }
95
- table.controlled tr:first-child th {
96
- border-top: 0;
97
- }
98
- table.controlled tr:last-child td {
99
- border-bottom: 0;
100
- }
101
- table.controlled tr td:first-child,
102
- table.controlled tr th:first-child {
103
- border-left: 0;
104
- }
105
- table.controlled tr td:last-child,
106
- table.controlled tr th:last-child {
107
- border-right: 0;
108
- }
109
- table.controlled td.item_id {
110
- width: 3%;
111
- text-align: center;
112
- }
113
- table.controlled td.item_text{
114
- text-align: left;
115
- }
116
- table.controlled:not(.odd-even) tbody tr:nth-child(odd) { background-color:#f6f7f8; }
117
- table.controlled:not(.odd-even) tbody tr:nth-child(even) { background-color: #fff; }
118
- table.controlled:not(.odd-even) tbody tr:nth-child(odd):hover,
119
- table.controlled:not(.odd-even) tbody tr:nth-child(even):hover { background-color:#ffffdd; }
120
- a, a:link, a:visited {
121
- color: #169;
122
- text-decoration: none;
123
- display: inline-block;
124
- }
125
- a:active {
126
- color: #555;
127
- background-color:#deb887;
128
- text-decoration: none;
129
- display: inline-block;
130
- }
131
- div.blockquote {
132
- display: block;
133
- background:#f9f9fb;
134
- border-left: 3px double #bbb;
135
- font-style: italic;
136
- padding: 4px 1em 4px 4px;
137
- margin-top: 4px;
138
- margin-bottom: 4px;
139
- }
140
- code {
141
- display: block;
142
- background:#ffffee;
143
- border-left: 3px double #bbb;
144
- font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace;
145
- padding: 4px 1em 4px 4px;
146
- margin-top: 4px;
147
- margin-bottom: 4px;
148
- }
149
- div.todoblock {
150
- display: block;
151
- background:#fcc;
152
- border-left: 3px double #bbb;
153
- font-style: italic;
154
- padding: 4px 1em 4px 4px;
155
- margin-top: 4px;
156
- margin-bottom: 4px;
157
- }
158
- img:hover{
159
- transition: 0.3s;
160
- }
161
- img{
162
- opacity: 0.9;
163
- cursor: pointer;
164
- }
165
- #modal_image_id{
166
- cursor: default;
167
- }
168
- #closed_nav_pane{
169
- padding: 0px;
170
- background: #169;
171
- border: 0px;
172
- position: fixed;
173
- width: 5px;
174
- height: 100%; /* 100% Full-height */
175
- visibility: visible;
176
- cursor: pointer;
177
- }
178
- #closed_nav_pane:hover{
179
- width: 10px;
180
- }
181
- #nav_pane{
182
- flex-shrink: 0;
183
- padding: 32px 8px 8px 8px;
184
- background: #EEEEEE;
185
- border: 1px solid #ddd;
186
- position: fixed;
187
- height: 100%; /* 100% Full-height */
188
- visibility: hidden;
189
- z-index: 1;
190
- overflow-y: auto;
191
- cursor: pointer;
192
- }
193
- @media screen and (min-width: 0px) and (max-width: 1089px) {#nav_pane{width: 22%;}}
194
- @media screen and (min-width: 1090px) and (max-width: 1279px) {#nav_pane{width: 240px;}}
195
- @media screen and (min-width: 1280px) and (max-width: 1599px) {#nav_pane{width: 280px;}}
196
- @media screen and (min-width: 1600px) and (max-width: 1919px) {#nav_pane{width: 320px;}}
197
- @media screen and (min-width: 1920px) and (max-width: 2559px) {#nav_pane{width: 360px;}}
198
- @media screen and (min-width: 2560px) {#nav_pane{width: 380px;}}
199
-
200
- #top_nav{
201
- background-color: #169;
202
- overflow: hidden;
203
- position: fixed;
204
- width: 100%;
205
- z-index: 2;
206
- }
207
- #top_nav a {
208
- float: left;
209
- color: white;
210
- text-align: center;
211
- padding: 4px 6px;
212
- text-decoration: none;
213
- font-size: 1.5em;
214
- font-family: "Trebuchet MS", Verdana, sans-serif;
215
- }
216
- #top_nav a.split {
217
- float: right;
218
- color: white;
219
- text-align: center;
220
- padding: 4px 6px;
221
- text-decoration: none;
222
- font-size: 1.5em;
223
- font-family: "Trebuchet MS", Verdana, sans-serif;
224
- }
225
- #top_nav a:hover {
226
- background-color: #169;
227
- color: #eee;
228
- }
229
- #top_nav a.active {
230
- background-color: #169;
231
- color: white;
232
- }
233
- #top_nav a:focus {
234
- text-decoration: underline;
235
- }
236
- #searchInput{
237
- float: left;
238
- margin: 4px 6px;
239
- text-decoration: none;
240
- }
241
- .modal {
242
- display: none; /* Hidden by default */
243
- position: fixed; /* Stay in place */
244
- z-index: 1; /* Sit on top */
245
- padding-top: 100px; /* Location of the box */
246
- left: 0;
247
- top: 0;
248
- width: 100%; /* Full width */
249
- height: 100%; /* Full height */
250
- overflow: auto; /* Enable scroll if needed */
251
- background-color: rgb(0,0,0); /* Fallback color */
252
- background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
253
- }
254
- .modal_image {
255
- margin: auto;
256
- display: block;
257
- width: 97%;
258
- /*max-width: 700px;*/
259
- }
260
- #modal_image_caption {
261
- margin: auto;
262
- display: block;
263
- width: 80%;
264
- max-width: 700px;
265
- text-align: center;
266
- color: #ccc;
267
- padding: 10px 0;
268
- height: 150px;
269
- }
270
- .modal_image, #modal_image_caption {
271
- animation-name: zoom;
272
- animation-duration: 0.6s;
273
- }
274
- @keyframes zoom {
275
- from {transform: scale(0.1)}
276
- to {transform: scale(1)}
277
- }
278
- .modal_close_btn {
279
- position: absolute;
280
- top: 15px;
281
- right: 35px;
282
- color: #f1f1f1;
283
- font-size: 30px;
284
- font-weight: bold;
285
- transition: 0.3s;
286
- }
287
- .modal_close_btn:hover,
288
- .modal_close_btn:focus {
289
- color: #bbb;
290
- text-decoration: none;
291
- cursor: pointer;
292
- }
293
- #footer {
294
- clear: both;
295
- border-top: 1px solid #bbb;
296
- font-size: 0.9em;
297
- color: #aaa;
298
- padding: 5px;
299
- text-align:center;
300
- background:#fff;
1
+ body {
2
+ font-family: Verdana, sans-serif;
3
+ font-size: 12px;
4
+ color: #333;
5
+ margin: 0;
6
+ padding: 0;
7
+ min-width: 900px;
8
+ }
9
+ #main {
10
+ flex-grow: 2;
11
+ display: flex;
12
+ flex-direction: row;
13
+ }
14
+ #content {
15
+ flex-grow: 1;
16
+ background-color: #fff;
17
+ margin-top: 30px;
18
+ padding: 10px 16px 10px 16px;
19
+ overflow-x: auto;
20
+ }
21
+ #content h1, h2, h3, h4, h5, h6 {
22
+ color: #555;
23
+ font-family: "Trebuchet MS", Verdana, sans-serif;
24
+ padding: 2px 10px 1px 0px;
25
+ margin: 0 0 10px 0;
26
+ }
27
+ h1 {
28
+ font-size: 2em;
29
+ }
30
+ h2 {
31
+ font-size: 1.8em;
32
+ }
33
+ h3 {
34
+ font-size: 1.5em;
35
+ }
36
+ h4 {
37
+ font-size: 1.2em;
38
+ border: none;
39
+ font-weight: bold;
40
+ }
41
+ h5 {
42
+ font-size: 1em;
43
+ }
44
+ h6 {
45
+ font-size: 1em; color: #8e8e8e;
46
+ }
47
+ a.heading_anchor {
48
+ display: none;
49
+ margin-left: 6px;
50
+ text-decoration: none;
51
+ }
52
+ table.markdown_table{
53
+ border: 1px solid #bbb;
54
+ border-collapse: collapse;
55
+ padding: 4px;
56
+ margin-bottom: 4px;
57
+ overflow: hidden;
58
+ }
59
+ table.markdown_table th{
60
+ border: 1px solid #bbb;
61
+ padding: 4px;
62
+ display: table-cell;
63
+ vertical-align: inherit;
64
+ background-color:#EEEEEE;
65
+ }
66
+ table.markdown_table td{
67
+ border: 1px solid #bbb;
68
+ padding: 4px;
69
+ display: table-cell;
70
+ vertical-align: inherit;
71
+ }
72
+ table.controlled{
73
+ border: 1px solid #e4e4e4;
74
+ border-collapse: collapse;
75
+ width: 100%;
76
+ margin-bottom: 4px;
77
+ border-spacing: 0px;
78
+ border-radius: 3px;
79
+ overflow: hidden;
80
+ }
81
+ table.controlled th {
82
+ background-color:#e1f1fa;
83
+ padding: 4px;
84
+ white-space:nowrap;
85
+ font-weight:normal;
86
+ border: 1px solid #bbb;
87
+ }
88
+ table.controlled td {
89
+ padding: 4px;
90
+ text-align:center;
91
+ vertical-align:middle;
92
+ padding-right:10px;
93
+ border: 1px solid #bbb;
94
+ }
95
+ table.controlled tr:first-child th {
96
+ border-top: 0;
97
+ }
98
+ table.controlled tr:last-child td {
99
+ border-bottom: 0;
100
+ }
101
+ table.controlled tr td:first-child,
102
+ table.controlled tr th:first-child {
103
+ border-left: 0;
104
+ }
105
+ table.controlled tr td:last-child,
106
+ table.controlled tr th:last-child {
107
+ border-right: 0;
108
+ }
109
+ table.controlled td.item_id {
110
+ width: 3%;
111
+ text-align: center;
112
+ }
113
+ table.controlled td.item_text{
114
+ text-align: left;
115
+ }
116
+ table.controlled:not(.odd-even) tbody tr:nth-child(odd) { background-color:#f6f7f8; }
117
+ table.controlled:not(.odd-even) tbody tr:nth-child(even) { background-color: #fff; }
118
+ table.controlled:not(.odd-even) tbody tr:nth-child(odd):hover,
119
+ table.controlled:not(.odd-even) tbody tr:nth-child(even):hover { background-color:#ffffdd; }
120
+ a, a:link, a:visited {
121
+ color: #169;
122
+ text-decoration: none;
123
+ display: inline-block;
124
+ }
125
+ a:active {
126
+ color: #555;
127
+ background-color:#deb887;
128
+ text-decoration: none;
129
+ display: inline-block;
130
+ }
131
+ div.blockquote {
132
+ display: block;
133
+ background:#f9f9fb;
134
+ border-left: 3px double #bbb;
135
+ font-style: italic;
136
+ padding: 4px 1em 4px 4px;
137
+ margin-top: 4px;
138
+ margin-bottom: 4px;
139
+ }
140
+ code {
141
+ display: block;
142
+ background:#ffffee;
143
+ border-left: 3px double #bbb;
144
+ font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace;
145
+ padding: 4px 1em 4px 4px;
146
+ margin-top: 4px;
147
+ margin-bottom: 4px;
148
+ }
149
+ div.todoblock {
150
+ display: block;
151
+ background:#fcc;
152
+ border-left: 3px double #bbb;
153
+ font-style: italic;
154
+ padding: 4px 1em 4px 4px;
155
+ margin-top: 4px;
156
+ margin-bottom: 4px;
157
+ }
158
+ img:hover{
159
+ transition: 0.3s;
160
+ }
161
+ img{
162
+ opacity: 0.9;
163
+ cursor: pointer;
164
+ }
165
+ #modal_image_id{
166
+ cursor: default;
167
+ }
168
+ #closed_nav_pane{
169
+ padding: 0px;
170
+ background: #169;
171
+ border: 0px;
172
+ position: fixed;
173
+ width: 5px;
174
+ height: 100%; /* 100% Full-height */
175
+ visibility: visible;
176
+ cursor: pointer;
177
+ }
178
+ #closed_nav_pane:hover{
179
+ width: 10px;
180
+ }
181
+ #nav_pane{
182
+ flex-shrink: 0;
183
+ padding: 32px 8px 8px 8px;
184
+ background: #EEEEEE;
185
+ border: 1px solid #ddd;
186
+ position: fixed;
187
+ height: 100%; /* 100% Full-height */
188
+ visibility: hidden;
189
+ z-index: 1;
190
+ overflow-y: auto;
191
+ cursor: pointer;
192
+ }
193
+ @media screen and (min-width: 0px) and (max-width: 1089px) {#nav_pane{width: 22%;}}
194
+ @media screen and (min-width: 1090px) and (max-width: 1279px) {#nav_pane{width: 240px;}}
195
+ @media screen and (min-width: 1280px) and (max-width: 1599px) {#nav_pane{width: 280px;}}
196
+ @media screen and (min-width: 1600px) and (max-width: 1919px) {#nav_pane{width: 320px;}}
197
+ @media screen and (min-width: 1920px) and (max-width: 2559px) {#nav_pane{width: 360px;}}
198
+ @media screen and (min-width: 2560px) {#nav_pane{width: 380px;}}
199
+
200
+ #top_nav{
201
+ background-color: #169;
202
+ overflow: hidden;
203
+ position: fixed;
204
+ width: 100%;
205
+ z-index: 2;
206
+ }
207
+ #top_nav a {
208
+ float: left;
209
+ color: white;
210
+ text-align: center;
211
+ padding: 4px 6px;
212
+ text-decoration: none;
213
+ font-size: 1.5em;
214
+ font-family: "Trebuchet MS", Verdana, sans-serif;
215
+ }
216
+ #top_nav a.split {
217
+ float: right;
218
+ color: white;
219
+ text-align: center;
220
+ padding: 4px 6px;
221
+ text-decoration: none;
222
+ font-size: 1.5em;
223
+ font-family: "Trebuchet MS", Verdana, sans-serif;
224
+ }
225
+ #top_nav a:hover {
226
+ background-color: #169;
227
+ color: #eee;
228
+ }
229
+ #top_nav a.active {
230
+ background-color: #169;
231
+ color: white;
232
+ }
233
+ #top_nav a:focus {
234
+ text-decoration: underline;
235
+ }
236
+ #searchInput{
237
+ float: left;
238
+ margin: 4px 6px;
239
+ text-decoration: none;
240
+ }
241
+ .modal {
242
+ display: none; /* Hidden by default */
243
+ position: fixed; /* Stay in place */
244
+ z-index: 1; /* Sit on top */
245
+ padding-top: 100px; /* Location of the box */
246
+ left: 0;
247
+ top: 0;
248
+ width: 100%; /* Full width */
249
+ height: 100%; /* Full height */
250
+ overflow: auto; /* Enable scroll if needed */
251
+ background-color: rgb(0,0,0); /* Fallback color */
252
+ background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
253
+ }
254
+ .modal_image {
255
+ margin: auto;
256
+ display: block;
257
+ width: 97%;
258
+ /*max-width: 700px;*/
259
+ }
260
+ #modal_image_caption {
261
+ margin: auto;
262
+ display: block;
263
+ width: 80%;
264
+ max-width: 700px;
265
+ text-align: center;
266
+ color: #ccc;
267
+ padding: 10px 0;
268
+ height: 150px;
269
+ }
270
+ .modal_image, #modal_image_caption {
271
+ animation-name: zoom;
272
+ animation-duration: 0.6s;
273
+ }
274
+ @keyframes zoom {
275
+ from {transform: scale(0.1)}
276
+ to {transform: scale(1)}
277
+ }
278
+ .modal_close_btn {
279
+ position: absolute;
280
+ top: 15px;
281
+ right: 35px;
282
+ color: #f1f1f1;
283
+ font-size: 30px;
284
+ font-weight: bold;
285
+ transition: 0.3s;
286
+ }
287
+ .modal_close_btn:hover,
288
+ .modal_close_btn:focus {
289
+ color: #bbb;
290
+ text-decoration: none;
291
+ cursor: pointer;
292
+ }
293
+ #footer {
294
+ clear: both;
295
+ border-top: 1px solid #bbb;
296
+ font-size: 0.9em;
297
+ color: #aaa;
298
+ padding: 5px;
299
+ text-align:center;
300
+ background:#fff;
301
301
  }
@@ -1,40 +1,40 @@
1
- /* Dropdown Content (Hidden by Default) */
2
- .search-results-content {
3
- display: none;
4
- position: absolute;
5
- background-color: #f6f6f6;
6
- min-width: 600px;
7
- border: 1px solid #ddd;
8
- z-index: 2;
9
- }
10
-
11
- /* Links inside the dropdown
12
- .search-results-content a, a:link, a:visited {
13
- color: #169;
14
- text-decoration: none;
15
- display: inline-block;
16
- }*/
17
-
18
- div.search-item {
19
- padding: 2px;
20
- text-align:left;
21
- vertical-align:middle;
22
- padding-right:10px;
23
- border: 1px solid #bbb;
24
- }
25
- table.search-result-table{
26
- border: 0;
27
- margin: 0;
28
- border-collapse: collapse;
29
- width: 100%;
30
- margin-bottom: 0px;
31
- border-spacing: 0px;
32
- overflow: hidden;
33
- }
34
- table.search-result-table td {
35
- padding: 4px;
36
- width: 50%;
37
- text-align:left;
38
- vertical-align:middle;
39
- padding-right:10px;
40
- }
1
+ /* Dropdown Content (Hidden by Default) */
2
+ .search-results-content {
3
+ display: none;
4
+ position: absolute;
5
+ background-color: #f6f6f6;
6
+ min-width: 600px;
7
+ border: 1px solid #ddd;
8
+ z-index: 2;
9
+ }
10
+
11
+ /* Links inside the dropdown
12
+ .search-results-content a, a:link, a:visited {
13
+ color: #169;
14
+ text-decoration: none;
15
+ display: inline-block;
16
+ }*/
17
+
18
+ div.search-item {
19
+ padding: 2px;
20
+ text-align:left;
21
+ vertical-align:middle;
22
+ padding-right:10px;
23
+ border: 1px solid #bbb;
24
+ }
25
+ table.search-result-table{
26
+ border: 0;
27
+ margin: 0;
28
+ border-collapse: collapse;
29
+ width: 100%;
30
+ margin-bottom: 0px;
31
+ border-spacing: 0px;
32
+ overflow: hidden;
33
+ }
34
+ table.search-result-table td {
35
+ padding: 4px;
36
+ width: 50%;
37
+ text-align:left;
38
+ vertical-align:middle;
39
+ padding-right:10px;
40
+ }