Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Another set of changes for #59

  • Loading branch information...
commit 119ff8754587cd0da690c7b467bb11e78aeb4cb0 1 parent e4c61b1
Paul Kinlan authored
View
11 examples/css/base.css
@@ -17,6 +17,7 @@ line-height: 20px;
}
header h1 {
+ margin-top: 10px;
font-size: 3em;
margin-bottom: 15px;
}
@@ -41,14 +42,14 @@ nav.sub a:active {
section h2 {
font-size: 2em;
- margin-bottom: 10px;
- margin-top: 10px;
+ margin-bottom: 15px;
+ margin-top: 25px;
}
section h3 {
font-size: 1.6em;
- margin-bottom: 10px;
- margin-top: 10px;
+ margin-bottom: 15px;
+ margin-top: 15px;
}
section dl {
@@ -57,7 +58,7 @@ line-height: 20px;
section p {
margin-top: 10px;
- margin-bottom: 5px;
+ margin-bottom: 10px;
line-height: 20px;
}
View
27 examples/intents/pick/index.html
@@ -1,21 +1,28 @@
<!doctype html>
<html>
<head>
- <title>Intent: Pick</title>
+ <link rel="stylesheet" href="/css/reset.css" />
+ <link rel="stylesheet" href="/css/base.css" />
<style>
- body {
- height: 100%;
- }
-
iframe {
- width: 45%;
- height: 80%;
+ float:left;
+ width: 50%;
+ height: 800px;
}
</style>
+ <title>Intent: Pick</title>
</head>
<body>
- <h2>This is an example app that lets the user pick files from a cloud storage solution</h2>
- <iframe src="register.html"></iframe>
- <iframe src="action.html"></iframe>
+ <header>
+ <h1>Intent Pick: example</h1>
+ </header>
+ <section>
+ <p>This example demonstates a cloud-based file picker.</p>
+ <div>
+ <iframe src="register.html"></iframe>
+ <iframe src="action.html"></iframe>
+ </div>
+ </section>
+
</body>
</html>
View
23 examples/intents/pick/pick.html
@@ -3,6 +3,15 @@
<title>Pick an Image</title>
<script src="/lib/webintents.debug.js"></script>
<script src="/lib/events.js"></script>
+ <link rel="stylesheet" href="/css/reset.css" />
+ <link rel="stylesheet" href="/css/base.css" />
+ <style>
+ iframe {
+ float:left;
+ width: 50%;
+ height: 800px;
+ }
+ </style>
<script>
var getImageData = function(img) {
var canvas = document.createElement("canvas");
@@ -36,11 +45,16 @@
</script>
<body>
- <h1>Kinlan's Cloud File Store</h1>
+ <header>
+ <h1>Kinlan's Cloud File Store</h1>
+ </header>
+ <section>
<p>Select a file for the app to use</p>
- <img id="img1" src="images/kitten1.jpg">
- <img id="img2" src="images/kitten2.jpg">
- <img id="img3" src="images/kitten3.jpg">
+ <div>
+ <img id="img1" src="images/kitten1.jpg">
+ <img id="img2" src="images/kitten2.jpg">
+ <img id="img3" src="images/kitten3.jpg">
+ </div>
<h2>Code</h2>
<pre>var getImageData = function(img) {
...
@@ -56,5 +70,6 @@
setTimeout(function() { window.close();}, 500);
}
};</pre>
+ </section>
</body>
</html>
View
33 examples/intents/share/index.html
@@ -2,20 +2,35 @@
<html>
<head>
<title>Intent: Share</title>
+ <link rel="stylesheet" href="/css/reset.css" />
+ <link rel="stylesheet" href="/css/base.css" />
<style>
- body {
- height: 100%;
- }
-
iframe {
- width: 45%;
- height: 80%;
+ float:left;
+ width: 50%;
+ height: 800px;
}
</style>
</head>
<body>
- <h2>This is an example app that needs to share links</h2>
- <iframe src="register.html"></iframe>
- <iframe src="action.html"></iframe>
+ <header>
+ <h1>Share intent example</h1>
+ <nav>
+ <a href="http://webintents.org/">Web Intents</a>
+ <a href="http://webintents.org/share">Share Intent documentation</a>
+ <a href="http://examples.webintents.org/">Examples</a>
+ </nav>
+ </header>
+ <section>
+ <p>
+ Sharing is a common action on the Internet. This example shows you how easy it is
+ to build applications that recieve Share requests, and how simple it is to build
+ applications that request Share functionality.
+ </p>
+ <div>
+ <iframe src="register.html"></iframe>
+ <iframe src="action.html"></iframe>
+ </div>
+ </section>
</body>
</html>
View
19 examples/intents/share/shareimage.html
@@ -9,9 +9,22 @@
output.src = intent.data[0];
});
</script>
+ <link rel="stylesheet" href="/css/reset.css" />
+ <link rel="stylesheet" href="/css/base.css" />
+ <style>
+ iframe {
+ float:left;
+ width: 50%;
+ height: 800px;
+ }
+ </style>
<body>
- <h1>Image Sharing app</h1>
- <p>Imagine this is a page like twit pic or picplz.</p>
- <img id="output" />
+ <header>
+ <h1>Image Sharing app</h1>
+ </header>
+ <section>
+ <p>Imagine this is a page like twit pic or picplz.</p>
+ <img id="output" />
+ </section>
</body>
</html>
View
19 examples/intents/share/sharelink.html
@@ -13,9 +13,22 @@
setText(output, intent.data);
}, false);
</script>
+ <link rel="stylesheet" href="/css/reset.css" />
+ <link rel="stylesheet" href="/css/base.css" />
+ <style>
+ iframe {
+ float:left;
+ width: 50%;
+ height: 800px;
+ }
+ </style>
<body>
- <h1>Link Sharing app</h1>
- <p>Imagine this is a page like twitter or facebook or google buzz.</p>
- <div id="output"></div>
+ <header>
+ <h1>Link Sharing app</h1>
+ </header>
+ <section>
+ <p>Imagine this is a page like twitter or facebook or google buzz.</p>
+ <div id="output"></div>
+ </section>
</body>
</html>
View
36 examples/intents/shorten/index.html
@@ -4,7 +4,16 @@
<title>Intent: Shorten</title>
<script src="/lib/webintents.debug.js"></script>
<script src="/lib/events.js"></script>
- <script src="/lib/common.js"></script>
+ <link rel="stylesheet" href="/css/reset.css" />
+ <link rel="stylesheet" href="/css/base.css" />
+ <style>
+ iframe {
+ float:left;
+ width: 50%;
+ height: 800px;
+ }
+ </style>
+ <script src="/lib/common.js"></script>
<intent
action="http://webintents.org/shorten"
type="text/uri-list"
@@ -33,15 +42,24 @@
};
}, false);
</script>
-
</head>
-
-
<body>
- <h2>This is an app that needs to share links</h2>
- <input id="url" name="url" type="url" value="http://paul.kinlan.me" />
- <button id="shortenLink">Shorten link</button>
- <h3>Response will appear here:</h3>
- <div id="output"></div>
+ <header>
+ <h1>Example: Shorten</h1>
+ <nav>
+ <a href="http://webintents.org/">Web Intents</a>
+ <a href="http://webintents.org/shorten">Shorten Intent documentation</a>
+ <a href="http://examples.webintents.org/">Examples</a>
+ </nav>
+ </header>
+ <section>
+ <p>Applications often have to </p>
+ <div>
+ <input id="url" name="url" type="url" value="http://paul.kinlan.me" />
+ <button id="shortenLink">Shorten link</button>
+ </div>
+ <p>Response will appear here:</p>
+ <div id="output"></div>
+ </section>
</body>
</html>
View
27 examples/intents/shorten/shorten.html
@@ -1,9 +1,18 @@
<!doctype html>
<html>
- <title>Edit Link</title>
+ <title>Kinlan's Link Shortener</title>
<script src="/lib/webintents.debug.js"></script>
<script src="/lib/events.js"></script>
<script src="/lib/common.js"></script>
+ <link rel="stylesheet" href="/css/reset.css" />
+ <link rel="stylesheet" href="/css/base.css" />
+ <style>
+ iframe {
+ float:left;
+ width: 50%;
+ height: 800px;
+ }
+ </style>
<script>
attachEventListener(window, "load", function() {
var output = document.getElementById("output");
@@ -12,7 +21,19 @@
}, false);
</script>
<body>
- <h1>Kinlan's Link Shortener</h1>
- <div id="output"></div>
+ <header>
+ <h1>Kinlan's Link Shortener</h1>
+ </header>
+ <section>
+ <p>The data that is passed to this application will appear below. We also send it back to
+ the calling application</p>
+ <div id="output"></div>
+ <h3>The code</h3>
+ <pre>attachEventListener(window, "load", function() {
+ var output = document.getElementById("output");
+ setText(output, intent.data[0]);
+ intent.postResult(["http://kin.ly/A" ]);
+}, false);</pre>
+ </section>
</body>
</html>
View
11 server/css/base.css
@@ -17,6 +17,7 @@ line-height: 20px;
}
header h1 {
+ margin-top: 10px;
font-size: 3em;
margin-bottom: 15px;
}
@@ -41,14 +42,14 @@ nav.sub a:active {
section h2 {
font-size: 2em;
- margin-bottom: 10px;
- margin-top: 10px;
+ margin-bottom: 15px;
+ margin-top: 25px;
}
section h3 {
font-size: 1.6em;
- margin-bottom: 10px;
- margin-top: 10px;
+ margin-bottom: 15px;
+ margin-top: 15px;
}
section dl {
@@ -57,7 +58,7 @@ line-height: 20px;
section p {
margin-top: 10px;
- margin-bottom: 5px;
+ margin-bottom: 10px;
line-height: 20px;
}
View
10 server/discover
@@ -2,9 +2,14 @@
<html>
<head>
<title>Discover</title>
+ <link rel="stylesheet" href="/css/reset.css" />
+ <link rel="stylesheet" href="/css/base.css" />
</head>
<body>
- <h1>Intent: Discover - http://webintents.org/discover</h1>
+ <header>
+ <h1>Discover - http://webintents.org/discover</h1>
+ </header>
+ <section>
<p>
The discover intent is designed to let developers query the API's and services that might live on external services.
</p>
@@ -34,6 +39,7 @@ window.navigator.startActivity(intent);</pre>
<dl id="dataformats">
<dt>application/JSON</dt>
<dd><pre>[ <i>Object</i> ]</pre></dd>
- </dl>
+ </dl>
+ </section>
</body>
</html>
View
10 server/edit
@@ -2,9 +2,14 @@
<html>
<head>
<title>Edit</title>
+ <link rel="stylesheet" href="/css/reset.css" />
+ <link rel="stylesheet" href="/css/base.css" />
</head>
<body>
- <h1>Intent: Edit - http://webintents.org/edit</h1>
+ <header>
+ <h1>Edit - http://webintents.org/edit</h1>
+ </header>
+ <section>
<p>
The edit intent is designed to give applications the ability to offer a simple mechanism for to edit data from the current page.
</p>
@@ -43,6 +48,7 @@ window.navigator.startActivity(intent);</pre>
<dd><pre>[ <i>string uri</i> ] || <i>string uri</i></pre></dd>
<dt>text/uri-list</dt>
<dd><pre>[ <i>string uri</i> ] || <i>string uri</i></pre></dd>
- </dl>
+ </dl>
+ </section>
</body>
</html>
View
10 server/pick
@@ -2,9 +2,14 @@
<html>
<head>
<title>Pick</title>
+ <link rel="stylesheet" href="/css/reset.css" />
+ <link rel="stylesheet" href="/css/base.css" />
</head>
<body>
- <h1>Intent: Pick - http://webintents.org/pick</h1>
+ <header>
+ <h1>Pick - http://webintents.org/pick</h1>
+ </header>
+ <section>
<p>
The pick intent is designed to give services the ability to allow their users pick files from their service for use in a client application.
</p>
@@ -43,6 +48,7 @@ window.navigator.startActivity(intent);</pre>
<dd><pre>[ <i>string uri</i> ] || <i>string uri</i></pre></dd>
<dt>text/uri-list</dt>
<dd><pre>[ <i>string uri</i> ] || <i>string uri</i></pre></dd>
- </dl>
+ </dl>
+ </section>
</body>
</html>
View
12 server/share
@@ -2,9 +2,14 @@
<html>
<head>
<title>Share</title>
+ <link rel="stylesheet" href="/css/reset.css" />
+ <link rel="stylesheet" href="/css/base.css" />
</head>
<body>
- <h1>Intent: Share - http://webintents.org/share</h1>
+ <header>
+ <h1>Share - http://webintents.org/share</h1>
+ </header>
+ <section>
<p>
The share intent is designed to give applications the ability to offer a simple mechanism for sharing data from the current page.
</p>
@@ -43,6 +48,7 @@ window.navigator.startActivity(intent);</pre>
<dd><pre>[ <i>string uri</i> ] || <i>string uri</i></pre></dd>
<dt>text/uri-list</dt>
<dd><pre>[ <i>string uri</i> ] || <i>string uri</i></pre></dd>
- </dl>
- </body>
+ </dl>
+ </section>
+ </body>
</html>
View
10 server/view
@@ -2,9 +2,14 @@
<html>
<head>
<title>View</title>
+ <link rel="stylesheet" href="/css/reset.css" />
+ <link rel="stylesheet" href="/css/base.css" />
</head>
<body>
- <h1>Intent: View - http://webintents.org/view</h1>
+ <header>
+ <h1>View - http://webintents.org/view</h1>
+ </header>
+ <section>
<p>
The view intent is designed to give applications the ability to offer a simple mechanism to view data in their application.
</p>
@@ -43,6 +48,7 @@ window.navigator.startActivity(intent);</pre>
<dd><pre>[ <i>string uri</i> ] || <i>string uri</i></pre></dd>
<dt>text/uri-list</dt>
<dd><pre>[ <i>string uri</i> ] || <i>string uri</i></pre></dd>
- </dl>
+ </dl>
+ </section>
</body>
</html>
Please sign in to comment.
Something went wrong with that request. Please try again.