2025-09-20 16:47:41 +03:00
<! DOCTYPE html >
< html lang = "{{ str_replace('_', '-', app()->getLocale()) }}" >
< head >
< meta charset = "utf-8" >
< meta name = "viewport" content = "width=device-width, initial-scale=1" >
<!-- Google tag ( gtag . js ) -->
< script async src = "https://www.googletagmanager.com/gtag/js?id=G-D5Z2BTSK43" ></ script >
< script >
window . dataLayer = window . dataLayer || [];
function gtag (){ dataLayer . push ( arguments );}
gtag ( 'js' , new Date ());
gtag ( 'config' , 'G-D5Z2BTSK43' );
</ script >
<!-- CSRF Token -->
< meta name = "csrf-token" content = "{{ csrf_token() }}" >
2025-09-27 16:33:31 +03:00
< title >@ yield ( 'page_title' , config ( 'app.name' , 'OpenTextSummaries' )) </ title >
< meta name = "description" content = "@yield('meta_description', 'OpenTextSummaries provides free, concise book summaries, key insights, and community reviews to help you learn faster.')" >
2025-09-20 16:47:41 +03:00
<!-- Fonts -->
< link rel = "preconnect" href = "https://fonts.bunny.net" >
< link href = "https://fonts.bunny.net/css?family=instrument-sans:400,500,600|playfair-display:700" rel = "stylesheet" />
<!-- Tailwind CSS ( CDN ) to ensure modern styling regardless of Vite build ) -->
< script src = "https://cdn.tailwindcss.com" ></ script >
<!-- Vite ( JS and any additional assets ) -->
@ if ( file_exists ( public_path ( 'build/manifest.json' )) || file_exists ( public_path ( 'hot' )))
@ vite ([ 'resources/css/app.css' , 'resources/js/app.js' ])
@ endif
</ head >
< body class = "bg-gray-50 text-gray-900 min-h-screen" >
< div id = "app" class = "flex flex-col min-h-screen" >
<!-- Header -->
< header class = "bg-white/80 backdrop-blur border-b border-gray-100" >
< div class = "container mx-auto px-4" >
< div class = "flex items-center justify-between py-4" >
< a href = "{{ url('/') }}" class = "flex items-center gap-2" >
< svg class = "w-8 h-8 text-indigo-600" viewBox = "0 0 24 24" fill = "none" xmlns = "http://www.w3.org/2000/svg" >
< path d = "M12 6.25278V19.2528M12 6.25278C10.8321 5.47686 9.24649 5 7.5 5C5.75351 5 4.16789 5.47686 3 6.25278V19.2528C4.16789 18.4769 5.75351 18 7.5 18C9.24649 18 10.8321 18.4769 12 19.2528M12 6.25278C13.1679 5.47686 14.7535 5 16.5 5C18.2465 5 19.8321 5.47686 21 6.25278V19.2528C19.8321 18.4769 18.2465 18 16.5 18C14.7535 18 13.1679 18.4769 12 19.2528" stroke = "currentColor" stroke - width = "2" stroke - linecap = "round" stroke - linejoin = "round" />
</ svg >
< span class = "text-xl font-bold text-indigo-700" > {{ config ( 'app.name' , 'OpenTextSummaries' ) }} </ span >
</ a >
< nav class = "flex items-center gap-6" >
< a href = "{{ route('books.index') }}" class = "text-sm font-medium text-gray-700 hover:text-indigo-600" > All Books </ a >
@ auth
< a href = "{{ route('readlist.index') }}" class = "text-sm font-medium text-gray-700 hover:text-indigo-600" > Readlist </ a >
< a href = "{{ route('requests.create') }}" class = "text-sm font-medium text-gray-700 hover:text-indigo-600" > Request Summary </ a >
@ endauth
@ guest
@ if ( Route :: has ( 'login' ))
< a href = "{{ route('login') }}" class = "text-sm font-medium text-gray-700 hover:text-indigo-600" > Login </ a >
@ endif
@ if ( Route :: has ( 'register' ))
< a href = "{{ route('register') }}" class = "px-4 py-2 bg-indigo-600 hover:bg-indigo-700 text-white rounded-lg text-sm font-semibold shadow-sm transition-colors" > Register </ a >
@ endif
@ else
< div class = "relative" x - data = "{ open:false }" >
< button @ click = "open=!open" class = "flex items-center gap-2 text-sm font-medium text-gray-700 hover:text-indigo-600" >
< span > {{ Auth :: user () -> name }} </ span >
< svg class = "w-4 h-4" viewBox = "0 0 20 20" fill = "currentColor" >< path fill - rule = "evenodd" d = "M5.23 7.21a.75.75 0 011.06.02L10 10.94l3.71-3.71a.75.75 0 111.06 1.06l-4.24 4.24a.75.75 0 01-1.06 0L5.21 8.29a.75.75 0 01.02-1.08z" clip - rule = "evenodd" /></ svg >
</ button >
< div x - show = "open" @ click . outside = "open=false" class = "absolute right-0 mt-2 w-40 bg-white border border-gray-100 rounded-lg shadow-lg py-1 z-10" >
< a href = "#" class = "block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50" onclick = "event.preventDefault(); document.getElementById('logout-form').submit();" > Logout </ a >
</ div >
</ div >
< form id = "logout-form" action = "{{ route('logout') }}" method = "POST" class = "hidden" >
@ csrf
</ form >
@ endguest
</ nav >
</ div >
</ div >
</ header >
<!-- Main content -->
< main class = "flex-1 py-8" >
< div class = "container mx-auto px-4" >
@ yield ( 'content' )
</ div >
</ main >
<!-- Footer -->
< footer class = "bg-white border-t border-gray-100 py-8" >
< div class = "container mx-auto px-4 flex flex-col md:flex-row items-center justify-between gap-4" >
< div class = "flex items-center gap-2 text-gray-700" >
< svg class = "w-6 h-6 text-indigo-600" viewBox = "0 0 24 24" fill = "none" xmlns = "http://www.w3.org/2000/svg" >
< path d = "M12 6.25278V19.2528M12 6.25278C10.8321 5.47686 9.24649 5 7.5 5C5.75351 5 4.16789 5.47686 3 6.25278V19.2528C4.16789 18.4769 5.75351 18 7.5 18C9.24649 18 10.8321 18.4769 12 19.2528M12 6.25278C13.1679 5.47686 14.7535 5 16.5 5C18.2465 5 19.8321 5.47686 21 6.25278V19.2528C19.8321 18.4769 18.2465 18 16.5 18C14.7535 18 13.1679 18.4769 12 19.2528" stroke = "currentColor" stroke - width = "2" stroke - linecap = "round" stroke - linejoin = "round" />
</ svg >
< span class = "font-semibold" > {{ config ( 'app.name' , 'OpenTextSummaries' ) }} </ span >
</ div >
< div class = "flex items-center gap-6 text-sm" >
< a href = "{{ route('about') }}" class = "text-gray-600 hover:text-indigo-600" > About </ a >
< a href = "{{ route('contact.show') }}" class = "text-gray-600 hover:text-indigo-600" > Contact </ a >
< a href = "{{ route('privacy') }}" class = "text-gray-600 hover:text-indigo-600" > Privacy </ a >
< a href = "{{ route('terms') }}" class = "text-gray-600 hover:text-indigo-600" > Terms </ a >
</ div >
< p class = "text-sm text-gray-500" >& copy ; {{ date ( 'Y' ) }} {{ config ( 'app.name' , 'OpenTextSummaries' ) }} . All rights reserved .</ p >
</ div >
</ footer >
</ div >
<!-- Small Alpine - like dropdown ( uses minimal inline Alpine substitute ) -->
< script >
// Minimal dropdown handler for the user menu without adding full Alpine dependency.
document . addEventListener ( 'click' , ( e ) => {
document . querySelectorAll ( '[x-data] [x-show]' ) ?. forEach ( menu => {
if ( ! menu . parentElement . contains ( e . target )) {
menu . style . display = 'none' ;
}
});
});
document . querySelectorAll ( '[x-data] button' ) ?. forEach ( btn => {
btn . addEventListener ( 'click' , ( e ) => {
const menu = btn . parentElement . querySelector ( '[x-show]' );
if ( menu ) {
e . stopPropagation ();
menu . style . display = ( menu . style . display === 'block' ) ? 'none' : 'block' ;
}
});
});
</ script >
</ body >
</ html >