metanorma-csa 1.4.8 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/macos.yml +0 -10
- data/.github/workflows/ubuntu.yml +12 -10
- data/.github/workflows/windows.yml +0 -11
- data/lib/asciidoctor/csa/biblio.rng +143 -38
- data/lib/asciidoctor/csa/converter.rb +11 -16
- data/lib/asciidoctor/csa/csa.rng +14 -0
- data/lib/asciidoctor/csa/isodoc.rng +475 -2
- data/lib/asciidoctor/csa/reqt.rng +23 -0
- data/lib/isodoc/csa/base_convert.rb +2 -1
- data/lib/isodoc/csa/csa.standard.xsl +4693 -0
- data/lib/isodoc/csa/html/scripts.html +14 -27
- data/lib/isodoc/csa/html_convert.rb +4 -4
- data/lib/isodoc/csa/pdf_convert.rb +4 -45
- data/lib/isodoc/csa/presentation_xml_convert.rb +10 -0
- data/lib/isodoc/csa/word_convert.rb +3 -4
- data/lib/metanorma/csa/processor.rb +14 -4
- data/lib/metanorma/csa/version.rb +1 -1
- data/metanorma-csa.gemspec +2 -2
- metadata +12 -12
- data/lib/isodoc/csa/html/scripts.pdf.html +0 -72
@@ -1,24 +1,8 @@
|
|
1
1
|
<script>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
'smoothScrolling': true, //enable or disable smooth scrolling on click
|
7
|
-
'prefix': 'toc', //prefix for anchor tags and class names
|
8
|
-
'onHighlight': function(el) {}, //called when a new section is highlighted
|
9
|
-
'highlightOnScroll': true, //add class to heading that is currently in focus
|
10
|
-
'highlightOffset': 100, //offset to trigger the next headline
|
11
|
-
'anchorName': function(i, heading, prefix) { //custom function for anchor name
|
12
|
-
return prefix+i;
|
13
|
-
},
|
14
|
-
'headerText': function(i, heading, $heading) { //custom function building the header-item text
|
15
|
-
return $heading.text();
|
16
|
-
},
|
17
|
-
'itemClass': function(i, heading, $heading, prefix) { // custom function for item class
|
18
|
-
return $heading[0].tagName.toLowerCase();
|
19
|
-
}
|
20
|
-
});
|
21
|
-
|
2
|
+
$("#toc").on('click', 'li', function(e) {
|
3
|
+
$(this).parent().find('li.toc-active').removeClass('toc-active');
|
4
|
+
$(this).addClass('toc-active');
|
5
|
+
});
|
22
6
|
</script>
|
23
7
|
|
24
8
|
<script>
|
@@ -58,13 +42,16 @@ $('#toggle').on('click', function(){
|
|
58
42
|
</script>
|
59
43
|
|
60
44
|
<script>
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
45
|
+
// @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat
|
46
|
+
//
|
47
|
+
// AnchorJS - v4.2.2 - 2020-04-20
|
48
|
+
// https://www.bryanbraun.com/anchorjs/
|
49
|
+
// Copyright (c) 2020 Bryan Braun; Licensed MIT
|
50
|
+
//
|
51
|
+
// @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat
|
52
|
+
!function(A,e){"use strict";"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():(A.AnchorJS=e(),A.anchors=new A.AnchorJS)}(this,function(){"use strict";return function(A){function f(A){A.icon=A.hasOwnProperty("icon")?A.icon:"",A.visible=A.hasOwnProperty("visible")?A.visible:"hover",A.placement=A.hasOwnProperty("placement")?A.placement:"right",A.ariaLabel=A.hasOwnProperty("ariaLabel")?A.ariaLabel:"Anchor",A.class=A.hasOwnProperty("class")?A.class:"",A.base=A.hasOwnProperty("base")?A.base:"",A.truncate=A.hasOwnProperty("truncate")?Math.floor(A.truncate):64,A.titleText=A.hasOwnProperty("titleText")?A.titleText:""}function p(A){var e;if("string"==typeof A||A instanceof String)e=[].slice.call(document.querySelectorAll(A));else{if(!(Array.isArray(A)||A instanceof NodeList))throw new Error("The selector provided to AnchorJS was invalid.");e=[].slice.call(A)}return e}this.options=A||{},this.elements=[],f(this.options),this.isTouchDevice=function(){return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)},this.add=function(A){var e,t,i,n,o,s,a,r,c,h,l,u,d=[];if(f(this.options),"touch"===(l=this.options.visible)&&(l=this.isTouchDevice()?"always":"hover"),0===(e=p(A=A||"h2, h3, h4, h5, h6")).length)return this;for(!function(){if(null!==document.head.querySelector("style.anchorjs"))return;var A,e=document.createElement("style");e.className="anchorjs",e.appendChild(document.createTextNode("")),void 0===(A=document.head.querySelector('[rel="stylesheet"],style'))?document.head.appendChild(e):document.head.insertBefore(e,A);e.sheet.insertRule(".anchorjs-link{opacity:0;text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}",e.sheet.cssRules.length),e.sheet.insertRule(":hover>.anchorjs-link,.anchorjs-link:focus{opacity:1}",e.sheet.cssRules.length),e.sheet.insertRule("[data-anchorjs-icon]::after{content:attr(data-anchorjs-icon)}",e.sheet.cssRules.length),e.sheet.insertRule('@font-face{font-family:anchorjs-icons;src:url(data:n/a;base64,AAEAAAALAIAAAwAwT1MvMg8yG2cAAAE4AAAAYGNtYXDp3gC3AAABpAAAAExnYXNwAAAAEAAAA9wAAAAIZ2x5ZlQCcfwAAAH4AAABCGhlYWQHFvHyAAAAvAAAADZoaGVhBnACFwAAAPQAAAAkaG10eASAADEAAAGYAAAADGxvY2EACACEAAAB8AAAAAhtYXhwAAYAVwAAARgAAAAgbmFtZQGOH9cAAAMAAAAAunBvc3QAAwAAAAADvAAAACAAAQAAAAEAAHzE2p9fDzz1AAkEAAAAAADRecUWAAAAANQA6R8AAAAAAoACwAAAAAgAAgAAAAAAAAABAAADwP/AAAACgAAA/9MCrQABAAAAAAAAAAAAAAAAAAAAAwABAAAAAwBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAMCQAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAg//0DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAAIAAAACgAAxAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADAAAAAIAAgAAgAAACDpy//9//8AAAAg6cv//f///+EWNwADAAEAAAAAAAAAAAAAAAAACACEAAEAAAAAAAAAAAAAAAAxAAACAAQARAKAAsAAKwBUAAABIiYnJjQ3NzY2MzIWFxYUBwcGIicmNDc3NjQnJiYjIgYHBwYUFxYUBwYGIwciJicmNDc3NjIXFhQHBwYUFxYWMzI2Nzc2NCcmNDc2MhcWFAcHBgYjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAAADACWAAEAAAAAAAEACAAAAAEAAAAAAAIAAwAIAAEAAAAAAAMACAAAAAEAAAAAAAQACAAAAAEAAAAAAAUAAQALAAEAAAAAAAYACAAAAAMAAQQJAAEAEAAMAAMAAQQJAAIABgAcAAMAAQQJAAMAEAAMAAMAAQQJAAQAEAAMAAMAAQQJAAUAAgAiAAMAAQQJAAYAEAAMYW5jaG9yanM0MDBAAGEAbgBjAGgAbwByAGoAcwA0ADAAMABAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAP) format("truetype")}',e.sheet.cssRules.length)}(),t=document.querySelectorAll("[id]"),i=[].map.call(t,function(A){return A.id}),o=0;o<e.length;o++)if(this.hasAnchorJSLink(e[o]))d.push(o);else{if(e[o].hasAttribute("id"))n=e[o].getAttribute("id");else if(e[o].hasAttribute("data-anchor-id"))n=e[o].getAttribute("data-anchor-id");else{for(c=r=this.urlify(e[o].textContent),a=0;void 0!==s&&(c=r+"-"+a),a+=1,-1!==(s=i.indexOf(c)););s=void 0,i.push(c),e[o].setAttribute("id",c),n=c}(h=document.createElement("a")).className="anchorjs-link "+this.options.class,h.setAttribute("aria-label",this.options.ariaLabel),h.setAttribute("data-anchorjs-icon",this.options.icon),this.options.titleText&&(h.title=this.options.titleText),u=document.querySelector("base")?window.location.pathname+window.location.search:"",u=this.options.base||u,h.href=u+"#"+n,"always"===l&&(h.style.opacity="1"),""===this.options.icon&&(h.style.font="1em/1 anchorjs-icons","left"===this.options.placement&&(h.style.lineHeight="inherit")),"left"===this.options.placement?(h.style.position="absolute",h.style.marginLeft="-1em",h.style.paddingRight="0.5em",e[o].insertBefore(h,e[o].firstChild)):(h.style.paddingLeft="0.375em",e[o].appendChild(h))}for(o=0;o<d.length;o++)e.splice(d[o]-o,1);return this.elements=this.elements.concat(e),this},this.remove=function(A){for(var e,t,i=p(A),n=0;n<i.length;n++)(t=i[n].querySelector(".anchorjs-link"))&&(-1!==(e=this.elements.indexOf(i[n]))&&this.elements.splice(e,1),i[n].removeChild(t));return this},this.removeAll=function(){this.remove(this.elements)},this.urlify=function(A){return this.options.truncate||f(this.options),A.trim().replace(/\'/gi,"").replace(/[& +$,:;=?@"#{}|^~[`%!'<>\]\.\/\(\)\*\\\n\t\b\v]/g,"-").replace(/-{2,}/g,"-").substring(0,this.options.truncate).replace(/^-+|-+$/gm,"").toLowerCase()},this.hasAnchorJSLink=function(A){var e=A.firstChild&&-1<(" "+A.firstChild.className+" ").indexOf(" anchorjs-link "),t=A.lastChild&&-1<(" "+A.lastChild.className+" ").indexOf(" anchorjs-link ");return e||t||!1}}});
|
53
|
+
// @license-end
|
54
|
+
</script>
|
68
55
|
<script>
|
69
56
|
anchors.options = {
|
70
57
|
placement: 'left'
|
@@ -16,10 +16,10 @@ module IsoDoc
|
|
16
16
|
def default_fonts(options)
|
17
17
|
is_hans = options[:script] == 'Hans'
|
18
18
|
{
|
19
|
-
bodyfont: (is_hans ? '"SimSun",serif' : '"Source Sans Pro",sans-serif'),
|
19
|
+
bodyfont: (is_hans ? '"SimSun",serif' : 'AzoSans,"Source Sans Pro",sans-serif'),
|
20
20
|
headerfont: (is_hans ? '"SimHei",sans-serif'
|
21
|
-
: '"Source Sans Pro",sans-serif'),
|
22
|
-
monospacefont: '"
|
21
|
+
: 'AzoSans,"Source Sans Pro",sans-serif'),
|
22
|
+
monospacefont: '"Source Code Pro",monospace'
|
23
23
|
}
|
24
24
|
end
|
25
25
|
|
@@ -36,8 +36,8 @@ module IsoDoc
|
|
36
36
|
<<~HEAD.freeze
|
37
37
|
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i|Space+Mono:400,700" rel="stylesheet">
|
38
38
|
<link href="https://fonts.googleapis.com/css?family=Rubik:300,300i,500" rel="stylesheet">
|
39
|
-
<link href="https://fonts.googleapis.com/css?family=Overpass:100,300,300i,600,900" rel="stylesheet">
|
40
39
|
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,300i,400,700,900" rel="stylesheet">
|
40
|
+
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:ital,wght@0,300;0,600;1,300;1,600&display=swap" rel="stylesheet">
|
41
41
|
HEAD
|
42
42
|
end
|
43
43
|
|
@@ -1,62 +1,21 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative 'base_convert'
|
4
3
|
require 'isodoc'
|
5
4
|
|
6
5
|
module IsoDoc
|
7
6
|
module Csa
|
8
7
|
# A {Converter} implementation that generates CSA output, and a document
|
9
8
|
# schema encapsulation of the document for validation
|
10
|
-
|
9
|
+
|
10
|
+
class PdfConvert < IsoDoc::XslfoPdfConvert
|
11
11
|
def initialize(options)
|
12
12
|
@libdir = File.dirname(__FILE__)
|
13
13
|
super
|
14
14
|
end
|
15
15
|
|
16
|
-
def
|
17
|
-
|
18
|
-
|
19
|
-
{
|
20
|
-
bodyfont: is_hans ? '"SimSun",serif' : '"Source Sans Pro",sans-serif',
|
21
|
-
headerfont: (is_hans ? '"SimHei",sans-serif'
|
22
|
-
: '"Source Sans Pro",sans-serif'),
|
23
|
-
monospacefont: '"Space Mono",monospace'
|
24
|
-
}
|
25
|
-
end
|
26
|
-
|
27
|
-
def default_file_locations(options)
|
28
|
-
{
|
29
|
-
htmlstylesheet: html_doc_path('htmlstyle.scss'),
|
30
|
-
htmlcoverpage: html_doc_path('html_csa_titlepage.html'),
|
31
|
-
htmlintropage: html_doc_path('html_csa_intro.html'),
|
32
|
-
scripts_pdf: html_doc_path('scripts.pdf.html')
|
33
|
-
}
|
34
|
-
end
|
35
|
-
|
36
|
-
def googlefonts()
|
37
|
-
<<~HEAD.freeze
|
38
|
-
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i|Space+Mono:400,700" rel="stylesheet">
|
39
|
-
<link href="https://fonts.googleapis.com/css?family=Rubik:300,300i,500" rel="stylesheet">
|
40
|
-
<link href="https://fonts.googleapis.com/css?family=Overpass:100,300,300i,600,900" rel="stylesheet">
|
41
|
-
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,300i,400,700,900" rel="stylesheet">
|
42
|
-
HEAD
|
16
|
+
def pdf_stylesheet(docxml)
|
17
|
+
"csa.standard.xsl"
|
43
18
|
end
|
44
|
-
|
45
|
-
def make_body(xml, docxml)
|
46
|
-
body_attr = { lang: 'EN-US', link: 'blue', vlink: '#954F72',
|
47
|
-
'xml:lang': 'EN-US', class: 'container' }
|
48
|
-
xml.body **body_attr do |body|
|
49
|
-
make_body1(body, docxml)
|
50
|
-
make_body2(body, docxml)
|
51
|
-
make_body3(body, docxml)
|
52
|
-
end
|
53
|
-
end
|
54
|
-
|
55
|
-
def html_toc(docxml)
|
56
|
-
docxml
|
57
|
-
end
|
58
|
-
|
59
|
-
include BaseConvert
|
60
19
|
end
|
61
20
|
end
|
62
21
|
end
|
@@ -15,11 +15,10 @@ module IsoDoc
|
|
15
15
|
|
16
16
|
def default_fonts(options)
|
17
17
|
is_hans = options[:script] == 'Hans'
|
18
|
-
|
19
18
|
{
|
20
|
-
bodyfont: (is_hans ? '"SimSun",serif' : '
|
21
|
-
headerfont: (is_hans ? '"SimHei",sans-serif' : '
|
22
|
-
monospacefont: '"Courier New",monospace'
|
19
|
+
bodyfont: (is_hans ? '"SimSun",serif' : 'AzoSans,Arial,sans-serif'),
|
20
|
+
headerfont: (is_hans ? '"SimHei",sans-serif' : 'AzoSans,Arial,sans-serif'),
|
21
|
+
monospacefont: '"Source Code Pro","Courier New",monospace'
|
23
22
|
}
|
24
23
|
end
|
25
24
|
|
@@ -5,6 +5,14 @@ require 'asciidoctor/csa/converter'
|
|
5
5
|
|
6
6
|
module Metanorma
|
7
7
|
module Csa
|
8
|
+
def self.fonts_used
|
9
|
+
{
|
10
|
+
html: %w(AzoSans AzoSans-Light SourceCodePro-Light),
|
11
|
+
doc: %w(AzoSans AzoSans-Light SourceCodePro-Light),
|
12
|
+
pdf: %w(AzoSans AzoSans-Light SourceCodePro-Light)
|
13
|
+
}
|
14
|
+
end
|
15
|
+
|
8
16
|
class Processor < Metanorma::Processor
|
9
17
|
|
10
18
|
def initialize
|
@@ -29,14 +37,16 @@ module Metanorma
|
|
29
37
|
Metanorma::Input::Asciidoc.new.process(file, filename, @asciidoctor_backend)
|
30
38
|
end
|
31
39
|
|
32
|
-
def output(isodoc_node, outname, format, options={})
|
40
|
+
def output(isodoc_node, inname, outname, format, options={})
|
33
41
|
case format
|
34
42
|
when :html
|
35
|
-
IsoDoc::Csa::HtmlConvert.new(options).convert(
|
43
|
+
IsoDoc::Csa::HtmlConvert.new(options).convert(inname, isodoc_node, nil, outname)
|
36
44
|
when :doc
|
37
|
-
IsoDoc::Csa::WordConvert.new(options).convert(
|
45
|
+
IsoDoc::Csa::WordConvert.new(options).convert(inname, isodoc_node, nil, outname)
|
38
46
|
when :pdf
|
39
|
-
IsoDoc::Csa::PdfConvert.new(options).convert(
|
47
|
+
IsoDoc::Csa::PdfConvert.new(options).convert(inname, isodoc_node, nil, outname)
|
48
|
+
when :presentation
|
49
|
+
IsoDoc::Csa::PresentationXMLConvert.new(options).convert(inname, isodoc_node, nil, outname)
|
40
50
|
else
|
41
51
|
super
|
42
52
|
end
|
data/metanorma-csa.gemspec
CHANGED
@@ -36,8 +36,8 @@ Gem::Specification.new do |spec|
|
|
36
36
|
spec.add_dependency "thread_safe"
|
37
37
|
spec.add_dependency "uuidtools"
|
38
38
|
|
39
|
-
spec.add_dependency "metanorma-standoc", "~> 1.
|
40
|
-
spec.add_dependency "isodoc", "~> 1.
|
39
|
+
spec.add_dependency "metanorma-standoc", "~> 1.4.0"
|
40
|
+
spec.add_dependency "isodoc", "~> 1.1.0"
|
41
41
|
|
42
42
|
spec.add_development_dependency "byebug", "~> 9.1"
|
43
43
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-csa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: htmlentities
|
@@ -100,28 +100,28 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 1.
|
103
|
+
version: 1.4.0
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 1.
|
110
|
+
version: 1.4.0
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: isodoc
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 1.
|
117
|
+
version: 1.1.0
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 1.
|
124
|
+
version: 1.1.0
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: byebug
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -284,6 +284,7 @@ files:
|
|
284
284
|
- lib/asciidoctor/csa/reqt.rng
|
285
285
|
- lib/asciidoctor/csa/validate.rb
|
286
286
|
- lib/isodoc/csa/base_convert.rb
|
287
|
+
- lib/isodoc/csa/csa.standard.xsl
|
287
288
|
- lib/isodoc/csa/html/csa-logo-white.png
|
288
289
|
- lib/isodoc/csa/html/csa.png
|
289
290
|
- lib/isodoc/csa/html/csa.scss
|
@@ -294,13 +295,13 @@ files:
|
|
294
295
|
- lib/isodoc/csa/html/html_csa_titlepage.html
|
295
296
|
- lib/isodoc/csa/html/htmlstyle.scss
|
296
297
|
- lib/isodoc/csa/html/scripts.html
|
297
|
-
- lib/isodoc/csa/html/scripts.pdf.html
|
298
298
|
- lib/isodoc/csa/html/word_csa_intro.html
|
299
299
|
- lib/isodoc/csa/html/word_csa_titlepage.html
|
300
300
|
- lib/isodoc/csa/html/wordstyle.scss
|
301
301
|
- lib/isodoc/csa/html_convert.rb
|
302
302
|
- lib/isodoc/csa/metadata.rb
|
303
303
|
- lib/isodoc/csa/pdf_convert.rb
|
304
|
+
- lib/isodoc/csa/presentation_xml_convert.rb
|
304
305
|
- lib/isodoc/csa/word_convert.rb
|
305
306
|
- lib/metanorma-csa.rb
|
306
307
|
- lib/metanorma/csa.rb
|
@@ -311,7 +312,7 @@ homepage: https://github.com/metanorma/metanorma-csa
|
|
311
312
|
licenses:
|
312
313
|
- BSD-2-Clause
|
313
314
|
metadata: {}
|
314
|
-
post_install_message:
|
315
|
+
post_install_message:
|
315
316
|
rdoc_options: []
|
316
317
|
require_paths:
|
317
318
|
- lib
|
@@ -326,9 +327,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
326
327
|
- !ruby/object:Gem::Version
|
327
328
|
version: '0'
|
328
329
|
requirements: []
|
329
|
-
|
330
|
-
|
331
|
-
signing_key:
|
330
|
+
rubygems_version: 3.0.3
|
331
|
+
signing_key:
|
332
332
|
specification_version: 4
|
333
333
|
summary: metanorma-csa lets you write CSA Normal Documents (CSAND) in AsciiDoc.
|
334
334
|
test_files: []
|
@@ -1,72 +0,0 @@
|
|
1
|
-
<script>
|
2
|
-
//TOC generation
|
3
|
-
$('#toc').toc({
|
4
|
-
'selectors': toclevel(), //elements to use as headings
|
5
|
-
'container': 'main', //element to find all selectors in
|
6
|
-
'smoothScrolling': true, //enable or disable smooth scrolling on click
|
7
|
-
'prefix': 'toc', //prefix for anchor tags and class names
|
8
|
-
'onHighlight': function(el) {}, //called when a new section is highlighted
|
9
|
-
'highlightOnScroll': false, //add class to heading that is currently in focus
|
10
|
-
'highlightOffset': 100, //offset to trigger the next headline
|
11
|
-
'anchorName': function(i, heading, prefix) { //custom function for anchor name
|
12
|
-
return prefix+i;
|
13
|
-
},
|
14
|
-
'headerText': function(i, heading, $heading) { //custom function building the header-item text
|
15
|
-
return $heading.text();
|
16
|
-
},
|
17
|
-
'itemClass': function(i, heading, $heading, prefix) { // custom function for item class
|
18
|
-
return $heading[0].tagName.toLowerCase();
|
19
|
-
}
|
20
|
-
});
|
21
|
-
|
22
|
-
</script>
|
23
|
-
|
24
|
-
<script>
|
25
|
-
//TOC toggle animation
|
26
|
-
$('#toggle').on('click', function(){
|
27
|
-
if( $('nav').is(':visible') ) {
|
28
|
-
$('nav').animate({ 'left': '-353px' }, 'slow', function(){
|
29
|
-
$('nav').hide();
|
30
|
-
});
|
31
|
-
$('.container').animate({ 'padding-left': '31px' }, 'slow');
|
32
|
-
}
|
33
|
-
else {
|
34
|
-
$('nav').show();
|
35
|
-
$('nav').animate({ 'left': '0px' }, 'slow');
|
36
|
-
$('.container').animate({ 'padding-left': '360px' }, 'slow');
|
37
|
-
}
|
38
|
-
});
|
39
|
-
</script>
|
40
|
-
|
41
|
-
<script>
|
42
|
-
// Scroll to top button
|
43
|
-
window.onscroll = function() {scrollFunction()};
|
44
|
-
|
45
|
-
function scrollFunction() {
|
46
|
-
if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) {
|
47
|
-
document.getElementById("myBtn").style.display = "block";
|
48
|
-
} else {
|
49
|
-
document.getElementById("myBtn").style.display = "none";
|
50
|
-
}
|
51
|
-
}
|
52
|
-
|
53
|
-
// When the user clicks on the button, scroll to the top of the document
|
54
|
-
function topFunction() {
|
55
|
-
document.body.scrollTop = 0;
|
56
|
-
document.documentElement.scrollTop = 0;
|
57
|
-
}
|
58
|
-
</script>
|
59
|
-
|
60
|
-
<script>
|
61
|
-
/*
|
62
|
-
$(document).ready(function() {
|
63
|
-
$('[id^=toc]').each(function ()
|
64
|
-
{
|
65
|
-
var currentToc = $(this);
|
66
|
-
var url = window.location.href;
|
67
|
-
currentToc.wrap("<a href='" + url + "#" + currentToc.attr("id") + "' </a>");
|
68
|
-
});
|
69
|
-
});
|
70
|
-
*/
|
71
|
-
</script>
|
72
|
-
|