diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index a9d9846c5..6777dbb49 100644 --- a/app/Http/Controllers/ProfileController.php +++ b/app/Http/Controllers/ProfileController.php @@ -32,7 +32,12 @@ class ProfileController extends Controller // TODO: refactor this mess $owner = Auth::check() && Auth::id() === $user->user_id; $following = ($owner == false && Auth::check()) ? $user->followedBy(Auth::user()->profile) : false; - $timeline = $user->statuses()->whereHas('media')->whereNull('in_reply_to_id')->orderBy('id','desc')->paginate(21); + $timeline = $user->statuses() + ->whereHas('media') + ->whereNull('in_reply_to_id') + ->orderBy('id','desc') + ->withCount(['comments', 'likes']) + ->simplePaginate(21); return view('profile.show', compact('user', 'owner', 'following', 'timeline')); } diff --git a/public/css/app.css b/public/css/app.css index 86c947d07..2da738eaa 100644 Binary files a/public/css/app.css and b/public/css/app.css differ diff --git a/public/mix-manifest.json b/public/mix-manifest.json index eb8b18576..7d075bc34 100644 Binary files a/public/mix-manifest.json and b/public/mix-manifest.json differ diff --git a/resources/assets/sass/custom.scss b/resources/assets/sass/custom.scss index e84a5dac5..a972f29d1 100644 --- a/resources/assets/sass/custom.scss +++ b/resources/assets/sass/custom.scss @@ -56,9 +56,7 @@ body, button, input, textarea { } .card.status-container .status-photo { - display: -webkit-box !important; - display: -ms-flexbox !important; - display: flex !important; + display: block !important; margin: auto !important; } @@ -105,3 +103,73 @@ body, button, input, textarea { .notification-page .list-group-item:first-child { border-top: none; } + +.nav-topbar { + border-top: 1px solid $gray-300; +} +.nav-topbar .nav-item { + margin: -1px 1.5rem 0; +} +.nav-topbar .nav-link { + border: 1px solid transparent; + color: $gray-300; + padding: 0.75rem 0; +} +.nav-topbar .nav-link:focus, .nav-topbar .nav-link:hover { + border-top-color: $gray-300; +} +.nav-topbar .nav-link.disabled { + color: $gray-300; + background-color: transparent; + border-color: transparent; +} +.nav-topbar .nav-item.show .nav-link, .nav-topbar .nav-link.active { + color: $gray-600; + border-top-color: $gray-600; +} +.nav-topbar .dropdown-menu { + margin-top:-1px; +} + +.info-overlay { + position: relative; +} + +.info-overlay .info-overlay-text { + display: none; + position: absolute; +} + +.info-overlay:hover .info-overlay-text { + display: flex; +} + +.info-overlay-text { + width: 100%; + height: 100%; + background-color: rgba(0,0,0,0.5); +} + +.font-weight-ultralight { + font-weight: 200 !important; +} + +.square { + position: relative; + width: 100%; +} + +.square::after { + content: ""; + display: block; + padding-bottom: 100%; +} + +.square-content { + position: absolute; + width: 100%; + height: 100%; + background-repeat: no-repeat; + background-size: cover; + background-position: 50%; +} diff --git a/resources/views/profile/followers.blade.php b/resources/views/profile/followers.blade.php index 58e79a3b4..75ff0e939 100644 --- a/resources/views/profile/followers.blade.php +++ b/resources/views/profile/followers.blade.php @@ -4,16 +4,16 @@
-
-
-
+
+
+
-
+
-
- {{$profile->username}} +
+ {{$profile->username}}
diff --git a/resources/views/profile/following.blade.php b/resources/views/profile/following.blade.php index f04ca85e4..27aae9eca 100644 --- a/resources/views/profile/following.blade.php +++ b/resources/views/profile/following.blade.php @@ -4,16 +4,16 @@
-
-
-
+
+
+
-
+
- {{$profile->username}} + {{$profile->username}}
diff --git a/resources/views/profile/show.blade.php b/resources/views/profile/show.blade.php index bb6d57a65..c2206387a 100644 --- a/resources/views/profile/show.blade.php +++ b/resources/views/profile/show.blade.php @@ -4,19 +4,19 @@
-
-
-
+
+
+
-
+
- {{$user->username}} + {{$user->username}} @if($owner == true) - - Settings + + @elseif ($following == true) @@ -80,8 +80,8 @@
@if($owner == true)
-
-@endsection \ No newline at end of file +@endsection diff --git a/resources/views/status/show.blade.php b/resources/views/status/show.blade.php index 7c882def9..7e6ddc5dd 100644 --- a/resources/views/status/show.blade.php +++ b/resources/views/status/show.blade.php @@ -2,86 +2,82 @@ @section('content') -
-
- -
-
-
-
- +
+
+
+
+ +
+
+
+
+
+ +
+
-
-
-
- -
- -
-
-
-
- {{$status->profile->username}} -

- {!! $status->rendered ?? e($status->caption) !!} -

- +
+
+

+ {{$status->profile->username}} + {!! $status->rendered ?? e($status->caption) !!} +

+
@foreach($status->comments->reverse()->take(10) as $item) -

- {{$item->profile->username}} - {!!$item->rendered!!} {{$item->created_at->diffForHumans(null, true, true ,true)}} -

+

+ {{$item->profile->username}} + {!!$item->rendered!!} {{$item->created_at->diffForHumans(null, true, true ,true)}} +

@endforeach -
-
-
-
-
+
+
+
+ @csrf - + - - @if(Auth::check()) - @if(Auth::user()->profile->id === $status->profile->id || Auth::user()->is_admin == true) -
- @csrf - - - -
- @endif - @endif - -
- @csrf - - -
-
-
- - -
-
-
+ + @if(Auth::check()) + @if(Auth::user()->profile->id === $status->profile->id || Auth::user()->is_admin == true) + + @csrf + + + +
+ @endif + @endif + +
@csrf - +
-
+
+ +
+
-@endsection \ No newline at end of file +@endsection