diff --git a/app/View/Components/ShareRhpzUrl.php b/app/View/Components/ShareRhpzUrl.php new file mode 100644 index 0000000..b41a475 --- /dev/null +++ b/app/View/Components/ShareRhpzUrl.php @@ -0,0 +1,41 @@ +entry->type ?? "news" ) === 'news' ){ + $letter = 'n'; + } else { + $letter = $this->entry->type[0]; + } + + $id = $this->entry->id; + $shareUrl = config('app.share_url'); + + $url = rtrim($shareUrl, '/') . '/' . $letter . '/' . $id; + + return view('components.share-rhpz-url', compact('url') ); + } +} diff --git a/config/app.php b/config/app.php index e534a64..0320654 100644 --- a/config/app.php +++ b/config/app.php @@ -126,4 +126,5 @@ return [ 'store' => env('APP_MAINTENANCE_STORE', 'database'), ], + 'share_url' => env('RHPZ_SHARE_URL', ''), ]; diff --git a/resources/css/layout/entry.css b/resources/css/layout/entry.css index 159a915..89425f6 100644 --- a/resources/css/layout/entry.css +++ b/resources/css/layout/entry.css @@ -178,7 +178,6 @@ max-width: 90%; max-height: 90%; position: relative; - img { max-width: 100%; max-height: 90vh; @@ -198,12 +197,40 @@ font-weight: bold; cursor: pointer; user-select: none; - &:hover { color: var(--rhpz-orange); } } + .gallery-modal-arrow { + position: absolute; + top: 50%; + transform: translateY(-50%); + color: #fff; + cursor: pointer; + user-select: none; + display: flex; + align-items: center; + justify-content: center; + width: 50px; + height: 50px; + &:hover { + color: var(--rhpz-orange); + } + i { + width: 28px; + height: 28px; + } + } + + .gallery-modal-arrow-prev { + left: 20px; + } + + .gallery-modal-arrow-next { + right: 20px; + } + .gallery-modal-video { width: 90%; max-width: 960px; @@ -211,7 +238,6 @@ box-shadow: 0 10px 30px rgba(0,0,0,0.6); border: 1px solid var(--border); background-color: #000; - iframe { width: 100%; height: 100%; diff --git a/resources/views/components/share-rhpz-url.blade.php b/resources/views/components/share-rhpz-url.blade.php new file mode 100644 index 0000000..c2c6d10 --- /dev/null +++ b/resources/views/components/share-rhpz-url.blade.php @@ -0,0 +1,50 @@ +