init
This commit is contained in:
118
app/templates/admin/catalog_pdf.html
Normal file
118
app/templates/admin/catalog_pdf.html
Normal file
@@ -0,0 +1,118 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Garage Sale Catalog</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: 'Times New Roman', serif;
|
||||
line-height: 1.6;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
color: #000;
|
||||
}
|
||||
.container {
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
padding: 1rem;
|
||||
}
|
||||
h1, h2, h3 {
|
||||
margin-top: 0;
|
||||
}
|
||||
.header {
|
||||
text-align: center;
|
||||
margin-bottom: 2rem;
|
||||
border-bottom: 1px solid #000;
|
||||
padding-bottom: 1rem;
|
||||
}
|
||||
.category {
|
||||
margin-bottom: 2rem;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
.category-title {
|
||||
border-bottom: 1px solid #000;
|
||||
padding-bottom: 0.5rem;
|
||||
}
|
||||
.items-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 1rem;
|
||||
}
|
||||
.item {
|
||||
border: 1px solid #000;
|
||||
padding: 1rem;
|
||||
margin-bottom: 1rem;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
.item-title {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
.item-price {
|
||||
font-weight: bold;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
.item-status {
|
||||
font-style: italic;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
.footer {
|
||||
margin-top: 2rem;
|
||||
text-align: center;
|
||||
border-top: 1px solid #000;
|
||||
padding-top: 1rem;
|
||||
}
|
||||
.page-break {
|
||||
page-break-after: always;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<h1>Digital Garage Sale Catalog</h1>
|
||||
<p>Printed on {{ now.strftime('%B %d, %Y') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="contact-info">
|
||||
<h2>Contact Information</h2>
|
||||
<p><strong>Email:</strong> {{ contact_info.email }}</p>
|
||||
{% if contact_info.signal %}
|
||||
<p><strong>Signal:</strong> {{ contact_info.signal }}</p>
|
||||
{% endif %}
|
||||
{% if contact_info.donation_link %}
|
||||
<p><strong>Donations:</strong> {{ contact_info.donation_link }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="page-break"></div>
|
||||
|
||||
<h2>Items For Sale</h2>
|
||||
|
||||
{% for category in categories %}
|
||||
<div class="category">
|
||||
<h3 class="category-title">{{ category.name }}</h3>
|
||||
<div class="items-grid">
|
||||
{% for item in items if item.category_id == category.id %}
|
||||
<div class="item">
|
||||
<h4 class="item-title">{{ item.title }}</h4>
|
||||
<p class="item-price">${{ "%.2f"|format(item.price) }}</p>
|
||||
<p class="item-status">Status: {{ item.status }}</p>
|
||||
<p>{{ item.description }}</p>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if not loop.last %}
|
||||
<div class="page-break"></div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
<div class="footer">
|
||||
<p>All items are sold as-is. Please contact for more information.</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user