forked from zurb/twentytwenty
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
executable file
·89 lines (79 loc) · 3.14 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>twentytwenty by Mark Hayes</title>
<link rel="stylesheet" href="demo/css/styles.css">
<meta name="viewport" content="width=device-width">
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script src="demo/js/angular.min.js"></script>
<script src="dist/angular-twentytwenty.js"></script>
<script>
var app = angular.module('twentytwenty-demo', ['tt']);
app.controller('DemoCtrl', function($scope) {
$scope.orientation = 'vertical';
});
</script>
</head>
<body ng-app="twentytwenty-demo">
<div class="wrapper">
<header>
<h1>twentytwenty</h1>
<p>The easiest way to highlight the differences between 2 images</p>
<p class="view"><a href="http://github.com/orderedlist/minimal">View the Project on GitHub <small>mhayes/twentytwenty</small></a></p>
<ul>
<li><a href="https://github.com/mhayes/twentytwenty/zipball/master">Download <strong>ZIP File</strong></a></li>
<li><a href="https://github.com/mhayes/twentytwenty/tarball/master">Download <strong>TAR Ball</strong></a></li>
<li><a href="http://github.com/mhayes/twentytwenty">Fork On <strong>GitHub</strong></a></li>
</ul>
</header>
<section ng-controller="DemoCtrl">
<twentytwenty
before="demo/img/1_1.jpg"
after="demo/img/1_2.jpg"
orientation="{{orientation}}">
</twentytwenty>
<small>Copyright <a href="http://www.boredpanda.com/before-after-childhood-photo-recreation/?image_id=recreation-childhood-photos-before-after-10.jpg" rel="nofollow">BoredPanda</a></small>
<hr>
<p>twentytwenty works with AngularJS and jQuery. To use the plugin just include the plugin like so:</p>
<h3>AngularJS</h3>
<pre><code><script src='angular.min.js'></script>
// Add twentytwenty after AngularJS
<script src='angular-twentytwenty.min.js'></script>
</code></pre>
<p>Then in your markup just add:</p>
<pre><code><twentytwenty
before='path/to/before.jpg'
after='path/to/after.jpg'>
</twentytwenty>
</code></pre>
<h3>jQuery</h3>
<pre><code><script src='jquery.min.js'></script>
// Add twentytwenty after jQuery
<script src='jquery.twentytwenty.min.js'></script>
</code></pre>
<p>Then in your markup just add:</p>
<pre><code><div class="twentytwenty-container">
<img src="img/1_1.jpg" />
<img src="img/1_2.jpg" />
</div>
</code></pre>
<p>And initialize like so:</p>
<pre><code><script>
$(function(){
$(".twentytwenty-container").twentytwenty();
});
</script>
</code></pre>
</section>
<footer>
<p>This project is maintained by <a href="http://github.com/mhayes">Mark Hayes</a></p>
<p><small>Hosted on GitHub Pages — Theme by <a href="https://github.com/orderedlist">orderedlist</a></small></p>
</footer>
</div>
<script src="demo/js/scale.fix.js"></script>
</body>
</html>