metanorma-un 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 78dd2e66f1de6d3ff4914f842c2bcaed21247b2ae03f58fdd2e31615abeffb40
4
- data.tar.gz: e6439b8ede7334ee4e4a96e4f3a074071e7011f449636142fa62acc2c039c79c
3
+ metadata.gz: bb4cec32f898b0e8fb67d94c1757eaf4336fdc76553559d8d3bd605f8ae35765
4
+ data.tar.gz: 1070671f7c2e81f7fc61462390129b01dfd31cf64fb17bd69974e94c72fbb9b2
5
5
  SHA512:
6
- metadata.gz: fc672a906c91fea85f3f7e6c72eae206477c8fdbb9770316d8c9826ba99a6322f7ce8fe1bbf61c54ba59a46a8805177f01cc7083392fdc3ca0e89d8c6d5567a1
7
- data.tar.gz: c666dcd1fcc305cc16d97c6f98e0dce7074a96724394a72e6e5ff1fa3abe4a7ae9b9689d69e35c0ec51d35451377701b0b1dbdc629c72e890e4f6bd62c89fb7e
6
+ metadata.gz: 1d433580329fcb1c9982107b7fa02f1301ffd4477dbda664c07f93ee0e108b95fadec720b755064f5d08fff14c8421c3f8686e7f4a66d476e9e86b80dd178b8c
7
+ data.tar.gz: aec0d9d71e583d8a92bf32074418bd7240812efb6f220177638847eb8eb083412f66946db5b05d4b31ebaa25604c08dcaf7dcb57dc142c215e25b2161eb5f6c2
@@ -130,8 +130,8 @@ module Asciidoctor
130
130
  def doctype(node)
131
131
  d = node.attr("doctype")
132
132
  unless %w{plenary recommendation addendum communication corrigendum reissue
133
- agenda budgetary sec-gen-notes expert-report resolution}.include? d
134
- warn "#{d} is not a legal document type: reverting to 'recommendation'"
133
+ agenda budgetary sec-gen-notes expert-report resolution plenary-attachment}.include? d
134
+ @log.add("Document Attributes", nil, "#{d} is not a legal document type: reverting to 'recommendation'")
135
135
  d = "recommendation"
136
136
  end
137
137
  d
@@ -149,6 +149,7 @@ module Asciidoctor
149
149
  word_converter(node).convert filename unless node.attr("nodoc")
150
150
  pdf_converter(node).convert filename unless node.attr("nodoc")
151
151
  end
152
+ @log.write(@filename + ".err") unless @novalid
152
153
  @files_to_delete.each { |f| FileUtils.rm f }
153
154
  ret
154
155
  end
@@ -185,6 +186,12 @@ module Asciidoctor
185
186
 
186
187
  def sections_cleanup(xmldoc)
187
188
  super
189
+ doctype = xmldoc&.at("//bibdata/ext/doctype")&.text
190
+ %w(plenary agenda budgetary).include?(doctype) or
191
+ para_to_clause(xmldoc)
192
+ end
193
+
194
+ def para_to_clause(xmldoc)
188
195
  xmldoc.xpath("//clause/p | //annex/p").each do |p|
189
196
  cl = Nokogiri::XML::Node.new("clause", xmldoc)
190
197
  cl["id"] = p["id"]
@@ -204,6 +211,15 @@ module Asciidoctor
204
211
  "subsequence": node.attr("subsequence"),
205
212
  ))
206
213
  end
214
+
215
+ def sectiontype_streamline(ret)
216
+ case ret
217
+ when "foreword" then "donotrecognise-foreword"
218
+ when "introduction" then "donotrecognise-foreword"
219
+ else
220
+ super
221
+ end
222
+ end
207
223
  end
208
224
  end
209
225
  end
@@ -645,6 +645,11 @@
645
645
  <optional>
646
646
  <attribute name="script"/>
647
647
  </optional>
648
+ <optional>
649
+ <attribute name="inline-header">
650
+ <data type="boolean"/>
651
+ </attribute>
652
+ </optional>
648
653
  <optional>
649
654
  <attribute name="obligation">
650
655
  <choice>
@@ -14,7 +14,7 @@ module Asciidoctor
14
14
  stage = xmldoc&.at("//bibdata/status/stage")&.text
15
15
  %w(proposal working-draft committee-draft draft-standard final-draft
16
16
  published withdrawn).include? stage or
17
- warn "Document Attributes: #{stage} is not a recognised status"
17
+ @log.add("Document Attributes", nil, "#{stage} is not a recognised status")
18
18
  end
19
19
  end
20
20
  end
