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
casa-albore opened this Issue Jul 4, 2016 · 0 comments

Comments

Projects
None yet
2 participants
@casa-albore

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 from gallery view on small screens - can't navigate between images to Enable Magnific Popup gallery view on small screens Jul 7, 2016

mmistakes added a commit that referenced this issue Jul 7, 2016

@mmistakes mmistakes closed this in 690f111 Jul 11, 2016

sobkowiak added a commit to sobkowiak/sobkowiak.github.io-new that referenced this issue Jul 18, 2016

sobkowiak added 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

antonizoon pushed a commit to antonizoon/antonizoon.github.io that referenced this issue Jul 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment