mirror of
https://github.com/kennethreitz/kjvstudy.org.git
synced 2026-06-21 06:50:56 +00:00
3a4862a2f9
Simplifies the kids story pages by removing the themes list section from both the web view and PDF templates. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
372 lines
9.5 KiB
HTML
372 lines
9.5 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}{{ story.kids_title }} - Bible Stories for Kids - KJV Study{% endblock %}
|
|
{% block description %}{{ story.kids_description }}{% endblock %}
|
|
|
|
{% block og_type %}article{% endblock %}
|
|
{% block og_title %}{{ story.kids_title }} - Bible Story for Kids{% endblock %}
|
|
{% block og_description %}{{ story.kids_description }}{% endblock %}
|
|
|
|
{% block head %}
|
|
<style>
|
|
.kids-header {
|
|
background: linear-gradient(135deg, #dbeafe 0%, #ede9fe 50%, #fce7f3 100%);
|
|
padding: 2.5rem;
|
|
border-radius: 16px;
|
|
margin-bottom: 2rem;
|
|
text-align: center;
|
|
}
|
|
.kids-header .category-link {
|
|
display: inline-block;
|
|
font-size: 0.85rem;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.1em;
|
|
color: #7c3aed;
|
|
text-decoration: none;
|
|
background: rgba(255,255,255,0.7);
|
|
padding: 0.25rem 0.75rem;
|
|
border-radius: 20px;
|
|
margin-bottom: 0.75rem;
|
|
}
|
|
.kids-header h1 {
|
|
color: #4338ca;
|
|
margin: 0.5rem 0;
|
|
font-size: 2.5rem;
|
|
}
|
|
.kids-header .subtitle {
|
|
color: #6366f1;
|
|
font-size: 1.1rem;
|
|
margin: 0;
|
|
}
|
|
|
|
.kids-meta {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
justify-content: center;
|
|
gap: 1rem;
|
|
margin: 1.5rem 0 2rem;
|
|
}
|
|
.kids-meta-item {
|
|
background: #fff;
|
|
border: 2px solid #e5e7eb;
|
|
border-radius: 12px;
|
|
padding: 1rem 1.5rem;
|
|
text-align: center;
|
|
min-width: 140px;
|
|
}
|
|
.kids-meta-item .label {
|
|
font-size: 0.7rem;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.1em;
|
|
color: #9ca3af;
|
|
margin-bottom: 0.25rem;
|
|
}
|
|
.kids-meta-item .value {
|
|
font-size: 0.95rem;
|
|
color: #374151;
|
|
}
|
|
.kids-meta-item .value a {
|
|
color: #6366f1;
|
|
text-decoration: none;
|
|
}
|
|
.kids-meta-item .value a:hover {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.characters-row {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
justify-content: center;
|
|
gap: 0.5rem;
|
|
margin: 1rem 0;
|
|
}
|
|
.character-badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.4rem;
|
|
background: linear-gradient(135deg, #dbeafe, #e0e7ff);
|
|
padding: 0.4rem 0.8rem;
|
|
border-radius: 20px;
|
|
font-size: 0.9rem;
|
|
color: #3730a3;
|
|
}
|
|
.character-badge::before {
|
|
content: "★";
|
|
font-size: 0.7rem;
|
|
}
|
|
|
|
/* Story divider */
|
|
hr.story-divider {
|
|
border: 0;
|
|
height: 0;
|
|
text-align: center;
|
|
margin: 2rem 0;
|
|
}
|
|
hr.story-divider::before {
|
|
content: "* * *";
|
|
font-size: 1rem;
|
|
letter-spacing: 0.6em;
|
|
color: #c4b5fd;
|
|
}
|
|
|
|
.themes-section {
|
|
background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
|
|
border-radius: 16px;
|
|
padding: 2rem;
|
|
margin: 2.5rem 0;
|
|
text-align: center;
|
|
}
|
|
.themes-section h3 {
|
|
color: #92400e;
|
|
margin: 0 0 1rem 0;
|
|
font-size: 1.3rem;
|
|
}
|
|
.themes-list {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
justify-content: center;
|
|
gap: 0.75rem;
|
|
list-style: none;
|
|
padding: 0;
|
|
margin: 0;
|
|
}
|
|
.themes-list li {
|
|
background: rgba(255,255,255,0.8);
|
|
padding: 0.5rem 1rem;
|
|
border-radius: 20px;
|
|
font-size: 0.95rem;
|
|
color: #78350f;
|
|
}
|
|
|
|
.adult-callout {
|
|
background: #fff;
|
|
border: 2px dashed #c4b5fd;
|
|
border-radius: 12px;
|
|
padding: 1.5rem 2rem;
|
|
margin: 2rem 0;
|
|
text-align: center;
|
|
}
|
|
.adult-callout p {
|
|
margin: 0;
|
|
color: #6b7280;
|
|
}
|
|
.adult-callout a {
|
|
color: #7c3aed;
|
|
font-weight: 600;
|
|
text-decoration: none;
|
|
}
|
|
.adult-callout a:hover {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.kids-nav {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-top: 3rem;
|
|
padding-top: 1.5rem;
|
|
border-top: 2px dashed #e5e7eb;
|
|
gap: 1rem;
|
|
}
|
|
.kids-nav .nav-prev,
|
|
.kids-nav .nav-next {
|
|
flex: 1;
|
|
max-width: 40%;
|
|
}
|
|
.kids-nav .nav-prev {
|
|
text-align: left;
|
|
}
|
|
.kids-nav .nav-next {
|
|
text-align: right;
|
|
}
|
|
.kids-nav .nav-center {
|
|
text-align: center;
|
|
}
|
|
.kids-nav .nav-label {
|
|
display: block;
|
|
font-size: 0.7rem;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.1em;
|
|
color: #9ca3af;
|
|
margin-bottom: 0.25rem;
|
|
}
|
|
.kids-nav .nav-link {
|
|
font-size: 0.95rem;
|
|
color: #7c3aed;
|
|
text-decoration: none;
|
|
}
|
|
.kids-nav .nav-link:hover {
|
|
text-decoration: underline;
|
|
}
|
|
.kids-nav .nav-disabled {
|
|
font-size: 0.95rem;
|
|
color: #d1d5db;
|
|
}
|
|
|
|
/* PDF download button */
|
|
.print-btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 0.5rem;
|
|
padding: 0.6rem 1.2rem;
|
|
font-size: 0.9rem;
|
|
color: #7c3aed;
|
|
background: #fff;
|
|
border: 2px solid #c4b5fd;
|
|
border-radius: 20px;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
margin: 1.5rem auto;
|
|
text-decoration: none;
|
|
}
|
|
.print-btn:hover {
|
|
background: #f5f0ff;
|
|
border-color: #8b5cf6;
|
|
text-decoration: none;
|
|
}
|
|
.print-btn svg {
|
|
width: 18px;
|
|
height: 18px;
|
|
}
|
|
|
|
/* Print styles */
|
|
@media print {
|
|
.kids-header {
|
|
background: none;
|
|
padding: 0;
|
|
text-align: left;
|
|
}
|
|
|
|
.kids-header .category-link,
|
|
.kids-meta,
|
|
.characters-row,
|
|
.themes-section,
|
|
.adult-callout,
|
|
.kids-nav {
|
|
display: none;
|
|
}
|
|
|
|
.kids-header h1 {
|
|
color: #000;
|
|
font-size: 1.8rem;
|
|
}
|
|
|
|
.kids-header .subtitle {
|
|
color: #666;
|
|
}
|
|
|
|
hr.story-divider {
|
|
display: none;
|
|
}
|
|
|
|
section p {
|
|
font-size: 11pt;
|
|
line-height: 1.6;
|
|
color: #000;
|
|
}
|
|
}
|
|
</style>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<article>
|
|
<header class="kids-header">
|
|
<a href="/stories#{{ story.category_slug }}" class="category-link">{{ story.category_name }}</a>
|
|
<h1>{{ story.kids_title }}</h1>
|
|
<p class="subtitle">A Bible Story for Kids</p>
|
|
</header>
|
|
|
|
<div class="kids-meta">
|
|
<div class="kids-meta-item">
|
|
<div class="label">Find it in the Bible</div>
|
|
<div class="value">
|
|
{% set verse = story.verses[0] %}
|
|
{% set ref_parts = verse.split(' ') %}
|
|
{% if ref_parts|length >= 2 %}
|
|
{% set chapter_verse = ref_parts[-1] %}
|
|
{% set book = ' '.join(ref_parts[:-1]) %}
|
|
{% if ':' in chapter_verse %}
|
|
{% set chapter = chapter_verse.split(':')[0] %}
|
|
{% set verse_part = chapter_verse.split(':')[1] %}
|
|
{% if '-' in verse_part %}
|
|
{# Verse range like "16:23-31" - use anchor syntax #}
|
|
<a href="/book/{{ book }}/chapter/{{ chapter }}#verse-{{ verse_part }}">{{ verse }}</a>
|
|
{% else %}
|
|
{# Single verse like "3:16" #}
|
|
<a href="/book/{{ book }}/chapter/{{ chapter }}#verse-{{ verse_part }}">{{ verse }}</a>
|
|
{% endif %}
|
|
{% elif '-' in chapter_verse %}
|
|
{# Chapter range like "1-2" - link to first chapter #}
|
|
{% set chapter = chapter_verse.split('-')[0] %}
|
|
<a href="/book/{{ book }}/chapter/{{ chapter }}">{{ verse }}</a>
|
|
{% else %}
|
|
{# Just a chapter number #}
|
|
<a href="/book/{{ book }}/chapter/{{ chapter_verse }}">{{ verse }}</a>
|
|
{% endif %}
|
|
{% else %}
|
|
{{ verse }}
|
|
{% endif %}
|
|
{% if story.verses|length > 1 %}
|
|
<span style="color: #9ca3af;"> +{{ story.verses|length - 1 }} more</span>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="characters-row">
|
|
{% for character in story.characters %}
|
|
<span class="character-badge">{{ character }}</span>
|
|
{% endfor %}
|
|
</div>
|
|
|
|
<hr class="story-divider">
|
|
|
|
<section>
|
|
{% for paragraph in story.kids_narrative.split('\n\n') %}
|
|
{% if loop.first %}
|
|
<p><span class="newthought">{{ paragraph.split(' ')[:3] | join(' ') }}</span> {{ paragraph.split(' ')[3:] | join(' ') }}</p>
|
|
{% else %}
|
|
<p>{{ paragraph }}</p>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</section>
|
|
|
|
<aside class="adult-callout">
|
|
<p>Want to read the full story with more details?<br/>
|
|
Check out the <a href="/stories/{{ story.slug }}">grown-up version</a> of this story!</p>
|
|
</aside>
|
|
|
|
<a href="/stories/{{ story.slug }}/kids/pdf" class="print-btn">
|
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
|
|
</svg>
|
|
Download PDF
|
|
</a>
|
|
</article>
|
|
|
|
<nav class="kids-nav">
|
|
<div class="nav-prev">
|
|
{% if prev_story %}
|
|
<span class="nav-label">Previous Story</span>
|
|
<a href="/stories/{{ prev_story.slug }}/kids" class="nav-link">← {{ prev_story.kids_title or prev_story.title }}</a>
|
|
{% else %}
|
|
<span class="nav-label">Previous Story</span>
|
|
<span class="nav-disabled">← No previous story</span>
|
|
{% endif %}
|
|
</div>
|
|
<div class="nav-center">
|
|
<a href="/stories" class="nav-link">All Stories</a>
|
|
</div>
|
|
<div class="nav-next">
|
|
{% if next_story %}
|
|
<span class="nav-label">Next Story</span>
|
|
<a href="/stories/{{ next_story.slug }}/kids" class="nav-link">{{ next_story.kids_title or next_story.title }} →</a>
|
|
{% else %}
|
|
<span class="nav-label">Next Story</span>
|
|
<span class="nav-disabled">No next story →</span>
|
|
{% endif %}
|
|
</div>
|
|
</nav>
|
|
{% endblock %}
|