@@ -227,6 +227,13 @@ module IsoDoc
227
227
  c1&.children&.each { |c2| parse(c2, s) }
228
228
  end
229
229
  end
230
+
231
+ def is_plenary?(docxml)
232
+ doctype = docxml&.at(ns("//bibdata/ext/doctype"))&.text
233
+ return true if %w(plenary agenda budgetary).include?(doctype)
234
+ return true if docxml&.at(ns("//bibdata/ext/session/*"))
235
+ false
236
+ end
230
237
  end
231
238
  end
232
239
  end
@@ -84,8 +84,13 @@ exactly'></p>
84
84
  </div>
85
85
 
86
86
  <div style='mso-element:header' id=eh2>
87
+ {% if session_id %}
88
+ <p class=MsoHeader align=left style='text-align:left;line-height:12.0pt;
89
+ mso-line-height-rule:exactly'><span lang=EN-GB><b>{{ session_id }}</b></span></p>
90
+ {% else %}
87
91
  <p class=MsoHeader align=center style='text-align:center;line-height:12.0pt;
88
92
  mso-line-height-rule:exactly'><span lang=EN-GB><b>{{ formatted_docnumber }}</b></span></p>
93
+ {% endif %}
89
94
 
90
95
  <div style='mso-element:para-border-div;border:none;border-bottom:solid windowtext 1.0pt;
91
96
  mso-border-bottom-alt:solid windowtext .5pt;padding:0cm 0cm 1.0pt 0cm'>
@@ -99,8 +104,13 @@ lang=EN-US><o:p>&nbsp;</o:p></span></p>
99
104
  </div>
100
105
 
101
106
  <div style='mso-element:header' id=eh2l>
107
+ {% if session_id %}
108
+ <p class=MsoHeaderLandscape align=left style='text-align:left;line-height:12.0pt;
109
+ mso-line-height-rule:exactly'><span lang=EN-GB><b>{{ session_id }}</b></span></p>
110
+ {% else %}
102
111
  <p class=MsoHeaderLandscape align=center style='text-align:center;line-height:12.0pt;
103
112
  mso-line-height-rule:exactly'><span lang=EN-GB><b>{{ formatted_docnumber }}</b></span></p>
113
+ {% endif %}
104
114
 
105
115
  <div style='mso-element:para-border-div;border:none;border-bottom:solid windowtext 1.0pt;
106
116
  mso-border-bottom-alt:solid windowtext .5pt;padding:0cm 0cm 1.0pt 0cm'>
@@ -114,9 +124,13 @@ lang=EN-US><o:p>&nbsp;</o:p></span></p>
114
124
  </div>
115
125
 
116
126
  <div style='mso-element:header' id=h2>
117
-
127
+ {% if session_id %}
128
+ <p class=MsoHeader align=right style='text-align:right;line-height:12.0pt;
129
+ mso-line-height-rule:exactly'><span lang=EN-GB><b>{{ session_id }}</b></span></p>
130
+ {% else %}
118
131
  <p class=MsoHeader align=center style='text-align:center;line-height:12.0pt;
119
132
  mso-line-height-rule:exactly'><span lang=EN-GB><b>{{ formatted_docnumber }}</b></span></p>
133
+ {% endif %}
120
134
 
121
135
  <div style='mso-element:para-border-div;border:none;border-bottom:solid windowtext 1.0pt;
122
136
  mso-border-bottom-alt:solid windowtext .5pt;padding:0cm 0cm 1.0pt 0cm'>
@@ -131,8 +145,13 @@ lang=EN-US><o:p>&nbsp;</o:p></span></p>
131
145
 
132
146
  <div style='mso-element:header' id=h2l>
133
147
 
148
+ {% if session_id %}
149
+ <p class=MsoHeaderLandscape align=right style='text-align:right;line-height:12.0pt;
150
+ mso-line-height-rule:exactly'><span lang=EN-GB><b>{{ session_id }}</b></span></p>
151
+ {% else %}
134
152
  <p class=MsoHeaderLandscape align=center style='text-align:center;line-height:12.0pt;
135
153
  mso-line-height-rule:exactly'><span lang=EN-GB><b>{{ formatted_docnumber }}</b></span></p>
154
+ {% endif %}
136
155
 
137
156
  <div style='mso-element:para-border-div;border:none;border-bottom:solid windowtext 1.0pt;
138
157
  mso-border-bottom-alt:solid windowtext .5pt;padding:0cm 0cm 1.0pt 0cm'>
@@ -1,8 +1,8 @@
1
- <div class="document-stage-band" id='{{ stage | downcase | replace: " ", "-" }}-band'>
1
+ <div class="document-stage-band" id="{{ stage | downcase | replace: ' ', '-' }}-band">
2
2
  <p class="document-stage">{{ stage }}</p>
