-
This commit is contained in:
@@ -0,0 +1,110 @@
|
||||
/* Flavor Theme - Custom Styles */
|
||||
|
||||
/* Base font */
|
||||
body {
|
||||
font-family: 'Inter', system-ui, -apple-system, sans-serif;
|
||||
}
|
||||
|
||||
/* Prose content styles for article body */
|
||||
.prose-content h1 { font-size: 2rem; font-weight: 700; margin: 1.5em 0 0.5em; line-height: 1.3; }
|
||||
.prose-content h2 { font-size: 1.5rem; font-weight: 600; margin: 1.5em 0 0.5em; line-height: 1.3; }
|
||||
.prose-content h3 { font-size: 1.25rem; font-weight: 600; margin: 1.25em 0 0.5em; line-height: 1.4; }
|
||||
.prose-content h4 { font-size: 1.125rem; font-weight: 600; margin: 1em 0 0.5em; line-height: 1.4; }
|
||||
|
||||
.prose-content p { margin: 1em 0; }
|
||||
|
||||
.prose-content a {
|
||||
color: #059669;
|
||||
text-decoration: underline;
|
||||
text-decoration-color: rgba(5, 150, 105, 0.3);
|
||||
text-underline-offset: 2px;
|
||||
transition: text-decoration-color 0.2s;
|
||||
}
|
||||
.prose-content a:hover {
|
||||
text-decoration-color: #059669;
|
||||
}
|
||||
|
||||
.prose-content ul,
|
||||
.prose-content ol {
|
||||
margin: 1em 0;
|
||||
padding-left: 1.5em;
|
||||
}
|
||||
.prose-content li { margin: 0.25em 0; }
|
||||
|
||||
.prose-content blockquote {
|
||||
border-left: 3px solid #059669;
|
||||
margin: 1.5em 0;
|
||||
padding: 0.5em 1em;
|
||||
color: #6b7280;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.prose-content pre {
|
||||
background: #1f2937;
|
||||
color: #e5e7eb;
|
||||
border-radius: 0.5rem;
|
||||
padding: 1rem;
|
||||
overflow-x: auto;
|
||||
margin: 1.5em 0;
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
.prose-content code {
|
||||
font-size: 0.875em;
|
||||
background: #f3f4f6;
|
||||
padding: 0.125em 0.375em;
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
|
||||
.prose-content pre code {
|
||||
background: none;
|
||||
padding: 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.prose-content img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
border-radius: 0.5rem;
|
||||
margin: 1.5em 0;
|
||||
}
|
||||
|
||||
.prose-content table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin: 1.5em 0;
|
||||
}
|
||||
.prose-content th,
|
||||
.prose-content td {
|
||||
border: 1px solid #e5e7eb;
|
||||
padding: 0.5em 0.75em;
|
||||
text-align: left;
|
||||
}
|
||||
.prose-content th {
|
||||
background: #f9fafb;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.prose-content hr {
|
||||
border: none;
|
||||
border-top: 1px solid #e5e7eb;
|
||||
margin: 2em 0;
|
||||
}
|
||||
|
||||
/* Dark mode prose overrides */
|
||||
`@media` (prefers-color-scheme: dark) {
|
||||
.prose-content code {
|
||||
background: `#374151`;
|
||||
}
|
||||
.prose-content blockquote {
|
||||
color: `#9ca3af`;
|
||||
}
|
||||
.prose-content th {
|
||||
background: `#1f2937`;
|
||||
}
|
||||
.prose-content th,
|
||||
.prose-content td {
|
||||
border-color: `#374151`;
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="<?php echo Theme::lang() ?>">
|
||||
<head>
|
||||
<?php include(THEME_DIR_PHP.'head.php'); ?>
|
||||
</head>
|
||||
<body class="bg-white dark:bg-gray-950 text-gray-900 dark:text-gray-100 antialiased">
|
||||
|
||||
<!-- Load Bludit Plugins: Site Body Begin -->
|
||||
<?php Theme::plugins('siteBodyBegin'); ?>
|
||||
|
||||
<!-- Navbar -->
|
||||
<?php include(THEME_DIR_PHP.'navbar.php'); ?>
|
||||
|
||||
<!-- Content -->
|
||||
<main class="max-w-2xl mx-auto px-4 py-8">
|
||||
<?php
|
||||
if ($url->notFound()) {
|
||||
include(THEME_DIR_PHP.'404.php');
|
||||
} elseif ($WHERE_AM_I === 'page') {
|
||||
include(THEME_DIR_PHP.'page.php');
|
||||
} else {
|
||||
include(THEME_DIR_PHP.'home.php');
|
||||
}
|
||||
?>
|
||||
</main>
|
||||
|
||||
<!-- Footer -->
|
||||
<?php include(THEME_DIR_PHP.'footer.php'); ?>
|
||||
|
||||
<!-- Load Bludit Plugins: Site Body End -->
|
||||
<?php Theme::plugins('siteBodyEnd'); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"theme-data":
|
||||
{
|
||||
"name": "Flavor",
|
||||
"description": "A minimal, clean blog theme powered by Tailwind CSS. Features a centered layout, elegant typography with Inter font, and emerald accents."
|
||||
},
|
||||
"Read more": "Read more",
|
||||
"Reading time": "Reading time",
|
||||
"read": "read",
|
||||
"Back to home": "Back to home",
|
||||
"Previous": "Previous",
|
||||
"Next": "Next"
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"author": "Bludit",
|
||||
"email": "",
|
||||
"website": "https://themes.bludit.com",
|
||||
"version": "3.22.0",
|
||||
"releaseDate": "2026-05-10",
|
||||
"license": "MIT",
|
||||
"compatible": "3.22",
|
||||
"notes": ""
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<article class="py-16 text-center">
|
||||
<p class="text-6xl font-bold text-gray-300 dark:text-gray-700 mb-4">404</p>
|
||||
<h1 class="text-2xl font-bold text-gray-900 dark:text-white mb-4">
|
||||
<?php echo $L->get('Page not found'); ?>
|
||||
</h1>
|
||||
<p class="text-gray-500 dark:text-gray-400 mb-8 max-w-md mx-auto">
|
||||
<?php echo $L->get('The page you are looking for does not exist or has been moved.'); ?>
|
||||
</p>
|
||||
<a href="<?php echo Theme::siteUrl(); ?>" class="inline-flex items-center text-sm font-medium text-accent-600 dark:text-accent-400 hover:text-accent-700 dark:hover:text-accent-300 no-underline transition-colors">
|
||||
← <?php echo $L->get('Back to home'); ?>
|
||||
</a>
|
||||
</article>
|
||||
@@ -0,0 +1,12 @@
|
||||
<footer class="border-t border-gray-200 dark:border-gray-800 mt-8">
|
||||
<div class="max-w-2xl mx-auto px-4 py-8">
|
||||
<div class="flex flex-col sm:flex-row items-center justify-between gap-4 text-sm text-gray-500 dark:text-gray-400">
|
||||
<p class="m-0"><?php echo $site->footer(); ?></p>
|
||||
<?php if (!defined('BLUDIT_PRO')): ?>
|
||||
<p class="m-0">
|
||||
Powered by <a href="https://www.bludit.com" target="_blank" rel="noopener" class="text-accent-600 dark:text-accent-400 hover:text-accent-700 dark:hover:text-accent-300 no-underline font-medium">Bludit</a>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
@@ -0,0 +1,207 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="generator" content="Bludit">
|
||||
|
||||
<!-- Dynamic title tag -->
|
||||
<?php echo Theme::metaTags('title'); ?>
|
||||
|
||||
<!-- Dynamic description tag -->
|
||||
<?php echo Theme::metaTags('description'); ?>
|
||||
|
||||
<!-- Canonical URL -->
|
||||
<?php if ($WHERE_AM_I === 'page'): ?>
|
||||
<link rel="canonical" href="<?php echo $page->permalink(); ?>">
|
||||
<?php else: ?>
|
||||
<link rel="canonical" href="<?php echo Theme::siteUrl(); ?>">
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Robots meta -->
|
||||
<?php if ($WHERE_AM_I === 'page'): ?>
|
||||
<?php
|
||||
$robotsDirectives = [];
|
||||
if ($page->noindex()) $robotsDirectives[] = 'noindex';
|
||||
if ($page->nofollow()) $robotsDirectives[] = 'nofollow';
|
||||
if ($page->noarchive()) $robotsDirectives[] = 'noarchive';
|
||||
if (!empty($robotsDirectives)):
|
||||
?>
|
||||
<meta name="robots" content="<?php echo implode(', ', $robotsDirectives); ?>">
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Open Graph -->
|
||||
<meta property="og:site_name" content="<?php echo $site->title(); ?>">
|
||||
<meta property="og:locale" content="<?php echo $site->locale(); ?>">
|
||||
<?php if ($WHERE_AM_I === 'page'): ?>
|
||||
<meta property="og:type" content="article">
|
||||
<meta property="og:title" content="<?php echo $page->title(); ?>">
|
||||
<meta property="og:description" content="<?php echo $page->description(); ?>">
|
||||
<meta property="og:url" content="<?php echo $page->permalink(); ?>">
|
||||
<?php if ($page->coverImage()): ?>
|
||||
<meta property="og:image" content="<?php echo $page->coverImage(true); ?>">
|
||||
<meta property="og:image:alt" content="<?php echo $page->title(); ?>">
|
||||
<?php endif; ?>
|
||||
<meta property="article:published_time" content="<?php echo $page->dateRaw(); ?>">
|
||||
<?php if ($page->dateModified('Y-m-d\TH:i:sP')): ?>
|
||||
<meta property="article:modified_time" content="<?php echo $page->dateModified('Y-m-d\TH:i:sP'); ?>">
|
||||
<?php endif; ?>
|
||||
<?php if ($page->user('nickname')): ?>
|
||||
<meta property="article:author" content="<?php echo $page->user('nickname'); ?>">
|
||||
<?php endif; ?>
|
||||
<?php $ogTags = $page->tags(true); ?>
|
||||
<?php foreach ($ogTags as $tagKey => $tagName): ?>
|
||||
<meta property="article:tag" content="<?php echo $tagName; ?>">
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:title" content="<?php echo $site->title(); ?>">
|
||||
<meta property="og:description" content="<?php echo $site->description(); ?>">
|
||||
<meta property="og:url" content="<?php echo Theme::siteUrl(); ?>">
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Twitter Card -->
|
||||
<meta name="twitter:card" content="<?php echo ($WHERE_AM_I === 'page' && $page->coverImage()) ? 'summary_large_image' : 'summary'; ?>">
|
||||
<?php if ($site->twitter()): ?>
|
||||
<meta name="twitter:site" content="<?php echo $site->twitter(); ?>">
|
||||
<?php endif; ?>
|
||||
<?php if ($WHERE_AM_I === 'page'): ?>
|
||||
<meta name="twitter:title" content="<?php echo $page->title(); ?>">
|
||||
<meta name="twitter:description" content="<?php echo $page->description(); ?>">
|
||||
<?php if ($page->coverImage()): ?>
|
||||
<meta name="twitter:image" content="<?php echo $page->coverImage(true); ?>">
|
||||
<meta name="twitter:image:alt" content="<?php echo $page->title(); ?>">
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<meta name="twitter:title" content="<?php echo $site->title(); ?>">
|
||||
<meta name="twitter:description" content="<?php echo $site->description(); ?>">
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- RSS Feed -->
|
||||
<?php if (Theme::rssUrl()): ?>
|
||||
<link rel="alternate" type="application/rss+xml" title="<?php echo $site->title(); ?> - RSS Feed" href="<?php echo Theme::rssUrl(); ?>">
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- JSON-LD Structured Data -->
|
||||
<?php if ($WHERE_AM_I === 'page' && !$page->isStatic()): ?>
|
||||
<script type="application/ld+json">
|
||||
<?php
|
||||
$jsonLd = [
|
||||
'@context' => 'https://schema.org',
|
||||
'@type' => 'BlogPosting',
|
||||
'mainEntityOfPage' => [
|
||||
'@type' => 'WebPage',
|
||||
'@id' => $page->permalink()
|
||||
],
|
||||
'headline' => $page->title(),
|
||||
'description' => $page->description(),
|
||||
'datePublished' => $page->dateRaw(),
|
||||
'url' => $page->permalink(),
|
||||
'publisher' => [
|
||||
'@type' => 'Organization',
|
||||
'name' => $site->title()
|
||||
]
|
||||
];
|
||||
if ($page->dateModified('Y-m-d\TH:i:sP')) {
|
||||
$jsonLd['dateModified'] = $page->dateModified('Y-m-d\TH:i:sP');
|
||||
}
|
||||
if ($page->coverImage()) {
|
||||
$jsonLd['image'] = [
|
||||
'@type' => 'ImageObject',
|
||||
'url' => $page->coverImage(true)
|
||||
];
|
||||
}
|
||||
if ($page->user('nickname')) {
|
||||
$jsonLd['author'] = [
|
||||
'@type' => 'Person',
|
||||
'name' => $page->user('nickname')
|
||||
];
|
||||
}
|
||||
$seoTags = $page->tags(true);
|
||||
if (!empty($seoTags)) {
|
||||
$jsonLd['keywords'] = implode(', ', array_values($seoTags));
|
||||
}
|
||||
if ($page->readingTime()) {
|
||||
$jsonLd['timeRequired'] = 'PT' . intval($page->readingTime()) . 'M';
|
||||
}
|
||||
echo json_encode($jsonLd, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);
|
||||
?>
|
||||
</script>
|
||||
|
||||
<!-- Breadcrumb JSON-LD -->
|
||||
<script type="application/ld+json">
|
||||
<?php
|
||||
$breadcrumbItems = [
|
||||
[
|
||||
'@type' => 'ListItem',
|
||||
'position' => 1,
|
||||
'name' => $site->title(),
|
||||
'item' => Theme::siteUrl()
|
||||
]
|
||||
];
|
||||
$position = 2;
|
||||
if ($page->categoryKey()) {
|
||||
$breadcrumbItems[] = [
|
||||
'@type' => 'ListItem',
|
||||
'position' => $position,
|
||||
'name' => $page->category(),
|
||||
'item' => $page->categoryPermalink()
|
||||
];
|
||||
$position++;
|
||||
}
|
||||
$breadcrumbItems[] = [
|
||||
'@type' => 'ListItem',
|
||||
'position' => $position,
|
||||
'name' => $page->title(),
|
||||
'item' => $page->permalink()
|
||||
];
|
||||
echo json_encode([
|
||||
'@context' => 'https://schema.org',
|
||||
'@type' => 'BreadcrumbList',
|
||||
'itemListElement' => $breadcrumbItems
|
||||
], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);
|
||||
?>
|
||||
</script>
|
||||
<?php elseif ($WHERE_AM_I !== 'page'): ?>
|
||||
<script type="application/ld+json">
|
||||
<?php
|
||||
echo json_encode([
|
||||
'@context' => 'https://schema.org',
|
||||
'@type' => 'WebSite',
|
||||
'name' => $site->title(),
|
||||
'description' => $site->description(),
|
||||
'url' => Theme::siteUrl()
|
||||
], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);
|
||||
?>
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Include Favicon -->
|
||||
<?php echo Theme::favicon('img/favicon.png'); ?>
|
||||
|
||||
<!-- Tailwind CSS v4 via CDN -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
|
||||
<style type="text/tailwindcss">
|
||||
@theme {
|
||||
--font-sans: 'Inter', system-ui, -apple-system, sans-serif;
|
||||
--color-accent-50: #ecfdf5;
|
||||
--color-accent-100: #d1fae5;
|
||||
--color-accent-200: #a7f3d0;
|
||||
--color-accent-300: #6ee7b7;
|
||||
--color-accent-400: #34d399;
|
||||
--color-accent-500: #10b981;
|
||||
--color-accent-600: #059669;
|
||||
--color-accent-700: #047857;
|
||||
--color-accent-800: #065f46;
|
||||
--color-accent-900: #064e3b;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- Google Fonts: Inter -->
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
|
||||
|
||||
<!-- Include CSS Styles from this theme -->
|
||||
<?php echo Theme::css('css/style.css'); ?>
|
||||
|
||||
<!-- Load Bludit Plugins: Site head -->
|
||||
<?php Theme::plugins('siteHead'); ?>
|
||||
@@ -0,0 +1,90 @@
|
||||
<?php if (empty($content)) : ?>
|
||||
<p class="text-gray-500 dark:text-gray-400 mt-8"><?php $language->p('No pages found') ?></p>
|
||||
<?php endif ?>
|
||||
|
||||
<div class="divide-y divide-gray-200 dark:divide-gray-800">
|
||||
<?php foreach ($content as $page) : ?>
|
||||
<article class="py-8">
|
||||
|
||||
<!-- Load Bludit Plugins: Page Begin -->
|
||||
<?php Theme::plugins('pageBegin'); ?>
|
||||
|
||||
<!-- Cover image -->
|
||||
<?php if ($page->coverImage()) : ?>
|
||||
<div class="mb-4 rounded-lg overflow-hidden">
|
||||
<img class="w-full h-auto" alt="<?php echo $page->title(); ?>" src="<?php echo $page->coverImage(); ?>" loading="lazy" />
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<!-- Date -->
|
||||
<time class="block text-sm text-gray-500 dark:text-gray-400 mb-2" datetime="<?php echo $page->dateRaw(); ?>">
|
||||
<?php echo $page->date(); ?>
|
||||
</time>
|
||||
|
||||
<!-- Title -->
|
||||
<h2 class="text-2xl font-bold mb-2">
|
||||
<a href="<?php echo $page->permalink(); ?>" class="text-gray-900 dark:text-white hover:text-accent-600 dark:hover:text-accent-400 transition-colors no-underline">
|
||||
<?php echo $page->title(); ?>
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
<!-- Reading time -->
|
||||
<p class="text-sm text-gray-500 dark:text-gray-400 mb-3">
|
||||
<?php echo $page->readingTime(); ?> <?php echo $L->get('read'); ?>
|
||||
</p>
|
||||
|
||||
<!-- Content excerpt -->
|
||||
<div class="prose-content text-gray-600 dark:text-gray-300 leading-relaxed">
|
||||
<?php echo $page->contentBreak(); ?>
|
||||
</div>
|
||||
|
||||
<!-- Read more -->
|
||||
<?php if ($page->readMore()) : ?>
|
||||
<a href="<?php echo $page->permalink(); ?>" class="inline-flex items-center mt-4 text-accent-600 dark:text-accent-400 hover:text-accent-700 dark:hover:text-accent-300 font-medium text-sm no-underline transition-colors">
|
||||
<?php echo $L->get('Read more'); ?> →
|
||||
</a>
|
||||
<?php endif ?>
|
||||
|
||||
<!-- Tags and Category -->
|
||||
<?php $tagsList = $page->tags(true); $categoryKey = $page->categoryKey(); ?>
|
||||
<?php if (!empty($tagsList) || $categoryKey) : ?>
|
||||
<div class="flex flex-wrap gap-2 mt-4">
|
||||
<?php if ($categoryKey) : ?>
|
||||
<a class="inline-block text-xs font-medium px-2.5 py-1 rounded-full bg-accent-100 text-accent-700 dark:bg-accent-900 dark:text-accent-300 hover:bg-accent-200 dark:hover:bg-accent-800 transition-colors no-underline" href="<?php echo $page->categoryPermalink(); ?>">
|
||||
<?php echo $page->category(); ?>
|
||||
</a>
|
||||
<?php endif ?>
|
||||
<?php foreach ($tagsList as $tagKey => $tagName) : ?>
|
||||
<a class="inline-block text-xs font-medium px-2.5 py-1 rounded-full bg-gray-100 text-gray-600 dark:bg-gray-800 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors no-underline" href="<?php echo DOMAIN_TAGS . $tagKey; ?>">
|
||||
<?php echo $tagName; ?>
|
||||
</a>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<!-- Load Bludit Plugins: Page End -->
|
||||
<?php Theme::plugins('pageEnd'); ?>
|
||||
|
||||
</article>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
|
||||
<!-- Pagination -->
|
||||
<?php if (Paginator::numberOfPages() > 1) : ?>
|
||||
<nav class="flex justify-between items-center py-8 border-t border-gray-200 dark:border-gray-800">
|
||||
<div>
|
||||
<?php if (Paginator::showPrev()) : ?>
|
||||
<a href="<?php echo htmlspecialchars(Paginator::previousPageUrl(), ENT_QUOTES, 'UTF-8') ?>" class="inline-flex items-center text-sm font-medium text-accent-600 dark:text-accent-400 hover:text-accent-700 dark:hover:text-accent-300 no-underline transition-colors">
|
||||
← <?php echo $L->get('Previous'); ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div>
|
||||
<?php if (Paginator::showNext()) : ?>
|
||||
<a href="<?php echo htmlspecialchars(Paginator::nextPageUrl(), ENT_QUOTES, 'UTF-8') ?>" class="inline-flex items-center text-sm font-medium text-accent-600 dark:text-accent-400 hover:text-accent-700 dark:hover:text-accent-300 no-underline transition-colors">
|
||||
<?php echo $L->get('Next'); ?> →
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</nav>
|
||||
<?php endif ?>
|
||||
@@ -0,0 +1,26 @@
|
||||
<header class="border-b border-gray-200 dark:border-gray-800">
|
||||
<div class="max-w-2xl mx-auto px-4 py-6 flex items-center justify-between">
|
||||
<a href="<?php echo Theme::siteUrl() ?>" class="text-xl font-bold text-gray-900 dark:text-white hover:text-accent-600 dark:hover:text-accent-400 transition-colors no-underline">
|
||||
<?php echo $site->title() ?>
|
||||
</a>
|
||||
<nav class="flex items-center gap-6 text-sm">
|
||||
<?php if ($site->homepage()): ?>
|
||||
<a class="text-gray-600 dark:text-gray-400 hover:text-accent-600 dark:hover:text-accent-400 transition-colors no-underline <?php echo ($WHERE_AM_I === 'blog') ? 'font-semibold text-accent-600 dark:text-accent-400' : '' ?>" href="<?php echo DOMAIN_BASE . ltrim($url->filters('blog'), '/') ?>">
|
||||
<?php echo $L->get('Blog') ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php foreach ($staticContent as $staticPage) : ?>
|
||||
<a class="text-gray-600 dark:text-gray-400 hover:text-accent-600 dark:hover:text-accent-400 transition-colors no-underline <?php echo ($url->slug() == $staticPage->slug()) ? 'font-semibold text-accent-600 dark:text-accent-400' : '' ?>" href="<?php echo $staticPage->permalink() ?>">
|
||||
<?php echo $staticPage->title() ?>
|
||||
</a>
|
||||
<?php endforeach ?>
|
||||
|
||||
<?php foreach (Theme::socialNetworks() as $key => $label) : ?>
|
||||
<a class="text-gray-400 hover:text-accent-600 dark:hover:text-accent-400 transition-colors no-underline" href="<?php echo $site->{$key}(); ?>" target="_blank" rel="noopener" title="<?php echo $label ?>">
|
||||
<?php echo $label ?>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
@@ -0,0 +1,96 @@
|
||||
<article class="py-8">
|
||||
|
||||
<!-- Load Bludit Plugins: Page Begin -->
|
||||
<?php Theme::plugins('pageBegin'); ?>
|
||||
|
||||
<?php if (!$page->isStatic() && !$url->notFound()): ?>
|
||||
<!-- Breadcrumb navigation -->
|
||||
<nav aria-label="Breadcrumb" class="mb-6">
|
||||
<ol class="flex items-center text-sm text-gray-500 dark:text-gray-400 gap-1.5">
|
||||
<li>
|
||||
<a href="<?php echo Theme::siteUrl(); ?>" class="hover:text-accent-600 dark:hover:text-accent-400 no-underline transition-colors">
|
||||
<?php echo $site->title(); ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php if ($page->categoryKey()): ?>
|
||||
<li class="flex items-center gap-1.5">
|
||||
<span aria-hidden="true">/</span>
|
||||
<a href="<?php echo $page->categoryPermalink(); ?>" class="hover:text-accent-600 dark:hover:text-accent-400 no-underline transition-colors">
|
||||
<?php echo $page->category(); ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<li class="flex items-center gap-1.5">
|
||||
<span aria-hidden="true">/</span>
|
||||
<span class="text-gray-700 dark:text-gray-300 font-medium truncate max-w-[200px]" aria-current="page">
|
||||
<?php echo $page->title(); ?>
|
||||
</span>
|
||||
</li>
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
<!-- Date and reading time -->
|
||||
<div class="mb-4">
|
||||
<time class="text-sm text-gray-500 dark:text-gray-400" datetime="<?php echo $page->dateRaw(); ?>">
|
||||
<?php echo $page->date(); ?>
|
||||
</time>
|
||||
<span class="text-sm text-gray-400 dark:text-gray-500 mx-2">·</span>
|
||||
<span class="text-sm text-gray-500 dark:text-gray-400">
|
||||
<?php echo $page->readingTime(); ?> <?php echo $L->get('read'); ?>
|
||||
</span>
|
||||
<?php if ($page->user('nickname')): ?>
|
||||
<span class="text-sm text-gray-400 dark:text-gray-500 mx-2">·</span>
|
||||
<span class="text-sm text-gray-500 dark:text-gray-400">
|
||||
<?php echo $page->user('nickname'); ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<!-- Title -->
|
||||
<h1 class="text-3xl font-bold text-gray-900 dark:text-white mb-6 leading-tight">
|
||||
<?php echo $page->title(); ?>
|
||||
</h1>
|
||||
|
||||
<!-- Cover image -->
|
||||
<?php if ($page->coverImage()): ?>
|
||||
<figure class="mb-8 rounded-lg overflow-hidden">
|
||||
<img class="w-full h-auto" alt="<?php echo $page->title(); ?>" src="<?php echo $page->coverImage(); ?>" loading="lazy" />
|
||||
</figure>
|
||||
<?php endif ?>
|
||||
|
||||
<!-- Full content -->
|
||||
<div class="prose-content text-gray-700 dark:text-gray-300 leading-relaxed">
|
||||
<?php echo $page->content(); ?>
|
||||
</div>
|
||||
|
||||
<!-- Tags and Category -->
|
||||
<?php $tagsList = $page->tags(true); $categoryKey = $page->categoryKey(); ?>
|
||||
<?php if (!empty($tagsList) || $categoryKey) : ?>
|
||||
<footer class="flex flex-wrap gap-2 mt-8 pt-6 border-t border-gray-200 dark:border-gray-800">
|
||||
<?php if ($categoryKey) : ?>
|
||||
<a class="inline-block text-xs font-medium px-2.5 py-1 rounded-full bg-accent-100 text-accent-700 dark:bg-accent-900 dark:text-accent-300 hover:bg-accent-200 dark:hover:bg-accent-800 transition-colors no-underline" href="<?php echo $page->categoryPermalink(); ?>">
|
||||
<?php echo $page->category(); ?>
|
||||
</a>
|
||||
<?php endif ?>
|
||||
<?php foreach ($tagsList as $tagKey => $tagName) : ?>
|
||||
<a class="inline-block text-xs font-medium px-2.5 py-1 rounded-full bg-gray-100 text-gray-600 dark:bg-gray-800 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors no-underline" href="<?php echo DOMAIN_TAGS . $tagKey; ?>">
|
||||
<?php echo $tagName; ?>
|
||||
</a>
|
||||
<?php endforeach ?>
|
||||
</footer>
|
||||
<?php endif ?>
|
||||
|
||||
<!-- Back to home -->
|
||||
<?php if (!$page->isStatic()) : ?>
|
||||
<div class="mt-8 pt-6 border-t border-gray-200 dark:border-gray-800">
|
||||
<a href="<?php echo Theme::siteUrl(); ?>" class="inline-flex items-center text-sm font-medium text-accent-600 dark:text-accent-400 hover:text-accent-700 dark:hover:text-accent-300 no-underline transition-colors">
|
||||
← <?php echo $L->get('Back to home'); ?>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<!-- Load Bludit Plugins: Page End -->
|
||||
<?php Theme::plugins('pageEnd'); ?>
|
||||
|
||||
</article>
|
||||
Reference in New Issue
Block a user