package templates

templ Layout(title string) {
	<!DOCTYPE html>
	<html lang="en">
		<head>
			<meta charset="UTF-8"/>
			<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
			<title>{ title }</title>
			<link rel="stylesheet" href="/static/css/style.css"/>
			<script src="https://unpkg.com/htmx.org@1.9.11"></script>
		</head>
		<body>
			<header>
				<div class="header-top">
					<div class="header-left">
						<a href="/" class="logo">/mal</a>
						<div class="nav">
							<a href="/">Catalog</a>
							<a href="/discover">Discover</a>
							<a href="/schedule">Schedule</a>
							<a href="/notifications">Notifications</a>
							<a href="/watchlist">Watchlist</a>
						</div>
					</div>
					<div class="header-search-wrapper">
						<form action="/search" method="GET" class="header-search">
							<input type="text" id="search-input" name="q" class="search-input" placeholder="Search anime..." autocomplete="off"/>
							<div id="search-dropdown" class="search-dropdown"></div>
						</form>
					</div>
				</div>
			</header>
			<main>
				{ children... }
			</main>
			<script src="/static/js/search.js"></script>
		</body>
	</html>
}
