149 lines
4.4 KiB
HTML
149 lines
4.4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Pug Features Demo</title>
|
|
<style>
|
|
:root {
|
|
color-scheme: light;
|
|
--ink: #202124;
|
|
--muted: #5f6368;
|
|
--line: #dadce0;
|
|
--paper: #ffffff;
|
|
--soft: #f7f8fa;
|
|
--accent: #0b57d0;
|
|
--accent-soft: #e8f0fe;
|
|
--good: #137333;
|
|
--warn: #b06000;
|
|
}
|
|
|
|
* { box-sizing: border-box; }
|
|
|
|
body {
|
|
margin: 0;
|
|
background: var(--soft);
|
|
color: var(--ink);
|
|
font: 15px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
}
|
|
|
|
main {
|
|
width: min(960px, calc(100% - 32px));
|
|
margin: 32px auto;
|
|
}
|
|
|
|
header {
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
h1, h2, h3, p { margin-top: 0; }
|
|
h1 { font-size: 32px; line-height: 1.1; }
|
|
h2 { font-size: 20px; margin-bottom: 12px; }
|
|
h3 { font-size: 16px; margin-bottom: 6px; }
|
|
|
|
.muted { color: var(--muted); }
|
|
|
|
.panel, .feature-card {
|
|
background: var(--paper);
|
|
border: 1px solid var(--line);
|
|
border-radius: 8px;
|
|
}
|
|
|
|
.panel {
|
|
padding: 18px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.feature-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
|
|
gap: 12px;
|
|
margin: 0;
|
|
padding: 0;
|
|
list-style: none;
|
|
}
|
|
|
|
.feature-card {
|
|
padding: 14px;
|
|
}
|
|
|
|
.feature-card p { margin-bottom: 10px; }
|
|
|
|
.badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
min-height: 24px;
|
|
padding: 2px 8px;
|
|
border-radius: 999px;
|
|
background: var(--accent-soft);
|
|
color: var(--accent);
|
|
font-size: 12px;
|
|
font-weight: 650;
|
|
}
|
|
|
|
.badge--ready {
|
|
background: #e6f4ea;
|
|
color: var(--good);
|
|
}
|
|
|
|
.badge--practice {
|
|
background: #fef7e0;
|
|
color: var(--warn);
|
|
}
|
|
|
|
code {
|
|
background: #eef0f3;
|
|
border-radius: 4px;
|
|
padding: 1px 5px;
|
|
}
|
|
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<main>
|
|
<header>
|
|
<h1>Pug features for Ada Lovelace</h1>
|
|
<p class="muted">This page is rendered from <code>index.pug</code> and extends <code>layout.pug</code>.</p>
|
|
</header>
|
|
<section class="panel">
|
|
<h2>Interpolation</h2>
|
|
<p>Hello, Ada Lovelace. Your current plan is PRO.</p>
|
|
<p>The literal syntax is <code>#{name}</code>, which inserts escaped text into a line.</p>
|
|
</section>
|
|
<section class="panel">
|
|
<h2>Conditionals</h2>
|
|
<p>Welcome back, Ada Lovelace.</p>
|
|
<p>You are using the pro plan, so all examples are visible.</p>
|
|
</section>
|
|
<section class="panel">
|
|
<h2>Loops and Mixins</h2>
|
|
<ul class="feature-grid">
|
|
<li class="feature-card">
|
|
<h3>Interpolation</h3>
|
|
<p class="muted">Drop values into text with #{name} and escaped output.</p><span class="badge badge--ready">ready</span>
|
|
</li>
|
|
<li class="feature-card">
|
|
<h3>Conditionals</h3>
|
|
<p class="muted">Render different branches with if, else if, else, and case.</p><span class="badge badge--ready">ready</span>
|
|
</li>
|
|
<li class="feature-card">
|
|
<h3>Loops</h3>
|
|
<p class="muted">Repeat markup with each item in collection syntax.</p><span class="badge badge--ready">ready</span>
|
|
</li>
|
|
<li class="feature-card">
|
|
<h3>Includes and extends</h3>
|
|
<p class="muted">Compose pages from layouts and smaller partial files.</p><span class="badge badge--practice">practice</span>
|
|
</li>
|
|
<li class="feature-card">
|
|
<h3>Mixins</h3>
|
|
<p class="muted">Create reusable snippets that accept arguments.</p><span class="badge badge--ready">ready</span>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="panel">
|
|
<h2>Included Summary</h2>
|
|
<p>This section comes from <code>_summary.pug</code>. It can still read variables declared in <code>index.pug</code>, including <strong>Ada Lovelace</strong> and the feature count: <strong>5</strong>.</p>
|
|
</section>
|
|
</main>
|
|
</body>
|
|
</html> |