Skip to content

Commit

Permalink
refactor: fix blade formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Ne-wt authored and github-actions[bot] committed Feb 5, 2024
1 parent c4ab4bb commit 1e23dd7
Show file tree
Hide file tree
Showing 9 changed files with 71 additions and 70 deletions.
10 changes: 5 additions & 5 deletions resources/views/admin/items/tags/pairing.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<p>Choose a trait that this pairing item will always grant the offspring.</p>
{!! Form::select('feature_id', $features, $tag->getData()['feature_id'] ?? null, [
'class' => 'form-control mr-2
feature-select',
feature-select',
'placeholder' => 'Select Offspring Trait',
]) !!}
</div>
Expand All @@ -45,7 +45,7 @@
<p>Choose a species that this pairing item will grant the offspring.</p>
{!! Form::select('species_id', $specieses, $tag->getData()['species_id'] ?? null, [
'class' => 'form-control mr-2
feature-select',
feature-select',
'placeholder' => 'Select Offspring Species',
]) !!}
</div>
Expand All @@ -55,7 +55,7 @@
<p>Choose a subtype that this pairing item will always grant the offspring. Will not work if the species does not match the subtype.</p>
{!! Form::select('subtype_id', $subtypes, $tag->getData()['subtype_id'] ?? null, [
'class' => 'form-control mr-2
feature-select',
feature-select',
'placeholder' => 'Select Offspring Subtype',
]) !!}
</div>
Expand All @@ -72,7 +72,7 @@
{!! Form::label('Default Species (Optional)') !!} {!! add_help('Choose a species that should be set if both parent species are excluded.') !!}
{!! Form::select('default_species_id', $specieses, $tag->getData()['default_species_id'] ?? null, [
'class' => 'form-control mr-2
feature-select',
feature-select',
'placeholder' => 'Select Default Species',
]) !!}
</div>
Expand Down Expand Up @@ -113,7 +113,7 @@
<p>Choose a subtype that should be set if both parent subtypes are excluded.</p>
{!! Form::select('default_subtype_ids', $subtypes, $tag->getData()['default_subtype_ids'] ?? null, [
'class' => 'form-control mr-2
feature-select',
feature-select',
'placeholder' => 'Select Default Subtype',
]) !!}
</div>
Expand Down
88 changes: 44 additions & 44 deletions resources/views/admin/pairings/_pairing_myo.blade.php
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
<div class="col-lg-4 p-2">
<div class="card character-bio w-100 p-3">
<div class="row">
<div class="col-lg-4 col-md-6 col-4">
<h5>Species</h5>
</div>
<div class="col-lg-8 col-md-6 col-8">{!! $myo['species'] !!}</div>
</div>
<div class="row">
<div class="col-lg-4 col-md-6 col-4">
<h5>Subtype</h5>
</div>
<div class="col-lg-8 col-md-6 col-8">{!! $myo['subtype'] !!}</div>
</div>
<div class="row">
<div class="col-lg-4 col-md-6 col-4">
<h5>Rarity</h5>
</div>
<div class="col-lg-8 col-md-6 col-8">{!! $myo['rarity'] !!}</div>
</div>
<div class="row">
<div class="col-lg-4 col-md-6 col-4">
<h5>Sex</h5>
<div class="row">
<div class="col-lg-4 col-md-6 col-4">
<h5>Species</h5>
</div>
<div class="col-lg-8 col-md-6 col-8">{!! $myo['species'] !!}</div>
</div>
<div class="col-lg-8 col-md-6 col-8">{!! $myo['sex'] !!}</div>
</div>
@if(config('lorekeeper.character_pairing.colours'))
<div class="row">
<div class="col-lg-4 col-md-6 col-4">
<h5>Colours</h5>
<h5>Subtype</h5>
</div>
<div class="col-lg-8 col-md-6 col-8">
{!! $myo['palette'] ?? '<div class="alert alert-info">No colours generated. Inheritance likely disabled.</div>' !!}
<div class="col-lg-8 col-md-6 col-8">{!! $myo['subtype'] !!}</div>
</div>
<div class="row">
<div class="col-lg-4 col-md-6 col-4">
<h5>Rarity</h5>
</div>
<div class="col-lg-8 col-md-6 col-8">{!! $myo['rarity'] !!}</div>
</div>
@endif
<div class="mb-3">
<div>
<h5>Traits</h5>
<div class="row">
<div class="col-lg-4 col-md-6 col-4">
<h5>Sex</h5>
</div>
<div class="col-lg-8 col-md-6 col-8">{!! $myo['sex'] !!}</div>
</div>
@if (config('lorekeeper.character_pairing.colours'))
<div class="row">
<div class="col-lg-4 col-md-6 col-4">
<h5>Colours</h5>
</div>
<div class="col-lg-8 col-md-6 col-8">
{!! $myo['palette'] ?? '<div class="alert alert-info">No colours generated. Inheritance likely disabled.</div>' !!}
</div>
</div>
@endif
<div class="mb-3">
<div>
<h5>Traits</h5>
</div>

