Skip to content

Commit

Permalink
added wire:navigate to links / fix images
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Jongstra authored and Justin Jongstra committed Sep 30, 2023
1 parent b595345 commit 124d856
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion app/Models/About.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class About extends Model

public function getFiles()
{
$files = glob(public_path('about/*'));
$files = glob(public_path('storage/about/*'));
$files = array_map('basename', $files);
sort($files);
return $files;
Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/anchor-link.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@props(['value', 'href' => '#'])

<a {{ $attributes->merge(['class' => 'inline-flex items-center px-4 py-2 bg-gray-800 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest hover:bg-gray-700 active:bg-gray-900 focus:outline-none focus:border-gray-900 focus:shadow-outline-gray disabled:opacity-25 transition ease-in-out duration-150']) }}
<a wire:navigate {{ $attributes->merge(['class' => 'inline-flex items-center px-4 py-2 bg-gray-800 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest hover:bg-gray-700 active:bg-gray-900 focus:outline-none focus:border-gray-900 focus:shadow-outline-gray disabled:opacity-25 transition ease-in-out duration-150']) }}
href="{{ $href }}">
{{ $value ?? $slot }}
</a>
2 changes: 1 addition & 1 deletion resources/views/layouts/navigation.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="flex">
<!-- Logo -->
<div class="shrink-0 flex items-center">
<a href="{{ route('welcome') }}" class="text-gray-500 dark:text-gray-400">
<a wire:navigate href="{{ route('welcome') }}" class="text-gray-500 dark:text-gray-400">
Welcome
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/livewire/about-carousel.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class="item pr-4 pl-4 h-80 min-h-80 flex justify-between flex-col rounded-lg ove
<div class="overflow-hidden sm:rounded-lg h-full">
<div class="content-center">
<div class="flex items-center justify-center">
<img src="about/{{ $image }}"
<img src="storage/about/{{ $image }}"
class="w-auto h-72 object-cover scale-100 hover:scale-105 transition duration-300 ease-in-out transform hover:-translate-y-1 hover:shadow-md rounded-lg mt-4 mb-4">
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/livewire/project/project-cards.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class="text-indigo-600 hover:text-indigo-900 dark:text-indigo-400 dark:hover:tex
</div>

<div class="px-4 py-2 bg-gray-50 dark:bg-gray-800 sm:px-6 cursor-pointer"
onclick="window.location.href = '/project/{{ $project->id }}'">
onclick="window.location.href = '/project/{{ $project->id }}'">
<div class="content-center">
<div class="flex items-center justify-center h-40 pb-4">
@php
Expand Down
13 changes: 7 additions & 6 deletions resources/views/welcome.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ class="relative sm:flex sm:justify-center sm:items-center min-h-screen bg-dots-d
@if (Route::has('login'))
<div class="sm:fixed sm:top-0 sm:right-0 p-6 text-right">
@auth
<a href="{{ url('/dashboard') }}"
<a wire:navigate href="{{ url('/dashboard') }}"
class="font-semibold text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white focus:outline focus:outline-2 focus:rounded-sm focus:outline-red-500">Dashboard</a>
@else
<a href="{{ route('login') }}"
<a wire:navigate href="{{ route('login') }}"
class="font-semibold text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white focus:outline focus:outline-2 focus:rounded-sm focus:outline-red-500">Log
in</a>
@endauth
Expand All @@ -48,10 +48,11 @@ class="text-purple-400 dark:text-purple-500">IJssel</span></a>
</p>
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4 mt-8">
<div class="text-center text-gray-600 dark:text-gray-400 font-bold sm:mt-0 lg:mt-32">
<h3 class="text-2xl text-gray-800 dark:text-gray-200 font-extrabold"
onclick="window.location.href = '/home'">
<x-primary-button>View more</x-primary-button>
</h3>
<h3 class="text-2xl text-gray-800 dark:text-gray-200 font-extrabold">
<a wire:navigate.hover href="/home"
<x-primary-button>View more</x-primary-button>
</a>
</h3>
</div>
<div class="h-48 w-48 hidden sm:block">
<x-application-logo class="block h-12 w-auto fill-current text-gray-600 dark:text-gray-400"/>
Expand Down

0 comments on commit 124d856

Please sign in to comment.