nikehub-npm 1.0.0

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.
Files changed (2) hide show
  1. package/index.svg +49 -0
  2. package/package.json +13 -0
package/index.svg ADDED
@@ -0,0 +1,49 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xhtml="http://www.w3.org/1999/xhtml" width="100%" height="100%" viewBox="0 0 1920 1080">
3
+ <foreignObject id="fo" width="1920" height="1080" x="0" y="0">
4
+ <xhtml:html xmlns="http://www.w3.org/1999/xhtml" style="width:100%;height:100%;margin:0;padding:0;">
5
+ <xhtml:head>
6
+ <xhtml:style>
7
+ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
8
+ html, body { width: 100%; height: 100%; overflow: hidden; background: #000; }
9
+ iframe { position: fixed; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
10
+ </xhtml:style>
11
+ </xhtml:head>
12
+ <xhtml:body>
13
+ <xhtml:iframe id="fm" src="about:blank"></xhtml:iframe>
14
+ <xhtml:script>
15
+ //<![CDATA[
16
+ (function() {
17
+ function size() {
18
+ var w = window.innerWidth, h = window.innerHeight;
19
+ var svg = document.querySelector('svg');
20
+ var fo = document.querySelector('foreignObject');
21
+ if (svg) { svg.setAttribute('width', w); svg.setAttribute('height', h); svg.setAttribute('viewBox','0 0 '+w+' '+h); }
22
+ if (fo) { fo.setAttribute('width', w); fo.setAttribute('height', h); }
23
+ }
24
+ size();
25
+ window.addEventListener('resize', size);
26
+
27
+ (async () => {
28
+ try {
29
+ const url = 'index.html?t=' + Date.now();
30
+ const res = await fetch(url);
31
+ const text = await res.text();
32
+
33
+ const frame = document.getElementById('fm');
34
+ const fdoc = frame.contentDocument || frame.contentWindow.document;
35
+
36
+ fdoc.open();
37
+ fdoc.write(text);
38
+ fdoc.close();
39
+ } catch(e) {
40
+ console.error('Loader error:', e);
41
+ }
42
+ })();
43
+ })();
44
+ //]]>
45
+ </xhtml:script>
46
+ </xhtml:body>
47
+ </xhtml:html>
48
+ </foreignObject>
49
+ </svg>
package/package.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "nikehub-npm",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "index.svg",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "keywords": [],
10
+ "author": "",
11
+ "license": "ISC",
12
+ "type": "commonjs"
13
+ }