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

Image size #5

Open
chen1223 opened this issue May 3, 2017 · 1 comment
Open

Image size #5

chen1223 opened this issue May 3, 2017 · 1 comment

Comments

@chen1223
Copy link

chen1223 commented May 3, 2017

Hi, first of all thank you for all the hard work. The code looks amazing. Just have a quick question would like to ask. For the plugin to work, do we need to prepare different dimensions of images or can we send images all with the same dimensions from the backend and have the waterfall plugin resize for us?

Thanks in advance

@mystist
Copy link
Owner

mystist commented May 3, 2017

@chen1223 No need. Backend can simply returns images of same size. But we need to set a width of each pin via css, and also for responsive case:

.waterfall {
  .list-group {
    margin-right: 14px;

    > li:first-child {
      padding: 0;
      background-color: white;

      img {
        width: 100%;
        border-top-right-radius: 4px;
        border-top-left-radius: 4px;
      }
    }

    > li {
      background-color: #f5f5f5;
    }
  }
}

@media (min-width: 768px) {
  .waterfall {
    .list-group {
      width: 346px;
    }
  }
}
@media (min-width: 992px) {
  .waterfall {
    .list-group {
      width: 299px;
    }
  }
}
@media (min-width: 1200px) {
  .waterfall {
    .list-group {
      width: 271px;
    }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants