-
Notifications
You must be signed in to change notification settings - Fork 0
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
0 parents
commit 10e66a7
Showing
18 changed files
with
7,006 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/.idea | ||
/vendor | ||
/node_modules | ||
auth.json | ||
package-lock.json | ||
composer.phar | ||
composer.lock | ||
phpunit.xml | ||
.phpunit.result.cache | ||
.DS_Store | ||
Thumbs.db |
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,67 @@ | ||
# Gridder | ||
|
||
A couple of years ago i decide to build `nova-gridder`, probably inspired in other developer repository. | ||
|
||
By the way, that was abandoned, for several reasons, this is a Nova 5 compatible, fresh grid system implementation based on tailwindcss. | ||
|
||
There are no goals to reach some point of development. | ||
|
||
![Gridder Usage](./result.png) | ||
|
||
## Installation | ||
|
||
As is usually, you need to install it using composer: | ||
|
||
``` | ||
composer require zen0x7/gridder | ||
``` | ||
|
||
## Usage | ||
|
||
### Basic Usage | ||
|
||
```php | ||
public static function fields() | ||
{ | ||
return [ | ||
Panel::make(__('Details'), [ | ||
Text::make(__('Name'), 'name') | ||
->withMeta([ | ||
"gridder" => [ | ||
"cols" => Gridder::$FIELD_ONE_OF_TWO_COLUMNS, | ||
"type" => "stack" | ||
] | ||
]) | ||
])->withMeta([ | ||
"gridder" => [ | ||
"cols" => Gridder::$GRID_STATIC_TWO_COLUMNS | ||
] | ||
]) | ||
] | ||
} | ||
``` | ||
|
||
## Digging deep | ||
|
||
Basically works with `meta`, you should to define columns per `field` and `panel`. | ||
|
||
Cols attribute is something like, of course, they are `responsive breakpoints`: | ||
|
||
```php | ||
$cols = [ | ||
"default" => 1, // On default should use 1 column | ||
"sm" => 2, // When device is on "sm" then use 2 columns (span) | ||
"md" => 2, // The same for the next ... | ||
"lg" => 2, | ||
"xl" => 2, | ||
"2xl" => 2, | ||
] | ||
``` | ||
|
||
# License | ||
|
||
Consider this as unlicensed piece of code. Right? | ||
|
||
Use it for the purpose that you want, there are no private or public usage limitation, including commercial. | ||
|
||
Also, there are no need to include this license in any distribution. Feel free to clone, fork, improve, store and/or distribute. |
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,37 @@ | ||
{ | ||
"name": "zen0x7/gridder", | ||
"description": "A Laravel Nova field.", | ||
"keywords": [ | ||
"laravel", | ||
"nova" | ||
], | ||
"license": "MIT", | ||
"require": { | ||
"php": "^8.1", | ||
"illuminate/support": "^10.0|^11.0" | ||
}, | ||
"require-dev": { | ||
"laravel/nova": "^5.0", | ||
"laravel/nova-devtool": "^1.2" | ||
}, | ||
"repositories": [ | ||
{ "type": "composer", "url": "https://nova.laravel.com" } | ||
], | ||
"autoload": { | ||
"psr-4": { | ||
"Zen0x7\\Gridder\\": "src/" | ||
} | ||
}, | ||
"extra": { | ||
"laravel": { | ||
"providers": [ | ||
"Zen0x7\\Gridder\\FieldServiceProvider" | ||
] | ||
} | ||
}, | ||
"config": { | ||
"sort-packages": true | ||
}, | ||
"minimum-stability": "dev", | ||
"prefer-stable": true | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/*! | ||
* The buffer module from node.js, for the browser. | ||
* | ||
* @author Feross Aboukhadijeh <http://feross.org> | ||
* @license MIT | ||
*/ | ||
|
||
/*! | ||
* vuex v4.1.0 | ||
* (c) 2022 Evan You | ||
* @license MIT | ||
*/ | ||
|
||
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ | ||
|
||
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ |
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,4 @@ | ||
{ | ||
"/js/field.js": "/js/field.js", | ||
"/css/field.css": "/css/field.css" | ||
} |
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,22 @@ | ||
{ | ||
"private": true, | ||
"scripts": { | ||
"dev": "npm run development", | ||
"development": "mix", | ||
"watch": "mix watch", | ||
"watch-poll": "mix watch -- --watch-options-poll=1000", | ||
"prod": "npm run production", | ||
"production": "mix --production" | ||
}, | ||
"devDependencies": { | ||
"lodash": "^4.17.21", | ||
"laravel-nova-devtool": "file:vendor/laravel/nova-devtool" | ||
}, | ||
"dependencies": { | ||
"laravel-mix": "^6.0.49", | ||
"postcss": "^8.4.49", | ||
"postcss-import": "^16.1.0", | ||
"postcss-rtlcss": "^5.6.0", | ||
"tailwindcss": "^3.4.17" | ||
} | ||
} |
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 @@ | ||
module.exports = {} |
Oops, something went wrong.