Giter Site home page Giter Site logo

mladenilic / columns.js Goto Github PK

View Code? Open in Web Editor NEW
62.0 2.0 2.0 6.41 MB

A minimalist masonry layout written in vanila JS, with no dependancies

Home Page: https://columnsjs.com/

JavaScript 100.00%
masonry masonry-layout masonry-grid vanilajs plain-js es6 grid grid-layout grid-system

columns.js's People

Contributors

dependabot[bot] avatar mladenilic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

columns.js's Issues

Any way to define specific element column within 'greedy' algorithm?

Dobar dan!๐Ÿค—
Your solution of representing masonry layout is very close to meet my needs, it's very clever.
But I'm little stuck: in my grid I have first element unique, that should always be in the first column, on the top. But with greedy algorithm it mostly appears in the second column. chronological algorithm doesn't make sense, since grid becomes look ugly. Do you have any solution of it?

Add type definitions

Hi @mladenilic, thanks for this awesome library.
Would you consider adding typescript definitions for the public class Columns?

I just added type definitions in my own project and I can raise a PR if needed.

Also, I was going through the code and all other classes/code have JsDoc comments except the Columns class. Curious if there is any special reason behind this?

Thanks

Internet Explorer 11 support

Hi @mladenilic,

Thank you for this neat library! I needed to have IE11 support and in the end I was able to get it to work quite easily by adding some polyfills. I thought I would post what I added for reference in case anyone else needs to do the same.

The polyfills come from https://polyfill.io/v3/url-builder/ and this is what I included in my site:

  • NodeList.prototype.forEach
  • Object.assign
  • Array.from
  • Object.entries
  • Element.prototype.append

They can be added via a single <script> tag:

<script src="https://polyfill.io/v3/polyfill.min.js?features=NodeList.prototype.forEach%2CObject.assign%2CArray.from%2CObject.entries%2CElement.prototype.append"></script>

I hope this helps someone!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.