Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Magnific Popup gallery view on small screens #385

Closed
3 tasks done
casa-albore opened this issue Jul 4, 2016 · 0 comments
Closed
3 tasks done

Enable Magnific Popup gallery view on small screens #385

casa-albore opened this issue Jul 4, 2016 · 0 comments
Assignees

Comments

@casa-albore
Copy link

casa-albore commented Jul 4, 2016

  • This is a feature request.
  • I have updated all gems with bundle update.
  • I have tested locally with bundle exec jekyll build.

The Magnific popups for gallery views has what I consider 'bad' behavior on small screens (phones) where clicking on an image will display the full-size image but will not show 'forward' or 'back' icons as is the case on larger screens.

This makes it impossible on telephones with smaller screens to browse the gallery with photos filling the screen.

The following change made the gallery navigation function again on phones:

diff --git a/assets/js/_main.js b/assets/js/_main.js
index 796e126..fca8edd 100644
--- a/assets/js/_main.js
+++ b/assets/js/_main.js
@@ -45,7 +44,7 @@ $(document).ready(function(){
   // Magnific-Popup options
   $(".image-popup").magnificPopup({
     disableOn: function() {
-      if( $(window).width() < 500 ) {
+      if( $(window).width() < 100 ) {
         return false;
       }
       return true;
@mmistakes mmistakes self-assigned this Jul 7, 2016
@mmistakes mmistakes changed the title gallery view on small screens - can't navigate between images Enable Magnific Popup gallery view on small screens Jul 7, 2016
mmistakes added a commit that referenced this issue Jul 7, 2016
sobkowiak pushed a commit to sobkowiak/sobkowiak.github.io-new that referenced this issue Jul 18, 2016
sobkowiak pushed a commit to sobkowiak/sobkowiak.github.io-new that referenced this issue Jul 18, 2016
cjmadsen pushed a commit to cjmadsen/cjmadsen.github.io that referenced this issue Dec 7, 2016
jluccisano added a commit to jluccisano/jluccisano.github.io that referenced this issue May 6, 2017
makaroniame added a commit to makaroniame/makaroniame-old.github.io that referenced this issue May 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants