autostart
This commit is contained in:
parent
65235d8c9a
commit
ca110918b4
6 changed files with 243 additions and 22 deletions
12
app/main.py
12
app/main.py
|
|
@ -147,11 +147,11 @@ def print_task(request: Request, task_id: str):
|
|||
draw = ImageDraw.Draw(img)
|
||||
draw.rectangle([(0,0),(CARD_WIDTH_PX-1,CARD_HEIGHT_PX-1)], outline=0, width=4)
|
||||
|
||||
# Robust font loading
|
||||
font_title = load_font(FONT_BOLD, 36, font_label="title")
|
||||
font_label_f = load_font(FONT_BOLD, 18, font_label="label")
|
||||
font_text = load_font(FONT_REGULAR, 22, font_label="text")
|
||||
font_icon = load_font(FA_FONT, 48, font_label="icon")
|
||||
# Robust font loading - increased sizes for physical printer readability
|
||||
font_title = load_font(FONT_BOLD, 42, font_label="title")
|
||||
font_label_f = load_font(FONT_BOLD, 24, font_label="label")
|
||||
font_text = load_font(FONT_REGULAR, 28, font_label="text")
|
||||
font_icon = load_font(FA_FONT, 60, font_label="icon")
|
||||
|
||||
# Prepare content for line wrapping
|
||||
import textwrap
|
||||
|
|
@ -159,7 +159,7 @@ def print_task(request: Request, task_id: str):
|
|||
max_text_width = CARD_WIDTH_PX - 40
|
||||
content_lines = []
|
||||
if font_title:
|
||||
wrapper = textwrap.TextWrapper(width=24)
|
||||
wrapper = textwrap.TextWrapper(width=20) # Reduced from 24 due to larger font
|
||||
lines = wrapper.wrap(task.content)
|
||||
for line in lines:
|
||||
# Check pixel width, wrap further if needed
|
||||
|
|
|
|||
|
|
@ -151,6 +151,22 @@ button:hover {
|
|||
color: #1C1C1E;
|
||||
}
|
||||
|
||||
footer {
|
||||
width: 100%;
|
||||
background-color: #E9EEF5;
|
||||
color: #1C1C1E;
|
||||
padding: 1.5em 0;
|
||||
text-align: center;
|
||||
box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.1);
|
||||
margin-top: 2em;
|
||||
}
|
||||
|
||||
footer .footer-logo {
|
||||
height: 40px;
|
||||
vertical-align: middle;
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
.container {
|
||||
width: 95%;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue