From d7d2bc23978d85f29f77c7c065e784b791224543 Mon Sep 17 00:00:00 2001 From: shibafu Date: Sat, 24 Oct 2020 14:32:30 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=97=E3=83=AD=E3=83=95=E3=82=A3=E3=83=BC?= =?UTF-8?q?=E3=83=AB=E3=83=9A=E3=83=BC=E3=82=B8=E3=81=AE=E3=82=BF=E3=83=96?= =?UTF-8?q?=E5=91=A8=E3=82=8A=E3=81=AE=E3=83=87=E3=82=B6=E3=82=A4=E3=83=B3?= =?UTF-8?q?=E3=82=92=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/assets/sass/_underline-tabs.scss | 16 ++++++ resources/assets/sass/app.scss | 3 + resources/views/components/profile.blade.php | 43 ++++++-------- resources/views/user/base.blade.php | 59 ++++++++++---------- 4 files changed, 67 insertions(+), 54 deletions(-) create mode 100644 resources/assets/sass/_underline-tabs.scss diff --git a/resources/assets/sass/_underline-tabs.scss b/resources/assets/sass/_underline-tabs.scss new file mode 100644 index 0000000..8e5f9aa --- /dev/null +++ b/resources/assets/sass/_underline-tabs.scss @@ -0,0 +1,16 @@ +.tis-nav-underline-tabs { + margin-bottom: -1px; + + .nav-link { + padding: 0.5rem 1.25rem; + border-bottom: 4px solid transparent; + + @include media-breakpoint-up(lg) { + padding: 1rem 1.25rem; + } + + &.active { + border-bottom-color: $primary; + } + } +} diff --git a/resources/assets/sass/app.scss b/resources/assets/sass/app.scss index a613a07..25c375d 100644 --- a/resources/assets/sass/app.scss +++ b/resources/assets/sass/app.scss @@ -18,3 +18,6 @@ $primary: #e53fb1; // Tag @import "tag/index"; + +// Underline tabs +@import "underline-tabs"; diff --git a/resources/views/components/profile.blade.php b/resources/views/components/profile.blade.php index 253e187..6bfa60c 100644 --- a/resources/views/components/profile.blade.php +++ b/resources/views/components/profile.blade.php @@ -1,32 +1,23 @@ -
-
- -

- {{ $user->display_name }} -

-
- @{{ $user->name }} - @if ($user->is_protected) - +@if (!empty($user->bio) || !empty($user->url)) +
+
+ {{-- Bio --}} + @if (!empty($user->bio)) +

+ {!! Formatter::linkify(nl2br(e($user->bio))) !!} +

@endif -
- {{-- Bio --}} - @if (!empty($user->bio)) -

- {!! Formatter::linkify(nl2br(e($user->bio))) !!} -

- @endif - - {{-- URL --}} - @if (!empty($user->url)) -

- - {{ preg_replace('~\Ahttps?://~', '', $user->url) }} -

- @endif + {{-- URL --}} + @if (!empty($user->url)) +

+ + {{ preg_replace('~\Ahttps?://~', '', $user->url) }} +

+ @endif +
- +@endif @if (!$user->is_protected || $user->isMe())
diff --git a/resources/views/user/base.blade.php b/resources/views/user/base.blade.php index 67c49ee..517071f 100644 --- a/resources/views/user/base.blade.php +++ b/resources/views/user/base.blade.php @@ -1,45 +1,48 @@ @extends('layouts.base') @section('content') +
+
+
+
+ @component('components.profile-mini', ['user' => $user]) + @endcomponent +
+ +
+
+
@if (Route::currentRouteName() === 'user.profile') @component('components.profile', ['user' => $user]) @endcomponent - @else -
-
- @component('components.profile-mini', ['user' => $user]) - @endcomponent -
-
@endif @section('sidebar') @show