Thinking about creating some blade-x components for Adminlte and then create a pull request, so they can be available in the package...
what you guys think? is that a need? what kind of components should we have?
my first thought is forms components and simple widgets...
That would be great.
Do you plan to create form elements as well? If so, a few elements come to mind:
My Suggestion:
File: /resources/views/components/inputs/button.blade.php
@props(['btntype' => 'default', 'text', 'title', 'icon', 'can'])
@if(isset($can) && Auth::user()->can($can) || empty($can))
<button type="button" {{ $attributes->merge(['class' => 'btn btn-'.$btntype]) }}
title="@if(isset($title)) {{ __($title) }} @elseif(isset($text)) {{ __($text) }} @endif"
@if(isset($onclick)) onclick="{{ $onclick }}" @endif
>
@if(isset($icon)) <i class="fa fa-{{ $icon }}"> </i> @endif
@if(isset($text)) {{ __($text) }} @endif
</button>
@endif
Toolbars for form pages would be nice, even though the project I'm currently working on already uses a similar approach including partials...
Our Toolbars include the following buttons on the top and bottom parts of form pages, but might not be something every app uses:
apply, save & close, save & new, cancel
Maybe something like:
File: /resources/views/components/toolbar/show.blade.php
@props(['canprefix'])
<div class="btn-toolbar btn-group" role="toolbar" aria-label="Toolbar" id="toolbar">
<x-input.button id="toolbar-apply" value="apply" btntype="success" text="global.toolbar.apply" icon="save" />
<x-input.button id="toolbar-save" value="save" btntype="default" text="global.toolbar.save_close" icon="check text-success"/>
@if(isset($canprefix) && Auth::user()->can($canprefix.'.create') || empty($canprefix))
<x-input.button id="toolbar-save-new" value="save" btntype="default" text="global.toolbar.save_new" icon="plus text-primary" />
@endif
<x-input.button id="toolbar-cancel" value="cancel" btntype="default" text="global.toolbar.cancel" icon="times-circle text-danger" />
<x-toolbar.script />
</div>
Maybe a simple component for the content_header section, with the following output:
<h1>
<i class="fa fa-OPTIONAL_ICON fa-lg" style="OPTIONAL COLOR MAYBE"></i>
PAGE TITLE
<small>OPTIONAL PAGE SUBTITLE</small>
</h1>
As for widgets, info-box, cards and maybe social widgets...
Thank you in advance for your work. I believe adding components to AdminLTE will make It easier for other developers to adopt this theme and the more the better ;-)
It will be great and will be easier to use the components like panel and so one.
@andcarpi Thanks for that issue, I have already considered the days.
@REJack What do you mean?
@lacodimizer I had this idea too some months ago 馃槃 but this was before the v3 release. We chatted about it too.
I like the idea really it can improve the agile development massivly.
I have created blade components for adminLTE, you may start by forking it: AdminLTE Blade Components
I would recomend to add your package git to the Readme as a suggestion, so we don't need to rebuild all of this inside this package...
@andcarpi I did not get you actually whom you suggested, me or jeroennoten. However, my x-components package has already suggested this package inside my README, and if you use my package you do not need to rebuild anything.
@dgvai My first thought was to build almost exactly what you have build in this package (laravel-adminlte). But since i was without time and you alredy did that in your own package, i was thinking in...
Option 1 - Just mention your package in this readme, so people can find it easaly
Option 2 - Add it as a dependency and make the config be ready to use (edit plugins)
Option 3 - Create a command to install your package and edit the config?
Option 4 - Do nothing?
That's it... if you have any other idea, i'm listening...
@dgvai If you want, you can create a merge request to add the components / logic of your project to this. It will be nice. So the components will be included in this package by default.
@lacodimizer sure, I would love to. By managing some free time I would update the logics and merge the package into yours.
@dgvai great! Can I help you? :)
@lacodimizer sure indeed!
Most helpful comment
@lacodimizer I had this idea too some months ago 馃槃 but this was before the v3 release. We chatted about it too.
I like the idea really it can improve the agile development massivly.