Coder Social home page Coder Social logo

clippings / layout-grid Goto Github PK

View Code? Open in Web Editor NEW
802.0 59.0 45.0 1.17 MB

Static responsive grid with pure css. Javascript using native drag-n-drop to reorder for each screen size on desktop and mobile.

Home Page: http://clippings.github.io/layout-grid/

License: BSD 3-Clause "New" or "Revised" License

CSS 4.11% HTML 36.24% JavaScript 59.65%

layout-grid's Introduction

Layout Grid

Build Status Codacy Badge Dependency Status devDependency Status

Documentation and demos: Layout Grid Site

Static responsive grid with pure css. Javascript using native Drag'n'drop to reorder for each screen size.

Example Layout Grid

Installation

For only static positioning include css/layout-grid.min.css For ordering items around include js/layout-grid.min.js

Modification

sass/layout-grid.sass allows you to modify a lot of variables for each screen size, overriding the defaults. If you're using reorder you'll need to tell the javascript plugin about these modifications as well.

Development

After modification you can run the npm install and then grunt to build and minify all the js and sass. Use grunt qunit to execute the tests.

License

Copyright (c) 2015, Clippings Ltd. Developed by Ivan Kerin

Under BSD-3-Clause license, read LICENSE file.

layout-grid's People

Contributors

hkdobrev avatar ivank avatar jonatack 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  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  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

layout-grid's Issues

Unstated dependency on jQuery

The jQuery dependency isn't mentioned anywhere, either in the README or in the installation notes.

On a very personal note, it's a disappointing requirement given the claim that only "a little bit of javascript." is required.

Javascript Methods

After reading the docs site I have a couple of questions:

1.) Can you dynamically add a "rect" to the Grid after the initial Grid has rendered?
2.) Can you serialize the "rects" out to a js object or array so that I can create a save/load of positions for re-creating a dashboard?

Hide/Unhide and Add/Remove Containers/Items at runtime

Hi, thanks for sharing this excelent project! I really like it and I have two questions/requests:
1.) It is quite common use case to hide parts of UI on smaller screens, so just wanted to ask for any hint, what is the best way to do it.
2.) Adding/removing containers and items at runtime is the next most common use case. It would be perfect if you would include such example in help site.
Please let me know if there is any (known) problem in hiding/unhiding or adding/removing items at runtime and what is preferred workflow for such use cases.

Small bug in docs and touch drag solution

Hi, there is a small bug in documentation example Resize grid items demo. If you resize browser window to XS size and click on 2x2 resize button, widget will get streched (because it already occupies all width, I think).
I also had problem to move (drag&drop) items with hand on my laptop touchscreen (with mouse it works perfectly), window get scrolled, etc. so drag&drop was not possible (with touch). I added simple css rule to custom.css:

/*
Set the touch-action CSS property to none, which works even with passive event listeners.
Applying this property to an element will not trigger the default (scroll)
behavior when the event is originating from that element.
*/
.lt {touch-action: none;}

Problem solved. It's too small for PR, but it is something :)

Can't drag again after dropping a box on a different sized box

Reproduction of the bug is possible using the ltGridOnly demo in lg mode.
http://clippings.github.io/layout-grid/demos/only.html

If I drag the #2 box over the #1 box, I can't do any other drag operations afterwards.
It seems that when dropping a bigger box on a smaller one, it creates empty regions and then can't respond anymore.
If I drag box over one of the same size, then I can drag again.
Is this normal? I have to refresh the page to correct the issue.

Thanks

Dashboard Widgets

Hey, i am wondering if you could add an example of an admin panel dashboard and widget implementation using this?

Remove gap between widgets

I want the widgets to have no gap between each other. I've tried setting it with

data-params='{"xs":{"gap":0}}'

as well as changing the gap parameter inside the sass file to 0%. Nothing seems to work. Any idea on how to achieve this?

Drag after holding specific time

Would be nice to only activate the avaibility to drag after holding the element for a specified time.

for example: holding for 2 sec and than be able to drag the element (important for touch devices)

Vulnerabilities from jQuery 2.2.4

Including jQuery 2.2.4 inroduces a potential for XSS vulnerabilities, should be upgraded to minimum of 3.0.0.

I'm happy to upgrade and ensure no jQuery related functionality is broken in the process, but wanted to ensure this project was still being maintained / used first.

Rect Content Overflow

If you add a lot of vertical content into the rect it will overflow and stretch over the top of rect's below it. I can add overflow:scroll to the .lt style but then I end up with a cosmetic issues.

Do you have any suggestions to stop this from happening?

setting more columns

Hi,
I tried having 10 columns for md size but whatever I did, nothing was changing.

I tried setting the LTGrid.DEFAULTS object, setting data attributes, but the columns only expanded when I adjusted the parameters in the sass file.

Do you know if this is a requirement, and if not, isn't the DEFAULTS object supposed to do something?

Thanks!

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.