3
3
  </div>
4
4
 
5
- <div class="document-type-band" id='{{ doctype | downcase | replace: " ", "-" }}-band'>
5
+ <div class="document-type-band" id="{{ doctype | downcase | replace: ' ', '-' }}-band">
6
6
  <p class="document-type">UNECE {{ doctype }}</p>
7
7
  </div>
8
8
 
@@ -1,8 +1,8 @@
1
- <div class="document-stage-band" id='{{ stage | downcase | replace: " ", "-" }}-band'>
1
+ <div class="document-stage-band" id="{{ stage | downcase | replace: ' ', '-' }}-band">
2
2
  <p class="document-stage">{{ stage }}</p>
3
3
  </div>
4
4
 
5
- <div class="document-type-band" id='{{ doctype | downcase | replace: " ", "-" }}-band'>
5
+ <div class="document-type-band" id="{{ doctype | downcase | replace: ' ', '-' }}-band">
6
6
  <p class="document-type">UNECE {{ doctype }}</p>
7
7
  </div>
8
8
 
@@ -7,126 +7,7 @@
7
7
  License: none (public domain)
8
8
  */
9
9
 
10
- html, body, div, span, applet, object, iframe,
11
- h1, h2, h3, h4, h5, h6, p, blockquote, pre,
12
- a, abbr, acronym, address, big, cite, code,
13
- del, dfn, em, img, ins, kbd, q, s, samp,
14
- small, strike, strong, sub, sup, tt, var,
15
- b, u, i, center,
16
- ol, ul, li,
17
- fieldset, form, label, legend,
18
- table, caption, tbody, tfoot, thead, tr, th, td,
19
- article, aside, canvas, details, embed,
20
- figure, figcaption, footer, header, hgroup,
21
- menu, nav, output, ruby, section, summary,
22
- time, mark, audio, video {
23
- margin: 0;
24
- padding: 0;
25
- }
26
-
27
- html, body, div, span, applet, object, iframe,
28
- h1, h2, h3, h4, h5, h6, p, blockquote, pre,
29
- a, abbr, acronym, address, big, cite, code,
30
- del, dfn, em, img, ins, kbd, q, s, samp,
31
- small, strike, strong, sub, sup, tt, var,
32
- b, u, i, center,
33
- dl, dt, dd, ol, ul, li,
34
- fieldset, form, label, legend,
35
- table, caption, tbody, tfoot, thead, tr, th, td,
36
- article, aside, canvas, details, embed,
37
- figure, figcaption, footer, header, hgroup,
38
- menu, nav, output, ruby, section, summary,
39
- time, mark, audio, video {
40
- border: 0;
41
- font-size: 100%;
42
- }
43
-
44
- html, body, div, span, applet, object, iframe,
45
- h1, h2, h3, h4, h5, h6, p, blockquote, pre,
46
- a, abbr, acronym, address, big, cite, code,
47
- del, dfn, em, img, ins, kbd, q, s, samp,
48
- small, strike, strong, tt, var,
49
- b, u, i, center,
50
- dl, dd, ol, ul, li,
51
- fieldset, form, label, legend,
52
- table, caption, tbody, tfoot, thead, tr, th, td,
53
- article, aside, canvas, details, embed,
54
- figure, figcaption, footer, header, hgroup,
55
- menu, nav, output, ruby, section, summary,
56
- time, mark, audio, video {
57
- vertical-align: baseline;
58
- }
59
-
60
-
61
- html, body, div, span, applet, object, iframe,
62
- p, blockquote,
63
- a, abbr, acronym, address, big, cite,
64
- del, dfn, em, img, ins, q, s,
65
- small, strike, strong, sub, sup, var,
66
- b, u, i, center,
67
- dl, dt, dd, ol, ul, li,
68
- fieldset, form, label, legend,
69
- table, caption, tbody, tfoot, thead, tr, th, td,
70
- article, aside, canvas, details, embed,
71
- figure, figcaption, footer, header, hgroup,
72
- menu, nav, output, ruby, section, summary,
73
- time, mark, audio, video {
74
- font-family: $bodyfont;
75
- }
76
-
77
- code, pre, tt, kbd, samp {
78
- font-family: $monospacefont;
79
- font-variant-ligatures: none;
80
- }
81
-
82
- code *, pre *, tt *, kbd *, samp * {
83
- font-family: $monospacefont !important;
84
- font-variant-ligatures: none;
85
- }
86
-
87
- h1, h2, h3, h4, h5, h6, .h2Annex {
88
- font-family: $headerfont;
89
- }
90
-
91
- dl {
92
- display: grid;
93
- grid-template-columns: max-content auto;
94
- }
95
-
96
- dt {
97
- grid-column-start: 1;
98
- }
99
-
100
- dd {
101
- grid-column-start: 2;
102
- }
103
-
104
- dd p, dt p {
105
- margin-top: 0px;
106
- }
107
-
108
- /* HTML5 display-role reset for older browsers */
109
- article, aside, details, figcaption, figure,
110
- footer, header, hgroup, menu, nav, section {
111
- display: block;
112
- }
113
- body {
114
- line-height: 1;
115
- }
116
-
117
- blockquote, q {
118
- quotes: none;
119
- }
120
- blockquote:before, blockquote:after,
121
- q:before, q:after {
122
- content: '';
123
- content: none;
124
- }
125
- table {
126
- border-collapse: collapse;
127
- border-spacing: 0;
128
- }
129
-
10
+ @import 'base_style/all';
130
11
 
