Skip to content

Commit

Permalink
[+]: example for bower ...
Browse files Browse the repository at this point in the history
  • Loading branch information
voku committed Nov 4, 2014
1 parent f1f6b63 commit 19e5982
Show file tree
Hide file tree
Showing 19 changed files with 57 additions and 2,313 deletions.
1 change: 1 addition & 0 deletions app/views/tpl_base.twig
Expand Up @@ -21,6 +21,7 @@
{# CSS #}
{% block head_css %}
<link rel="stylesheet" href="/vendor/bower/font-awesome/css/font-awesome.css">
<link rel="stylesheet" href="/vendor/bower/magnific-popup/dist/magnific-popup.css">
<link rel="stylesheet" href="/css-min/app.css">
{% endblock %}

Expand Down
5 changes: 3 additions & 2 deletions app/views/tpl_index.twig
Expand Up @@ -161,8 +161,9 @@

<hr>

<img src="images/rheinisches_industriemuseum.jpg" class="img-responsive">

<a href="/images/rheinisches_industriemuseum.jpg" class="with-caption image-link" title="Rheinisches Industriemuseum">
<img src="/images/rheinisches_industriemuseum.jpg" class="img-responsive">
</a>
<hr>
</div>
<!--/col-->
Expand Down
3 changes: 3 additions & 0 deletions web/.bowerrc
@@ -0,0 +1,3 @@
{
"directory": "vendor/bower/"
}
3 changes: 2 additions & 1 deletion web/Gruntfile.js
Expand Up @@ -84,7 +84,8 @@ module.exports = function(grunt) {
sourceMap: true
},
src: [
'vendor/bower/bootstrap-sass/dist/js/bootstrap.min.js'
'vendor/bower/bootstrap-sass/dist/js/bootstrap.min.js',
'vendor/bower/magnific-popup/dist/jquery.magnific-popup.min.js'
],
dest: 'js/plugins.js'
}
Expand Down
3 changes: 2 additions & 1 deletion web/bower.json
Expand Up @@ -6,6 +6,7 @@
"normalize-scss": "3.*",
"font-awesome": "4.0.*",
"bootstrap-sass": "3.*",
"jquery": "2.*"
"jquery": "2.*",
"magnific-popup": "~0.9.9"
}
}
2 changes: 1 addition & 1 deletion web/css-min/app.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions web/js-min/app.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion web/js-min/app.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions web/js-min/bootstrap.js

This file was deleted.

1 change: 0 additions & 1 deletion web/js-min/bootstrap.js.map

This file was deleted.

6 changes: 0 additions & 6 deletions web/js-min/bootstrap.min.js

This file was deleted.

1 change: 0 additions & 1 deletion web/js-min/bootstrap.min.js.map

This file was deleted.

5 changes: 3 additions & 2 deletions web/js-min/plugins.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion web/js-min/plugins.js.map

Large diffs are not rendered by default.

32 changes: 32 additions & 0 deletions web/js/app.js
Expand Up @@ -35,5 +35,37 @@ $(document).ready(function () {
'<a target="_blank" href="http://www.openstreetmap.org/?lat=51.475675&lon=6.850315&zoom=17&layers=B000FTFTT&mlat=51.47569&mlon=6.85032">Grö&szlig;ere Karte anzeigen</a>' +
'</small>'
);

// image-popup
$('.without-caption').magnificPopup({
type: 'image',
closeOnContentClick: true,
closeBtnInside: false,
mainClass: 'mfp-no-margins mfp-with-zoom', // class to remove default margin from left and right side
image: {
verticalFit: true
},
zoom: {
enabled: true,
duration: 300 // don't foget to change the duration also in CSS
}
});

$('.with-caption').magnificPopup({
type: 'image',
closeOnContentClick: true,
closeBtnInside: false,
mainClass: 'mfp-with-zoom mfp-img-mobile',
image: {
verticalFit: true,
titleSrc: function(item) {
return item.el.attr('title') + ' &middot; <a class="image-source-link" href="'+item.el.attr('data-source')+'" target="_blank">image source</a>';
}
},
zoom: {
enabled: true
}
});


});

0 comments on commit 19e5982

Please sign in to comment.