Improve qsgen3 theme system: complete theme override and new minimal theme
- Remove legacy themes (black-orange, minimal) with old .tpl structure - Create new minimal theme with proper qsgen3 structure: - Complete layouts/ directory with all required templates - Modern CSS with responsive design and clean styling - Proper theme documentation in README.md - Update THEMES-HOWTO.md to accurately reflect theme behavior: - Clarify complete layout override (no fallback to defaults) - Document included minimal theme example - Correct layout processing documentation - Update site.conf to use new minimal theme CSS path - Ensure themes are complete packages when specified
This commit is contained in:
53
themes/minimal/layouts/index.html
Normal file
53
themes/minimal/layouts/index.html
Normal file
@ -0,0 +1,53 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>$site_name$ - $site_tagline$</title>
|
||||
$for(css)$
|
||||
<link rel="stylesheet" href="$css$">
|
||||
$endfor$
|
||||
$if(site_rss_url)$
|
||||
<link rel="alternate" type="application/rss+xml" title="RSS Feed" href="$site_rss_url$">
|
||||
$endif$
|
||||
</head>
|
||||
<body class="minimal-theme">
|
||||
<header class="site-header">
|
||||
<div class="container">
|
||||
<h1 class="site-title"><a href="$site_url$">$site_name$</a></h1>
|
||||
<p class="site-tagline">$site_tagline$</p>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main class="main-content">
|
||||
<div class="container">
|
||||
<section id="posts-list">
|
||||
<h2>Latest Posts</h2>
|
||||
$if(posts)$
|
||||
<div class="posts-grid">
|
||||
$for(posts)$
|
||||
<article class="post-card">
|
||||
<h3><a href="$posts.url$">$posts.title$</a></h3>
|
||||
$if(posts.date)$
|
||||
<p class="post-date">$posts.date$</p>
|
||||
$endif$
|
||||
$if(posts.summary)$
|
||||
<p class="post-summary">$posts.summary$</p>
|
||||
$endif$
|
||||
</article>
|
||||
$endfor$
|
||||
</div>
|
||||
$else$
|
||||
<p class="no-posts">No posts found.</p>
|
||||
$endif$
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer class="site-footer">
|
||||
<div class="container">
|
||||
<p>© $current_year$ $site_name$. Generated by qsgen3.</p>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
44
themes/minimal/layouts/page.html
Normal file
44
themes/minimal/layouts/page.html
Normal file
@ -0,0 +1,44 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>$title$ - $site_name$</title>
|
||||
<meta name="description" content="$description$">
|
||||
$for(css)$
|
||||
<link rel="stylesheet" href="$css$">
|
||||
$endfor$
|
||||
$if(math)$ $math$ $endif$
|
||||
</head>
|
||||
<body class="minimal-theme">
|
||||
<header class="site-header">
|
||||
<div class="container">
|
||||
<h1 class="site-title"><a href="/">$site_name$</a></h1>
|
||||
<p class="site-tagline">$site_tagline$</p>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main class="main-content">
|
||||
<div class="container">
|
||||
<article class="page">
|
||||
<header class="page-header">
|
||||
<h1 class="page-title">$title$</h1>
|
||||
</header>
|
||||
<div class="page-content">
|
||||
$body$
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<nav class="page-nav">
|
||||
<a href="/" class="back-link">← Back to Home</a>
|
||||
</nav>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer class="site-footer">
|
||||
<div class="container">
|
||||
<p>© $current_year$ $site_name$. Generated by qsgen3.</p>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
54
themes/minimal/layouts/post.html
Normal file
54
themes/minimal/layouts/post.html
Normal file
@ -0,0 +1,54 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>$title$ - $site_name$</title>
|
||||
<meta name="author" content="$author$">
|
||||
<meta name="description" content="$description$">
|
||||
$if(date)$<meta name="date" content="$date$">$endif$
|
||||
$for(css)$
|
||||
<link rel="stylesheet" href="$css$">
|
||||
$endfor$
|
||||
$if(math)$ $math$ $endif$
|
||||
</head>
|
||||
<body class="minimal-theme">
|
||||
<header class="site-header">
|
||||
<div class="container">
|
||||
<h1 class="site-title"><a href="/">$site_name$</a></h1>
|
||||
<p class="site-tagline">$site_tagline$</p>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main class="main-content">
|
||||
<div class="container">
|
||||
<article class="post">
|
||||
<header class="post-header">
|
||||
<h1 class="post-title">$title$</h1>
|
||||
<div class="post-meta">
|
||||
$if(author)$
|
||||
<span class="post-author">By: $author$</span>
|
||||
$endif$
|
||||
$if(date)$
|
||||
<span class="post-date">Published: $date$</span>
|
||||
$endif$
|
||||
</div>
|
||||
</header>
|
||||
<div class="post-content">
|
||||
$body$
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<nav class="post-nav">
|
||||
<a href="/" class="back-link">← Back to Home</a>
|
||||
</nav>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer class="site-footer">
|
||||
<div class="container">
|
||||
<p>© $current_year$ $site_name$. Generated by qsgen3.</p>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
24
themes/minimal/layouts/rss.xml
Normal file
24
themes/minimal/layouts/rss.xml
Normal file
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>$site_name$</title>
|
||||
<link>$site_url$</link>
|
||||
<description>$site_tagline$</description>
|
||||
<language>en-us</language>
|
||||
<lastBuildDate>$rfc_2822_date$</lastBuildDate>
|
||||
<atom:link href="$site_url$/rss.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
$if(posts)$
|
||||
$for(posts)$
|
||||
<item>
|
||||
<title>$it.post_title$</title>
|
||||
<link>$it.post_url$</link>
|
||||
<pubDate>$it.post_rfc_2822_date$</pubDate>
|
||||
<guid isPermaLink="true">$it.post_url$</guid>
|
||||
<description><![CDATA[$it.post_summary$]]></description>
|
||||
</item>
|
||||
$endfor$
|
||||
$endif$
|
||||
|
||||
</channel>
|
||||
</rss>
|
Reference in New Issue
Block a user