best 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (128) hide show
  1. data/README.md +19 -0
  2. data/framework/best/best.rb +32 -0
  3. data/framework/best/stylesheets/_best.scss +15 -0
  4. data/framework/best/stylesheets/best/_button.scss +49 -0
  5. data/framework/best/stylesheets/best/_effects.scss +5 -0
  6. data/framework/best/stylesheets/best/_form.scss +6 -0
  7. data/framework/best/stylesheets/best/_layout.scss +7 -0
  8. data/framework/best/stylesheets/best/_navigation.scss +8 -0
  9. data/framework/best/stylesheets/best/_reset.scss +4 -0
  10. data/framework/best/stylesheets/best/_utilities.scss +4 -0
  11. data/framework/best/stylesheets/best/effects/_iterative.scss +15 -0
  12. data/framework/best/stylesheets/best/effects/_keyframes.scss +121 -0
  13. data/framework/best/stylesheets/best/form/_form-layout.scss +120 -0
  14. data/framework/best/stylesheets/best/form/_form-style.scss +41 -0
  15. data/framework/best/stylesheets/best/form/_form-validation.scss +25 -0
  16. data/framework/best/stylesheets/best/layout/_dl-horizontal.scss +32 -0
  17. data/framework/best/stylesheets/best/layout/_equal-heights.scss +70 -0
  18. data/framework/best/stylesheets/best/layout/_layout-center.scss +20 -0
  19. data/framework/best/stylesheets/best/layout/_mediablock.scss +34 -0
  20. data/framework/best/stylesheets/best/navigation/_navigation-breadcrumb.scss +59 -0
  21. data/framework/best/stylesheets/best/navigation/_navigation-dropdown.scss +39 -0
  22. data/framework/best/stylesheets/best/navigation/_navigation-horizontal.scss +34 -0
  23. data/framework/best/stylesheets/best/navigation/_navigation.scss +28 -0
  24. data/framework/best/stylesheets/best/navigation/_tinynav.scss +18 -0
  25. data/framework/best/stylesheets/best/reset/_normalize.scss +376 -0
  26. data/framework/best/stylesheets/best/utilities/_em.scss +6 -0
  27. data/template/breakpoints.html +89 -0
  28. data/template/codekit-config.json +1142 -0
  29. data/template/colors.html +115 -0
  30. data/template/components/custom-select/arrow.gif +0 -0
  31. data/template/components/custom-select/custom-select.css +23 -0
  32. data/template/components/custom-select/custom-select.html +31 -0
  33. data/template/components/custom-select/custom-select.js +9 -0
  34. data/template/components/custom-select/customSelect.jquery.js +56 -0
  35. data/template/components/custom-select/customSelect.jquery.min.js +1 -0
  36. data/template/components/dropdown/dropdown.css +54 -0
  37. data/template/components/dropdown/dropdown.html +34 -0
  38. data/template/components/dropdown/dropdown.js +50 -0
  39. data/template/components/example component/component.css +5 -0
  40. data/template/components/example component/component.html +13 -0
  41. data/template/components/example component/component.js b/data/template/components/example → component/component.js +0 -0
  42. data/template/components/fancybox/CHANGELOG.md +115 -0
  43. data/template/components/fancybox/README.md +217 -0
  44. data/template/components/fancybox/component.json +8 -0
  45. data/template/components/fancybox/demo/1_b.jpg +0 -0
  46. data/template/components/fancybox/demo/1_s.jpg +0 -0
  47. data/template/components/fancybox/demo/2_b.jpg +0 -0
  48. data/template/components/fancybox/demo/2_s.jpg +0 -0
  49. data/template/components/fancybox/demo/3_b.jpg +0 -0
  50. data/template/components/fancybox/demo/3_s.jpg +0 -0
  51. data/template/components/fancybox/demo/4_b.jpg +0 -0
  52. data/template/components/fancybox/demo/4_s.jpg +0 -0
  53. data/template/components/fancybox/demo/5_b.jpg +0 -0
  54. data/template/components/fancybox/demo/5_s.jpg +0 -0
  55. data/template/components/fancybox/demo/ajax.txt +15 -0
  56. data/template/components/fancybox/demo/iframe.html +26 -0
  57. data/template/components/fancybox/demo/index.html +307 -0
  58. data/template/components/fancybox/lib/jquery-1.8.2.min.js +2 -0
  59. data/template/components/fancybox/lib/jquery.mousewheel-3.0.6.pack.js +13 -0
  60. data/template/components/fancybox/source/blank.gif +0 -0
  61. data/template/components/fancybox/source/fancybox_loading.gif +0 -0
  62. data/template/components/fancybox/source/fancybox_overlay.png +0 -0
  63. data/template/components/fancybox/source/fancybox_sprite.png +0 -0
  64. data/template/components/fancybox/source/helpers/fancybox_buttons.png +0 -0
  65. data/template/components/fancybox/source/helpers/jquery.fancybox-buttons.css +96 -0
  66. data/template/components/fancybox/source/helpers/jquery.fancybox-buttons.js +121 -0
  67. data/template/components/fancybox/source/helpers/jquery.fancybox-media.js +196 -0
  68. data/template/components/fancybox/source/helpers/jquery.fancybox-thumbs.css +54 -0
  69. data/template/components/fancybox/source/helpers/jquery.fancybox-thumbs.js +162 -0
  70. data/template/components/fancybox/source/jquery.fancybox.css +249 -0
  71. data/template/components/fancybox/source/jquery.fancybox.js +1985 -0
  72. data/template/components/fancybox/source/jquery.fancybox.pack.js +45 -0
  73. data/template/components/jquery/component.json +14 -0
  74. data/template/components/jquery/composer.json +23 -0
  75. data/template/components/jquery/jquery.js +9472 -0
  76. data/template/components/jquery/jquery.min.js +2 -0
  77. data/template/config.rb +25 -0
  78. data/template/css/style.css +1094 -0
  79. data/template/fancybox.html +118 -0
  80. data/template/forms.html +132 -0
  81. data/template/grid.html +122 -0
  82. data/template/index.html +116 -0
  83. data/template/jade/--- from cybex as inspiration/keyvisuals.jade +37 -0
  84. data/template/jade/--- from cybex as inspiration/m-carousel.jade +37 -0
  85. data/template/jade/--- from cybex as inspiration/m-faq.jade +23 -0
  86. data/template/jade/--- from cybex as inspiration/m-keyvisual.jade +55 -0
  87. data/template/jade/--- from cybex as inspiration/m-search.jade +3 -0
  88. data/template/jade/--- from cybex as inspiration/m-slideshow.jade +12 -0
  89. data/template/jade/--- from cybex as inspiration/m-social.jade +10 -0
  90. data/template/jade/breakpoints.jade +26 -0
  91. data/template/jade/colors.jade +32 -0
  92. data/template/jade/fancybox.jade +34 -0
  93. data/template/jade/forms.jade +39 -0
  94. data/template/jade/grid.jade +36 -0
  95. data/template/jade/includes/module-development.jade +1 -0
  96. data/template/jade/includes/nav-development.jade +27 -0
  97. data/template/jade/includes/nav-meta.jade +6 -0
  98. data/template/jade/includes/nav-primary.jade +5 -0
  99. data/template/jade/includes/nav-secondary.jade +18 -0
  100. data/template/jade/index.jade +33 -0
  101. data/template/jade/layouts/layout-footer.jade +5 -0
  102. data/template/jade/layouts/layout-header.jade +3 -0
  103. data/template/jade/layouts/layout-html5.jade +26 -0
  104. data/template/jade/layouts/layout-page.jade +40 -0
  105. data/template/jade/mixins/form-helpers.jade +10 -0
  106. data/template/jade/mixins/mixin-menu.jade +3 -0
  107. data/template/jade/typography.jade +38 -0
  108. data/template/js/footer.js +16 -0
  109. data/template/js/footer.min.js +3 -0
  110. data/template/js/header.js +1 -0
  111. data/template/js/header.min.js +3 -0
  112. data/template/js/main.js +18 -0
  113. data/template/js/main.min.js +1 -0
  114. data/template/js/vendor/jquery.flexslider.min.js +6 -0
  115. data/template/js/vendor/modernizr-custom.js +4 -0
  116. data/template/readme.md +6 -0
  117. data/template/sass/_base.scss +66 -0
  118. data/template/sass/_config.scss +58 -0
  119. data/template/sass/_labs.scss +4 -0
  120. data/template/sass/_layout.scss +26 -0
  121. data/template/sass/_m-breakpoints.scss +42 -0
  122. data/template/sass/_m-colors.scss +39 -0
  123. data/template/sass/_m-navigation.scss +43 -0
  124. data/template/sass/_m-offcanvas.scss +60 -0
  125. data/template/sass/_module.scss +63 -0
  126. data/template/sass/style.scss +38 -0
  127. data/template/typography.html +120 -0
  128. metadata +130 -3
