From b240ae3b4437c35bde70773b2ff4d0b690388570 Mon Sep 17 00:00:00 2001 From: Stasiek Michalski Date: Sat, 2 Jun 2018 06:14:49 +0200 Subject: [PATCH 01/14] Add css for changes in user's profile --- resources/assets/sass/custom.scss | 46 +++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/resources/assets/sass/custom.scss b/resources/assets/sass/custom.scss index e84a5dac5..dd208eb05 100644 --- a/resources/assets/sass/custom.scss +++ b/resources/assets/sass/custom.scss @@ -105,3 +105,49 @@ 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); +} From 3550c0b94c284eaf1958f157d149d9bdc68a4294 Mon Sep 17 00:00:00 2001 From: Stasiek Michalski Date: Sat, 2 Jun 2018 06:22:43 +0200 Subject: [PATCH 02/14] Add lower weight option --- resources/assets/sass/custom.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/resources/assets/sass/custom.scss b/resources/assets/sass/custom.scss index dd208eb05..a145f48dd 100644 --- a/resources/assets/sass/custom.scss +++ b/resources/assets/sass/custom.scss @@ -151,3 +151,7 @@ body, button, input, textarea { height: 100%; background-color: rgba(0,0,0,0.5); } + +.font-weight-ultralight { + font-weight: 200 !important; +} From 2c190ba934e918a212dadeb1f76ee9514e166c27 Mon Sep 17 00:00:00 2001 From: Stasiek Michalski Date: Sat, 2 Jun 2018 06:25:12 +0200 Subject: [PATCH 03/14] Use new classes from stylesheet --- resources/views/profile/show.blade.php | 28 ++++++++++++++++---------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/resources/views/profile/show.blade.php b/resources/views/profile/show.blade.php index bb6d57a65..f81e96dbb 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 From 1b12cc2295680b970abaa69b6c1fb6a5864b3d8c Mon Sep 17 00:00:00 2001 From: Stasiek Michalski Date: Sat, 2 Jun 2018 06:32:19 +0200 Subject: [PATCH 04/14] Replicate improvements from show --- resources/views/profile/followers.blade.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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}}
From 2d008ea2eecd340a8f76ffb261194512971d48f5 Mon Sep 17 00:00:00 2001 From: Stasiek Michalski Date: Sat, 2 Jun 2018 06:33:15 +0200 Subject: [PATCH 05/14] Replicate improvements from show --- resources/views/profile/following.blade.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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}}
From 35020b71084f39e170947cc92e7dc86a266533ca Mon Sep 17 00:00:00 2001 From: Stasiek Michalski Date: Sun, 3 Jun 2018 01:47:06 +0200 Subject: [PATCH 06/14] Update look of status view --- resources/views/status/show.blade.php | 129 +++++++++++++------------- 1 file changed, 63 insertions(+), 66 deletions(-) diff --git a/resources/views/status/show.blade.php b/resources/views/status/show.blade.php index 7c882def9..54d9ae030 100644 --- a/resources/views/status/show.blade.php +++ b/resources/views/status/show.blade.php @@ -2,86 +2,83 @@ @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 From c4b9cc9eda1588e9787731e7a57b479bafab4b2d Mon Sep 17 00:00:00 2001 From: Stasiek Michalski Date: Sun, 3 Jun 2018 01:52:50 +0200 Subject: [PATCH 07/14] Remove useless hr --- resources/views/status/show.blade.php | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/views/status/show.blade.php b/resources/views/status/show.blade.php index 54d9ae030..7e6ddc5dd 100644 --- a/resources/views/status/show.blade.php +++ b/resources/views/status/show.blade.php @@ -22,7 +22,6 @@

{{$status->created_at->diffForHumans()}}

-

From 0440f8ba720e8eab4235d1ba326c9b48d7e7c665 Mon Sep 17 00:00:00 2001 From: Stasiek Michalski Date: Sun, 3 Jun 2018 01:53:54 +0200 Subject: [PATCH 08/14] Fix #90 --- resources/assets/sass/custom.scss | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/resources/assets/sass/custom.scss b/resources/assets/sass/custom.scss index e84a5dac5..01bb1eda9 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; } From 66f285c2b1dca7eebfa10d684e98b23a63b04018 Mon Sep 17 00:00:00 2001 From: Stasiek Michalski Date: Sun, 3 Jun 2018 03:25:29 +0200 Subject: [PATCH 09/14] Add supporting classes to square based layout --- resources/views/profile/show.blade.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/resources/views/profile/show.blade.php b/resources/views/profile/show.blade.php index f81e96dbb..8894cccab 100644 --- a/resources/views/profile/show.blade.php +++ b/resources/views/profile/show.blade.php @@ -101,12 +101,14 @@ @foreach($timeline as $status)

