This repository was archived by the owner on May 14, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
312 additions
and
2,069 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
dist | ||
.DS_Store | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
- [GitHub](https://github.com/henriquea/minigrid) | ||
- [npm](https://www.npmjs.com/package/minigrid) | ||
|
||
# Minigrid | ||
|
||
Minimal 2kb zero dependency cascading grid layout without pain. | ||
|
||
## Usage | ||
|
||
It works on a grid container with a group of grid items. | ||
|
||
``` | ||
<div class="cards"> | ||
<div class="card"></div> | ||
<div class="card"></div> | ||
<div class="card"></div> | ||
</div> | ||
``` | ||
|
||
Then: | ||
|
||
``` | ||
var grid = new Minigrid({ | ||
container: '.cards', | ||
item: '.card', | ||
gutter: 6 | ||
}); | ||
grid.mount(); | ||
``` | ||
|
||
## Installation | ||
|
||
Get it from <strong>npm</strong>. | ||
|
||
``` | ||
npm install minigrid | ||
``` | ||
|
||
Or 1998 script include tag from **npmcdn**. | ||
|
||
``` | ||
npm install minigrid | ||
``` | ||
|
||
## Upgrade | ||
|
||
Upgrading from v1.x or v2.x? | ||
|
||
Please read the [CHANGELOG](https://github.com/henriquea/minigrid/blob/master/CONTRIBUTING.md) for API changes. | ||
|
||
## Limitations | ||
|
||
Minigrid was built having in mind "cards" with same width and different heights. If your cards have different width sizes or you need more power I’d recommend [Isotope](http://isotope.metafizzy.co/). | ||
|
||
- **Minigrid** v3.0.0 | ||
- [GitHub](https://github.com/henriquea/minigrid) | ||
- [npm](https://www.npmjs.com/package/minigrid) | ||
- [@healves82](https://twitter.com/healves82) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
var fs = require('fs'); | ||
var index = fs.readFileSync('./README.md', 'utf8'); | ||
var template = fs.readFileSync('./template.ejs', 'utf8'); | ||
|
||
var minify = require('html-minifier').minify; | ||
var ejs = require('ejs'); | ||
var remark = require('remark'); | ||
var html = require('remark-html'); | ||
var yamlConfig = require('remark-yaml-config'); | ||
var processor = remark().use(yamlConfig).use(html); | ||
var doc = processor.process([ | ||
'---', | ||
'remark:', | ||
' commonmark: true', | ||
'---', | ||
'', | ||
index | ||
].join('\n')); | ||
|
||
var data = { content: doc }; | ||
var options = {}; | ||
var rendered = ejs.render(template, data, options); | ||
|
||
var html = minify(rendered, { | ||
collapseWhitespace: true | ||
}); | ||
|
||
fs.writeFileSync('index.html', html); |
Oops, something went wrong.