131
12
  /*
132
13
  1. HTML & Body
@@ -153,148 +34,79 @@ $un-text: #333;
153
34
  $un-link: #00ADEF;
154
35
 
155
36
  body {
156
- margin: 0;
157
- margin-left: auto;
158
- margin-right: auto;
159
- max-width: 100%;
160
- color: $un-text;
37
+ @include bodyStyle1(15px, 1.4em, $un-text, #ffffff, 300);
161
38
  font-weight: 400;
162
- font-size: 15px;
163
- line-height: 1.4em;
164
- background-color: #ffffff;
165
- }
166
-
167
- p {
168
- line-height: 1.6;
169
39
  }
170
40
 
171
41
  main {
172
42
  margin: 0 3em 0 6em;
173
43
  }
174
44
 
175
- #toc{
176
- font-family: $bodyfont;
177
- font-weight: 400;
45
+ p {
46
+ line-height: 1.6;
178
47
  }
179
48
 
180
49
  /*
181
50
  2. Responsive navigation layout
182
51
  */
183
52
 
53
+ #toc {
54
+ @include toc($un-text, #1661AD, $un-text);
55
+ @include sidebarToc();
184
56
 
185
- @media screen and (min-width: 768px) {
186
- nav {
187
- position: fixed;
188
- top: 0;
189
- bottom: 0;
190
- left: 0;
191
- width: 323px;
192
- font-size: 0.9em;
193
- overflow: auto;
194
- padding: 0 0 0 45px;
195
- margin-right: 30px;
196
- background-color: #f2f2f2;
197
- }
198
-
199
- #toggle {
200
- position: fixed;
201
- height: 100%;
202
- width: 30px;
203
- background-color: $un-blue;
204
- color: white!important;
205
- cursor: pointer;
206
- z-index: 100;
207
- }
208
-
209
- #toggle span {
210
- text-align: center;
211
- width: 100%;
212
- position: absolute;
213
- top: 50%;
214
- transform: translate(0, -50%);
215
-
216
- }
217
-
218
- .container {
219
- padding-left: 360px;
220
- }
221
-
222
- .rule.toc {
223
- display: none;
224
- }
57
+ .toc-active a {
58
+ color: white;
59
+ }
225
60
 
226
- h1.toc-contents {
227
- margin-top: 1em;
228
- }
61
+ .toc-active,
62
+ li:hover {
63
+ background: linear-gradient(280deg, $un-blue, $un-classic-blue);
64
+ box-shadow: inset -5px 0px 10px -5px $un-blue !important;
229
65
 
230
- ul#toc-list {
231
- padding:0;
232
- margin:0;
66
+ a {
67
+ color: white;
68
+ background: none;
69
+ box-shadow: none;
233
70
  }
234
- }
71
+ }
235
72
 
236
- @media screen and (max-width: 768px) {
237
- #toc {
238
- padding: 0 1.5em 0 1.5em;
239
- overflow: visible;
73
+ ul {
74
+ a:hover {
75
+ box-shadow: none;
76
+ color: white;
240
77
  }
241
- }
242
-
243
- div.figure > img {
244
- margin-left: auto;
245
- margin-right: auto;
246
- display: block;
247
- max-width: 100%;
248
- height: auto;
249
78
  }
250
-
251
- #toc ul {
252
- margin: 0;
253
- padding: 0;
254
- list-style: none;
255
- }
256
-
257
- #toc li a {
258
- padding: 5px 10px;
259
- }
260
-
261
- #toc a {
262
- color: $un-text;
263
- text-decoration: none;
264
- display: block;
265
79
  }
266
80
 
