forked from Flotype/now
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Flotype#179 from mrienstra/master
Updates to examples: package.json; CSS; JS.
- Loading branch information
Showing
8 changed files
with
106 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "nowjs-express-example", | ||
"version": "0.0.2", | ||
"author": "ericz (Eric Zhang) <eric@nowjs.com>", | ||
"description": "This is an example of an embedded chat window added to any site.", | ||
"keywords": [ | ||
"nowjs", | ||
"express", | ||
"example" | ||
], | ||
"dependencies" : { | ||
"now" : ">=0.7", | ||
"express" : ">=2.4", | ||
"ejs" : ">=0.5" | ||
}, | ||
"engine": { | ||
"node": ">=0.4" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
<h1><%= title %></h1> | ||
<p>Welcome to <%= title %></p> | ||
<p>This is an example of an embedded chat window added to any site. <a href='#' id='chat'>Chat with us</a></p> | ||
<div id="floater" style="position: absolute; right: 0; top:0; width="25%" height="100%"></div> | ||
<div id="floater" style="position: absolute; right: 0; top:0; width: 300px; height: 100%;"></div> | ||
<script> | ||
$(document).ready(function() { | ||
$(document).ready(function() { | ||
$('#chat').click(function(e) { | ||
e.preventDefault(); | ||
$('<iframe width="300px" height="100%" sandbox="allow-same-origin allow-forms allow-scripts" src="http://localhost:8080/chat"></iframe>').appendTo('#floater'); | ||
}); | ||
e.preventDefault(); | ||
$('#floater').css("border-left", "1px solid #000").append('<iframe style="width: 300px; border: 0;" sandbox="allow-same-origin allow-forms allow-scripts" src="http://localhost:8080/chat"></iframe>'); | ||
}); | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"name": "nowjs-helloworld-example", | ||
"version": "0.0.6", | ||
"author": "ericz (Eric Zhang) <eric@nowjs.com>", | ||
"description": "'Hello world' example for NowJS.", | ||
"keywords": [ | ||
"nowjs", | ||
"example" | ||
], | ||
"dependencies" : { | ||
"now" : ">=0.7" | ||
}, | ||
"engine": { | ||
"node": ">=0.4" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"name": "nowjs-helloworld-example", | ||
"version": "0.0.6", | ||
"author": "ericz (Eric Zhang) <eric@nowjs.com>", | ||
"description": "'Hello world' example for NowJS.", | ||
"keywords": [ | ||
"nowjs", | ||
"example" | ||
], | ||
"dependencies" : { | ||
"now" : ">=0.7" | ||
}, | ||
"engine": { | ||
"node": ">=0.4" | ||
} | ||
} |