File tree 6 files changed +58
-13
lines changed
6 files changed +58
-13
lines changed Original file line number Diff line number Diff line change 13
13
</div >
14
14
15
15
<div
16
- class =" absolute {{ $alignmentClasses [$alignment ] } } z-20 bg-white rounded shadow-md py-2 mt-1 w-40"
16
+ class =" absolute {{ $alignmentClasses [$alignment ] } } z-20 bg-white text-black rounded shadow-md py-2 mt-1 w-40"
17
17
x-show =" open"
18
18
x-transition:enter =" transition transform duration-300"
19
19
x-transition:enter-start =" opacity-0 scale-95"
Original file line number Diff line number Diff line change 7
7
content =" width=device-width, initial-scale=1"
8
8
>
9
9
10
- <title >Laravel </title >
10
+ <title >Blade Component Examples </title >
11
11
12
12
<link href =" https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css"
13
13
rel =" stylesheet"
17
17
</head >
18
18
19
19
<body >
20
+ @include (' partials/header' )
20
21
21
22
{{ $slot } }
22
23
Original file line number Diff line number Diff line change
1
+ @props ([' route' ] )
2
+
3
+ @php
4
+ $classes = Request:: routeIs ($route ) ? ' text-blue-500 underline' : ' hover:text-blue-500' ;
5
+ @endphp
6
+
7
+ <a href =" {{ route ($route ) } }" {{ $attributes -> merge ([' class' => " px-6 hover:underline {$classes }" ]) } } >
8
+ {{ $slot } }
9
+ </a >
Original file line number Diff line number Diff line change
1
+ <header class =" bg-gray-700 text-white px-6 py-4 flex justify-between items-center" >
2
+ <h1 class =" font-bold tracking-widest uppercase" >Laracasts</h1 >
3
+
4
+ <nav >
5
+ <x-nav-link route =" home" >Home</x-nav-link >
6
+ <x-nav-link route =" about" >About</x-nav-link >
7
+ <x-nav-link route =" testimonials" >Testimonials</x-nav-link >
8
+ <x-nav-link route =" contact" >Contact</x-nav-link >
9
+ </nav >
10
+
11
+ <x-dropdown alignment =" right" >
12
+ <x-slot name =" trigger" >
13
+ <button >
14
+ <img src =" https://www.placecage.com/30/30"
15
+ class =" rounded-full border border-white"
16
+ alt =" "
17
+ >
18
+ </button >
19
+ </x-slot >
20
+
21
+ <x-dropdown-link href =" #" >Account</x-dropdown-link >
22
+ <x-dropdown-link href =" #" >Support</x-dropdown-link >
23
+ </x-dropdown >
24
+ </header >
Original file line number Diff line number Diff line change 1
1
<x-layout >
2
2
<x-section >
3
- <div >
4
- <x-dropdown >
5
- <x-slot name =" trigger" >
6
- <button >Click Me</button >
7
- </x-slot >
8
-
9
- <x-dropdown-link href =" /" >One</x-dropdown-link >
10
- <x-dropdown-link href =" /" >Two</x-dropdown-link >
11
- <x-dropdown-link href =" /" >Three</x-dropdown-link >
12
- </x-dropdown >
13
- </div >
3
+ <p >
4
+ Hello World
5
+ </p >
14
6
</x-section >
15
7
</x-layout >
Original file line number Diff line number Diff line change 4
4
use App \Comment ;
5
5
6
6
7
+ // Select Nav Link Setup
8
+
7
9
Route::get ('/ ' , function () {
8
10
return view ('welcome ' );
11
+ })->name ('home ' );
12
+
13
+ Route::get ('/about ' , function () {
14
+ return view ('welcome ' );
15
+ })->name ('about ' );
16
+
17
+ Route::get ('/testimonials ' , function () {
18
+ return view ('welcome ' );
19
+ })->name ('testimonials ' );
20
+
21
+ Route::get ('/contact ' , function () {
22
+ return view ('welcome ' );
23
+ })->name ('contact ' );
24
+
25
+ Route::get ('/contact-team ' , function () {
26
+ return view ('welcome ' );
9
27
});
10
28
29
+
11
30
Route::get ('/comments/{comment}/edit ' , function (Comment $ comment ) {
12
31
return view ('comments.edit ' , ['comment ' => $ comment ]);
13
32
});
You can’t perform that action at this time.
0 commit comments