267
- #toc a:hover {
268
- /* color: white;*/
269
- box-shadow: none;
81
+ nav {
82
+ @include sidebarNav(#f2f2f2, 323px, 45px);
270
83
  }
271
84
 
272
- #toc .h2 {
273
- padding-left: 30px;
85
+ #toggle {
86
+ @include sidebarNavToggle(white, $un-blue)
274
87
  }
275
88
 
276
- #toc .h3 {
277
- padding-left: 50px;
278
- }
89
+ @media screen and (min-width: 768px) {
90
+ .container {
91
+ padding-left: 360px;
92
+ }
279
93
 
280
- #toc .toc-active a {
281
- color: white;
282
- }
94
+ .rule.toc {
95
+ display: none;
96
+ }
283
97
 
284
- #toc .toc-active,
285
- #toc li:hover {
286
- background: linear-gradient(280deg, $un-blue, $un-classic-blue);
287
- box-shadow: inset -5px 0px 10px -5px $un-blue!important;
288
- }
98
+ h1.toc-contents {
99
+ margin-top: 1em;
100
+ }
289
101
 
290
- #toc li:hover a {
291
- color: white;
292
- background: none;
293
- box-shadow: none;
102
+ ul#toc-list {
103
+ padding:0;
104
+ margin:0;
105
+ }
294
106
  }
295
107
 
296
- #toc li a {
297
- /* text-transform: uppercase;*/
108
+ div.figure {
109
+ @include figureBlock();
298
110
  }
299
111
 
300
112
  /*
@@ -302,69 +114,31 @@ height: auto;
302
114
  */
303
115
 
304
116
  .document-type-band {
305
- left:0;
306
- top:180px;
307
- height: 100%;
308
- position: fixed;
309
- display: block;
310
- z-index: 99;
311
- /*box-shadow: -5px 0px 10px #1d1d1d*/
312
-
117
+ @include docBand(2, 150, 180px);
313
118
  }
314
119
 
315
120
  .document-stage-band {
316
- left:0;
317
- top:0;
318
- height: 100%;
319
- position: fixed;
320
- display: block;
321
- z-index: 98;
322
- box-shadow: -5px 0px 10px #1d1d1d
323
- }
324
-
325
- .document-type {
326
- position: relative;
327
- width: 25px;
121
+ @include docBand(1, 150);
328
122
  }
329
-
330
- .document-stage {
331
- position: relative;
332
- width: 25px;
123
+ .document-stage-band > :first-child {
124
+ font-weight: 300;
333
125
  }
334
126
 
335
- p.document-type, p.document-stage {
336
- color: white;
337
- text-transform: uppercase;
338
- font-size: 0.9em;
339
- font-weight: 400;
340
- letter-spacing: 0.05em;
341
- margin:0;
342
- margin-left: 6px;
343
- writing-mode:tb-rl;
344
- -webkit-transform:rotate(180deg);
345
- -moz-transform:rotate(180deg);
346
- -o-transform: rotate(180deg);
347
- white-space:nowrap;
348
- display:block;
349
- bottom:0;
350
- }
351
-
352
- p.document-type {
353
- font-weight: 400;
354
- height: 150;
127
+ p.document-type,
128
+ p.document-stage {
129
+ @include docBandTitle(150);
355
130
  }
356
131
 
357
132
  #governance-band p.document-type {
358
- font-weight: 400;
359
- height: 230px!important;
133
+ height: 230px !important;
360
134
  }
361
135
 
362
136
  p.document-stage {
363
- font-weight: 300;
364
- height:160px;
137
+ font-weight: 300;
138
+ height: 160px;
365
139
  }
366
140
 
367
- #standard-band p{
141
+ #standard-band p {
368
142
  height: 270px;
369
143
  }
370
144
 
@@ -372,77 +146,78 @@ p.document-stage {
372
146
  height: 150px;
373
147
  }
374
148
 
375
-
376
- #standard-band, #published-band {
377
- background-color: #9ABD48;
149
+ #standard-band,
150
+ #published-band {
151
+ background-color: #9ABD48;
378
152
  }
379
153
 
380
- #standard, #published {
381
- border-bottom: solid 3px #9ABD48;
154
+ #standard,
155
+ #published {
156
+ border-bottom: solid 3px #9ABD48;
382
157
  }
383
158
 
384
- #governance, #policy-and-procedures {
385
- border-bottom: solid 3px #750697;
159
+ #governance,
160
+ #policy-and-procedures {
161
+ border-bottom: solid 3px #750697;
386
162
  }
387
163
 
388
- #governance-band, #policy-and-procedures-band {
389
- background-color: #750697;
164
+ #governance-band,
165
+ #policy-and-procedures-band {
166
+ background-color: #750697;
390
167
  }
391
168
 
