aboutsummaryrefslogtreecommitdiff
path: root/js/document/templates
diff options
context:
space:
mode:
authorValerio Virgillito2012-05-11 14:46:51 -0700
committerValerio Virgillito2012-05-11 14:46:51 -0700
commit1fb663b5f348fe2ff5ce86a80e8a61be289eba70 (patch)
tree7ccb54a07eb4adf793bae3f1a4ddd622bd4f9a0c /js/document/templates
parent647a7cf0697debe7b3d6fa0d68cd6b37996d6b59 (diff)
parentd2e1d4eeba4439ed26f2adf1c34991caf44a591f (diff)
downloadninja-1fb663b5f348fe2ff5ce86a80e8a61be289eba70.tar.gz
Merge pull request #222 from joseeight/Document
Adding partial support for templates
Diffstat (limited to 'js/document/templates')
-rwxr-xr-xjs/document/templates/banner/index.html94
-rw-r--r--js/document/templates/banner/main.js (renamed from js/document/templates/montage-web/main.js)0
-rwxr-xr-xjs/document/templates/banner/package.json (renamed from js/document/templates/montage-html/package.json)0
-rwxr-xr-xjs/document/templates/html/index.html (renamed from js/document/templates/montage-web/index.html)16
-rw-r--r--js/document/templates/html/main.js (renamed from js/document/templates/montage-html/main.reel/main.js)3
-rwxr-xr-xjs/document/templates/html/package.json (renamed from js/document/templates/montage-web/package.json)0
-rwxr-xr-xjs/document/templates/montage-html/default_html.css74
-rwxr-xr-xjs/document/templates/montage-html/index.html48
8 files changed, 103 insertions, 132 deletions
diff --git a/js/document/templates/banner/index.html b/js/document/templates/banner/index.html
new file mode 100755
index 00000000..2cd82f51
--- /dev/null
+++ b/js/document/templates/banner/index.html
@@ -0,0 +1,94 @@
1<!DOCTYPE html>
2<!-- <copyright>
3 This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
4 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
5 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
6 </copyright> -->
7
8
9<!--
10 NOTE(s):
11 All elements in the head of the document to be exclude from I/O
12 must set the 'data-ninja-template'
13 data-ninja-template="true"
14-->
15<html>
16
17 <head>
18
19 <style type="text/css" id="nj-stage-stylesheet" data-ninja-template="true">
20 * {
21 -webkit-transition-duration: 0s !important;
22 -webkit-animation-duration: 0s !important;
23 -webkit-animation-name: none !important;
24 }
25
26 body {
27 margin: 0;
28 padding: 0;
29 position: absolute;
30 -webkit-transform-style: preserve-3d;
31 -webkit-transform: perspective(1400) matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
32 }
33
34 html {
35 overflow: scroll;
36 }
37
38 html, body {
39 width: 100%;
40 height: 100%;
41 background: #666;
42 }
43
44 ninjaloadinghack {
45 display: none;
46 }
47
48 .active-element-outline {
49 outline: #adff2f solid 2px;
50 }
51
52 .nj-preset-transition {
53 -webkit-transition: all 450ms linear !important;
54 }
55
56 ninja-banner {
57 display: block;
58 margin: 0;
59 padding: 0;
60 border: 0;
61 position: absolute;
62 overflow: visible;
63 top: 50%;
64 left: 50%;
65 background: #FFF;
66 }
67 </style>
68
69 <script type="text/javascript" data-ninja-template="true">
70 function getElement(x,y) {
71 return document.elementFromPoint(x,y);
72 }
73 </script>
74
75 <!-- TODO: Determine if loading Montage is always needed or if it could be done author-time or on file open -->
76
77 <script type="text/javascript" data-package="." src="../../../../node_modules/montage/montage.js" data-ninja-template="true"></script>
78
79 <script type="text/montage-serialization" data-ninja-template="true">
80 {
81 "owner": {
82 "prototype": "main"
83 }
84 }
85 </script>
86
87 </head>
88
89 <body>
90 <ninjaloadinghack></ninjaloadinghack>
91 <ninja-banner></ninja-banner>
92 </body>
93
94</html> \ No newline at end of file
diff --git a/js/document/templates/montage-web/main.js b/js/document/templates/banner/main.js
index d5ac88d5..d5ac88d5 100644
--- a/js/document/templates/montage-web/main.js
+++ b/js/document/templates/banner/main.js
diff --git a/js/document/templates/montage-html/package.json b/js/document/templates/banner/package.json
index c8bc02fb..c8bc02fb 100755
--- a/js/document/templates/montage-html/package.json
+++ b/js/document/templates/banner/package.json
diff --git a/js/document/templates/montage-web/index.html b/js/document/templates/html/index.html
index e02d8d8e..a1b8b242 100755
--- a/js/document/templates/montage-web/index.html
+++ b/js/document/templates/html/index.html
@@ -15,8 +15,6 @@
15<html> 15<html>
16 16
17 <head> 17 <head>
18
19 <title data-ninja-template="true">Ninja Prototype</title>
20 18
21 <style type="text/css" id="nj-stage-stylesheet" data-ninja-template="true"> 19 <style type="text/css" id="nj-stage-stylesheet" data-ninja-template="true">
22 * { 20 * {
@@ -35,7 +33,6 @@
35 33
36 html { 34 html {
37 overflow: scroll; 35 overflow: scroll;
38 padding: 0 11px 11px 0;
39 } 36 }
40 37
41 html, body { 38 html, body {
@@ -55,14 +52,16 @@
55 -webkit-transition: all 450ms linear !important; 52 -webkit-transition: all 450ms linear !important;
56 } 53 }
57 </style> 54 </style>
58 55
59 <script type="text/javascript" data-package="." src="../../../../node_modules/montage/montage.js" data-ninja-template="true"></script> 56 <script type="text/javascript" data-ninja-template="true">
60
61 <script type="text/javascript" data-ninja-template="true">
62 function getElement(x,y) { 57 function getElement(x,y) {
63 return document.elementFromPoint(x,y); 58 return document.elementFromPoint(x,y);
64 } 59 }
65 </script> 60 </script>
61
62 <!-- TODO: Determine if loading Montage is always needed or if it could be done author-time or on file open -->
63
64 <script type="text/javascript" data-package="." src="../../../../node_modules/montage/montage.js" data-ninja-template="true"></script>
66 65
67 <script type="text/montage-serialization" data-ninja-template="true"> 66 <script type="text/montage-serialization" data-ninja-template="true">
68 { 67 {
@@ -74,7 +73,6 @@
74 73
75 </head> 74 </head>
76 75
77 <body> 76 <body></body>
78 </body>
79 77
80</html> \ No newline at end of file 78</html> \ No newline at end of file
diff --git a/js/document/templates/montage-html/main.reel/main.js b/js/document/templates/html/main.js
index 019c675e..d5ac88d5 100644
--- a/js/document/templates/montage-html/main.reel/main.js
+++ b/js/document/templates/html/main.js
@@ -38,10 +38,11 @@ exports.Main = Montage.create(Component, {
38 }; 38 };
39 39
40 // Dispatch event when this template has loaded. 40 // Dispatch event when this template has loaded.
41 /*
41 var newEvent = document.createEvent( "CustomEvent" ); 42 var newEvent = document.createEvent( "CustomEvent" );
42 newEvent.initCustomEvent( "userTemplateDidLoad", false, true ); 43 newEvent.initCustomEvent( "userTemplateDidLoad", false, true );
43
44 document.body.dispatchEvent( newEvent ); 44 document.body.dispatchEvent( newEvent );
45 */
45 46
46 } 47 }
47 } 48 }
diff --git a/js/document/templates/montage-web/package.json b/js/document/templates/html/package.json
index c8bc02fb..c8bc02fb 100755
--- a/js/document/templates/montage-web/package.json
+++ b/js/document/templates/html/package.json
diff --git a/js/document/templates/montage-html/default_html.css b/js/document/templates/montage-html/default_html.css
deleted file mode 100755
index 04b21c6f..00000000
--- a/js/document/templates/montage-html/default_html.css
+++ /dev/null
@@ -1,74 +0,0 @@
1/* <copyright>
2This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5</copyright> */
6
7* {
8 -webkit-transition-duration: 0s !important;
9 -webkit-animation-duration: 0s !important;
10 -webkit-animation-name: none !important;
11}
12
13html{
14 overflow:hidden;
15}
16
17body
18{
19 background: #808080;
20}
21
22#Viewport
23{
24 margin: 0px;
25 padding: 0px;
26 top: 200px;
27 left: 700px;
28 /*position: absolute;*/