fixed backend errors, added delete and more configuration
This commit is contained in:
@@ -7,12 +7,15 @@ interface Props {
|
||||
|
||||
const { title } = Astro.props;
|
||||
|
||||
const API_URL = (typeof process !== 'undefined' ? process.env.PUBLIC_API_URL : import.meta.env.PUBLIC_API_URL) || 'http://localhost:3000';
|
||||
const API_URL = process.env.PUBLIC_API_URL || 'http://backend:3000';
|
||||
|
||||
let siteConfig = {
|
||||
title: "Narlblog",
|
||||
subtitle: "A clean, modern blog",
|
||||
footer: "Built with Rust & Astro",
|
||||
favicon: "/favicon.svg",
|
||||
theme: "catppuccin-mocha"
|
||||
theme: "mocha",
|
||||
custom_css: ""
|
||||
};
|
||||
|
||||
try {
|
||||
@@ -34,18 +37,21 @@ try {
|
||||
<link rel="icon" href={siteConfig.favicon} />
|
||||
<meta name="generator" content={Astro.generator} />
|
||||
<title>{title} | {siteConfig.title}</title>
|
||||
{siteConfig.custom_css && <style set:html={siteConfig.custom_css} />}
|
||||
</head>
|
||||
<body class="bg-base text-text selection:bg-surface2 selection:text-text">
|
||||
<body class={`bg-base text-text selection:bg-surface2 selection:text-text ${siteConfig.theme}`}>
|
||||
<div class="fixed inset-0 z-[-1] bg-[radial-gradient(ellipse_at_top,_var(--tw-gradient-stops))] from-surface0 via-base to-base"></div>
|
||||
|
||||
<nav class="max-w-4xl mx-auto px-6 py-8">
|
||||
<header class="glass px-6 py-4 flex items-center justify-between">
|
||||
<a href="/" class="text-2xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-mauve to-blue">
|
||||
{siteConfig.title}
|
||||
</a>
|
||||
<div class="flex gap-4">
|
||||
<div>
|
||||
<a href="/" class="text-2xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-mauve to-blue block">
|
||||
{siteConfig.title}
|
||||
</a>
|
||||
<p class="text-[10px] text-subtext0 uppercase tracking-widest">{siteConfig.subtitle}</p>
|
||||
</div>
|
||||
<div class="flex gap-4 items-center">
|
||||
<a href="/" class="text-subtext0 hover:text-text transition-colors">Home</a>
|
||||
<a href="https://github.com/narl" target="_blank" class="text-subtext0 hover:text-text transition-colors">About</a>
|
||||
<a href="/admin" class="text-subtext0 hover:text-mauve transition-colors">Admin</a>
|
||||
</div>
|
||||
</header>
|
||||
@@ -55,8 +61,11 @@ try {
|
||||
<slot />
|
||||
</main>
|
||||
|
||||
<footer class="max-w-4xl mx-auto px-6 py-8 text-center text-sm text-subtext0">
|
||||
© {new Date().getFullYear()} {siteConfig.title}. Built with Rust & Astro.
|
||||
<footer class="max-w-4xl mx-auto px-6 py-12 text-center text-sm text-subtext1 border-t border-white/5 mt-12">
|
||||
<p class="mb-2">{siteConfig.footer}</p>
|
||||
<div class="text-subtext0 opacity-50">
|
||||
© {new Date().getFullYear()} {siteConfig.title}
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user