392
169
  #guide {
393
- border-bottom: solid 3px #48a0e7;
170
+ border-bottom: solid 3px #48a0e7;
394
171
  }
395
172
 
396
173
  #guide-band {
397
- background-color: #48a0e7;
174
+ background-color: #48a0e7;
398
175
  }
399
176
 
400
177
  .coverpage-maturity {
401
- font-family: $bodyfont;
402
- font-weight: 400;
403
- font-size: 1em;
404
- margin: 0 0 2em 0;
405
- text-transform: uppercase;
406
- }
178
+ @include coverpageStageBlock();
179
+ }
407
180
 
408
- #working-draft, #proposal {
409
- border-bottom: solid 3px #F7803C;
181
+ #working-draft,
182
+ #proposal {
183
+ border-bottom: solid 3px #F7803C;
410
184
  }
411
185
 
412
- #working-draft-band, #proposal-band {
413
- background-color: #F7803C;
186
+ #working-draft-band,
187
+ #proposal-band {
188
+ background-color: #F7803C;
414
189
  }
415
190
 
416
191
  #committee-draft {
417
- border-bottom: solid 3px #fd06fd;
192
+ border-bottom: solid 3px #fd06fd;
418
193
  }
419
194
 
420
195
  #committee-draft-band {
421
- background-color: #fd06fd;
196
+ background-color: #fd06fd;
422
197
  }
423
198
 
424
199
  #draft-standard {
425
- border-bottom: solid 3px #fdf906;
200
+ border-bottom: solid 3px #fdf906;
426
201
  }
427
202
 
428
203
  #draft-standard-band {
429
- background-color: #fdf906;
204
+ background-color: #fdf906;
430
205
  }
431
206
 
432
207
  #standard {
433
- border-bottom: solid 3px #9ABD48;
208
+ border-bottom: solid 3px #9ABD48;
434
209
  }
435
210
 
436
211
  #standard-band {
437
- background-color: #9ABD48;
212
+ background-color: #9ABD48;
438
213
  }
439
214
 
440
215
  #obsolete {
441
- border-bottom: solid 3px #7e0d13;
216
+ border-bottom: solid 3px #7e0d13;
442
217
  }
443
218
 
444
219
  #obsolete-band {
445
- background-color: #7e0d13;
220
+ background-color: #7e0d13;
446
221
  }
447
222
 
448
223
  /*
@@ -556,36 +331,7 @@ h6 {
556
331
  3.2 Links
557
332
  */
558
333
 
559
- a, a:visited{
560
- text-decoration: none;
561
- color: $un-link;
562
- }
563
-
564
- a:hover {
565
- color: white;
566
- background: $un-blue;
567
- box-shadow: 3px 0 0 $un-blue, -3px 0 0 $un-blue;
568
- /* padding: 2px 0 2px 0; */
569
- }
570
-
571
- ::selection {
572
- background: $un-blue; /* WebKit/Blink Browsers */
573
- color: white;
574
- }
575
-
576
- ::-moz-selection {
577
- background: $un-blue; /* Gecko Browsers */
578
- color: white;
579
- }
580
-
581
- .contact-info a:hover {
582
- color: $un-link;
583
- text-decoration: underline;
584
- background: none;
585
- box-shadow: 0 0 0 0;
586
- }
587
-
588
-
334
+ @include elementStyles($un-link, $un-blue, white);
589
335
 
590
336
  /*
591
337
  3.3 Lists
@@ -629,10 +375,7 @@ main ul > li {
629
375
  */
630
376
 
