From 83c61449e3b8f77a24ddbf17a30bb03cdf2422fc Mon Sep 17 00:00:00 2001 From: "Daniel S. Billing" Date: Mon, 4 Apr 2022 22:38:05 +0200 Subject: [PATCH 1/2] Add explanation for publishing views --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 702d9df..7284fe3 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,14 @@ In your dashboard view you can use the `livewire:forge-server-tile` and `livewir ... +``` + +## Customizing the view +If you want to customize the view used to render this tile, run this command: + +```bash +php artisan vendor:publish --provider="aglipanci\ForgeTile\ForgeTileServiceProvider" --tag="dashboard-forge-tile-views" ``` ## Testing From 52c2eeb9e876e739fc4ed5abfe15b48b8539bc36 Mon Sep 17 00:00:00 2001 From: "Daniel S. Billing" Date: Mon, 4 Apr 2022 22:39:19 +0200 Subject: [PATCH 2/2] Improved styling of views --- resources/views/recent-events.blade.php | 46 +++++++++++------------ resources/views/servers.blade.php | 49 ++++++++++++------------- 2 files changed, 44 insertions(+), 51 deletions(-) diff --git a/resources/views/recent-events.blade.php b/resources/views/recent-events.blade.php index 9b46fc4..cac315d 100644 --- a/resources/views/recent-events.blade.php +++ b/resources/views/recent-events.blade.php @@ -1,34 +1,30 @@
-

{{$title ?? 'Forge Recent Events'}}

+

{{ $title ?? 'Forge Recent Events' }}

-
+
    - @if(count($events)) - @foreach($events as $event) -
  • -
    -
    - {{ \Carbon\Carbon::parse($event['createdAt'])->format('F j, g:m:i A') }} -
    -
    - {{ $event['serverName'] }} -
    -
    - {{ $event['description'] }} -
    -
    -
  • - @endforeach - @else -
    - -
    !
    -
    - Currently there are no events. Make sure you have configured the background command. + @forelse($events as $event) +
  • +
    + {{ \Carbon\Carbon::parse($event['createdAt'])->isoFormat('LLL') }} +
    +
    + {{ $event['serverName'] }} +
    +
    + {{ $event['description'] }} +
    +
  • + @empty +
    + + + + Currently there are no events. Make sure you have configured the background command.
    - @endif + @endforelse
diff --git a/resources/views/servers.blade.php b/resources/views/servers.blade.php index 7f80608..4287f54 100644 --- a/resources/views/servers.blade.php +++ b/resources/views/servers.blade.php @@ -1,37 +1,34 @@
-

{{$title ?? 'Forge Servers'}}

+

{{ $title ?? 'Forge Servers' }}

-
+
    - @if(count($servers)) - @foreach($servers as $server) -
  • -
    -
    - - {{ $server['name'] }} -
    -
    {{ $server['provider'] }}
    -
    {{ $server['ipAddress'] }}
    -
    - @foreach($server['tags'] as $tag) - {{ $tag['name'] }} - @endforeach -
    + @forelse($servers as $server) +
  • +
    + + {{ $server['name'] }} +
    +
    {{ $server['provider'] }} · {{ $server['ipAddress'] }}
    + @if($server['tags']) +
    + @foreach($server['tags'] as $tag) + {{ $tag['name'] }} + @endforeach
    -
  • - @endforeach - @else -
    - -
    !
    -
    - Currently there are no servers. Make sure you have configured the background command. + @endif + + @empty +
    + + + + Currently there are no servers. Make sure you have configured the background command.
    - @endif + @endforelse