first release
274
css/print.css
Normal file
@ -0,0 +1,274 @@
|
||||
/*---------------------------------------- Text */
|
||||
|
||||
body {
|
||||
font-family: Georgia, Times New Roman, Times, serif;
|
||||
font-weight: bold;
|
||||
font-size: 30px;
|
||||
text-align: center;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
header {
|
||||
height: 400px;
|
||||
border-bottom: 1px solid #698b91
|
||||
}
|
||||
|
||||
footer {
|
||||
display: none;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 120px;
|
||||
font-weight: normal;
|
||||
margin: 0;
|
||||
font-family: 'Sansita One', cursive;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 80px;
|
||||
font-weight: normal;
|
||||
margin: 0;
|
||||
font-family: 'Sansita One', cursive;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 40px;
|
||||
font-weight: normal;
|
||||
margin: 0;
|
||||
font-family: 'Sansita One', cursive;
|
||||
}
|
||||
|
||||
p {
|
||||
width: 95%;
|
||||
margin: 20px auto;
|
||||
text-shadow: 0 2px 1px #fff;
|
||||
}
|
||||
|
||||
a, a:visited {
|
||||
font-weight: bold;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style: none;
|
||||
margin-left: 0;
|
||||
padding-left: 1em;
|
||||
text-indent: -1em;
|
||||
text-shadow: 0 2px 1px #fff;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
ul li:before {
|
||||
content: "\2605\a0"
|
||||
}
|
||||
|
||||
/** coding block */
|
||||
blockquote {
|
||||
text-align: left;
|
||||
margin: 10px auto;
|
||||
background: #131420;
|
||||
border-bottom: 2px solid #30334F;
|
||||
border-right: 2px solid #30334F;
|
||||
border-radius: 10px;
|
||||
padding: 5px 20px;
|
||||
|
||||
}
|
||||
|
||||
code {
|
||||
font-style: normal;
|
||||
padding-left: 5px;
|
||||
border-radius: 10px;
|
||||
color: white;
|
||||
padding: 5px 15px;
|
||||
font-family: menlo, monospace;
|
||||
background: #131420;
|
||||
text-shadow: none;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
/*---------------------------------------- Images */
|
||||
|
||||
.initialize {
|
||||
background: url("../img/initialize.png") no-repeat scroll center center transparent;
|
||||
height: 300px;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
z-index: 99;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.lines-small {
|
||||
width: 500px;
|
||||
height: 150px;
|
||||
background-repeat: repeat-y;
|
||||
background: url("../img/lines-small.png");
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.lines-small-end {
|
||||
width: 500px;
|
||||
height: 500px;
|
||||
background-repeat: repeat-y;
|
||||
background: url("../img/lines-small.png");
|
||||
position: absolute;
|
||||
|
||||
}
|
||||
|
||||
.lines-big {
|
||||
width: 500px;
|
||||
height: 5620px;
|
||||
background-repeat: repeat-y;
|
||||
background: url("../img/lines-big.png");
|
||||
position: absolute;
|
||||
left: 697px;
|
||||
|
||||
}
|
||||
|
||||
.lines-open {
|
||||
width: 500px;
|
||||
height: 86px;
|
||||
background: url("../img/lines-open.png");
|
||||
}
|
||||
|
||||
.lines-close {
|
||||
width: 500px;
|
||||
height: 86px;
|
||||
background: url("../img/lines-close.png");
|
||||
}
|
||||
|
||||
.hotfix-end, .hotfix-start, .release-end, .release-start, .feature-end, .feature-start {
|
||||
display: inline-block;
|
||||
background-repeat: no-repeat;
|
||||
background-image: url('../img/flow-sprites.png');
|
||||
background-color: rgba(218, 218, 218, 0.78);
|
||||
border: 2px dashed grey;
|
||||
border-radius: 25px;
|
||||
width: 500px;
|
||||
height: 370px;
|
||||
position: relative;
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
.feature-publish {
|
||||
display: inline-block;
|
||||
background-repeat: no-repeat;
|
||||
|
||||
background-color: rgba(218, 218, 218, 0.78);
|
||||
border: 2px dashed grey;
|
||||
border-radius: 25px;
|
||||
width: 500px;
|
||||
height: 370px;
|
||||
position: relative;
|
||||
|
||||
background-image: url('../img/feature-publish.png');
|
||||
background-position: center;
|
||||
|
||||
}
|
||||
|
||||
.feature-pull {
|
||||
display: inline-block;
|
||||
background-repeat: no-repeat;
|
||||
|
||||
background-color: rgba(218, 218, 218, 0.78);
|
||||
border: 2px dashed grey;
|
||||
border-radius: 25px;
|
||||
width: 500px;
|
||||
height: 370px;
|
||||
position: relative;
|
||||
z-index: 99;
|
||||
|
||||
background-image: url('../img/feature-pull.png');
|
||||
background-position: center;
|
||||
|
||||
}
|
||||
|
||||
.hotfix-end {
|
||||
background-position: 0px 0px;
|
||||
}
|
||||
|
||||
.hotfix-start {
|
||||
background-position: 0px -370px;
|
||||
}
|
||||
|
||||
.release-end {
|
||||
background-position: 0px -740px;
|
||||
}
|
||||
|
||||
.release-start {
|
||||
background-position: 0px -1110px;
|
||||
}
|
||||
|
||||
.feature-end {
|
||||
background-position: 0px -1480px;
|
||||
}
|
||||
|
||||
.feature-start {
|
||||
background-position: 0px -1850px;
|
||||
}
|
||||
|
||||
/*---------------------------------------- BLOCKS */
|
||||
|
||||
.col-1 {
|
||||
float: left;
|
||||
width: 600px;
|
||||
}
|
||||
|
||||
.col-2 {
|
||||
float: right;
|
||||
width: 500px;
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
#main {
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
width: 1200px;
|
||||
}
|
||||
|
||||
.scrollblock {
|
||||
width: 100%;
|
||||
padding-top: 100px;
|
||||
min-height: 450px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.divider, .accent {
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
#title {
|
||||
margin: auto;
|
||||
padding-top: 40px;
|
||||
width: 1150px;
|
||||
position: relative;
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
#author {
|
||||
width: 640px;
|
||||
position: absolute;
|
||||
top: 180px;
|
||||
right: 15%;
|
||||
font-size: 20px;
|
||||
text-align: right;
|
||||
font-style: italic;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.twitter-share-button {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#desc {
|
||||
position: absolute;
|
||||
top: 250px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/*---------------------------------------- Github Banner */
|
||||
#banner {
|
||||
display: none;
|
||||
}
|
||||
|
285
css/style.css
@ -1,26 +1,3 @@
|
||||
/*---------------------------------------- Colors */
|
||||
/*.color1 {
|
||||
background-color: lightskyblue;
|
||||
}
|
||||
|
||||
|
||||
.color2 {
|
||||
background-color: lightblue;
|
||||
}
|
||||
|
||||
.color3 {
|
||||
background-color: deepskyblue;
|
||||
}
|
||||
|
||||
.color4 {
|
||||
background-color: darkturquoise;
|
||||
}
|
||||
|
||||
.color5 {
|
||||
background-color: cornflowerblue;
|
||||
}
|
||||
*/
|
||||
|
||||
/*---------------------------------------- Text */
|
||||
|
||||
body {
|
||||
@ -29,14 +6,29 @@ body {
|
||||
font-weight: bold;
|
||||
font-size: 30px;
|
||||
text-align: center;
|
||||
transition: background-color 1s linear;
|
||||
-moz-transition: background-color 1s linear; /* FF3.7+ */
|
||||
-o-transition: background-color 1s linear; /* Opera 10.5 */
|
||||
-webkit-transition: background-color 1s linear; /* Saf3.2+, Chrome */
|
||||
adding: 0;
|
||||
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
header {
|
||||
box-shadow: 0px 5px 7px #8db7bd;
|
||||
-webkit-box-shadow: 0px 5px 7px #8db7bd;
|
||||
-moz-box-shadow: 0px 5px 7px #8db7bd;
|
||||
height: 400px;
|
||||
background-color: #8db7bd;
|
||||
border-bottom: 1px solid #698b91
|
||||
}
|
||||
|
||||
footer {
|
||||
box-shadow: 0px -5px 7px #8db7bd;
|
||||
-webkit-box-shadow: 0px -5px 7px #8db7bd;
|
||||
-moz-box-shadow: 0px -5px 7px #8db7bd;
|
||||
background-color: #8db7bd;
|
||||
border-top: 1px solid #698b91;
|
||||
position:relative;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 120px;
|
||||
font-weight: normal;
|
||||
@ -84,16 +76,13 @@ ul {
|
||||
padding-left: 1em;
|
||||
text-indent: -1em;
|
||||
text-shadow: 0 2px 1px #fff;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
ul li:before {
|
||||
content: "\2605\a0"
|
||||
}
|
||||
|
||||
.download {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
/** coding block */
|
||||
blockquote {
|
||||
text-align: left;
|
||||
@ -120,56 +109,135 @@ code {
|
||||
|
||||
/*---------------------------------------- Images */
|
||||
|
||||
div#git-repo {
|
||||
background: url("../img/git-repo.png") no-repeat scroll center center transparent;
|
||||
height: 275px;
|
||||
width: 257px;
|
||||
position: relative;
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
div#init-img {
|
||||
.initialize {
|
||||
background: url("../img/initialize.png") no-repeat scroll center center transparent;
|
||||
height: 300px;
|
||||
width: 300px;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
z-index: 99;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
div#feature-start-img {
|
||||
background: url("../img/feature-start.png") no-repeat scroll center center transparent;
|
||||
.lines-small {
|
||||
width: 500px;
|
||||
height: 150px;
|
||||
background-repeat: repeat-y;
|
||||
background: url("../img/lines-small.png");
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.lines-small-end {
|
||||
width: 500px;
|
||||
height: 500px;
|
||||
background-repeat: repeat-y;
|
||||
background: url("../img/lines-small.png");
|
||||
position: absolute;
|
||||
|
||||
}
|
||||
|
||||
.lines-big {
|
||||
width: 500px;
|
||||
height: 5620px;
|
||||
background-repeat: repeat-y;
|
||||
background: url("../img/lines-big.png");
|
||||
position: absolute;
|
||||
left: 697px;
|
||||
|
||||
}
|
||||
|
||||
.lines-open {
|
||||
width: 500px;
|
||||
height: 86px;
|
||||
background: url("../img/lines-open.png");
|
||||
}
|
||||
|
||||
.lines-close {
|
||||
width: 500px;
|
||||
height: 86px;
|
||||
background: url("../img/lines-close.png");
|
||||
}
|
||||
|
||||
.hotfix-end, .hotfix-start, .release-end, .release-start, .feature-end, .feature-start {
|
||||
display: inline-block;
|
||||
background-repeat: no-repeat;
|
||||
background-image: url('../img/flow-sprites.png');
|
||||
background-color: rgba(173, 215, 223, 0.8);
|
||||
border: 2px dashed #008098;
|
||||
border-radius: 25px;
|
||||
width: 500px;
|
||||
height: 370px;
|
||||
position: relative;
|
||||
width: 321px;
|
||||
height: 386px;
|
||||
left: -8px;
|
||||
z-index: 99;
|
||||
|
||||
box-shadow: 5px 5px 7px #8db7bd;
|
||||
-webkit-box-shadow: 5px 5px 7px #8db7bd;
|
||||
-moz-box-shadow: 5px 5px 7px #8db7bd;
|
||||
|
||||
}
|
||||
|
||||
div#feature-finish-img {
|
||||
background: url("../img/feature-finish.png") no-repeat scroll center center transparent;
|
||||
position: relative;
|
||||
width: 321px;
|
||||
height: 338px;
|
||||
left: -8px;
|
||||
z-index: 99;
|
||||
.feature-publish {
|
||||
display: inline-block;
|
||||
background-repeat: no-repeat;
|
||||
|
||||
background-color: rgba(173, 215, 223, 0.8);
|
||||
border: 2px dashed #008098;
|
||||
border-radius: 25px;
|
||||
width: 500px;
|
||||
height: 370px;
|
||||
position: relative;
|
||||
|
||||
|
||||
box-shadow: 5px 5px 7px #8db7bd;
|
||||
-webkit-box-shadow: 5px 5px 7px #8db7bd;
|
||||
-moz-box-shadow: 5px 5px 7px #8db7bd;
|
||||
background-image: url('../img/feature-publish.png');
|
||||
background-position:center;
|
||||
|
||||
}
|
||||
|
||||
div#blue-line-img {
|
||||
background: url("../img/blue_line.png") repeat-y scroll center center transparent;
|
||||
width: 46px;
|
||||
position: relative;
|
||||
height: 1500px;
|
||||
left: 37px;
|
||||
top: -10px;
|
||||
.feature-pull {
|
||||
display: inline-block;
|
||||
background-repeat: no-repeat;
|
||||
|
||||
background-color: rgba(173, 215, 223, 0.8);
|
||||
border: 2px dashed #008098;
|
||||
border-radius: 25px;
|
||||
width: 500px;
|
||||
height: 370px;
|
||||
position: relative;
|
||||
z-index: 99;
|
||||
|
||||
box-shadow: 5px 5px 7px #8db7bd;
|
||||
-webkit-box-shadow: 5px 5px 7px #8db7bd;
|
||||
-moz-box-shadow: 5px 5px 7px #8db7bd;
|
||||
background-image: url('../img/feature-pull.png');
|
||||
background-position:center;
|
||||
|
||||
}
|
||||
|
||||
div#violet-line-img {
|
||||
background: url("../img/violet-line.png") repeat-y scroll center center transparent;
|
||||
width: 46px;
|
||||
position: relative;
|
||||
height: 300px;
|
||||
left: 184px;
|
||||
top: -60px;
|
||||
|
||||
.hotfix-end {
|
||||
background-position: 0px 0px;
|
||||
}
|
||||
|
||||
.hotfix-start {
|
||||
background-position: 0px -370px;
|
||||
}
|
||||
|
||||
.release-end {
|
||||
background-position: 0px -740px;
|
||||
}
|
||||
|
||||
.release-start {
|
||||
background-position: 0px -1110px;
|
||||
}
|
||||
|
||||
.feature-end {
|
||||
background-position: 0px -1480px;
|
||||
}
|
||||
|
||||
.feature-start {
|
||||
background-position: 0px -1850px;
|
||||
}
|
||||
|
||||
/*---------------------------------------- BLOCKS */
|
||||
@ -185,10 +253,6 @@ div#violet-line-img {
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
/*.col-2:after {
|
||||
clear: both;
|
||||
}*/
|
||||
|
||||
#main {
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
@ -196,14 +260,10 @@ div#violet-line-img {
|
||||
}
|
||||
|
||||
.scrollblock {
|
||||
position: relative;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
min-height: 600px;
|
||||
}
|
||||
|
||||
.scrollblock h2 {
|
||||
padding-top: 100px;
|
||||
min-height: 450px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.divider, .accent {
|
||||
@ -211,24 +271,6 @@ div#violet-line-img {
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
#console {
|
||||
display: none;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 15px;
|
||||
width: 500px;
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
font-style: italic;
|
||||
background-color: #69697A;
|
||||
text-shadow: none;
|
||||
text-align: left;
|
||||
padding: 3px 10px;
|
||||
border-radius: 0 0 10px 10px;
|
||||
z-index: 99;
|
||||
opacity: .8;
|
||||
}
|
||||
|
||||
#title {
|
||||
margin: auto;
|
||||
padding-top: 40px;
|
||||
@ -261,53 +303,14 @@ div#violet-line-img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#head-img {
|
||||
position: relative;
|
||||
top: 200px;
|
||||
#disqus_thread {
|
||||
width: 800px;
|
||||
text-align: left;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
#download {
|
||||
position: absolute;
|
||||
top: 380px;
|
||||
font-size: 18px;
|
||||
width: 100%;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
#download a {
|
||||
color: #69697A;
|
||||
}
|
||||
|
||||
#examples-pin {
|
||||
height: 500px;
|
||||
}
|
||||
|
||||
.param-list {
|
||||
color: #C5C3DE;
|
||||
font-size: 18px;
|
||||
line-height: 1.4;
|
||||
padding: 0 18px;
|
||||
}
|
||||
|
||||
.param-list li {
|
||||
padding-bottom: 20px;
|
||||
text-shadow: 0 2px 1px #000;
|
||||
}
|
||||
|
||||
.param {
|
||||
display: block;
|
||||
color: #69697A;
|
||||
}
|
||||
|
||||
.param-def small {
|
||||
display: block;
|
||||
font-weight: normal;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
|
||||
#disqus_thread { width: 800px; text-align: left; margin-left: auto; margin-right: auto; }
|
||||
/*---------------------------------------- Banner */
|
||||
/*---------------------------------------- Github Banner */
|
||||
#banner {
|
||||
height: 149px;
|
||||
width: 149px;
|
||||
|
BIN
files/big.psd
Normal file
BIN
files/graphs.psd
Normal file
BIN
files/lines.psd
Normal file
BIN
files/new_opener.psd
Normal file
BIN
files/opener_for_graphs.psd
Normal file
87201
files/sprites.sprweb
Normal file
Before Width: | Height: | Size: 888 B |
BIN
img/feature-end.png
Normal file
After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 13 KiB |
BIN
img/flow-sprites.png
Normal file
After Width: | Height: | Size: 113 KiB |
BIN
img/hotfix-end.png
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
img/hotfix-start.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
img/init.png
Before Width: | Height: | Size: 9.5 KiB |
BIN
img/lines-big.png
Normal file
After Width: | Height: | Size: 266 B |
BIN
img/lines-close.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
img/lines-open.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
img/lines-small.png
Normal file
After Width: | Height: | Size: 227 B |
BIN
img/release-end.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
img/release-start.png
Normal file
After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 883 B |
366
index.html
@ -5,12 +5,11 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<title>git-flow cheatsheet</title>
|
||||
<link href='http://fonts.googleapis.com/css?family=Sansita+One' rel='stylesheet' type='text/css'>
|
||||
<link rel="stylesheet" href="css/normalize.css" type="text/css">
|
||||
<link rel="stylesheet" href="css/style.css" type="text/css">
|
||||
|
||||
|
||||
<link rel="stylesheet" href="css/normalize.css" type="text/css" media="screen,print">
|
||||
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen">
|
||||
<link rel="stylesheet" href="css/print.css" type="text/css" media="print">
|
||||
<script src="js/jquery-1.7.2.min.js"></script>
|
||||
<script src="js/jquery.scrollorama.js"></script>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
@ -28,45 +27,32 @@
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<p id="console"></p>
|
||||
|
||||
<div id="banner"><a href="">Fork me on GitHub</a></div>
|
||||
|
||||
<header>
|
||||
<div class="scrollblock">
|
||||
<h1 id="title">git-flow cheatsheet</h1>
|
||||
|
||||
<p id="author">
|
||||
created by <a href="http://twitter.com/0r1g4m14dd1c7">Daniel Kummer</a>
|
||||
<a href="https://twitter.com/share" class="twitter-share-button" data-via="0r1g4m14dd1c7" data-size="large">Tweet</a>
|
||||
<script>!function (d, s, id) {
|
||||
var js, fjs = d.getElementsByTagName(s)[0];
|
||||
if (!d.getElementById(id)) {
|
||||
js = d.createElement(s);
|
||||
js.id = id;
|
||||
js.src = "//platform.twitter.com/widgets.js";
|
||||
fjs.parentNode.insertBefore(js, fjs);
|
||||
}
|
||||
}(document, "script", "twitter-wjs");</script>
|
||||
</p>
|
||||
<h1 id="title">git-flow cheatsheet</h1>
|
||||
|
||||
<p id="desc">efficient branching using git-flow by <a href="http://nvie.com/">Vincent Driessen</a></p>
|
||||
|
||||
<!-- <p id="download">
|
||||
<span class="accent">★</span>
|
||||
<a href="files/git-flow-cheatsheet.pdf"
|
||||
onClick="recordOutboundLink(this, 'Cheat Sheet', 'git-flow-cheatsheet');return false;" class="download">Download
|
||||
as pdf</a>
|
||||
<span class="accent">★</span>
|
||||
</p>-->
|
||||
<img id="head-img" src="/img/git-flow.png" alt="git flow"/>
|
||||
</div>
|
||||
<p id="author">
|
||||
created by <a href="http://twitter.com/0r1g4m14dd1c7">Daniel Kummer</a>
|
||||
<a href="https://twitter.com/share" class="twitter-share-button" data-via="0r1g4m14dd1c7" data-size="large">Tweet</a>
|
||||
<script>!function (d, s, id) {
|
||||
var js, fjs = d.getElementsByTagName(s)[0];
|
||||
if (!d.getElementById(id)) {
|
||||
js = d.createElement(s);
|
||||
js.id = id;
|
||||
js.src = "//platform.twitter.com/widgets.js";
|
||||
fjs.parentNode.insertBefore(js, fjs);
|
||||
}
|
||||
}(document, "script", "twitter-wjs");</script>
|
||||
</p>
|
||||
<p id="desc">efficient branching using git-flow by <a href="http://nvie.com/">Vincent Driessen</a></p>
|
||||
</header>
|
||||
|
||||
<div id="main">
|
||||
|
||||
|
||||
<div class="scrollblock">
|
||||
<h2 id="animate1">About</h2>
|
||||
<h2>About</h2>
|
||||
|
||||
<p>
|
||||
git-flow are a set of git extensions to provide high-level repository operations for Vincent
|
||||
@ -81,13 +67,317 @@
|
||||
</div>
|
||||
|
||||
<div class="scrollblock">
|
||||
<h2 id="animate2">Wait for it...</h2>
|
||||
<h3>Sorry, the cheatsheet is still 'in development' - stay tuned</h3>
|
||||
<h2>Basic tips</h2>
|
||||
<ul>
|
||||
<li>Git flow provides excellent command line help and output. Read it carefully to see what's happening...</li>
|
||||
<li>The OSX Client <a href="http://www.sourcetreeapp.com/">Sourcetree</a> is an excellent git gui and provides
|
||||
git-flow support
|
||||
</li>
|
||||
</ul>
|
||||
<p class="divider">★ ★ ★</p>
|
||||
<p>Expect a release near the end of august 2012</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="scrollblock" style="height: 800px;">
|
||||
<h2>Setup</h2>
|
||||
|
||||
<div class="col-1">
|
||||
<h3>OSX</h3>
|
||||
<blockquote>
|
||||
<code>$ brew install git-flow</code>
|
||||
</blockquote>
|
||||
<h3>Linux</h3>
|
||||
<blockquote>
|
||||
<code>$ apt-get install git-flow</code>
|
||||
</blockquote>
|
||||
<h3>Windows (Cygwin)</h3>
|
||||
<blockquote>
|
||||
<code>
|
||||
$ wget -q -O - --no-check-certificate
|
||||
https://github.com/nvie/gitflow/raw/develop/contrib/gitflow-installer.sh | bash
|
||||
</code>
|
||||
</blockquote>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<p>
|
||||
You need a working git installation as prerequirement.<br/>
|
||||
For detailed instructions please visit the <a href="https://github.com/nvie/gitflow/wiki/Windows">git flow
|
||||
wiki</a>.
|
||||
</p>
|
||||
<img src="img/download.png" alt="install git-flow"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="scrollblock">
|
||||
<h2>Getting started</h2>
|
||||
|
||||
<div class="col-1">
|
||||
<h3>Initialize</h3>
|
||||
|
||||
<p>Start using git-flow by initializing it inside an existing git repository:</p>
|
||||
<blockquote>
|
||||
<code>
|
||||
git flow init
|
||||
</code>
|
||||
</blockquote>
|
||||
<p>
|
||||
You'll have to answer a few questions regarding the naming conventions for your branches.<br/>
|
||||
It's recommended to use the default values.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="initialize"></div>
|
||||
<div class="lines-small"></div>
|
||||
<div class="lines-open"></div>
|
||||
<div class="lines-big"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="scrollblock" style="height: 600px;">
|
||||
<h2>Features</h2>
|
||||
<ul class="narrow">
|
||||
<li>Develop new features for upcoming releases</li>
|
||||
<li>Typically exist in developers repos only</li>
|
||||
</ul>
|
||||
|
||||
<div class="col-1">
|
||||
<h3>Start a new feature</h3>
|
||||
|
||||
<p>Development of new features starting from the 'develop' branch.</p>
|
||||
|
||||
<p>Start developing a new feature with</p>
|
||||
<blockquote>
|
||||
<code>
|
||||
git-flow feature start MYFEATURE
|
||||
</code>
|
||||
</blockquote>
|
||||
<p>This action creates a new feature branch based on 'develop' and switches to it</p>
|
||||
|
||||
<!--
|
||||
- Bump the version number now!
|
||||
- Start committing last-minute fixes in preparing your release
|
||||
- When done, run:
|
||||
|
||||
git flow release finish 'testrelease'
|
||||
|
||||
|
||||
|
||||
-->
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="feature-start"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="scrollblock">
|
||||
<div class="col-1">
|
||||
<h3>Finish up a feature</h3>
|
||||
|
||||
<p>
|
||||
Finish the development of a feature.
|
||||
This action performs the following
|
||||
</p>
|
||||
<ul>
|
||||
<li>Merged MYFEATURE into 'develop'</li>
|
||||
<li>Removes the feature branch</li>
|
||||
<li>Switches back to 'develop' branch</li>
|
||||
</ul>
|
||||
|
||||
<blockquote>
|
||||
<code>
|
||||
git-flow feature finish MYFEATURE
|
||||
</code>
|
||||
</blockquote>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="feature-end"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="scrollblock">
|
||||
<div class="col-1">
|
||||
<h3>Publish a feature</h3>
|
||||
|
||||
<p>
|
||||
Are you developing a feature in collaboration? <br/>
|
||||
Publish a feature to the remote server so it can be used by other users.
|
||||
</p>
|
||||
|
||||
<blockquote>
|
||||
<code>
|
||||
git-flow feature publish MYFEATURE
|
||||
</code>
|
||||
</blockquote>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="feature-publish"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="scrollblock">
|
||||
<div class="col-1">
|
||||
<h3>Getting a published feature</h3>
|
||||
|
||||
<p>
|
||||
Get a feature published by another user and track remote changes.
|
||||
</p>
|
||||
|
||||
<blockquote>
|
||||
<code>
|
||||
git-flow feature pull MYFEATURE
|
||||
</code>
|
||||
</blockquote>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="feature-pull"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="scrollblock" style="height: 900px;">
|
||||
<h2>Make a release</h2>
|
||||
|
||||
<ul>
|
||||
<li>Support preparation of a new production release</li>
|
||||
<li>Allow for minor bug fixes and preparing meta-data for a release</li>
|
||||
</ul>
|
||||
|
||||
<div class="col-1">
|
||||
<h3>Start a release</h3>
|
||||
|
||||
<p>To start a release, use the git flow release command. It</p>
|
||||
creates a release branch created from the 'develop' branch.
|
||||
</p>
|
||||
<blockquote>
|
||||
<code>
|
||||
git flow release start RELEASE [BASE]
|
||||
</code>
|
||||
</blockquote>
|
||||
<p>You can optionally supply a <code>[BASE]</code> commit sha-1 hash to start the release from. The commit must
|
||||
be on the
|
||||
'develop' branch.</p>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="release-start"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="scrollblock" style="height: 900px;">
|
||||
<div class="col-1">
|
||||
<h3>Finish up a release</h3>
|
||||
|
||||
<p>Finishing a release is one of the big steps in git branching. It performs several actions:</p>
|
||||
<ul>
|
||||
<li>Merges the release branch back into 'master'</li>
|
||||
<li>Tags the release with it's name</li>
|
||||
<li>Back-merges the release into 'develop'</li>
|
||||
<li>Removes the release branch</li>
|
||||
</ul>
|
||||
<blockquote>
|
||||
<code>
|
||||
git flow release finish RELEASE
|
||||
</code>
|
||||
</blockquote>
|
||||
|
||||
<p>It's wise to publish a finished release after finishing it. Do it similar to feature publishing with the
|
||||
command:</p>
|
||||
<blockquote>
|
||||
<code>
|
||||
git flow release publish RELEASE
|
||||
</code>
|
||||
</blockquote>
|
||||
<p>(You can track a remote release with the <br/><code>git flow release track RELEASE</code> command)</p>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="release-end"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="scrollblock" style="height: 800px;">
|
||||
<h2>Hotfixes</h2>
|
||||
|
||||
<ul>
|
||||
<li>Hotfixes arise from the necessity to act immediately upon an undesired state of a live production version
|
||||
</li>
|
||||
<li>May be branched off from the corresponding tag on the master branch that marks the production version.</li>
|
||||
</ul>
|
||||
|
||||
<div class="col-1">
|
||||
<h3>git flow hotfix start</h3>
|
||||
|
||||
<p>Like the other git flow commands, a hotfix is started with</p>
|
||||
<blockquote>
|
||||
<code>
|
||||
git flow hotfix start RELEASE
|
||||
</code>
|
||||
</blockquote>
|
||||
<p>The release argument hereby marks the faulty production release</p>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="hotfix-start"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="scrollblock">
|
||||
<div class="col-1">
|
||||
<h3>Finish a hotfix</h3>
|
||||
|
||||
<p>By finishing a hotfix it gets merged back into develp and master. Additionally the master merge ist tagged.</p>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="hotfix-end"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class="col-1"></div>
|
||||
<div class="col-2">
|
||||
<div class="lines-close"></div>
|
||||
<div class="lines-small-end"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="scrollblock">
|
||||
<h2>Backlog</h2>
|
||||
<ul>
|
||||
<li>Not all available commands are covered here, only the most important ones</li>
|
||||
<li>You can still use git and all its commands normally as you know them, git flow is only a tooling
|
||||
collection
|
||||
</li>
|
||||
<li>The 'support' feature is still beta, using it is not advised</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<div class="scrollblock">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
|
||||
var disqus_shortname = 'gitflowcheatsheet'; // required: replace example with your forum shortname
|
||||
|
||||
/* * * DON'T EDIT BELOW THIS LINE * * */
|
||||
(function () {
|
||||
var dsq = document.createElement('script');
|
||||
dsq.type = 'text/javascript';
|
||||
dsq.async = true;
|
||||
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
|
||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
||||
})();
|
||||
</script>
|
||||
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
4
js/jquery-1.7.2.min.js
vendored
@ -1,518 +0,0 @@
|
||||
/*
|
||||
scrollorama - The jQuery plugin for doing cool scrolly stuff
|
||||
by John Polacek (@johnpolacek)
|
||||
|
||||
Dual licensed under MIT and GPL.
|
||||
*/
|
||||
|
||||
(function($) {
|
||||
$.scrollorama = function(options) {
|
||||
var scrollorama = this,
|
||||
blocks = [],
|
||||
browserPrefix = '',
|
||||
onBlockChange = function() {},
|
||||
latestKnownScrollY = 0,
|
||||
ticking = false,
|
||||
requestAnimFrame = window.requestAnimationFrame ||
|
||||
window.webkitRequestAnimationFrame ||
|
||||
window.mozRequestAnimationFrame ||
|
||||
window.oRequestAnimationFrame ||
|
||||
window.msRequestAnimationFrame ||
|
||||
function( callback ){
|
||||
window.setTimeout(callback, 1000 / 60);
|
||||
},
|
||||
defaults = {offset:0, enablePin: true};
|
||||
|
||||
scrollorama.settings = $.extend({}, defaults, options);
|
||||
scrollorama.blockIndex = 0;
|
||||
|
||||
if (options.blocks === undefined) { alert('ERROR: Must assign blocks class selector to scrollorama plugin'); }
|
||||
|
||||
// PRIVATE FUNCTIONS
|
||||
function init() {
|
||||
var i, block, didScroll = false;
|
||||
if (typeof scrollorama.settings.blocks === 'string') { scrollorama.settings.blocks = $(scrollorama.settings.blocks); }
|
||||
|
||||
// set browser prefix
|
||||
if ($.browser.mozilla) { browserPrefix = '-moz-'; }
|
||||
if ($.browser.webkit) { browserPrefix = '-webkit-'; }
|
||||
if ($.browser.opera) { browserPrefix = '-o-'; }
|
||||
if ($.browser.msie) { browserPrefix = '-ms-'; }
|
||||
|
||||
// create blocks array to contain animation props
|
||||
$('body').css('position','relative');
|
||||
for (i=0; i<scrollorama.settings.blocks.length; i++) {
|
||||
block = scrollorama.settings.blocks.eq(i);
|
||||
blocks.push({
|
||||
block: block,
|
||||
top: block.offset().top - parseInt(block.css('margin-top'), 10),
|
||||
pin: 0,
|
||||
animations:[]
|
||||
});
|
||||
}
|
||||
|
||||
// convert block elements to absolute position
|
||||
if (scrollorama.settings.enablePin.toString() === 'true') {
|
||||
for (i=0; i<blocks.length; i++) {
|
||||
blocks[i].block
|
||||
.css('position', 'absolute')
|
||||
.css('top', blocks[i].top);
|
||||
}
|
||||
}
|
||||
|
||||
$('body').prepend('<div id="scroll-wrap"></div>');
|
||||
|
||||
latestKnownScrollY = 0;
|
||||
ticking = false;
|
||||
$(window).on( 'scroll.scrollorama', onScroll );
|
||||
}
|
||||
|
||||
function onScroll() {
|
||||
latestKnownScrollY = window.scrollY;
|
||||
requestTick();
|
||||
}
|
||||
|
||||
function requestTick() {
|
||||
if(!ticking) {
|
||||
requestAnimFrame(function(){
|
||||
onScrollorama();
|
||||
update();
|
||||
});
|
||||
}
|
||||
ticking = true;
|
||||
}
|
||||
|
||||
function update() {
|
||||
// reset the tick so we can
|
||||
// capture the next onScroll
|
||||
ticking = false;
|
||||
}
|
||||
|
||||
function onScrollorama() {
|
||||
var scrollTop = $(window).scrollTop(),
|
||||
currBlockIndex = getCurrBlockIndex(scrollTop),
|
||||
i, j, anim, startAnimPos, endAnimPos, animPercent, animVal;
|
||||
|
||||
// update all animations
|
||||
for (i=0; i<blocks.length; i++) {
|
||||
|
||||
// go through the animations for each block
|
||||
if (blocks[i].animations.length) {
|
||||
for (j=0; j<blocks[i].animations.length; j++) {
|
||||
anim = blocks[i].animations[j];
|
||||
|
||||
// if above current block, settings should be at start value
|
||||
if (i > currBlockIndex) {
|
||||
if (currBlockIndex !== i-1 && anim.baseline !== 'bottom') {
|
||||
setProperty(anim.element, anim.property, anim.startVal);
|
||||
}
|
||||
if (blocks[i].pin) {
|
||||
blocks[i].block
|
||||
.css('position', 'absolute')
|
||||
.css('top', blocks[i].top);
|
||||
}
|
||||
}
|
||||
|
||||
// if below current block, settings should be at end value
|
||||
// unless on an element that gets animated when it hits the bottom of the viewport
|
||||
else if (i < currBlockIndex) {
|
||||
setProperty(anim.element, anim.property, anim.endVal);
|
||||
if (blocks[i].pin) {
|
||||
blocks[i].block
|
||||
.css('position', 'absolute')
|
||||
.css('top', (blocks[i].top + blocks[i].pin));
|
||||
}
|
||||
}
|
||||
|
||||
// otherwise, set values per scroll position
|
||||
if (i === currBlockIndex || (currBlockIndex === i-1 && anim.baseline === 'bottom')) {
|
||||
// if block gets pinned, set position fixed
|
||||
if (blocks[i].pin && currBlockIndex === i) {
|
||||
blocks[i].block
|
||||
.css('position', 'fixed')
|
||||
.css('top', 0);
|
||||
}
|
||||
|
||||
// set start and end animation positions
|
||||
startAnimPos = blocks[i].top + anim.delay;
|
||||
if (anim.baseline === 'bottom') { startAnimPos -= $(window).height(); }
|
||||
endAnimPos = startAnimPos + anim.duration;
|
||||
|
||||
// if scroll is before start of animation, set to start value
|
||||
if (scrollTop < startAnimPos) {
|
||||
setProperty(anim.element, anim.property, anim.startVal);
|
||||
}
|
||||
|
||||
// if scroll is after end of animation, set to end value
|
||||
else if (scrollTop > endAnimPos) {
|
||||
setProperty(anim.element, anim.property, anim.endVal);
|
||||
if (blocks[i].pin) {
|
||||
blocks[i].block
|
||||
.css('position', 'absolute')
|
||||
.css('top', (blocks[i].top + blocks[i].pin));
|
||||
}
|
||||
}
|
||||
|
||||
// otherwise, set value based on scroll
|
||||
else {
|
||||
// calculate percent to animate
|
||||
animPercent = (scrollTop - startAnimPos) / anim.duration;
|
||||
// account for easing if there is any
|
||||
if ( anim.easing && $.isFunction( $.easing[anim.easing] ) ) {
|
||||
animPercent = $.easing[anim.easing]( animPercent, animPercent*1000, 0, 1, 1000 );
|
||||
}
|
||||
// then multiply the percent by the value range and calculate the new value
|
||||
animVal = anim.startVal + (animPercent * (anim.endVal - anim.startVal));
|
||||
setProperty(anim.element, anim.property, animVal);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// update blockIndex and trigger event if changed
|
||||
if (scrollorama.blockIndex !== currBlockIndex) {
|
||||
scrollorama.blockIndex = currBlockIndex;
|
||||
onBlockChange();
|
||||
}
|
||||
}
|
||||
|
||||
function getCurrBlockIndex(scrollTop) {
|
||||
var currBlockIndex = 0, i;
|
||||
for (i=0; i<blocks.length; i++) {
|
||||
// check if block is in view
|
||||
if (blocks[i].top <= scrollTop - scrollorama.settings.offset) { currBlockIndex = i; }
|
||||
}
|
||||
return currBlockIndex;
|
||||
}
|
||||
|
||||
function setProperty(target, prop, val) {
|
||||
var scaleCSS, currentPosition;
|
||||
if (prop === 'rotate' || prop === 'zoom' || prop === 'scale') {
|
||||
if (prop === 'rotate') {
|
||||
target.css(browserPrefix+'transform', 'rotate('+val+'deg)');
|
||||
} else if (prop === 'zoom' || prop === 'scale') {
|
||||
scaleCSS = 'scale('+val+')';
|
||||
if (browserPrefix !== '-ms-') {
|
||||
target.css(browserPrefix+'transform', scaleCSS);
|
||||
} else {
|
||||
target.css('zoom', scaleCSS);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(prop === 'background-position-x' || prop === 'background-position-y' ) {
|
||||
currentPosition = target.css('background-position').split(' ');
|
||||
if(prop === 'background-position-x') {
|
||||
target.css('background-position',val+'px '+currentPosition[1]);
|
||||
}
|
||||
if(prop === 'background-position-y') {
|
||||
target.css('background-position', currentPosition[0]+' '+val+'px');
|
||||
}
|
||||
}
|
||||
else if(prop === 'text-shadow' ) {
|
||||
target.css(prop,'0px 0px '+val+'px #ffffff');
|
||||
} else {
|
||||
target.css(prop, val);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// PUBLIC FUNCTIONS
|
||||
scrollorama.animate = function(target) {
|
||||
var targetIndex,
|
||||
targetBlock,
|
||||
anim,
|
||||
offset,
|
||||
i, j;
|
||||
/*
|
||||
target = animation target
|
||||
arguments = array of animation parameters
|
||||
anim = object that contains all animation params (created from arguments)
|
||||
offset = positioning helper for pinning
|
||||
|
||||
animation parameters:
|
||||
delay = amount of scrolling (in pixels) before animation starts
|
||||
duration = amount of scrolling (in pixels) over which the animation occurs
|
||||
property = css property being animated
|
||||
start = start value of the property
|
||||
end = end value of the property
|
||||
pin = pin block during animation duration (applies to all animations within block)
|
||||
baseline = top (default, when block reaches top of viewport) or bottom (when block first comies into view)
|
||||
easing = just like jquery's easing functions
|
||||
*/
|
||||
|
||||
// if string, convert to DOM object
|
||||
if (typeof target === 'string') { target = $(target); }
|
||||
|
||||
// find block of target
|
||||
for (i=0; i<blocks.length; i++) {
|
||||
if (blocks[i].block.has(target).length) {
|
||||
targetBlock = blocks[i];
|
||||
targetIndex = i;
|
||||
}
|
||||
}
|
||||
|
||||
// add each animation to the blocks animations array from function arguments
|
||||
for (i=1; i<arguments.length; i++) {
|
||||
|
||||
anim = arguments[i];
|
||||
|
||||
// for top/left/right/bottom, set relative positioning if static
|
||||
if (anim.property === 'top' || anim.property === 'left' || anim.property === 'bottom' || anim.property === 'right' ) {
|
||||
if (target.css('position') === 'static') { target.css('position','relative'); }
|
||||
// set anim.start, anim.end defaults
|
||||
cssValue = parseInt(target.css(anim.property),10);
|
||||
if (anim.start === undefined) {
|
||||
anim.start = isNaN(cssValue) ? 0 : cssValue;
|
||||
} else if (anim.end === undefined) {
|
||||
anim.end = isNaN(cssValue) ? 0 : cssValue;
|
||||
}
|
||||
}
|
||||
|
||||
// set anim.start/anim.end defaults for rotate, zoom/scale, letter-spacing
|
||||
if (anim.property === 'rotate') {
|
||||
if (anim.start === undefined) { anim.start = 0; }
|
||||
if (anim.end === undefined) { anim.end = 0; }
|
||||
} else if (anim.property === 'zoom' || anim.property === 'scale' ) {
|
||||
if (anim.start === undefined) { anim.start = 1; }
|
||||
if (anim.end === undefined) { anim.end = 1; }
|
||||
} else if (anim.property === 'letter-spacing' && target.css(anim.property)) {
|
||||
if (anim.start === undefined) { anim.start = 1; }
|
||||
if (anim.end === undefined) { anim.end = 1; }
|
||||
}
|
||||
|
||||
if (anim.baseline === undefined) {
|
||||
if (anim.pin || targetBlock.pin || targetIndex === 0) {
|
||||
anim.baseline = 'top';
|
||||
} else {
|
||||
anim.baseline = 'bottom';
|
||||
}
|
||||
}
|
||||
|
||||
if (anim.delay === undefined) { anim.delay = 0; }
|
||||
|
||||
targetBlock.animations.push({
|
||||
element: target,
|
||||
delay: anim.delay,
|
||||
duration: anim.duration,
|
||||
property: anim.property,
|
||||
startVal: anim.start !== undefined ? anim.start : parseInt(target.css(anim.property),10), // if undefined, use current css value
|
||||
endVal: anim.end !== undefined ? anim.end : parseInt(target.css(anim.property),10), // if undefined, use current css value
|
||||
baseline: anim.baseline !== undefined ? anim.baseline : 'bottom',
|
||||
easing: anim.easing
|
||||
});
|
||||
|
||||
if (anim.pin) {
|
||||
if (targetBlock.pin < anim.duration + anim.delay) {
|
||||
offset = anim.duration + anim.delay - targetBlock.pin;
|
||||
targetBlock.pin += offset;
|
||||
|
||||
// adjust positions of blocks below target block
|
||||
for (j=targetIndex+1; j<blocks.length; j++) {
|
||||
blocks[j].top += offset;
|
||||
blocks[j].block.css('top', blocks[j].top);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onScrollorama();
|
||||
};
|
||||
|
||||
// function for passing blockChange event callback
|
||||
scrollorama.onBlockChange = function(f) {
|
||||
onBlockChange = f;
|
||||
};
|
||||
|
||||
// function for getting an array of scrollpoints
|
||||
// (top of each animation block and animation element scroll start point)
|
||||
scrollorama.getScrollpoints = function() {
|
||||
var scrollpoints = [],i,j,anim;
|
||||
for (i=0; i<blocks.length; i++) {
|
||||
scrollpoints.push(blocks[i].top);
|
||||
// go through the animations for each block
|
||||
if (blocks[i].animations.length && blocks[i].pin > 0) {
|
||||
for (j=0; j<blocks[i].animations.length; j++) {
|
||||
anim = blocks[i].animations[j];
|
||||
scrollpoints.push(blocks[i].top + anim.delay + anim.duration);
|
||||
}
|
||||
}
|
||||
}
|
||||
// make sure scrollpoints are in numeric order
|
||||
scrollpoints.sort(function(a,b) {return a - b;});
|
||||
return scrollpoints;
|
||||
};
|
||||
|
||||
// Remove scrollorama
|
||||
scrollorama.destroy = function () {
|
||||
// Remove animations
|
||||
for (i=0; i<blocks.length; i++) {
|
||||
// Remove CSS rules
|
||||
blocks[i].block.css({
|
||||
top: '',
|
||||
position: ''
|
||||
});
|
||||
|
||||
// Remove scrolloroma-specific attributes
|
||||
delete blocks[i].animations;
|
||||
delete blocks[i].top;
|
||||
delete blocks[i].pin;
|
||||
}
|
||||
|
||||
// Unbind the window scroll event
|
||||
$(window).off('scroll.scrollorama');
|
||||
$('#scroll-wrap').remove();
|
||||
|
||||
// Remove the scrolloroma object
|
||||
delete scrollorama;
|
||||
};
|
||||
|
||||
|
||||
// INIT
|
||||
init();
|
||||
|
||||
return scrollorama;
|
||||
};
|
||||
|
||||
//
|
||||
// Easing functions from jQuery UI
|
||||
//
|
||||
$.extend($.easing, {
|
||||
def: 'easeOutQuad',
|
||||
swing: function (x, t, b, c, d) {
|
||||
//alert($.easing.default);
|
||||
return $.easing[$.easing.def](x, t, b, c, d);
|
||||
},
|
||||
easeInQuad: function (x, t, b, c, d) {
|
||||
return c*(t/=d)*t + b;
|
||||
},
|
||||
easeOutQuad: function (x, t, b, c, d) {
|
||||
return -c *(t/=d)*(t-2) + b;
|
||||
},
|
||||
easeInOutQuad: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) { return c/2*t*t + b; }
|
||||
return -c/2 * ((--t)*(t-2) - 1) + b;
|
||||
},
|
||||
easeInCubic: function (x, t, b, c, d) {
|
||||
return c*(t/=d)*t*t + b;
|
||||
},
|
||||
easeOutCubic: function (x, t, b, c, d) {
|
||||
return c*((t=t/d-1)*t*t + 1) + b;
|
||||
},
|
||||
easeInOutCubic: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) { return c/2*t*t*t + b; }
|
||||
return c/2*((t-=2)*t*t + 2) + b;
|
||||
},
|
||||
easeInQuart: function (x, t, b, c, d) {
|
||||
return c*(t/=d)*t*t*t + b;
|
||||
},
|
||||
easeOutQuart: function (x, t, b, c, d) {
|
||||
return -c * ((t=t/d-1)*t*t*t - 1) + b;
|
||||
},
|
||||
easeInOutQuart: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) { return c/2*t*t*t*t + b; }
|
||||
return -c/2 * ((t-=2)*t*t*t - 2) + b;
|
||||
},
|
||||
easeInQuint: function (x, t, b, c, d) {
|
||||
return c*(t/=d)*t*t*t*t + b;
|
||||
},
|
||||
easeOutQuint: function (x, t, b, c, d) {
|
||||
return c*((t=t/d-1)*t*t*t*t + 1) + b;
|
||||
},
|
||||
easeInOutQuint: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) { return c/2*t*t*t*t*t + b; }
|
||||
return c/2*((t-=2)*t*t*t*t + 2) + b;
|
||||
},
|
||||
easeInSine: function (x, t, b, c, d) {
|
||||
return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
|
||||
},
|
||||
easeOutSine: function (x, t, b, c, d) {
|
||||
return c * Math.sin(t/d * (Math.PI/2)) + b;
|
||||
},
|
||||
easeInOutSine: function (x, t, b, c, d) {
|
||||
return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
|
||||
},
|
||||
easeInExpo: function (x, t, b, c, d) {
|
||||
return (t===0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
|
||||
},
|
||||
easeOutExpo: function (x, t, b, c, d) {
|
||||
return (t===d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
|
||||
},
|
||||
easeInOutExpo: function (x, t, b, c, d) {
|
||||
if (t===0) { return b; }
|
||||
if (t===d) { return b+c; }
|
||||
if ((t/=d/2) < 1) { return c/2 * Math.pow(2, 10 * (t - 1)) + b; }
|
||||
return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
|
||||
},
|
||||
easeInCirc: function (x, t, b, c, d) {
|
||||
return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
|
||||
},
|
||||
easeOutCirc: function (x, t, b, c, d) {
|
||||
return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
|
||||
},
|
||||
easeInOutCirc: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) { return -c/2 * (Math.sqrt(1 - t*t) - 1) + b; }
|
||||
return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
|
||||
},
|
||||
easeInElastic: function (x, t, b, c, d) {
|
||||
var s=1.70158,p=0,a=c;
|
||||
if (t===0) { return b; }
|
||||
if ((t/=d)===1) { return b+c; }
|
||||
if (!p) { p=d*0.3; }
|
||||
if (a < Math.abs(c)) { a=c; s=p/4; }
|
||||
else{ s = p/(2*Math.PI) * Math.asin (c/a); }
|
||||
return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
|
||||
},
|
||||
easeOutElastic: function (x, t, b, c, d) {
|
||||
var s=1.70158,p=0,a=c;
|
||||
if (t===0) { return b; }
|
||||
if ((t/=d)===1) { return b+c; }
|
||||
if (!p) { p=d*0.3; }
|
||||
if (a < Math.abs(c)) { a=c; s=p/4; }
|
||||
else { s = p/(2*Math.PI) * Math.asin (c/a); }
|
||||
return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
|
||||
},
|
||||
easeInOutElastic: function (x, t, b, c, d) {
|
||||
var s=1.70158,p=0,a=c;
|
||||
if (t===0) { return b; }
|
||||
if ((t/=d/2)===2) { return b+c; }
|
||||
if (!p) { p=d*(0.3*1.5); }
|
||||
if (a < Math.abs(c)) { a=c; s=p/4; }
|
||||
else { s = p/(2*Math.PI) * Math.asin (c/a); }
|
||||
if (t < 1) { return -0.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; }
|
||||
return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*0.5 + c + b;
|
||||
},
|
||||
easeInBack: function (x, t, b, c, d, s) {
|
||||
if (s === undefined) { s = 1.70158; }
|
||||
return c*(t/=d)*t*((s+1)*t - s) + b;
|
||||
},
|
||||
easeOutBack: function (x, t, b, c, d, s) {
|
||||
if (s === undefined) { s = 1.70158; }
|
||||
return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
|
||||
},
|
||||
easeInOutBack: function (x, t, b, c, d, s) {
|
||||
if (s === undefined) { s = 1.70158; }
|
||||
if ((t/=d/2) < 1) { return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; }
|
||||
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
|
||||
},
|
||||
easeInBounce: function (x, t, b, c, d) {
|
||||
return c - $.easing.easeOutBounce (x, d-t, 0, c, d) + b;
|
||||
},
|
||||
easeOutBounce: function (x, t, b, c, d) {
|
||||
if ((t/=d) < (1/2.75)) {
|
||||
return c*(7.5625*t*t) + b;
|
||||
} else if (t < (2/2.75)) {
|
||||
return c*(7.5625*(t-=(1.5/2.75))*t + 0.75) + b;
|
||||
} else if (t < (2.5/2.75)) {
|
||||
return c*(7.5625*(t-=(2.25/2.75))*t + 0.9375) + b;
|
||||
} else {
|
||||
return c*(7.5625*(t-=(2.625/2.75))*t + 0.984375) + b;
|
||||
}
|
||||
},
|
||||
easeInOutBounce: function (x, t, b, c, d) {
|
||||
if (t < d/2) { return $.easing.easeInBounce (x, t*2, 0, c, d) * 0.5 + b; }
|
||||
return $.easing.easeOutBounce (x, t*2-d, 0, c, d) * 0.5 + c*0.5 + b;
|
||||
}
|
||||
});
|
||||
|
||||
})(jQuery);
|