- - From ea119a28ed36a3861467bc9e82cd6e2cf0b62e09 Mon Sep 17 00:00:00 2001 From: Stasiek Michalski Date: Sun, 3 Jun 2018 03:28:58 +0200 Subject: [PATCH 10/14] Add CSS for added classes --- resources/assets/sass/custom.scss | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/resources/assets/sass/custom.scss b/resources/assets/sass/custom.scss index bc24a07ed..a972f29d1 100644 --- a/resources/assets/sass/custom.scss +++ b/resources/assets/sass/custom.scss @@ -153,3 +153,23 @@ body, button, input, textarea { .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%; +} From c36aeba532d8b9909d5db7e687197cc95b51e652 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 2 Jun 2018 19:41:27 -0600 Subject: [PATCH 11/14] Fix profile blade variables --- resources/views/profile/show.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/profile/show.blade.php b/resources/views/profile/show.blade.php index 8894cccab..7b691517f 100644 --- a/resources/views/profile/show.blade.php +++ b/resources/views/profile/show.blade.php @@ -105,8 +105,8 @@
- {{$item->likes()->count()}} - {{$item->comments()->count()}} + {{$status->likes()->count()}} + {{$status->comments()->count()}}
From 333577c240a25286c612790acee7fb9898e24bc7 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 2 Jun 2018 19:41:53 -0600 Subject: [PATCH 12/14] Update compiled assets --- public/css/app.css | Bin 157579 -> 158641 bytes public/mix-manifest.json | Bin 184 -> 184 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/public/css/app.css b/public/css/app.css index 86c947d07c3d10146b939c3ab01a4cd0dd01970f..2da738eaa3442eff712d66652fdc524534c26756 100644 GIT binary patch delta 674 zcmZut&ubGw80AaRT0{ya*k)^FB}8mt)=gj=neD-Yo;*ke@10~O*`d2L>tvEvmxT!4 zytL#n;KBbv5Q3nHC&5ec)QboGCp?>Ml9Gkqz8~*xt0BISwh%&#%P-&)16FaN9W>FFm)#U=CdVFlx9Z#{yc9)^1T88^OZ5c|1 ztCX<@+x25YDHmPrG%vxQmSLlm>CRL_E)H=Z2h1D4Exki1G_+2fi^ffWmh<^z`B+c`AS>{ut1_u|PZ7E&DqL>+efXe!!!=$5`N=B!@i{`V08@EwQYAvHoYyq0&Dl`+?e18H(^ZX}l on)d+rsy+Ui;r28%zeU=IT_yX1qKoi6x0a6noZlM9w6L}EA52K^ZU6uP delta 39 xcmV+?0NDSr*9nWy34nwFv;y{Elj@KQmoLNtKeq*80vZFCqG$pZx0YxE8v{?p4zd6M diff --git a/public/mix-manifest.json b/public/mix-manifest.json index eb8b185763e456730c6dcac9cfdb183670f3205e..7d075bc34ac918703825ec142db010309796cbf8 100644 GIT binary patch delta 30 lcmdnNxPx&*yhxgbNt%g)VQP}8xsjn+s Date: Sat, 2 Jun 2018 20:22:44 -0600 Subject: [PATCH 13/14] Add padding to overlay --- resources/views/profile/show.blade.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/resources/views/profile/show.blade.php b/resources/views/profile/show.blade.php index 7b691517f..ca7166401 100644 --- a/resources/views/profile/show.blade.php +++ b/resources/views/profile/show.blade.php @@ -104,9 +104,13 @@
-
- {{$status->likes()->count()}} - {{$status->comments()->count()}} +
+ + {{$status->likes()->count()}} + + + {{$status->comments()->count()}} +
From 3d657e0c5259c22da67c46f9e7a6e6eab427cd2e Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 2 Jun 2018 20:26:49 -0600 Subject: [PATCH 14/14] Fix n+1 comment + like counts in status overlays --- app/Http/Controllers/ProfileController.php | 7 ++++++- resources/views/profile/show.blade.php | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) 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/resources/views/profile/show.blade.php b/resources/views/profile/show.blade.php index ca7166401..c2206387a 100644 --- a/resources/views/profile/show.blade.php +++ b/resources/views/profile/show.blade.php @@ -106,10 +106,10 @@
- {{$status->likes()->count()}} + {{$status->likes_count}} - {{$status->comments()->count()}} + {{$status->comments_count}}