Skip to content

Commit

Permalink
Merge pull request #714 from waynestate/release/8.10.2
Browse files Browse the repository at this point in the history
Release/8.10.2
  • Loading branch information
breakdancingcat authored May 2, 2024
2 parents ab37a8d + 6e134da commit fa5ab22
Show file tree
Hide file tree
Showing 92 changed files with 761 additions and 1,167 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "base",
"private": true,
"version": "8.10.1",
"version": "8.10.2",
"description": "",
"scripts": {
"dev": "npm run development",
Expand Down
48 changes: 48 additions & 0 deletions resources/views/components/accordion-styleguide.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{{--
$items => array // ['title', 'description']
--}}
<ul class="accordion">
@foreach($data as $item)
<li>
<a href="#definition-{{ $item['promo_item_id'] }}" id="definition-{{ $item['promo_item_id'] }}"><span aria-hidden="true"></span>{{ $item['title'] }}</a>
<div class="content">
{!! $item['description'] !!}

<table style="cell-padding: 5px;" class="mt-4 {{ ($item['promo_item_id'] === 'componentConfiguration') ? 'no-stripe' : '' }}">
@if($item['promo_item_id'] === 'componentConfiguration')
<thead>
<tr>
<th class="md:w-2/5">Page field</th>
<th>Data</th>
</tr>
</thead>
<tbody>
@foreach($item as $tr => $details)
@if(strpos($tr, 'tr') !== false)
<tr>
<td><pre class="w-full">{!! $details['Page field'] !!}</pre></td>
<td><pre class="w-full">{!! $details['Data'] !!}</pre></td>
</tr>
@endif
@endforeach
</tbody>
@endif

@if($item['promo_item_id'] === 'promotionGroupDetails')
<thead>
<tr>
<th colspan="2">Available fields</th>
</tr>
</thead>
@foreach($item['table'] as $key => $detail)
<tr>
<td class="font-bold">{{ $key }}</td>
<td>{!! $detail !!}</td>
</tr>
@endforeach
@endif
</table>
</div>
</li>
@endforeach
</ul>
15 changes: 15 additions & 0 deletions resources/views/partials/component-loop.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@if(!empty($base['components']))
<div class="grid grid-cols-1 md:grid-cols-2 items-start gap-y-8 sm:gap-x-4 lg:gap-x-8 mt-8 mb-4">
@foreach($base['components'] as $componentName => $component)
@if(!empty($component['data']) && !empty($component['component']['filename']))
@if(\View::exists('components/'.$component['component']['filename']))
<div class="col-span-2 {{ str_contains($component['component']['filename'], 'column') ? 'md:col-span-1' : 'md:col-span-2' }}">
@if(!empty($component['component']['heading']))<h2 class="mt-0" id="{{ Str::slug($component['component']['heading']) }}">{{ $component['component']['heading'] }}</h2>@endif

@include('components/'.$component['component']['filename'], ['data' => $component['data'], 'component' => $component['component']])
</div>
@endif
@endif
@endforeach
</div>
@endif
118 changes: 0 additions & 118 deletions styleguide/Http/Controllers/AccordionController.php

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Illuminate\Http\Request;
use Faker\Factory;

class BasicLayoutsController extends Controller
class CMSBasicLayoutsController extends Controller
{
/**
* Construct the controller.
Expand All @@ -22,6 +22,6 @@ public function __construct(Factory $faker)
*/
public function index(Request $request): View
{
return view('styleguide-basic-layouts', merge($request->data, $this->faker));
return view('styleguide-cms-basic-layouts', merge($request->data, $this->faker));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Illuminate\Http\Request;
use Faker\Factory;

class FigureController extends Controller
class CMSButtonsController extends Controller
{
/**
* Construct the controller.
Expand All @@ -22,6 +22,6 @@ public function __construct(Factory $faker)
*/
public function index(Request $request): View
{
return view('styleguide-figure', merge($request->data, $this->faker));
return view('styleguide-cms-buttons', merge($request->data, $this->faker));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;

class ColorsController extends Controller
class CMSColorsController extends Controller
{
/**
* Display the styleguide view.
*/
public function index(Request $request): View
{
return view('styleguide-colors', merge($request->data));
return view('styleguide-cms-colors', merge($request->data));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Illuminate\Http\Request;
use Faker\Factory;

class ButtonsController extends Controller
class CMSFigureController extends Controller
{
/**
* Construct the controller.
Expand All @@ -22,6 +22,6 @@ public function __construct(Factory $faker)
*/
public function index(Request $request): View
{
return view('styleguide-buttons', merge($request->data, $this->faker));
return view('styleguide-cms-figure', merge($request->data, $this->faker));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;

class FormsController extends Controller
class CMSFormsController extends Controller
{
/**
* Display the form view.
*/
public function index(Request $request): View
{
return view('styleguide-forms', merge($request->data));
return view('styleguide-cms-forms', merge($request->data));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;

class FormsErrorController extends Controller
class CMSFormsErrorController extends Controller
{
/**
* Display the form view.
*/
public function index(Request $request): View
{
return view('styleguide-forms-error', merge($request->data));
return view('styleguide-cms-forms-error', merge($request->data));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Illuminate\Http\Request;
use Faker\Factory;

class HeadingStylesController extends Controller
class CMSHeadingStylesController extends Controller
{
/**
* Construct the controller.
Expand All @@ -22,6 +22,6 @@ public function __construct(Factory $faker)
*/
public function index(Request $request): View
{
return view('styleguide-heading-styles', merge($request->data, $this->faker));
return view('styleguide-cms-heading-styles', merge($request->data, $this->faker));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Illuminate\Http\Request;
use Faker\Factory;

class TablesController extends Controller
class CMSTablesController extends Controller
{
/**
* Construct the controller.
Expand All @@ -22,6 +22,6 @@ public function __construct(Factory $faker)
*/
public function index(Request $request): View
{
return view('styleguide-tables', merge($request->data, $this->faker));
return view('styleguide-cms-tables', merge($request->data, $this->faker));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Factories\Video;
use Illuminate\Http\Request;

class VideoController extends Controller
class CMSVideoController extends Controller
{
/**
* Display an example Video.
Expand All @@ -16,6 +16,6 @@ public function index(Request $request): View
{
$promos['video'] = app(Video::class)->create(1, true);

return view('styleguide-video', merge($request->data, $promos));
return view('styleguide-cms-video', merge($request->data, $promos));
}
}
Loading

0 comments on commit fa5ab22

Please sign in to comment.