jekyll-theme-isotc211 0.4.9 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_includes/head.html +10 -9
- data/_sass/jekyll-theme-isotc211.scss +4 -4
- data/_sass/main.scss +6 -0
- data/assets/resource-browser.js +54 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea841412b3cf1ba22128115bdc959864e05fe1221227c6d6ba3356699552f1be
|
4
|
+
data.tar.gz: f292ea6a1b17053dbc3c5e0414b296517b27ced9c9e61dbc29ba70b6ee99999e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64b8b789ca77c6b1aa0cbe01a3eb303e774ded0a9b2fbc481f23cad39ac6e908ca5d998c8bd6118f91ec193dc51863c40b3a9f16cfedeb92ed1b3cfb9985f8a5
|
7
|
+
data.tar.gz: c920c2c99c033a78bb440c131826880ad08f55df71841b7e6666fd2dc584f27aa94cd0d3a00a6f03b6b7949683df2f82300ee3db0ab5df5a3855097cdd4c69ab
|
data/_includes/head.html
CHANGED
@@ -16,10 +16,11 @@
|
|
16
16
|
<meta name="msapplication-config" content="/browserconfig.xml" />
|
17
17
|
<meta name="theme-color" content="#ffffff" />
|
18
18
|
|
19
|
-
<
|
19
|
+
<link rel="canonical" href="{{ page.url | replace:'index.html','' | relative_url }}" />
|
20
20
|
|
21
|
-
|
22
|
-
|
21
|
+
{% if site.font_awesome_kit_url %}
|
22
|
+
<script src="{{ site.font_awesome_kit_url }}"></script>
|
23
|
+
{% endif %}
|
23
24
|
|
24
25
|
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
25
26
|
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
@@ -28,12 +29,6 @@
|
|
28
29
|
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
|
29
30
|
<![endif]-->
|
30
31
|
|
31
|
-
<link rel="canonical" href="{{ page.url | replace:'index.html','' | relative_url }}" />
|
32
|
-
|
33
|
-
{% if jekyll.environment == 'production' and site.google_analytics %}
|
34
|
-
<script src="{{ "/assets/ga.js" | relative_url }}"></script>
|
35
|
-
{% endif %}
|
36
|
-
|
37
32
|
{% assign extra_stylesheets = page.extra_stylesheets | default: layout.extra_stylesheets %}
|
38
33
|
{% if extra_stylesheets %}
|
39
34
|
{% for ss in extra_stylesheets %}
|
@@ -54,4 +49,10 @@
|
|
54
49
|
{% endfor %}
|
55
50
|
{% endif %}
|
56
51
|
|
52
|
+
<link rel="stylesheet" type="text/css" href="{{ "/assets/style.css" | relative_url }}" />
|
53
|
+
|
54
|
+
{% if jekyll.environment == 'production' and site.google_analytics %}
|
55
|
+
<script src="{{ "/assets/ga.js" | relative_url }}"></script>
|
56
|
+
{% endif %}
|
57
|
+
|
57
58
|
</head>
|
@@ -39,10 +39,6 @@ $homeSectionItemSidePadding: 1em;
|
|
39
39
|
|
40
40
|
@import 'normalize';
|
41
41
|
|
42
|
-
body {
|
43
|
-
font-family: $bodyFontFamily;
|
44
|
-
}
|
45
|
-
|
46
42
|
a {
|
47
43
|
&:link, &:visited, &:hover {
|
48
44
|
color: inherit;
|
@@ -127,6 +123,10 @@ body.resource {
|
|
127
123
|
overflow-y: scroll;
|
128
124
|
padding-top: 1em;
|
129
125
|
|
126
|
+
.bp3-tree-node-content:hover {
|
127
|
+
background-color: inherit;
|
128
|
+
}
|
129
|
+
|
130
130
|
a {
|
131
131
|
color: inherit;
|
132
132
|
text-decoration: none;
|
data/_sass/main.scss
CHANGED
data/assets/resource-browser.js
CHANGED
@@ -15,12 +15,65 @@
|
|
15
15
|
|
16
16
|
for (var el of browser.querySelectorAll('.bp3-tree-node-label a')) {
|
17
17
|
el.addEventListener('click', function (evt) {
|
18
|
+
iframe.setAttribute('src', 'about:blank');
|
19
|
+
|
20
|
+
var itemUrl = evt.target.getAttribute('href');
|
21
|
+
// var extension = itemUrl.slice('-1');
|
22
|
+
fetchResource(itemUrl, function () {
|
23
|
+
if (this.responseXML) {
|
24
|
+
try {
|
25
|
+
iframe.setAttribute('src', 'about:blank');
|
26
|
+
iframe.contentWindow.document.open();
|
27
|
+
iframe.contentWindow.document.write(
|
28
|
+
'<pre>' +
|
29
|
+
new Option(prettyPrintXML(this.responseXML)).innerHTML +
|
30
|
+
'</pre>');
|
31
|
+
iframe.contentWindow.document.close();
|
32
|
+
|
33
|
+
} catch (e) {
|
34
|
+
iframe.setAttribute('src', itemUrl);
|
35
|
+
}
|
36
|
+
} else {
|
37
|
+
iframe.setAttribute('src', itemUrl);
|
38
|
+
}
|
39
|
+
});
|
40
|
+
|
18
41
|
selectItem(evt.target);
|
42
|
+
|
19
43
|
evt.preventDefault();
|
20
|
-
iframe.setAttribute('src', evt.target.getAttribute('href'));
|
21
44
|
return false;
|
22
45
|
});
|
23
46
|
}
|
24
47
|
}
|
25
48
|
}
|
49
|
+
|
50
|
+
function fetchResource(url, handleResourceResponse) {
|
51
|
+
var oReq = new XMLHttpRequest();
|
52
|
+
oReq.addEventListener("load", handleResourceResponse);
|
53
|
+
oReq.open("GET", url);
|
54
|
+
// oReq.overrideMimeType("text/plain; charset=x-user-defined");
|
55
|
+
oReq.send();
|
56
|
+
}
|
57
|
+
|
58
|
+
function prettyPrintXML(xmlDoc) {
|
59
|
+
var xsltDoc = new DOMParser().parseFromString([
|
60
|
+
// describes how we want to modify the XML - indent everything
|
61
|
+
'<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">',
|
62
|
+
' <xsl:strip-space elements="*"/>',
|
63
|
+
' <xsl:template match="para[content-style][not(text())]">', // change to just text() to strip space in text nodes
|
64
|
+
' <xsl:value-of select="normalize-space(.)"/>',
|
65
|
+
' </xsl:template>',
|
66
|
+
' <xsl:template match="node()|@*">',
|
67
|
+
' <xsl:copy><xsl:apply-templates select="node()|@*"/></xsl:copy>',
|
68
|
+
' </xsl:template>',
|
69
|
+
' <xsl:output indent="yes"/>',
|
70
|
+
'</xsl:stylesheet>',
|
71
|
+
].join('\n'), 'application/xml');
|
72
|
+
|
73
|
+
var xsltProcessor = new XSLTProcessor();
|
74
|
+
xsltProcessor.importStylesheet(xsltDoc);
|
75
|
+
var resultDoc = xsltProcessor.transformToDocument(xmlDoc);
|
76
|
+
var resultXml = new XMLSerializer().serializeToString(resultDoc);
|
77
|
+
return resultXml;
|
78
|
+
};
|
26
79
|
}());
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-theme-isotc211
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-08-
|
11
|
+
date: 2019-08-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.
|
61
|
+
version: 0.5.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.
|
68
|
+
version: 0.5.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: bundler
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|