52 lines
3.7 KiB
HTML
52 lines
3.7 KiB
HTML
{{define "title"}}Solis | Print Labels{{end}}
|
|
|
|
{{define "content"}}
|
|
<div class="page-header">
|
|
<div class="page-title">
|
|
<h1>Printable QR Labels</h1>
|
|
<p>Generate high-fidelity label sheets for your inventory. Press <kbd style="font-family: monospace; background:#e7e5e4; padding:0.1rem 0.3rem; border-radius:3px; font-weight:600;">Ctrl + P</kbd> (or <kbd style="font-family: monospace; background:#e7e5e4; padding:0.1rem 0.3rem; border-radius:3px; font-weight:600;">Cmd + P</kbd>) to print sticker sheets. Standard print stylesheets are auto-applied.</p>
|
|
</div>
|
|
<div style="display: flex; gap: 0.5rem;">
|
|
<button onclick="window.print()" class="btn btn-primary">
|
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" style="width:18px;height:18px;">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M6.72 13.829c-.24.03-.48.062-.72.096m.72-.096a42.415 42.415 0 0110.56 0m-10.56 0L6.34 18m10.94-4.171c.24.03.48.062.72.096m-.72-.096L17.66 18m0 0a2.25 2.25 0 01-2.247 2.118H8.587A2.25 2.25 0 016.34 18m11.32 0h.008v.008h-.008V18zm-12 0h.008v.008h-.008V18zm0-11.25h12.75c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125H5.66c-.621 0-1.125-.504-1.125-1.125v-1.5c0-.621.504-1.125 1.125-1.125z" />
|
|
</svg>
|
|
Print Sheet
|
|
</button>
|
|
<a href="/admin" class="btn btn-secondary">Back to Assets</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card" style="margin-bottom: 2rem;">
|
|
<h3 style="font-weight: 700; margin-bottom: 0.5rem; color: var(--color-brand-primary);">Printing Guidelines</h3>
|
|
<ul style="margin-left: 1.5rem; color: var(--color-text-muted); font-size: 0.95rem; display: flex; flex-direction: column; gap: 0.25rem;">
|
|
<li>Set your margins to <strong>None</strong> or <strong>Minimum</strong> in the browser print dialogue.</li>
|
|
<li>Enable <strong>Background graphics</strong> to preserve borders and alignments.</li>
|
|
<li>Check the layout preview page size (standard Letter/A4) to ensure grid alignment on your sticker paper.</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<!-- Dynamic Printable Grid -->
|
|
<div class="print-grid" style="display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; padding: 10px; background-color: white; border: 1px solid var(--color-border); border-radius: var(--radius-md);">
|
|
{{if .Items}}
|
|
{{range .Items}}
|
|
{{if .ShortSlug}}
|
|
<div class="print-label-item" style="border: 1px dashed var(--color-border); border-radius: var(--radius-sm); padding: 1rem; text-align: center; background-color: white; display: flex; flex-direction: column; align-items: center; justify-content: space-between; aspect-ratio: 1/1;">
|
|
<div class="print-label-name" style="font-weight: 700; font-size: 0.95rem; color: var(--color-text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%;" title="{{.Name}}">
|
|
{{.Name}}
|
|
</div>
|
|
<img class="print-label-qr" src="/admin/qr/{{.ShortSlug}}" alt="QR Code" style="width: 110px; height: 110px; margin: 0.5rem 0; border: 1px solid var(--color-border); padding: 2px;">
|
|
<div class="print-label-slug" style="font-family: monospace; font-size: 0.8rem; color: var(--color-text-muted); font-weight: 600;">
|
|
s/{{.ShortSlug}}
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
{{end}}
|
|
{{else}}
|
|
<div style="grid-column: 1/-1; text-align: center; color: var(--color-text-light); padding: 4rem 1rem;">
|
|
No items with active short links found. Create an asset to generate labels!
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
{{end}}
|