631
377
  .rule {
632
- width: 100%;
633
- height: 1px;
634
- background-color: #eee;
635
- margin: 2em 0;
378
+ @include rule(1px, #eee)
636
379
  }
637
380
 
638
381
  /*
@@ -648,29 +391,22 @@ p.Biblio, p.NormRef {
648
391
  3.6 Source Code + figures
649
392
  */
650
393
 
651
- pre {
652
- font-family: $monospacefont;
653
- font-variant-ligatures: none;
654
- }
655
-
656
- .figure, pre, .pseudocode {
657
- background-color: $un-gray;
658
- font-size: 0.8em;
659
- line-height: 1.6em;
660
- padding: 1.5em;
661
- margin: 2em 0 1em 0;
662
- overflow: auto;
394
+ .figure,
395
+ pre,
396
+ .pseudocode {
397
+ @include pseudocodeBlock($un-gray);
663
398
  }
664
399
 
665
- .FigureTitle, .SourceTitle, .AdmonitionTitle, .RecommendationTitle {
666
- font-weight: 700;
667
- font-size: 1em;
668
- text-align: center;
400
+ pre {
401
+ @include monospaceBlockStyle()
669
402
  }
670
403
 
671
- div.Admonition {
672
- border: 2px solid black;
673
- padding: 6pt;
404
+ @include admonitionBlock();
405
+ @include recommendationBlock();
406
+
407
+ .FigureTitle,
408
+ .SourceTitle {
409
+ @include blockTitle()
674
410
  }
675
411
 
676
412
  /*
@@ -705,22 +441,16 @@ div.Admonition {
705
441
  */
706
442
 
707
443
  .example {
708
- background-color: #e1eef1;
709
- padding: 1.2em;
710
- margin: 2em 0 1em 0;
711
- padding-left: 2em;
712
- }
444
+ @include exampleBlock(#e1eef1, #424242, 1.2em);
713
445
 
714
- .example .example-title {
715
- font-weight: 700;
716
- text-transform: uppercase;
717
- text-align: center;
718
- margin-top:0;
719
- margin-left:-1.5em;
720
- }
446
+ .example-title {
447
+ margin-top: 0;
448
+ }
721
449
 
722
- .example pre, .example .pseudocode {
723
- background: none;
450
+ pre,
451
+ .pseudocode {
452
+ background: none;
453
+ }
724
454
  }
725
455
 
726
456
  /*
@@ -728,26 +458,7 @@ div.Admonition {
728
458
  */
729
459
 
730
460
  table {
731
- border-collapse: collapse;
732
- width: 100%;
733
- font-weight: 300;
734
- margin: 1em 0 2em 0;
735
- margin-left: auto;
736
- margin-right: auto;
737
- padding-right: 2em;
738
- }
739
-
740
- table, th, td {
741
- border: 1px solid black;
742
- font-size: 0.95em;
743
- }
744
-
745
- td, th {
746
- padding: 1em;
747
- }
748
-
749
- td.header {
750
- font-weight: 400;
461
+ @include table(1px solid black);
751
462
  }
752
463
 
753
464
  p.TableTitle {
@@ -775,13 +486,7 @@ a.footnote-number {
775
486
  */
776
487
 
777
488
  .Quote {
778
- background-color: #f2f2f2;
779
- font-style: italic;
780
- width: 80%;
781
- padding: 1.5em;
782
- margin-top: 2em;
783
- margin-left: auto;
784
- margin-right: auto;
489
+ @include blockquoteBlock(#f2f2f2);
785
490
  }
786
491
 
787
492
 
@@ -790,10 +495,7 @@ a.footnote-number {
790
495
  */
791
496
 
792
497
  .formula {
793
- background-color: #f2f2f2;
794
- padding: 1.5em;
795
- margin-top: 2em;
796
- text-align: center;
498
+ @include formulaBlock(#f2f2f2)
797
499
  }
798
500
 
799
501
  /*
@@ -1001,48 +703,22 @@ text-align: center;
1001
703
  border: solid;
1002
704
  }
1003
705
 
1004
- /* .copyright .name, .copyright .address {color: $un-link;} */
1005
-
1006
-
1007
-
1008
706
  /*
1009
707
  5.0 Other styles
1010
708
  */
1011
709
 
1012
710
 
1013
-
1014
711
  /*
1015
712
  To top button
1016
713
  */
1017
714
 
1018
715
  #myBtn {
1019
- font-family: $monospacefont;
1020
- font-variant-ligatures: none;
1021
- display: none;
1022
- position: fixed;
1023
- bottom: 20px;
1024
- right: 30px;
1025
- z-index: 99;
1026
- font-size: 12px;
1027
- border: none;
1028
- outline: none;
1029
- background-color: #1f8ca0;
1030
- opacity: 0.15;
1031
- color: white;
1032
- cursor: pointer;
1033
- padding: 10px 15px 10px 15px;
1034
- border-radius: 4px;
716
+ @include toTopBtn(white, #1f8ca0);
1035
717
  text-transform: uppercase;
1036
- }
1037
-
1038
- #myBtn:hover {
1039
- opacity: 1;
1040
- }
1041
718
 
1042
- a.anchorjs-link:hover {
1043
- background: none;
1044
- color: $un-link;
1045
- box-shadow: none;
719
+ a.anchorjs-link {
720
+ @include anchorLink($un-link)
721
+ }
1046
722
  }
1047
723
 
1048
724
  @page {
@@ -1055,10 +731,6 @@ a.anchorjs-link:hover {
1055
731
  page-break-before: always;
1056
732
  }
1057
733
 
1058
- nav {
1059
- page-break-after: always;
1060
- }
1061
-
1062
734
  h1, h2, h3, h4 {
1063
735
  page-break-after: avoid;
1064
736
  margin-top: 1.2em;
@@ -1086,29 +758,10 @@ a.anchorjs-link:hover {
1086
758
  margin-top: -5px;
1087
759
  }
1088
760
 
1089
-
1090
- #toggle, .document-stage-band,
1091
- .document-type-band, button#myBtn {
1092
- display: none;
1093
- }
1094
-
1095
- button#myBtn {
1096
- background-color: white;
1097
- }
1098
-
1099
761
  .container {
1100
762
  padding-left: 0;
1101
763
  }
1102
764
 
1103
- nav {
1104
- position: relative;
1105
- width: auto;
1106
- font-size: 0.9em;
1107
- overflow: auto;
1108
- padding: 0;
1109
- margin-right: 0;
1110
- background-color: white;
1111
- }
1112
765
 
1113
766
  #toc .toc-active a {
1114
767
  color: #4D7EA5;
@@ -47,7 +47,7 @@ module IsoDoc
47
47
  end
48
48
 
49
49
  def make_body(xml, docxml)
50
- plenary = docxml.at(ns("//bibdata/ext[doctype = 'plenary']"))
50
+ plenary = is_plenary?(docxml)
51
51
  body_attr = { lang: "EN-US", link: "blue", vlink: "#954F72", "xml:lang": "EN-US", class: "container" }
52
52
  if plenary && @htmlcoverpage == html_doc_path("html_unece_titlepage.html")
53
53
  @htmlcoverpage = html_doc_path("html_unece_plenary_titlepage.html")
@@ -53,7 +53,7 @@ module IsoDoc
53
53
  end
54
54
 
55
55
  def make_body(xml, docxml)
56
- plenary = docxml.at(ns("//bibdata/ext[doctype = 'plenary']"))
56
+ plenary = is_plenary?(docxml)
57
57
  body_attr = { lang: "EN-US", link: "blue", vlink: "#954F72", "xml:lang": "EN-US", class: "container" }
58
58
  if plenary && @htmlcoverpage == html_doc_path("html_unece_titlepage.html")
59
59
  @htmlcoverpage = html_doc_path("html_unece_plenary_titlepage.html")
@@ -51,7 +51,7 @@ module IsoDoc
51
51
  end
52
52
 
53
53
  def make_body(xml, docxml)
54
- plenary = docxml.at(ns("//bibdata/ext[doctype = 'plenary']"))
54
+ plenary = is_plenary?(docxml)
55
55
  if plenary && @wordcoverpage == html_doc_path("word_unece_titlepage.html")
56
56
  @wordcoverpage = html_doc_path("word_unece_plenary_titlepage.html")
57
57
  end
@@ -144,7 +144,8 @@ module IsoDoc
144
144
  foreword = docxml.at("//p[@class = 'ForewordTitle']/..")
145
145
  intro = docxml.at("//p[@class = 'IntroTitle']/..")
146
146
  abstract = docxml.at("//p[@class = 'AbstractTitle']/..")
147
- abstract.parent = (abstractbox || preface_container) if abstract
147
+ abstract.parent = (abstractbox || preface_container) if abstract &&
148
+ (abstractbox || preface_container)
148
149
  abstractbox and abstract&.xpath(".//p/br")&.each do |a|
149
150
  a.parent.remove if /page-break-before:always/.match(a["style"])
150
151
  end
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module UN
3
- VERSION = "0.3.3"
3
+ VERSION = "0.3.4"
4
4
  end
5
5
  end
@@ -44,5 +44,4 @@ Gem::Specification.new do |spec|
44
44
  spec.add_development_dependency "rubocop", "= 0.54.0"
45
45
  spec.add_development_dependency "simplecov", "~> 0.15"
46
46
  spec.add_development_dependency "timecop", "~> 0.9"
47
- spec.add_development_dependency "metanorma", "~> 0.3.1"
48
47
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-un
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-03-05 00:00:00.000000000 Z
11
+ date: 2020-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities
@@ -234,20 +234,6 @@ dependencies:
234
234
  - - "~>"
235
235
  - !ruby/object:Gem::Version
236
236
  version: '0.9'
237
- - !ruby/object:Gem::Dependency
238
- name: metanorma
239
- requirement: !ruby/object:Gem::Requirement
240
- requirements:
241
- - - "~>"
242
- - !ruby/object:Gem::Version
243
- version: 0.3.1
244
- type: :development
245
- prerelease: false
246
- version_requirements: !ruby/object:Gem::Requirement
247
- requirements:
248
- - - "~>"
249
- - !ruby/object:Gem::Version
250
- version: 0.3.1
251
237
  description: |
252
238
  Metanorma for UN documents.
253
239