Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prettier code formatting and config update #618

Merged
merged 3 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ node_modules
dist
.env*
vendor/
/storage
/vendor
public/
.git
Expand Down
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"semi": true,
"tabWidth": 4,
"trailingComma": "all",
"plugins": ["@shufo/prettier-plugin-blade", "prettier-plugin-tailwindcss"],
"plugins": ["prettier-plugin-blade", "prettier-plugin-tailwindcss"],
"overrides": [
{
"files": ["*.blade.php"],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
@extends('backend.layouts.app')
@extends("backend.layouts.app")

@section('title')
@section("title")
{{ __($module_action) }} {{ __($module_title) }}
@endsection

@section('breadcrumbs')
@section("breadcrumbs")
<x-backend.breadcrumbs>
<x-backend.breadcrumb-item route='{{ route("backend.$module_name.index") }}' icon='{{ $module_icon }}'>
<x-backend.breadcrumb-item route='{{ route("backend.$module_name.index") }}' icon="{{ $module_icon }}">
{{ __($module_title) }}
</x-backend.breadcrumb-item>
<x-backend.breadcrumb-item type="active">{{ __($module_action) }}</x-backend.breadcrumb-item>
</x-backend.breadcrumbs>
@endsection

@section('content')
<x-backend.layouts.create :module_name="$module_name" :module_path="$module_path" :module_title="$module_title" :module_icon="$module_icon" :module_action="$module_action" />
@section("content")
<x-backend.layouts.create
:module_name="$module_name"
:module_path="$module_path"
:module_title="$module_title"
:module_icon="$module_icon"
:module_action="$module_action"
/>
@endsection
20 changes: 13 additions & 7 deletions Modules/Category/Resources/views/backend/categories/edit.blade.php
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
@extends('backend.layouts.app')
@extends("backend.layouts.app")

@section('title')
@section("title")
{{ __($module_action) }} {{ __($module_title) }}
@endsection

@section('breadcrumbs')
@section("breadcrumbs")
<x-backend.breadcrumbs>
<x-backend.breadcrumb-item route='{{ route("backend.$module_name.index") }}' icon='{{ $module_icon }}'>
<x-backend.breadcrumb-item route='{{ route("backend.$module_name.index") }}' icon="{{ $module_icon }}">
{{ __($module_title) }}
</x-backend.breadcrumb-item>
<x-backend.breadcrumb-item type="active">{{ __($module_action) }}</x-backend.breadcrumb-item>
</x-backend.breadcrumbs>
@endsection

@section('content')
<x-backend.layouts.edit :data="$$module_name_singular" :module_name="$module_name" :module_path="$module_path" :module_title="$module_title" :module_icon="$module_icon"
:module_action="$module_action" />
@section("content")
<x-backend.layouts.edit
:data="$$module_name_singular"
:module_name="$module_name"
:module_path="$module_path"
:module_title="$module_title"
:module_icon="$module_icon"
:module_action="$module_action"
/>
@endsection
112 changes: 65 additions & 47 deletions Modules/Category/Resources/views/backend/categories/form.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,71 +2,84 @@
<div class="col-12 col-sm-4 mb-3">
<div class="form-group">
<?php
$field_name = 'name';
$field_name = "name";
$field_lable = label_case($field_name);
$field_placeholder = $field_lable;
$required = 'required';
$required = "required";
?>
{{ html()->label($field_lable, $field_name)->class('form-label') }} {!! field_required($required) !!}
{{ html()->text($field_name)->placeholder($field_placeholder)->class('form-control')->attributes(["$required"]) }}

{{ html()->label($field_lable, $field_name)->class("form-label") }} {!! field_required($required) !!}
{{ html()->text($field_name)->placeholder($field_placeholder)->class("form-control")->attributes(["$required"]) }}
</div>
</div>
<div class="col-12 col-sm-4 mb-3">
<div class="form-group">
<?php
$field_name = 'slug';
$field_name = "slug";
$field_lable = label_case($field_name);
$field_placeholder = $field_lable;
$required = '';
$required = "";
?>
{{ html()->label($field_lable, $field_name)->class('form-label') }} {!! field_required($required) !!}
{{ html()->text($field_name)->placeholder($field_placeholder)->class('form-control')->attributes(["$required"]) }}

{{ html()->label($field_lable, $field_name)->class("form-label") }} {!! field_required($required) !!}
{{ html()->text($field_name)->placeholder($field_placeholder)->class("form-control")->attributes(["$required"]) }}
</div>
</div>
<div class="col-12 col-sm-4 mb-3">
<div class="form-group">
<?php
$field_name = 'group_name';
$field_name = "group_name";
$field_lable = label_case($field_name);
$field_placeholder = $field_lable;
$required = '';
$required = "";
?>
{{ html()->label($field_lable, $field_name)->class('form-label') }} {!! field_required($required) !!}
{{ html()->text($field_name)->placeholder($field_placeholder)->class('form-control')->attributes(["$required"]) }}

{{ html()->label($field_lable, $field_name)->class("form-label") }} {!! field_required($required) !!}
{{ html()->text($field_name)->placeholder($field_placeholder)->class("form-control")->attributes(["$required"]) }}
</div>
</div>
</div>
<div class="row mb-3">
<div class="col-8">
<div class="form-group">
<?php
$field_name = 'image';
$field_name = "image";
$field_lable = label_case($field_name);
$field_placeholder = $field_lable;
$required = '';
$required = "";
?>
{{ html()->label($field_lable, $field_name)->class('form-label') }} {!! field_required($required) !!}
{{ html()->input('file', $field_name)->class('form-control')->attributes(["$required"]) }}

{{ html()->label($field_lable, $field_name)->class("form-label") }} {!! field_required($required) !!}
{{ html()->input("file", $field_name)->class("form-control")->attributes(["$required"]) }}
</div>
</div>

@if ($data && $data->getMedia($module_name)->first())
<div class="col-4">
<div class="float-end">
<figure class="figure">
<a href="{{ asset($data->$field_name) }}" data-lightbox="image-set"
data-title="Path: {{ asset($data->$field_name) }}">
<img src="{{ asset($data->getMedia($module_name)->first()->getUrl('thumb300')) }}"
class="figure-img img-fluid rounded img-thumbnail" alt="">
<a
href="{{ asset($data->$field_name) }}"
data-lightbox="image-set"
data-title="Path: {{ asset($data->$field_name) }}"
>
<img
src="{{ asset($data->getMedia($module_name)->first()->getUrl("thumb300"),) }}"
class="figure-img img-fluid img-thumbnail rounded"
alt=""
/>
</a>
<!-- <figcaption class="figure-caption">Path: </figcaption> -->
</figure>
<div class="form-check">
<input class="form-check-input" type="checkbox" value="image_remove" id="image_remove"
name="image_remove">
<label class="form-check-label" for="image_remove">
Remove this image
</label>
<input
class="form-check-input"
type="checkbox"
value="image_remove"
id="image_remove"
name="image_remove"
/>
<label class="form-check-label" for="image_remove">Remove this image</label>
</div>
</div>
</div>
Expand All @@ -77,52 +90,56 @@ class="figure-img img-fluid rounded img-thumbnail" alt="">
<div class="col-12 mb-3">
<div class="form-group">
<?php
$field_name = 'description';
$field_name = "description";
$field_lable = label_case($field_name);
$field_placeholder = $field_lable;
$required = '';
$required = "";
?>
{{ html()->label($field_lable, $field_name)->class('form-label') }} {!! field_required($required) !!}
{{ html()->textarea($field_name)->placeholder($field_placeholder)->class('form-control')->attributes(["$required"]) }}

{{ html()->label($field_lable, $field_name)->class("form-label") }} {!! field_required($required) !!}
{{ html()->textarea($field_name)->placeholder($field_placeholder)->class("form-control")->attributes(["$required"]) }}
</div>
</div>
</div>
<hr>
<hr />
<div class="row">
<div class="col-12 col-sm-4 mb-3">
<div class="form-group">
<?php
$field_name = 'meta_title';
$field_name = "meta_title";
$field_lable = label_case($field_name);
$field_placeholder = $field_lable;
$required = '';
$required = "";
?>
{{ html()->label($field_lable, $field_name)->class('form-label') }} {!! field_required($required) !!}
{{ html()->text($field_name)->placeholder($field_placeholder)->class('form-control')->attributes(["$required"]) }}

{{ html()->label($field_lable, $field_name)->class("form-label") }} {!! field_required($required) !!}
{{ html()->text($field_name)->placeholder($field_placeholder)->class("form-control")->attributes(["$required"]) }}
</div>
</div>
<div class="col-12 col-sm-4 mb-3">
<div class="form-group">
<?php
$field_name = 'meta_keyword';
$field_name = "meta_keyword";
$field_lable = label_case($field_name);
$field_placeholder = $field_lable;
$required = '';
$required = "";
?>
{{ html()->label($field_lable, $field_name)->class('form-label') }} {!! field_required($required) !!}
{{ html()->text($field_name)->placeholder($field_placeholder)->class('form-control')->attributes(["$required"]) }}

{{ html()->label($field_lable, $field_name)->class("form-label") }} {!! field_required($required) !!}
{{ html()->text($field_name)->placeholder($field_placeholder)->class("form-control")->attributes(["$required"]) }}
</div>
</div>
<div class="col-12 col-sm-4 mb-3">
<div class="form-group">
<?php
$field_name = 'meta_description';
$field_name = "meta_description";
$field_lable = label_case($field_name);
$field_placeholder = $field_lable;
$required = '';
$required = "";
?>
{{ html()->label($field_lable, $field_name)->class('form-label') }} {!! field_required($required) !!}
{{ html()->text($field_name)->placeholder($field_placeholder)->class('form-control')->attributes(["$required"]) }}

{{ html()->label($field_lable, $field_name)->class("form-label") }} {!! field_required($required) !!}
{{ html()->text($field_name)->placeholder($field_placeholder)->class("form-control")->attributes(["$required"]) }}
</div>
</div>
</div>
Expand All @@ -131,14 +148,15 @@ class="figure-img img-fluid rounded img-thumbnail" alt="">
<div class="col-12 col-sm-4">
<div class="form-group">
<?php
$field_name = 'status';
$field_name = "status";
$field_lable = label_case($field_name);
$field_placeholder = '-- Select an option --';
$required = 'required';
$field_placeholder = "-- Select an option --";
$required = "required";
$select_options = \Modules\Category\Enums\CategoryStatus::toArray();
?>
{{ html()->label($field_lable, $field_name)->class('form-label') }} {!! field_required($required) !!}
{{ html()->select($field_name, $select_options)->class('form-select')->attributes(["$required"]) }}

{{ html()->label($field_lable, $field_name)->class("form-label") }} {!! field_required($required) !!}
{{ html()->select($field_name, $select_options)->class("form-select")->attributes(["$required"]) }}
</div>
</div>
</div>
Loading
Loading