feat: release v1.1.0 (countdown, highlight tags, changelog)

This commit is contained in:
2026-02-16 18:52:07 +01:00
parent 71cb2e8475
commit d6a2236a5b
9 changed files with 1984 additions and 1248 deletions
+47 -6
View File
@@ -108,14 +108,23 @@ cat > "$DIST_DIR/install.html" << INSTALLEOF
</head> </head>
<body> <body>
<h1>🍽️ Kantine Wrapper <span style="font-size:0.5em; opacity:0.6; font-weight:400; vertical-align:middle; margin-left:10px;">$VERSION</span></h1> <h1>🍽️ Kantine Wrapper <span style="font-size:0.5em; opacity:0.6; font-weight:400; vertical-align:middle; margin-left:10px;">$VERSION</span></h1>
<div class="instructions"> <div class="card">
<h2>Installation</h2> <h2>Changelog</h2>
<div class="changelog-container">
<!-- CHANGELOG_PLACEHOLDER -->
</div>
</div>
<div class="card">
<h2>So funktioniert's</h2>
<ol> <ol>
<li>Ziehe den Button unten in deine <strong>Lesezeichen-Leiste</strong> (Drag & Drop)</li> <li>Ziehe den Button unten in deine <strong>Lesezeichen-Leiste</strong> (Drag & Drop)</li>
<li>Navigiere zu <a href="https://web.bessa.app/knapp-kantine" style="color:#029AA8">web.bessa.app/knapp-kantine</a></li> <li>Navigiere zu <a href="https://web.bessa.app/knapp-kantine" style="color:#029AA8">web.bessa.app/knapp-kantine</a></li>
<li>Klicke auf das Lesezeichen <code>Kantine $VERSION</code></li> <li>Klicke auf das Lesezeichen <code>Kantine $VERSION</code></li>
</ol> </ol>
</div>
<div class="card">
<h2>✨ Features</h2> <h2>✨ Features</h2>
<ul> <ul>
<li>📅 <strong>Wochenübersicht:</strong> Die ganze Woche auf einen Blick.</li> <li>📅 <strong>Wochenübersicht:</strong> Die ganze Woche auf einen Blick.</li>
@@ -135,15 +144,47 @@ cat > "$DIST_DIR/install.html" << INSTALLEOF
<script> <script>
INSTALLEOF INSTALLEOF
# Embed the bookmarklet URL inline # Generate Changlog HTML from Markdown
CHANGELOG_HTML=""
if [ -f "$SCRIPT_DIR/changelog.md" ]; then
CHANGELOG_HTML=$(cat "$SCRIPT_DIR/changelog.md" | python3 -c "
import sys, re
md = sys.stdin.read()
# Convert headers to h3/h4
html = re.sub(r'^## (.*)', r'<h3>\1</h3>', md, flags=re.MULTILINE)
# Convert bullets to list items
html = re.sub(r'^- (.*)', r'<li>\1</li>', html, flags=re.MULTILINE)
# Wrap lists (simple heuristic)
html = html.replace('</h3>\n<li>', '</h3>\n<ul>\n<li>').replace('</li>\n<h', '</li>\n</ul>\n<h').replace('</li>\n\n', '</li>\n</ul>\n')
if '<li>' in html and '<ul>' not in html: html = '<ul>' + html + '</ul>'
print(html)
")
fi
echo "document.getElementById('bookmarklet-link').href = " >> "$DIST_DIR/install.html" echo "document.getElementById('bookmarklet-link').href = " >> "$DIST_DIR/install.html"
echo "$JS_CONTENT" | python3 -c " echo "$JS_CONTENT" | python3 -c "
import sys, json import sys, json
js = sys.stdin.read() js = sys.stdin.read()
css = open('$CSS_FILE').read().replace('\\n', ' ').replace(' ', ' ') css = open('$CSS_FILE').read().replace('\\n', ' ').replace(' ', ' ')
bmk = '''javascript:(function(){if(window.__KANTINE_LOADED){alert(\"Already loaded\");return;}var s=document.createElement(\"style\");s.textContent=''' + json.dumps(css) + ''';document.head.appendChild(s);var sc=document.createElement(\"script\");sc.textContent=''' + json.dumps(js) + ''';document.head.appendChild(sc);})();''' escaped_css = css.replace('\\\\', '\\\\\\\\').replace(\"'\", \"\\\\'\").replace('\"', '\\\\\"')
print(json.dumps(bmk) + ';')
" 2>/dev/null >> "$DIST_DIR/install.html" || echo "'javascript:alert(\"Build error\")'" >> "$DIST_DIR/install.html" # Inject Update URL with htmlpreview
update_url = 'https://htmlpreview.github.io/?https://github.com/TauNeutrino/kantine-overview/blob/main/dist/install.html'
js = js.replace('https://github.com/TauNeutrino/kantine-overview/raw/main/dist/install.html', update_url)
print(json.dumps('javascript:(function(){' + js.replace('{{CSS_ESCAPED}}', escaped_css) + '})();'))
" >> "$DIST_DIR/install.html"
# Inject Changelog into Installer HTML (Safe Python replace)
python3 -c "
import sys
html = open('$DIST_DIR/install.html').read()
changelog = sys.stdin.read()
html = html.replace('<!-- CHANGELOG_PLACEHOLDER -->', changelog)
open('$DIST_DIR/install.html', 'w').write(html)
" << EOF
$CHANGELOG_HTML
EOF
cat >> "$DIST_DIR/install.html" << INSTALLEOF cat >> "$DIST_DIR/install.html" << INSTALLEOF
document.getElementById('bookmarklet-link').textContent = 'Kantine $VERSION'; document.getElementById('bookmarklet-link').textContent = 'Kantine $VERSION';
Executable
+15
View File
@@ -0,0 +1,15 @@
## v1.1.0 (2026-02-16)
- **Feature: Bestell-Countdown**: Zeigt 1 Stunde vor Bestellschluss einen roten Countdown an. ⏳
- **Feature: Smart Highlights**: Markiere deine Lieblingsspeisen (z.B. "Schnitzel", "Vegetarisch"), damit sie leuchten. 🌟
- **Feature: Changelog**: Diese Übersicht der Änderungen. 📜
- **Verbesserung**: Live-Check der Version beim Update.
## v1.0.3 (2026-02-13)
- **Fix**: Update-Link öffnet nun den Installer direkt als Webseite (via htmlpreview).
## v1.0.2 (2026-02-13)
- **Sync**: Version mit GitHub synchronisiert.
## v1.0.1 (2026-02-12)
- **UI**: Besseres Design für "Nächste Woche" (Badges).
- **Core**: Grundlegende Funktionen (Bestellen, Guthaben, Token-Store).
+2 -2
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+35 -7
View File
File diff suppressed because one or more lines are too long
+942 -616
View File
File diff suppressed because it is too large Load Diff
+802 -615
View File
File diff suppressed because it is too large Load Diff
+139
View File
@@ -1195,3 +1195,142 @@ body {
70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); } 70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
} }
/* Order Countdown */
#order-countdown {
background: rgba(255, 255, 255, 0.1);
padding: 0.25rem 0.75rem;
border-radius: 99px;
font-size: 0.85rem;
display: flex;
align-items: center;
gap: 0.5rem;
white-space: nowrap;
border: 1px solid var(--border-color);
}
#order-countdown span {
opacity: 0.7;
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.5px;
}
#order-countdown.urgent {
background: rgba(239, 68, 68, 0.2);
border-color: rgba(239, 68, 68, 0.5);
color: #ef4444;
animation: pulse-red 2s infinite;
}
@keyframes pulse-red {
0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
/* Smart Highlights */
.highlight-glow {
box-shadow: 0 0 15px rgba(59, 130, 246, 0.5); /* Blue glow */
border: 1px solid rgba(59, 130, 246, 0.8);
background: rgba(59, 130, 246, 0.05);
position: relative;
z-index: 1;
}
/* Nav Badge with Count */
.nav-badge.has-highlights {
background-color: var(--card-bg); /* Neutral background */
color: var(--text-primary);
border: 1px solid var(--border-color);
padding: 2px 6px;
}
.nav-badge .highlight-count {
color: #3b82f6; /* Blue 500 */
font-weight: 700;
margin-left: 4px;
}
/* Tag Management Modal */
#tags-list {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
margin-top: 1rem;
min-height: 50px;
}
.tag-badge {
display: inline-flex;
align-items: center;
background: rgba(59, 130, 246, 0.15);
color: #3b82f6;
padding: 4px 10px;
border-radius: 99px;
font-size: 0.85rem;
font-weight: 500;
}
.tag-remove {
margin-left: 6px;
cursor: pointer;
opacity: 0.7;
font-size: 1.1em;
line-height: 1;
}
.tag-remove:hover {
opacity: 1;
color: #ef4444;
}
.input-group {
display: flex;
gap: 0.5rem;
}
.input-group input {
flex: 1;
padding: 0.75rem;
background: var(--bg-color);
border: 1px solid var(--border-color);
color: var(--text-primary);
border-radius: 8px;
}
/* Update Banner Enhanced */
.change-summary {
font-size: 0.8rem;
background: rgba(0,0,0,0.1);
padding: 0.5rem;
border-radius: 4px;
margin: 0.5rem 0;
white-space: pre-wrap;
font-family: inherit;
line-height: 1.4;
max-height: 100px;
overflow-y: auto;
}
.update-content {
display: flex;
flex-direction: column;
gap: 4px;
flex: 1;
}
/* Installer Changelog */
.changelog-container ul {
padding-left: 1.5rem;
margin: 0.5rem 0;
}
.changelog-container li {
margin-bottom: 0.4rem;
line-height: 1.5;
}
.changelog-container h3 {
margin-top: 1.5rem;
margin-bottom: 0.5rem;
font-size: 1.1em;
color: var(--accent-color);
}
+1 -1
View File
@@ -1 +1 @@
v1.0.3 v1.1.0