@@ -0,0 +1,217 @@
1
+ fancyBox
2
+ ========
3
+
4
+ fancyBox is a tool that offers a nice and elegant way to add zooming functionality for images, html content and multi-media on your webpages.
5
+
6
+ More information and examples: http://www.fancyapps.com/fancybox/
7
+
8
+ License: http://www.fancyapps.com/fancybox/#license
9
+
10
+ Copyright (c) 2012 Janis Skarnelis - janis@fancyapps.com
11
+
12
+
13
+ How to use
14
+ ----------
15
+
16
+ To get started, download the plugin, unzip it and copy files to your website/application directory.
17
+ Load files in the <head> section of your HTML document. Make sure you also add the jQuery library.
18
+
19
+ <head>
20
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
21
+ <link rel="stylesheet" href="/fancybox/jquery.fancybox.css" type="text/css" media="screen" />
22
+ <script type="text/javascript" src="/fancybox/jquery.fancybox.pack.js"></script>
23
+ </head>
24
+
25
+ Create your links with a `title` if you want a title to be shown, and add a class:
26
+
27
+ <a href="large_image.jpg" class="fancybox" title="Sample title"><img src="small_image.jpg" /></a>
28
+
29
+ If you have a set of related items that you would like to group,
30
+ additionally include a group name in the `rel` (or `data-fancybox-group`) attribute:
31
+
32
+ <a href="large_1.jpg" class="fancybox" rel="gallery" title="Sample title 1"><img src="small_1.jpg" /></a>
33
+ <a href="large_2.jpg" class="fancybox" rel="gallery" title="Sample title 1"><img src="small_2.jpg" /></a>
34
+
35
+ Initialise the script like this:
36
+
37
+ <script>
38
+ $(document).ready(function() {
39
+ $('.fancybox').fancybox();
40
+ });
41
+ </script>
42
+
43
+ May also be passed an optional options object which will extend the default values. Example:
44
+
45
+ <script>
46
+ $(document).ready(function() {
47
+ $('.fancybox').fancybox({
48
+ padding : 0,
49
+ openEffect : 'elastic'
50
+ });
51
+ });
52
+ </script>
53
+
54
+ Tip: Automatically group and apply fancyBox to all images:
55
+
56
+ $("a[href$='.jpg'],a[href$='.jpeg'],a[href$='.png'],a[href$='.gif']").attr('rel', 'gallery').fancybox();
57
+
58
+ Script uses the `href` attribute of the matched elements to obtain the location of the content and to figure out content type you want to display.
59
+ You can specify type directly by adding classname (fancybox.image, fancybox.iframe, etc) or `data-fancybox-type` attribute:
60
+
61
+ //Ajax:
62
+ <a href="/example.html" class="fancybox fancybox.ajax">Example</a>
63
+ //or
64
+ <a href="/example.html" class="fancybox" data-fancybox-type="ajax">Example</a>
65
+
66
+ //Iframe:
67
+ <a href="example.html" class="fancybox fancybox.iframe">Example</a>
68
+
69
+ //Inline (will display an element with `id="example"`)
70
+ <a href="#example" class="fancybox">Example</a>
71
+
72
+ //SWF:
73
+ <a href="example.swf" class="fancybox">Example</a>
74
+
75
+ //Image:
76
+ <a href="example.jpg" class="fancybox">Example</a>
77
+
78
+ Note, ajax requests are subject to the [same origin policy](http://en.wikipedia.org/wiki/Same_origin_policy).
79
+ If fancyBox will not be able to get content type, it will try to guess based on 'href' and will quit silently if would not succeed.
80
+ (this is different from previsous versions where 'ajax' was used as default type or an error message was displayed).
81
+
82
+ Advanced
83
+ --------
84
+
85
+ ### Helpers
86
+
87
+ Helpers provide a simple mechanism to extend the capabilities of fancyBox. There are two built-in helpers - 'overlay' and 'title'.
88
+ You can disable them, set custom options or enable other helpers. Examples:
89
+
90
+ //Disable title helper
91
+ $(".fancybox").fancybox({
92
+ helpers: {
93
+ title: null
94
+ }
95
+ });
96
+
97
+ //Disable overlay helper
98
+ $(".fancybox").fancybox({
99
+ helpers: {
100
+ overlay : null
101
+ }
102
+ });
103
+
104
+ //Change title position and overlay color
105
+ $(".fancybox").fancybox({
106
+ helpers: {
107
+ title : {
108
+ type : 'inside'
109
+ },
110
+ overlay : {
111
+ css : {
112
+ 'background' : 'rgba(255,255,255,0.5)'
113
+ }
114
+ }
115
+ }
116
+ });
117
+
118
+ //Enable thumbnail helper and set custom options
119
+ $(".fancybox").fancybox({
120
+ helpers: {
121
+ thumbs : {
122
+ width: 50,
123
+ height: 50
124
+ }
125
+ }
126
+ });
127
+
128
+
129
+ ### API
130
+
131
+ Also available are event driven callback methods. The `this` keyword refers to the current or upcoming object (depends on callback method). Here is how you can change title:
132
+
133
+ $(".fancybox").fancybox({
134
+ beforeLoad : function() {
135
+ this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : '');
136
+
137
+ /*
138
+ "this.element" refers to current element, so you can, for example, use the "alt" attribute of the image to store the title:
139
+ this.title = $(this.element).find('img').attr('alt');
140
+ */
141
+ }
142
+ });
143
+
144
+ It`s possible to open fancyBox programmatically in various ways:
145
+
146
+ //HTML content:
147
+ $.fancybox( '<div><h1>Lorem Lipsum</h1><p>Lorem lipsum</p></div>', {
148
+ title : 'Custom Title'
149
+ });
150
+
151
+ //DOM element:
152
+ $.fancybox( $("#inline"), {
153
+ title : 'Custom Title'
154
+ });
155
+
156
+ //Custom object:
157
+ $.fancybox({
158
+ href: 'example.jpg',
159
+ title : 'Custom Title'
160
+ });
161
+
162
+ //Array of objects:
163
+ $.fancybox([
164
+ {
165
+ href: 'example1.jpg',
166
+ title : 'Custom Title 1'
167
+ },
168
+ {
169
+ href: 'example2.jpg',
170
+ title : 'Custom Title 2'
171
+ }
172
+ ], {
173
+ padding: 0
174
+ });
175
+
176
+ There are several methods that allow you to interact with and manipulate fancyBox, example:
177
+
178
+ //Close fancybox:
179
+ $.fancybox.close();
180
+
181
+ There is a simply way to access wrapping elements using JS:
182
+
183
+ $.fancybox.wrap
184
+ $.fancybox.skin
185
+ $.fancybox.outer
186
+ $.fancybox.inner
187
+
188
+ You can override CSS to customize the look. For example, make navigation arrows always visible,
189
+ change width and move them outside of area (use this snippet after including fancybox.css):
190
+
191
+ .fancybox-nav span {
192
+ visibility: visible;
193
+ }
194
+
195
+ .fancybox-nav {
196
+ width: 80px;
197
+ }
198
+
199
+ .fancybox-prev {
200
+ left: -80px;
201
+ }
202
+
203
+ .fancybox-next {
204
+ right: -80px;
205
+ }
206
+
207
+ In that case, you might want to increase space around box:
208
+
209
+ $(".fancybox").fancybox({
210
+ margin : [20, 60, 20, 60]
211
+ });
212
+
213
+
214
+ Bug tracker
215
+ -----------
216
+
217
+ Have a bug? Please create an issue on GitHub at https://github.com/fancyapps/fancyBox/issues
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "fancybox",
3
+ "version": "2.1.3",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "git://github.com/fancyapps/fancyBox.git"
7
+ }
8
+ }
@@ -0,0 +1,15 @@
1
+ <div style="max-width:700px;">
2
+ <h2>Lorem ipsum dolor sit amet3</h2>
3
+ <p>
4
+ <a href="javascript:jQuery.fancybox.close();">Close me</a>
5
+ </p>
6
+ <p>
7
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas fermentum ante et sapien dignissim in viverra magna feugiat. Donec tempus ipsum nec neque dignissim quis eleifend eros gravida. Praesent nisi massa, sodales quis tincidunt ac, semper quis risus. In suscipit nisl sed leo aliquet consequat. Integer vitae augue in risus porttitor pellentesque eu eget odio. Fusce ut sagittis quam. Morbi aliquam interdum blandit. Integer pharetra tempor velit, aliquam dictum justo tempus sed. Morbi congue fringilla justo a feugiat. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent quis metus et nisl consectetur pharetra. Nam bibendum turpis eu metus luctus eu volutpat sem molestie. Nam sollicitudin porttitor lorem, ac ultricies est venenatis eu. Ut dignissim elit et orci feugiat ac placerat purus euismod. Ut mi lorem, cursus et sagittis elementum, luctus ac massa.
8
+ </p>
9
+ <p>
10
+ Phasellus et ligula vel diam ullamcorper volutpat. Integer rhoncus rhoncus aliquam. Aliquam erat volutpat. Aenean luctus vestibulum placerat. Quisque quam neque, lacinia aliquet eleifend ac, aliquet blandit felis. Curabitur porta ultricies dui, sit amet mattis quam euismod a. Ut eleifend scelerisque neque, sit amet accumsan odio consequat ut. Proin facilisis auctor elit sed accumsan. Cras dapibus nisl in nisi rhoncus laoreet. Nullam pellentesque tortor libero, eget facilisis ipsum. Donec ultricies tellus tellus, in tincidunt purus. Nullam in est aliquam velit scelerisque blandit. In tincidunt, magna a dapibus imperdiet, quam urna elementum leo, vitae rhoncus nisl velit cursus velit. In dignissim sem ac mauris rhoncus ornare.
11
+ </p>
12
+ <p>
13
+ Duis imperdiet velit vel quam malesuada suscipit imperdiet tellus hendrerit. Mauris vestibulum odio mauris, ut placerat leo. Mauris quis neque at tellus feugiat congue id non enim. Nam vehicula posuere nulla eget vehicula. Donec pretium purus nec ligula porta eu laoreet sapien venenatis. Nulla facilisi. Phasellus eget mi enim. Phasellus molestie tincidunt ultrices. Aenean id sem a tellus lobortis tincidunt. Nam laoreet nulla vel velit tincidunt ac rutrum libero malesuada. Nulla consequat dolor quis nisl tempor fermentum. Integer sodales pretium varius. Aenean a leo vitae odio dictum dignissim malesuada nec dolor. Phasellus adipiscing viverra est, ac sagittis libero sagittis quis. Sed interdum dapibus nunc et fringilla. Nunc vel velit et urna laoreet bibendum.
14
+ </p>
15
+ </div>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>fancyBox - iframe demo</title>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6
+ </head>
7
+ <body>
8
+ <h1>fancyBox - iframe demo</h1>
9
+
10
+ <p>
11
+ <a href="javascript:parent.jQuery.fancybox.close();">Close iframe parent</a>
12
+
13
+ |
14
+
15
+ <a href="javascript:parent.jQuery.fancybox.open({href : '1_b.jpg', title : 'My title'});">Change content</a>
16
+ </p>
17
+
18
+ <p>
19
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam scelerisque justo ac eros consectetur bibendum. In hac habitasse platea dictumst. Nulla aliquam turpis et tellus elementum luctus. Duis sit amet rhoncus velit. Duis nisl ligula, mattis interdum blandit laoreet, mattis id ante. Cras pulvinar lacus vitae nisi egestas non euismod neque bibendum. Vestibulum faucibus libero id ante molestie ultricies. Vestibulum quis nibh felis. Vestibulum libero nisl, vehicula vel ullamcorper sit amet, tristique sit amet augue. Etiam urna neque, porttitor sed sodales lacinia, posuere a nisl. Vestibulum blandit neque in sapien volutpat ac condimentum sapien auctor. Ut imperdiet venenatis ultricies. Phasellus accumsan, sem eu placerat commodo, felis purus commodo ipsum, sit amet vulputate orci est viverra est.
20
+ </p>
21
+
22
+ <p>
23
+ Aenean velit est, condimentum ut iaculis ut, accumsan at mi. Maecenas velit mi, venenatis ut condimentum at, ultrices vel tortor. Curabitur pharetra ornare dapibus. Ut volutpat cursus semper. In hac habitasse platea dictumst. Donec eu iaculis ipsum. Morbi eu dolor velit, a semper nunc.
24
+ </p>
25
+ </body>
26
+ </html>
@@ -0,0 +1,307 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>fancyBox - Fancy jQuery Lightbox Alternative | Demonstration</title>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6
+
7
+ <!-- Add jQuery library -->
8
+ <script type="text/javascript" src="../lib/jquery-1.8.2.min.js"></script>
9
+
10
+ <!-- Add mousewheel plugin (this is optional) -->
11
+ <script type="text/javascript" src="../lib/jquery.mousewheel-3.0.6.pack.js"></script>
12
+
13
+ <!-- Add fancyBox main JS and CSS files -->
14
+ <script type="text/javascript" src="../source/jquery.fancybox.js?v=2.1.3"></script>
15
+ <link rel="stylesheet" type="text/css" href="../source/jquery.fancybox.css?v=2.1.2" media="screen" />
16
+
17
+ <!-- Add Button helper (this is optional) -->
18
+ <link rel="stylesheet" type="text/css" href="../source/helpers/jquery.fancybox-buttons.css?v=1.0.5" />
19
+ <script type="text/javascript" src="../source/helpers/jquery.fancybox-buttons.js?v=1.0.5"></script>
20
+
21
+ <!-- Add Thumbnail helper (this is optional) -->
22
+ <link rel="stylesheet" type="text/css" href="../source/helpers/jquery.fancybox-thumbs.css?v=1.0.7" />
23
+ <script type="text/javascript" src="../source/helpers/jquery.fancybox-thumbs.js?v=1.0.7"></script>
24
+
25
+ <!-- Add Media helper (this is optional) -->
26
+ <script type="text/javascript" src="../source/helpers/jquery.fancybox-media.js?v=1.0.5"></script>
27
+
28
+ <script type="text/javascript">
29
+ $(document).ready(function() {
30
+ /*
31
+ * Simple image gallery. Uses default settings
32
+ */
33
+
34
+ $('.fancybox').fancybox();
35
+
36
+ /*
37
+ * Different effects
38
+ */
39
+
40
+ // Change title type, overlay closing speed
41
+ $(".fancybox-effects-a").fancybox({
42
+ helpers: {
43
+ title : {
44
+ type : 'outside'
45
+ },
46
+ overlay : {
47
+ speedOut : 0
48
+ }
49
+ }
50
+ });
51
+
52
+ // Disable opening and closing animations, change title type
53
+ $(".fancybox-effects-b").fancybox({
54
+ openEffect : 'none',
55
+ closeEffect : 'none',
56
+
57
+ helpers : {
58
+ title : {
59
+ type : 'over'
60
+ }
61
+ }
62
+ });
63
+
64
+ // Set custom style, close if clicked, change title type and overlay color
65
+ $(".fancybox-effects-c").fancybox({
66
+ wrapCSS : 'fancybox-custom',
67
+ closeClick : true,
68
+
69
+ openEffect : 'none',
70
+
71
+ helpers : {
72
+ title : {
73
+ type : 'inside'
74
+ },
75
+ overlay : {
76
+ css : {
77
+ 'background' : 'rgba(238,238,238,0.85)'
78
+ }
79
+ }
80
+ }
81
+ });
82
+
83
+ // Remove padding, set opening and closing animations, close if clicked and disable overlay
84
+ $(".fancybox-effects-d").fancybox({
85
+ padding: 0,
86
+
87
+ openEffect : 'elastic',
88
+ openSpeed : 150,
89
+
90
+ closeEffect : 'elastic',
91
+ closeSpeed : 150,
92
+
93
+ closeClick : true,
94
+
95
+ helpers : {
96
+ overlay : null
97
+ }
98
+ });
99
+
100
+ /*
101
+ * Button helper. Disable animations, hide close button, change title type and content
102
+ */
103
+
104
+ $('.fancybox-buttons').fancybox({
105
+ openEffect : 'none',
106
+ closeEffect : 'none',
107
+
108
+ prevEffect : 'none',
109
+ nextEffect : 'none',
110
+
111
+ closeBtn : false,
112
+
113
+ helpers : {
114
+ title : {
115
+ type : 'inside'
116
+ },
117
+ buttons : {}
118
+ },
119
+
120
+ afterLoad : function() {
121
+ this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : '');
122
+ }
123
+ });
124
+
125
+
126
+ /*
127
+ * Thumbnail helper. Disable animations, hide close button, arrows and slide to next gallery item if clicked
128
+ */
129
+
130
+ $('.fancybox-thumbs').fancybox({
131
+ prevEffect : 'none',
132
+ nextEffect : 'none',
133
+
134
+ closeBtn : false,
135
+ arrows : false,
136
+ nextClick : true,
137
+
138
+ helpers : {
139
+ thumbs : {
140
+ width : 50,
141
+ height : 50
142
+ }
143
+ }
144
+ });
145
+
146
+ /*
147
+ * Media helper. Group items, disable animations, hide arrows, enable media and button helpers.
148
+ */
149
+ $('.fancybox-media')
150
+ .attr('rel', 'media-gallery')
151
+ .fancybox({
152
+ openEffect : 'none',
153
+ closeEffect : 'none',
154
+ prevEffect : 'none',
155
+ nextEffect : 'none',
156
+
157
+ arrows : false,
158
+ helpers : {
159
+ media : {},
160
+ buttons : {}
161
+ }
162
+ });
163
+
164
+ /*
165
+ * Open manually
166
+ */
167
+
168
+ $("#fancybox-manual-a").click(function() {
169
+ $.fancybox.open('1_b.jpg');
170
+ });
171
+
172
+ $("#fancybox-manual-b").click(function() {
173
+ $.fancybox.open({
174
+ href : 'iframe.html',
175
+ type : 'iframe',
176
+ padding : 5
177
+ });
178
+ });
179
+
180
+ $("#fancybox-manual-c").click(function() {
181
+ $.fancybox.open([
182
+ {
183
+ href : '1_b.jpg',
184
+ title : 'My title'
185
+ }, {
186
+ href : '2_b.jpg',
187
+ title : '2nd title'
188
+ }, {
189
+ href : '3_b.jpg'
190
+ }
191
+ ], {
192
+ helpers : {
193
+ thumbs : {
194
+ width: 75,
195
+ height: 50
196
+ }
197
+ }
198
+ });
199
+ });
200
+
201
+
202
+ });
203
+ </script>
204
+ <style type="text/css">
205
+ .fancybox-custom .fancybox-skin {
206
+ box-shadow: 0 0 50px #222;
207
+ }
208
+ </style>
209
+ </head>
210
+ <body>
211
+ <h1>fancyBox</h1>
212
+
213
+ <p>This is a demonstration. More information and examples: <a href="http://fancyapps.com/fancybox/">www.fancyapps.com/fancybox/</a></p>
214
+
215
+ <h3>Simple image gallery</h3>
216
+ <p>
217
+ <a class="fancybox" href="1_b.jpg" data-fancybox-group="gallery" title="Lorem ipsum dolor sit amet"><img src="1_s.jpg" alt="" /></a>
218
+
219
+ <a class="fancybox" href="2_b.jpg" data-fancybox-group="gallery" title="Etiam quis mi eu elit temp"><img src="2_s.jpg" alt="" /></a>
220
+
221
+ <a class="fancybox" href="3_b.jpg" data-fancybox-group="gallery" title="Cras neque mi, semper leon"><img src="3_s.jpg" alt="" /></a>
222
+
223
+ <a class="fancybox" href="4_b.jpg" data-fancybox-group="gallery" title="Sed vel sapien vel sem uno"><img src="4_s.jpg" alt="" /></a>
224
+ </p>
225
+
226
+ <h3>Different effects</h3>
227
+ <p>
228
+ <a class="fancybox-effects-a" href="5_b.jpg" title="Lorem ipsum dolor sit amet, consectetur adipiscing elit"><img src="5_s.jpg" alt="" /></a>
229
+
230
+ <a class="fancybox-effects-b" href="5_b.jpg" title="Lorem ipsum dolor sit amet, consectetur adipiscing elit"><img src="5_s.jpg" alt="" /></a>
231
+
232
+ <a class="fancybox-effects-c" href="5_b.jpg" title="Lorem ipsum dolor sit amet, consectetur adipiscing elit"><img src="5_s.jpg" alt="" /></a>
233
+
234
+ <a class="fancybox-effects-d" href="5_b.jpg" title="Lorem ipsum dolor sit amet, consectetur adipiscing elit"><img src="5_s.jpg" alt="" /></a>
235
+ </p>
236
+
237
+ <h3>Various types</h3>
238
+ <p>
239
+ fancyBox will try to guess content type from href attribute but you can specify it directly by adding classname (fancybox.image, fancybox.iframe, etc).
240
+ </p>
241
+ <ul>
242
+ <li><a class="fancybox" href="#inline1" title="Lorem ipsum dolor sit amet">Inline</a></li>
243
+ <li><a class="fancybox fancybox.ajax" href="ajax.txt">Ajax</a></li>
244
+ <li><a class="fancybox fancybox.iframe" href="iframe.html">Iframe</a></li>
245
+ <li><a class="fancybox" href="http://www.adobe.com/jp/events/cs3_web_edition_tour/swfs/perform.swf">Swf</a></li>
246
+ </ul>
247
+
248
+ <div id="inline1" style="width:400px;display: none;">
249
+ <h3>Etiam quis mi eu elit</h3>
250
+ <p>
251
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam quis mi eu elit tempor facilisis id et neque. Nulla sit amet sem sapien. Vestibulum imperdiet porta ante ac ornare. Nulla et lorem eu nibh adipiscing ultricies nec at lacus. Cras laoreet ultricies sem, at blandit mi eleifend aliquam. Nunc enim ipsum, vehicula non pretium varius, cursus ac tortor. Vivamus fringilla congue laoreet. Quisque ultrices sodales orci, quis rhoncus justo auctor in. Phasellus dui eros, bibendum eu feugiat ornare, faucibus eu mi. Nunc aliquet tempus sem, id aliquam diam varius ac. Maecenas nisl nunc, molestie vitae eleifend vel, iaculis sed magna. Aenean tempus lacus vitae orci posuere porttitor eget non felis. Donec lectus elit, aliquam nec eleifend sit amet, vestibulum sed nunc.
252
+ </p>
253
+ </div>
254
+
255
+ <p>
256
+ Ajax example will not run from your local computer and requires a server to run.
257
+ </p>
258
+
259
+ <h3>Button helper</h3>
260
+ <p>
261
+ <a class="fancybox-buttons" data-fancybox-group="button" href="1_b.jpg"><img src="1_s.jpg" alt="" /></a>
262
+
263
+ <a class="fancybox-buttons" data-fancybox-group="button" href="2_b.jpg"><img src="2_s.jpg" alt="" /></a>
264
+
265
+ <a class="fancybox-buttons" data-fancybox-group="button" href="3_b.jpg"><img src="3_s.jpg" alt="" /></a>
266
+
267
+ <a class="fancybox-buttons" data-fancybox-group="button" href="4_b.jpg"><img src="4_s.jpg" alt="" /></a>
268
+ </p>
269
+
270
+ <h3>Thumbnail helper</h3>
271
+ <p>
272
+ <a class="fancybox-thumbs" data-fancybox-group="thumb" href="4_b.jpg"><img src="4_s.jpg" alt="" /></a>
273
+
274
+ <a class="fancybox-thumbs" data-fancybox-group="thumb" href="3_b.jpg"><img src="3_s.jpg" alt="" /></a>
275
+
276
+ <a class="fancybox-thumbs" data-fancybox-group="thumb" href="2_b.jpg"><img src="2_s.jpg" alt="" /></a>
277
+
278
+ <a class="fancybox-thumbs" data-fancybox-group="thumb" href="1_b.jpg"><img src="1_s.jpg" alt="" /></a>
279
+ </p>
280
+
281
+ <h3>Media helper</h3>
282
+ <p>
283
+ Will not run from your local computer, requires a server to run.
284
+ </p>
285
+
286
+ <ul>
287
+ <li><a class="fancybox-media" href="http://www.youtube.com/watch?v=opj24KnzrWo">Youtube</a></li>
288
+ <li><a class="fancybox-media" href="http://vimeo.com/25634903">Vimeo</a></li>
289
+ <li><a class="fancybox-media" href="http://www.metacafe.com/watch/7635964/">Metacafe</a></li>
290
+ <li><a class="fancybox-media" href="http://www.dailymotion.com/video/xoeylt_electric-guest-this-head-i-hold_music">Dailymotion</a></li>
291
+ <li><a class="fancybox-media" href="http://twitvid.com/QY7MD">Twitvid</a></li>
292
+ <li><a class="fancybox-media" href="http://twitpic.com/7p93st">Twitpic</a></li>
293
+ <li><a class="fancybox-media" href="http://instagr.am/p/IejkuUGxQn">Instagram</a></li>
294
+ </ul>
295
+
296
+ <h3>Open manually</h3>
297
+ <ul>
298
+ <li><a id="fancybox-manual-a" href="javascript:;">Open single item</a></li>
299
+ <li><a id="fancybox-manual-b" href="javascript:;">Open single item, custom options</a></li>
300
+ <li><a id="fancybox-manual-c" href="javascript:;">Open gallery</a></li>
301
+ </ul>
302
+
303
+ <p>
304
+ Photo Credit: Instagrammer @whitjohns
305
+ </p>
306
+ </body>
307
+ </html>