<div>
@if (count($myo['features']) > 0)
@foreach ($myo['features'] as $feature)
<div>
<strong>{!! $feature->displayName !!}:</strong>
({!! $feature->rarity->displayName !!})
{{ isset($myo['feature_data'][$loop->index]) ? '(' . $myo['feature_data'][$loop->index] . ')' : '' }}
</div>
@endforeach
@else
<div>No traits listed.</div>
@endif
<div>
@if (count($myo['features']) > 0)
@foreach ($myo['features'] as $feature)
<div>
<strong>{!! $feature->displayName !!}:</strong>
({!! $feature->rarity->displayName !!})
{{ isset($myo['feature_data'][$loop->index]) ? '(' . $myo['feature_data'][$loop->index] . ')' : '' }}
</div>
@endforeach
@else
<div>No traits listed.</div>
@endif
</div>
</div>
</div>
</div>
</div>
2 changes: 1 addition & 1 deletion resources/views/character/_image_info.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
<div>No colours listed.</div>
@if (Auth::check() && Auth::user()->hasPower('manage_characters') && !$image->character->is_myo_slot)
{!! Form::open(['url' => 'admin/character/image/' . $image->id . '/colours']) !!}
{!! Form::submit('Generate', ['class' => 'btn btn-outline-info btn-sm ml-3 py-0']) !!}
{!! Form::submit('Generate', ['class' => 'btn btn-outline-info btn-sm ml-3 py-0']) !!}
{!! Form::close() !!}
@endif
</div>
Expand Down
4 changes: 2 additions & 2 deletions resources/views/character/_lineage_tree.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
@include('character._lineage_tree', [
'character' => $character?->lineage?->parent_1,
'max_depth' => $max_depth - 1,
'parent' => $character?->lineage?->parent_1->parentType ?? "Parent",
'parent' => $character?->lineage?->parent_1->parentType ?? 'Parent',
])
@include('character._lineage_tree', [
'character' => $character?->lineage?->parent_2,
'max_depth' => $max_depth - 1,
'parent' => $character?->lineage?->parent_2->parentType ?? "Parent",
'parent' => $character?->lineage?->parent_2->parentType ?? 'Parent',
])
</div>
@endif
Expand Down
4 changes: 2 additions & 2 deletions resources/views/character/_tab_lineage.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
@include('character._tab_lineage_col', [
'character' => $character?->lineage?->parent_1,
'max_depth' => config('lorekeeper.lineage.tab_lineage_depth') - 1,
'parent' => $character?->lineage?->parent_1?->parentType ?? "Parent",
'parent' => $character?->lineage?->parent_1?->parentType ?? 'Parent',
])
@include('character._tab_lineage_col', [
'character' => $character?->lineage?->parent_2,
'max_depth' => config('lorekeeper.lineage.tab_lineage_depth') - 1,
'parent' => $character?->lineage?->parent_2?->parentType ?? "Parent",
'parent' => $character?->lineage?->parent_2?->parentType ?? 'Parent',
])
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions resources/views/character/_tab_lineage_col.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
@include('character._tab_lineage_col', [
'character' => $character?->lineage?->parent_1,
'max_depth' => $max_depth - 1,
'parent' => $parent . "'s " . ($character?->lineage?->parent_1?->parentType ?? "Parent"),
'parent' => $parent . "'s " . ($character?->lineage?->parent_1?->parentType ?? 'Parent'),
])
@include('character._tab_lineage_col', [
'character' => $character?->lineage?->parent_2,
'max_depth' => $max_depth - 1,
'parent' => $parent . "'s " . ($character?->lineage?->parent_2?->parentType ?? "Parent"),
'parent' => $parent . "'s " . ($character?->lineage?->parent_2?->parentType ?? 'Parent'),
])
</div>
@endif
Expand Down
22 changes: 11 additions & 11 deletions resources/views/character/admin/_edit_image_colours.blade.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{!! Form::open(['url' => 'admin/character/image/' . $image->id . '/colours', 'class' => 'form-horizontal',]) !!}
{!! Form::open(['url' => 'admin/character/image/' . $image->id . '/colours', 'class' => 'form-horizontal']) !!}

