Skip to content

Commit 4b32e89

Browse files
migueldemouranielsenramon
authored andcommitted
Replace Fluidbox with Zooming
1 parent 198c8a7 commit 4b32e89

File tree

8 files changed

+46
-11
lines changed

8 files changed

+46
-11
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ Used tools
4141
- [Jekyll Sitemap](https://github.com/jekyll/jekyll-sitemap)
4242
- [HTML5 Boilerplate](https://html5boilerplate.com/) (Influenced by)
4343
- [Kickster](https://kickster.nielsenramon.com/)
44+
- [Zooming](https://github.com/kingdido999/zooming/)
4445
- [Retina.js](https://imulus.github.io/retinajs/)
4546
- [STACSS](https://stacss.nielsenramon.com/)
4647
- [Yarn](https://yarnpkg.com)

_assets/javascripts/application.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
//= require_self
22

3-
$(function() {
3+
$(document).ready(function() {
44
// ScrollAppear
55
if (typeof $.fn.scrollAppear === 'function') {
66
$('.scrollappear').scrollAppear();
77
}
88

9-
// Fluidbox
10-
$('.fluidbox-trigger').fluidbox();
9+
// Zooming
10+
new Zooming(
11+
{customSize: '100%', scaleBase: 0.9, scaleExtra: 0, enableGrab: false}
12+
).listen('img[data-action="zoom"]');
1113

1214
// Share buttons
1315
$('.article-share a').on('click', function() {

_assets/javascripts/vendor.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//= require jquery
2-
//= require throttle-debounce-fn/dist/throttle-debounce-fn.js
3-
//= require fluidbox
2+
//= require zooming
43
//= require retinajs/dist/retina.js
54
//= require svgxuse/svgxuse.js

_assets/stylesheets/dark.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ $article-paginator-color-hover: $gray-lightest;
4747
// Vendors
4848

4949
@import "vendor/normalize";
50-
@import "../yarn/fluidbox/src/css/_fluidbox.scss";
5150

5251
// Settings
5352

_assets/stylesheets/light.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ $article-paginator-color-hover: $gray-darkest;
4747
// Vendors
4848

4949
@import "vendor/normalize";
50-
@import "../yarn/fluidbox/src/css/_fluidbox.scss";
5150

5251
// Settings
5352

_includes/image.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<a href="{% asset '{{ include.path-detail }}' @path %}"
22
data-rjs="{% asset '{{ include.path-detail }}' @path %}"
3-
class="fluidbox-trigger">
4-
<img src="{% asset '{{ include.path }}' @path %}" alt="{{ include.alt }}" />
3+
>
4+
<img src="{% asset '{{ include.path }}' @path %}" alt="{{ include.alt }}"
5+
data-action="zoom"
6+
data-zooming-width="{{ assets[include.path].width }}"
7+
data-zooming-height="{{ assets[include.path].height }}"
8+
/>
59
</a>

package-lock.json

Lines changed: 32 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
},
88
"dependencies": {
99
"jquery": "^3.2.1",
10-
"throttle-debounce-fn": "^1.0.1",
11-
"fluidbox": "^2.0.5",
10+
"zooming": "^2.0.0",
1211
"retinajs": "^2.1.1",
1312
"webfontloader": "^1.6.28",
1413
"svgxuse": "^1.2.4"

0 commit comments

Comments
 (0)