From 51b6fe7dc8d95af1938a6ee291947999369de8c8 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 20 Apr 2024 04:25:22 -0600 Subject: [PATCH] Refactor embeds --- resources/views/profile/embed.blade.php | 176 ++++++++---------- resources/views/status/embed.blade.php | 232 +++++++----------------- 2 files changed, 143 insertions(+), 265 deletions(-) diff --git a/resources/views/profile/embed.blade.php b/resources/views/profile/embed.blade.php index aeb6a5b99..6cf3b534b 100644 --- a/resources/views/profile/embed.blade.php +++ b/resources/views/profile/embed.blade.php @@ -1,14 +1,11 @@ - - - + + - - {{ $title ?? config('app.name', 'Pixelfed') }} - + {{ $title ?? config_cache('app.name', 'Pixelfed') }} @@ -18,101 +15,82 @@ - - + -
-
-
-
- - - {{$profile['username']}} - -
-
- {{config('pixelfed.domain.app')}} - +
+
+ +
+
+
+

+

Posts

+
+
+

+

Followers

+
+
+

Follow

+
+
+
+
+ +
-
-
-
-
-

-

Posts

-
-
-

-

Followers

-
-
-

Follow

-
-
-
-
- -
-
- - - - - - - + diff --git a/resources/views/status/embed.blade.php b/resources/views/status/embed.blade.php index 54d9b7330..02ab2de90 100644 --- a/resources/views/status/embed.blade.php +++ b/resources/views/status/embed.blade.php @@ -1,172 +1,72 @@ - + - - - - - - - {{ $title ?? config('app.name', 'Pixelfed') }} - - - - - - - - - - - - + + + + + {{ $title ?? config_cache('app.name', 'Pixelfed') }} + + + + + + + + + + -
- @php($item = $status) -
- - - @php($status = $item) - @switch($status->viewType()) - @case('photo') - @case('image') - @if($status->is_nsfw) -
- -

CW / NSFW / Hidden Media

-

(click to show)

-
-
- - -
- @else -
- -
- @endif - @break - @case('photo:album') - - @break - @case('video') - @if($status->is_nsfw) -
- -

CW / NSFW / Hidden Media

-

(click to show)

-
-
- -
-
- @else -
- -
- @endif - @break - @case('video-album') - @if($status->is_nsfw) -
- -

CW / NSFW / Hidden Media

-

(click to show)

-
-
- -
-
- @else -
- -
- @endif - @break - @endswitch - - @if($layout != 'compact') -
- -
-
-

- - {{$item->profile->username}} - - @if($showCaption) - {!! $item->rendered ?? e($item->caption) !!} - @endif -

-
-
- @endif - -
-
- - - - - +
+
+ + +
+ +
+
+ @if($layout != 'compact') +
+ +
+
+

+ + {{$status['account']['username']}} + + @if($showCaption) + {{ $status['content_text'] }} + @endif +

+
+
+ @endif + +
+
+