{!! Form::hidden('edit', true) !!}
{!! Form::hidden('edit', true) !!}

<div class="mt-2">
@foreach(json_decode($image->colours, false) as $key => $colour)
<div class="form-group">
{!! Form::color('colours[' . $key . ']', $colour, ['class' => 'form-control', 'required' => 'required']) !!}
</div>
@endforeach
</div>
<div class="mt-2">
@foreach (json_decode($image->colours, false) as $key => $colour)
<div class="form-group">
{!! Form::color('colours[' . $key . ']', $colour, ['class' => 'form-control', 'required' => 'required']) !!}
</div>
@endforeach
</div>

{!! Form::submit('Update', ['class' => 'btn btn-primary']) !!}
{!! Form::submit('Update', ['class' => 'btn btn-primary']) !!}

{!! Form::close() !!}
{!! Form::close() !!}
3 changes: 2 additions & 1 deletion resources/views/character/design/image.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@

@if ($request->character->is_myo_slot && $request->character->image->colours && config('lorekeeper.character_pairing.colours'))
<div class="alert alert-info">
This is a pairing slot with predefined colours. Colours are a general guideline that your MYO should follow. You may deviate from these colours, but they should be recognizable as the same character. If you have any questions, please contact staff.
This is a pairing slot with predefined colours. Colours are a general guideline that your MYO should follow. You may deviate from these colours, but they should be recognizable as the same character. If you have any questions, please
contact staff.
<div class="mt-2 mb-0">{!! $request->character->image->displayColours() !!}</div>
</div>
@endif
Expand Down
4 changes: 2 additions & 2 deletions resources/views/character/lineage.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ class="image mb-2" style="max-height: 40vh !important;" alt="{{ $character->full
@include('character._lineage_tree', [
'character' => $character->lineage?->parent_1,
'max_depth' => config('lorekeeper.lineage.lineage_depth') - 1,
'parent' => $character->lineage?->parent_1->parentType ?? "Parent",
'parent' => $character->lineage?->parent_1->parentType ?? 'Parent',
])
@include('character._lineage_tree', [
'character' => $character->lineage?->parent_2,
'max_depth' => config('lorekeeper.lineage.lineage_depth') - 1,
'parent' => $character->lineage?->parent_2->parentType ?? "Parent",
'parent' => $character->lineage?->parent_2->parentType ?? 'Parent',
])
</div>
</div>
Expand Down

0 comments on commit 1e23dd7

Please sign in to comment.