Almirah 0.0.3 → 0.0.4
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.
- checksums.yaml +4 -4
- data/lib/almirah/doc_items/blockquote.rb +2 -2
- data/lib/almirah/doc_items/controlled_paragraph.rb +8 -8
- data/lib/almirah/doc_items/heading.rb +1 -1
- data/lib/almirah/doc_items/markdown_table.rb +1 -1
- data/lib/almirah/specification.rb +3 -3
- data/lib/almirah/templates/page.html +139 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0cec091b4437bbdeb9ea83b3a55638fafef7b0d629ba9eb1f069594ec420651c
|
4
|
+
data.tar.gz: 6de241968325f0d89227f25b854332aa697a8af659e49d91fe5130112fcb31ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5196218711f21202659e7cf84b5e1f8329ace42a00831d80acc275357e4b2b38cecb1af6842cc3b9b439f8a1d8c78610761756af5b9e565ce77b3f0aa64d24fd
|
7
|
+
data.tar.gz: a23964002a9c745e7529182b6e2ae684b4ca6a9fd7c963a7eae553c370ac64565edd6be4412dfa27c8ed4517f9273562e14ab4adfebe818cf13bce6102b72736
|
@@ -11,11 +11,11 @@ class Blockquote < DocItem
|
|
11
11
|
def to_html
|
12
12
|
s = ''
|
13
13
|
if @@htmlTableRenderInProgress
|
14
|
-
s += "</table
|
14
|
+
s += "</table>\n\r"
|
15
15
|
@@htmlTableRenderInProgress = false
|
16
16
|
end
|
17
17
|
|
18
|
-
s += "<p
|
18
|
+
s += "<div class=\"blockquote\"><p>#{@text}</div>\n\r"
|
19
19
|
return s
|
20
20
|
end
|
21
21
|
end
|
@@ -16,35 +16,35 @@ class ControlledParagraph < Paragraph
|
|
16
16
|
def to_html
|
17
17
|
s = ''
|
18
18
|
unless @@htmlTableRenderInProgress
|
19
|
-
s += "<table>\n\r"
|
19
|
+
s += "<table class=\"controlled\">\n\r"
|
20
20
|
s += "\t<thead> <th>#</th> <th>Text</th> <th>UL</th> <th>DL</th> <th>COV</th> </thead>\n\r"
|
21
21
|
@@htmlTableRenderInProgress = true
|
22
22
|
end
|
23
23
|
s += "\t<tr>\n\r"
|
24
|
-
s += "\t\t<td> <a name=\"#{@id}\"></a>#{@id} </td>\n\r"
|
25
|
-
s += "\t\t<td>#{@text}</td>\n\r"
|
24
|
+
s += "\t\t<td class=\"item_id\"> <a name=\"#{@id}\"></a>#{@id} </td>\n\r"
|
25
|
+
s += "\t\t<td class=\"item_text\">#{@text}</td>\n\r"
|
26
26
|
|
27
27
|
if @up_link
|
28
28
|
if tmp = /^([a-zA-Z]+)[-]\d+/.match(@up_link)
|
29
29
|
up_link_doc_name = tmp[1].downcase
|
30
30
|
end
|
31
|
-
s += "\t\t<td><a href=\"./../#{up_link_doc_name}/#{up_link_doc_name}.html\" class=\"external\">#{@up_link}</a></td>\n\r"
|
31
|
+
s += "\t\t<td class=\"item_id\"><a href=\"./../#{up_link_doc_name}/#{up_link_doc_name}.html\" class=\"external\">#{@up_link}</a></td>\n\r"
|
32
32
|
else
|
33
|
-
s += "\t\t<td></td>\n\r"
|
33
|
+
s += "\t\t<td class=\"item_id\"></td>\n\r"
|
34
34
|
end
|
35
35
|
|
36
36
|
if @down_links
|
37
37
|
if tmp = /^([a-zA-Z]+)[-]\d+/.match(@down_links[0].id) # guessing that all the links refer to one document
|
38
38
|
down_link_doc_name = tmp[1].downcase
|
39
39
|
end
|
40
|
-
s += "\t\t<td><a href=\"./../#{down_link_doc_name}/#{down_link_doc_name}.html\" class=\"external\">#{@down_links.length}</a></td>\n\r"
|
40
|
+
s += "\t\t<td class=\"item_id\"><a href=\"./../#{down_link_doc_name}/#{down_link_doc_name}.html\" class=\"external\">#{@down_links.length}</a></td>\n\r"
|
41
41
|
else
|
42
|
-
s += "\t\t<td></td>\n\r"
|
42
|
+
s += "\t\t<td class=\"item_id\"></td>\n\r"
|
43
43
|
end
|
44
44
|
|
45
45
|
#s += "\t\t<td></td>\n\r" # UL
|
46
46
|
#s += "\t\t<td></td>\n\r" # DL
|
47
|
-
s += "\t\t<td></td>\n\r" # COV
|
47
|
+
s += "\t\t<td class=\"item_id\"></td>\n\r" # COV
|
48
48
|
s += "\t</tr>\n\r"
|
49
49
|
return s
|
50
50
|
end
|
@@ -18,7 +18,7 @@ class Heading < Paragraph
|
|
18
18
|
headingLevel = level.to_s
|
19
19
|
itemTextNoSpaces = self.getTextWithoutSpaces
|
20
20
|
s += "<a name=\"#{itemTextNoSpaces}\"></a>\n\r"
|
21
|
-
s += "<h#{headingLevel}> #{@text} <a href=\"\##{itemTextNoSpaces}\">"
|
21
|
+
s += "<h#{headingLevel}> #{@text} <a href=\"\##{itemTextNoSpaces}\" class=\"heading_anchor\">"
|
22
22
|
s += "¶</a></h#{headingLevel}>"
|
23
23
|
return s
|
24
24
|
end
|
@@ -64,7 +64,6 @@ class Specification
|
|
64
64
|
|
65
65
|
id = res[1]
|
66
66
|
text = res[2]
|
67
|
-
item = ControlledParagraph.new( text, id )
|
68
67
|
|
69
68
|
#check if it contains the uplink
|
70
69
|
if tmp = /(.*)\s+>\[(\S*)\]$/.match(text)
|
@@ -72,13 +71,14 @@ class Specification
|
|
72
71
|
text = tmp[1]
|
73
72
|
up_link = tmp[2]
|
74
73
|
|
75
|
-
item.up_link = up_link
|
76
|
-
|
77
74
|
if tmp = /^([a-zA-Z]+)[-]\d+/.match(up_link)
|
78
75
|
self.up_link_key = tmp[1]
|
79
76
|
end
|
80
77
|
end
|
81
78
|
|
79
|
+
item = ControlledParagraph.new( text, id )
|
80
|
+
item.up_link = up_link
|
81
|
+
|
82
82
|
self.docItems.append(item)
|
83
83
|
self.dictionary[ id.to_s ] = item #for fast search
|
84
84
|
self.controlledParagraphs.append(item) #for fast search
|
@@ -2,8 +2,146 @@
|
|
2
2
|
<html lang="en">
|
3
3
|
<head>
|
4
4
|
<meta charset="utf-8" />
|
5
|
+
<!-- CSS -->
|
6
|
+
<style>
|
7
|
+
body {
|
8
|
+
font-family: Verdana, sans-serif;
|
9
|
+
font-size: 12px;
|
10
|
+
color: #333;
|
11
|
+
margin: 0;
|
12
|
+
padding: 0;
|
13
|
+
min-width: 900px;
|
14
|
+
}
|
15
|
+
#main {
|
16
|
+
flex-grow: 2;
|
17
|
+
display: flex;
|
18
|
+
flex-direction: row-reverse;
|
19
|
+
}
|
20
|
+
#content {
|
21
|
+
flex-grow: 1;
|
22
|
+
background-color: #fff;
|
23
|
+
margin: 0px;
|
24
|
+
padding: 10px 16px 10px 16px;
|
25
|
+
overflow-x: auto;
|
26
|
+
}
|
27
|
+
#content h1, h2, h3, h4, h5, h6 {
|
28
|
+
color: #555;
|
29
|
+
font-family: "Trebuchet MS", Verdana, sans-serif;
|
30
|
+
padding: 2px 10px 1px 0px;
|
31
|
+
margin: 0 0 10px 0;
|
32
|
+
}
|
33
|
+
h1 {
|
34
|
+
font-size: 2em;
|
35
|
+
}
|
36
|
+
h2 {
|
37
|
+
font-size: 1.8em;
|
38
|
+
}
|
39
|
+
h3 {
|
40
|
+
font-size: 1.5em;
|
41
|
+
}
|
42
|
+
h4 {
|
43
|
+
font-size: 1.2em;
|
44
|
+
border: none;
|
45
|
+
font-weight: bold;
|
46
|
+
}
|
47
|
+
h5 {
|
48
|
+
font-size: 1em;
|
49
|
+
}
|
50
|
+
h6 {
|
51
|
+
font-size: 1em; color: #8e8e8e;
|
52
|
+
}
|
53
|
+
a.heading_anchor {
|
54
|
+
display: none;
|
55
|
+
margin-left: 6px;
|
56
|
+
text-decoration: none;
|
57
|
+
}
|
58
|
+
table.markdown_table{
|
59
|
+
border: 1px solid #bbb;
|
60
|
+
border-collapse: collapse;
|
61
|
+
padding: 4px;
|
62
|
+
margin-bottom: 4px;
|
63
|
+
overflow: hidden;
|
64
|
+
}
|
65
|
+
table.markdown_table th{
|
66
|
+
border: 1px solid #bbb;
|
67
|
+
padding: 4px;
|
68
|
+
display: table-cell;
|
69
|
+
vertical-align: inherit;
|
70
|
+
background-color:#EEEEEE;
|
71
|
+
}
|
72
|
+
table.markdown_table td{
|
73
|
+
border: 1px solid #bbb;
|
74
|
+
padding: 4px;
|
75
|
+
display: table-cell;
|
76
|
+
vertical-align: inherit;
|
77
|
+
}
|
78
|
+
table.controlled{
|
79
|
+
border: 1px solid #e4e4e4;
|
80
|
+
border-collapse: collapse;
|
81
|
+
width: 100%;
|
82
|
+
margin-bottom: 4px;
|
83
|
+
border-spacing: 0px;
|
84
|
+
border-radius: 3px;
|
85
|
+
overflow: hidden;
|
86
|
+
}
|
87
|
+
table.controlled th {
|
88
|
+
background-color:#e1f1fa;
|
89
|
+
padding: 4px;
|
90
|
+
white-space:nowrap;
|
91
|
+
font-weight:bold;
|
92
|
+
border: 1px solid #bbb;
|
93
|
+
}
|
94
|
+
table.controlled td {
|
95
|
+
text-align:center;
|
96
|
+
vertical-align:middle;
|
97
|
+
padding-right:10px;
|
98
|
+
border: 1px solid #bbb;
|
99
|
+
}
|
100
|
+
table.controlled tr:first-child th {
|
101
|
+
border-top: 0;
|
102
|
+
}
|
103
|
+
table.controlled tr:last-child td {
|
104
|
+
border-bottom: 0;
|
105
|
+
}
|
106
|
+
table.controlled tr td:first-child,
|
107
|
+
table.controlled tr th:first-child {
|
108
|
+
border-left: 0;
|
109
|
+
}
|
110
|
+
table.controlled tr td:last-child,
|
111
|
+
table.controlled tr th:last-child {
|
112
|
+
border-right: 0;
|
113
|
+
}
|
114
|
+
table.controlled td.item_id {
|
115
|
+
width: 3%;
|
116
|
+
text-align: center;
|
117
|
+
}
|
118
|
+
table.controlled td.item_text{
|
119
|
+
text-align: left;
|
120
|
+
}
|
121
|
+
table.controlled:not(.odd-even) tbody tr:nth-child(odd) { background-color:#f6f7f8; }
|
122
|
+
table.controlled:not(.odd-even) tbody tr:nth-child(even) { background-color: #fff; }
|
123
|
+
table.controlled:not(.odd-even) tbody tr:nth-child(odd):hover,
|
124
|
+
table.controlled:not(.odd-even) tbody tr:nth-child(even):hover { background-color:#ffffdd; }
|
125
|
+
a, a:link, a:visited {
|
126
|
+
color: #169;
|
127
|
+
text-decoration: none;
|
128
|
+
}
|
129
|
+
div.blockquote {
|
130
|
+
display: block;
|
131
|
+
background:#f9f9fb;
|
132
|
+
border-left: 3px double #bbb;
|
133
|
+
font-style: italic;
|
134
|
+
padding: 4px 1em 4px 4px;
|
135
|
+
margin-top: 4px;
|
136
|
+
margin-bottom: 4px;
|
137
|
+
}
|
138
|
+
</style>
|
5
139
|
</head>
|
6
140
|
<body>
|
7
|
-
|
141
|
+
<div id="main">
|
142
|
+
<div id="content">
|
143
|
+
{{CONTENT}}
|
144
|
+
</div>
|
145
|
+
</div>
|
8
146
|
</body>
|
9
147
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: Almirah
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oleksandr Ivanov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-01-
|
11
|
+
date: 2024-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: The software part of the Almirah system
|
14
14
|
email: oleksandr.ivanov.development@gmail.com
|