Permalink
Browse files

Better template

  • Loading branch information...
Koen Bok
Koen Bok committed May 15, 2013
1 parent c45dbb7 commit 6fd264c787a410e47ea4d3e8e6e32d5f99d5ac8c
Showing with 37 additions and 15 deletions.
  1. +33 −15 template/app.js
  2. BIN template/framer-logo.png
  3. +4 −0 template/index.html
@@ -1,20 +1,38 @@
view = new View({
x:100, y:100,
width:200, height:200
});
// Welcome to Framer
// This is just demo code. Feel free to delete it all.
view.style = {
textAlign: "center",
lineHeight: view.height + "px",
backgroundColor: "rgba(255,0,0,0.5)"
};
view.html = "Hello";
// Create the logo view
logoView = new ImageView({
width:251, height:302,
image: "framer-logo.png"
});
// Place it center screen
logoView.midX = window.innerWidth / 2
logoView.midY = window.innerHeight / 2 - 100
view.on("click", function() {
view.scale = 0.8;
view.animate({
// Bounce on a click
logoView.on("click", function() {
logoView.scale = 0.8;
logoView.animate({
properties: {scale:1},
curve: "spring(100,15,1000)"
curve: "spring(1000,15,1000)"
});
});
});
// Create the logo view
instructionsView = new View({
x: logoView.x, y: logoView.maxY + 30,
width:logoView.width, height:100,
});
// Add some handy links
instructionsView.html = "To start editing, open the app.js file in your text editor.<br><br>";
instructionsView.html += "<a href='http://www.framerjs.com/documentation?origin=project' target='new'>Documentation</a> &nbsp;";
instructionsView.html += "<a href='http://www.framerjs.com/examples?origin=project' target='new'>Examples</a>";
instructionsView.style = {
font: "15px/1.4em Helvetica",
textAlign: "center"
}
Binary file not shown.
@@ -25,6 +25,10 @@
-webkit-tap-highlight-color: rgba(0,0,0,0)
}
a {
color: #bfbfbf;
}
</style>
</head>

0 comments on commit 6fd264c

Please sign in to comment.