-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adds footer and improves styling and navigation (closes #326)
- Loading branch information
1 parent
5ab845e
commit 1f53514
Showing
26 changed files
with
358 additions
and
231 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
@props([ | ||
'location' => 'top', | ||
'route' => null | ||
]) | ||
|
||
@php | ||
$routeMap = [ | ||
'home.index' => 'home', | ||
'monitors.index' => 'monitors', | ||
'monitors.show' => 'monitor', | ||
'monitors.custom.index' => 'monitors', | ||
'monitors.custom.show' => 'monitor', | ||
'milestone.show' => 'milestone', | ||
'pdf.index' => 'pdf', | ||
'settings.index' => 'home', | ||
'settings.monitors.index' => 'home', | ||
'repositories.list' => 'monitors' | ||
]; | ||
$breadcrumbName = $route && isset($routeMap[$route]) ? $routeMap[$route] : $route; | ||
$breadcrumbs = $breadcrumbName ? Breadcrumbs::generate($breadcrumbName) : collect([]); | ||
@endphp | ||
|
||
@unless ($breadcrumbs->isEmpty()) | ||
@if($location === 'top') | ||
<div class="flex flex-col gap-1"> | ||
<nav class="flex gap-2 items-center"> | ||
@foreach ($breadcrumbs as $breadcrumb) | ||
@if (!is_null($breadcrumb->url) && !$loop->last) | ||
<a | ||
href="{{ $breadcrumb->url }}" | ||
class="transition-colors duration-200 text-primary-blue/70 hover:text-primary-blue font-sourceSansPro" | ||
> | ||
{{ $breadcrumb->title }} | ||
</a> | ||
@else | ||
<span class="font-semibold font-sourceSansPro text-primary-blue"> | ||
{{ $breadcrumb->title }} | ||
</span> | ||
@endif | ||
|
||
@unless($loop->last) | ||
<sl-icon name="chevron-right" class="text-sm text-primary-blue/40"></sl-icon> | ||
@endunless | ||
@endforeach | ||
</nav> | ||
</div> | ||
@else | ||
<nav class="flex items-center space-x-2 text-sm font-sourceSansPro text-primary-blue/70"> | ||
@foreach ($breadcrumbs as $breadcrumb) | ||
@if (!is_null($breadcrumb->url) && !$loop->last) | ||
<a | ||
href="{{ $breadcrumb->url }}" | ||
class="transition-colors duration-200 hover:text-primary-blue" | ||
> | ||
{{ $breadcrumb->title }} | ||
</a> | ||
@else | ||
<span class="text-primary-blue"> | ||
{{ $breadcrumb->title }} | ||
</span> | ||
@endif | ||
|
||
@unless($loop->last) | ||
<sl-icon name="chevron-right" class="text-sm opacity-70"></sl-icon> | ||
@endunless | ||
@endforeach | ||
</nav> | ||
@endif | ||
@endunless |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<footer class="py-6 mt-auto border-t bg-primary-blue/5 border-primary-blue/10"> | ||
<div class="container px-8 mx-auto"> | ||
<div class="flex flex-col justify-between items-center space-y-4 md:flex-row md:space-y-0"> | ||
<div class="flex gap-4 items-center text-sm text-primary-blue/70"> | ||
<span>© {{ date('Y') }} Propromo. All rights reserved.</span> | ||
<a | ||
href="https://github.com/propromo-software" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
class="inline-flex items-center transition-colors duration-200 hover:text-primary-blue" | ||
> | ||
<sl-icon style="font-size: 16px; margin-top: -1px;" name="github"></sl-icon> | ||
<span class="ml-1">GitHub</span> | ||
</a> | ||
</div> | ||
|
||
<x-breadcrumbs :route="$route" location="footer" /> | ||
</div> | ||
</div> | ||
</footer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,42 @@ | ||
<!DOCTYPE html> | ||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, viewport-fit=cover"> | ||
<meta name="csrf-token" content="{{ csrf_token() }}"> | ||
<title>{{ isset($title) ? $title.' - '.config('app.name') : config('app.name') }}</title> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, viewport-fit=cover"> | ||
<meta name="csrf-token" content="{{ csrf_token() }}"> | ||
<title>{{ isset($title) ? $title.' - '.config('app.name') : config('app.name') }}</title> | ||
|
||
@vite(['resources/css/app.css', 'resources/js/app.js']) | ||
@vite(['resources/css/app.css', 'resources/js/app.js']) | ||
|
||
</head> | ||
<body class="min-h-screen font-sans antialiased bg-base-200/50 dark:bg-base-200"> | ||
</head> | ||
<body class="relative min-h-screen font-sans antialiased bg-base-200/50 dark:bg-base-200"> | ||
<header class="sticky top-0 z-50"> | ||
@if(request()->path() !== '/' && request()->path() !== 'create-monitor' && request()->path() !== 'create-open-source-monitor' && request()->path() !== 'register' && request()->path() !== 'login' && request()->path() !== 'join') | ||
@include('components.layouts.navigation-logged-in') | ||
@else | ||
@include('components.layouts.navigation-logged-out') | ||
@endif | ||
</header> | ||
|
||
@if(request()->path() !== '/' && request()->path() !== 'create-monitor' && request()->path() !== 'create-open-source-monitor' && request()->path() !== 'register' && request()->path() !== 'login' && request()->path() !== 'join') | ||
@include('components.layouts.navigation-logged-in') | ||
@else | ||
@include('components.layouts.navigation-logged-out') | ||
@endif | ||
<main class="p-8 min-h-screen"> | ||
@if(request()->path() !== '/' && | ||
request()->path() !== 'create-monitor' && | ||
request()->path() !== 'create-open-source-monitor' && | ||
request()->path() !== 'register' && | ||
request()->path() !== 'login' && | ||
request()->path() !== 'join' && | ||
request()->path() !== 'settings/profile') | ||
<div class="container px-8 py-4 mx-auto"> | ||
<x-breadcrumbs route="{{ request()->route()->getName() }}" location="top" /> | ||
</div> | ||
@endif | ||
|
||
<main> | ||
@yield('content') | ||
{{ $slot }} | ||
</main> | ||
@yield('content') | ||
{{ $slot }} | ||
|
||
<livewire:base.api-changed-toast></livewire:base.api-changed-toast> | ||
</main> | ||
|
||
<livewire:base.api-changed-toast></livewire:base.api-changed-toast> | ||
|
||
</body> | ||
<x-footer :route="request()->route()->getName()" /> | ||
</body> | ||
</html> |
49 changes: 27 additions & 22 deletions
49
resources/views/components/layouts/navigation-logged-in.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,38 @@ | ||
<?php | ||
use Livewire\Volt\Component; | ||
new class extends Component { | ||
public $monitor_hash; | ||
} | ||
?> | ||
|
||
|
||
<div class="flex justify-between items-center gap-2 mt-5 mx-8 border-2 border-other-grey p-6 rounded-2xl"> | ||
<a class="font-koulen text-primary-blue text-5xl" href="{{ url('/') }}">PROPROMO</a> | ||
|
||
<div class="flex gap-x-5"> | ||
|
||
@if(count(request()->segments()) == 2 && request()->segment(1) == 'monitors') | ||
<livewire:base.copy-monitor-id> | ||
@endif | ||
|
||
<div class="flex items-center gap-2"> | ||
|
||
<a href="/settings/profile"> | ||
<sl-icon name="gear-wide-connected" class="text-3xl font-bold text-primary-blue"></sl-icon> | ||
</a> | ||
<a href="/settings/profile"> | ||
<sl-icon name="person-circle" class="text-3xl font-bold text-primary-blue"></sl-icon> | ||
</a> | ||
<div class="p-8"> | ||
<div class="flex justify-between items-center p-6 rounded-2xl border-2 backdrop-blur-sm bg-base-200/50 border-other-grey"> | ||
<a class="text-5xl font-koulen text-primary-blue text-uppercase" href="{{ url('/') }}">Propromo</a> | ||
|
||
<div class="flex gap-x-5 items-center"> | ||
@if(count(request()->segments()) == 2 && request()->segment(1) == 'monitors') | ||
<livewire:base.copy-monitor-id> | ||
@endif | ||
|
||
<nav class="flex gap-4 items-center"> | ||
<a href="{{ route('monitors.index') }}" class="flex gap-1 items-center transition-colors duration-200 text-primary-blue/70 hover:text-primary-blue"> | ||
<sl-icon name="display" class="text-xl"></sl-icon> | ||
<span>Monitors</span> | ||
</a> | ||
|
||
<div class="w-px h-6 bg-primary-blue/20"></div> | ||
|
||
<a href="{{ route('settings.index') }}" class="flex gap-1 items-center transition-colors duration-200 text-primary-blue/70 hover:text-primary-blue"> | ||
<sl-icon name="gear-wide-connected" class="text-xl"></sl-icon> | ||
<span>Settings</span> | ||
</a> | ||
|
||
<a href="{{ url('/logout') }}" class="flex gap-1 items-center transition-colors duration-200 text-primary-blue/70 hover:text-primary-blue"> | ||
<sl-icon name="box-arrow-right" class="text-xl"></sl-icon> | ||
<span>Logout</span> | ||
</a> | ||
</nav> | ||
</div> | ||
</div> | ||
</div> |
55 changes: 33 additions & 22 deletions
55
resources/views/components/layouts/navigation-logged-out.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,43 @@ | ||
@auth | ||
<div class="flex justify-between mt-5 mx-8 items-center"> | ||
<div> | ||
<a class="font-koulen text-primary-blue text-3xl" href="{{ url('/') }}">PROPROMO</a> | ||
</div> | ||
<div class="px-8"> | ||
<div class="flex justify-between items-center p-6 rounded-2xl border-2 backdrop-blur-sm bg-base-200/50 border-other-grey"> | ||
<a class="text-5xl font-koulen text-primary-blue text-uppercase" href="{{ url('/') }}">Propromo</a> | ||
|
||
<nav class="flex gap-4 items-center"> | ||
<a href="{{ route('monitors.index') }}" class="flex gap-1 items-center transition-colors duration-200 text-primary-blue/70 hover:text-primary-blue"> | ||
<sl-icon name="display" class="text-xl"></sl-icon> | ||
<span>Monitors</span> | ||
</a> | ||
|
||
<div class="flex gap-2"> | ||
<sl-button> | ||
<a href="{{ url('/monitors') }}">MONITORS</a> | ||
</sl-button> | ||
<sl-button> | ||
<a href="{{ url('/logout') }}">LOG OUT</a> | ||
</sl-button> | ||
<div class="w-px h-6 bg-primary-blue/20"></div> | ||
|
||
<a href="{{ url('/logout') }}" class="flex gap-1 items-center transition-colors duration-200 text-primary-blue/70 hover:text-primary-blue"> | ||
<sl-icon name="box-arrow-right" class="text-xl"></sl-icon> | ||
<span>Logout</span> | ||
</a> | ||
</nav> | ||
</div> | ||
</div> | ||
@else | ||
<div class="flex justify-between mt-5 mx-8 items-center"> | ||
<div> | ||
<a class="font-koulen text-primary-blue text-3xl" href="{{ url('/') }}">PROPROMO</a> | ||
</div> | ||
<div class="px-8"> | ||
<div class="flex justify-between items-center p-6 backdrop-blur-sm bg-base-200/50"> | ||
<a class="text-3xl font-koulen text-primary-blue text-uppercase" href="{{ url('/') }}">Propromo</a> | ||
|
||
<div class="flex gap-2"> | ||
<sl-button> | ||
<a href="{{ url('login') }}">LOG IN</a> | ||
</sl-button> | ||
<nav class="flex gap-4 items-center"> | ||
<a href="{{ url('login') }}" class="[&_sl-button::part(base)]:flex [&_sl-button::part(base)]:items-center [&_sl-button::part(base)]:gap-1"> | ||
<sl-button variant="default"> | ||
<sl-icon slot="prefix" name="box-arrow-in-right" class="text-lg align-middle"></sl-icon> | ||
<span class="align-middle">Login</span> | ||
</sl-button> | ||
</a> | ||
|
||
<sl-button> | ||
<a href="{{ url('register') }}">REGISTER</a> | ||
</sl-button> | ||
<a href="{{ url('register') }}" class="[&_sl-button::part(base)]:flex [&_sl-button::part(base)]:items-center [&_sl-button::part(base)]:gap-1"> | ||
<sl-button variant="default"> | ||
<sl-icon slot="prefix" name="person-plus" class="text-lg align-middle"></sl-icon> | ||
<span class="align-middle">Register</span> | ||
</sl-button> | ||
</a> | ||
</nav> | ||
</div> | ||
</div> | ||
@endauth |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.