Convert backend from submodule to regular directory
Some checks failed
Deploy to NAS / deploy (push) Failing after 4s
Some checks failed
Deploy to NAS / deploy (push) Failing after 4s
Remove submodule tracking; backend is now a plain directory in the repo. Also update deploy workflow: remove --recurse-submodules. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
47
backend/internal/api/static/day.js
Normal file
47
backend/internal/api/static/day.js
Normal file
@@ -0,0 +1,47 @@
|
||||
// GPS button
|
||||
document.getElementById('btn-gps')?.addEventListener('click', function () {
|
||||
const status = document.getElementById('gps-status');
|
||||
if (!navigator.geolocation) {
|
||||
status.textContent = '// GPS nicht verfügbar';
|
||||
return;
|
||||
}
|
||||
status.textContent = '// Standort wird ermittelt...';
|
||||
navigator.geolocation.getCurrentPosition(
|
||||
function (pos) {
|
||||
document.getElementById('entry-lat').value = pos.coords.latitude.toFixed(6);
|
||||
document.getElementById('entry-lon').value = pos.coords.longitude.toFixed(6);
|
||||
status.textContent = '// Standort gesetzt (' + pos.coords.accuracy.toFixed(0) + ' m Genauigkeit)';
|
||||
},
|
||||
function (err) {
|
||||
status.textContent = '// Fehler: ' + err.message;
|
||||
},
|
||||
{ enableHighAccuracy: true, timeout: 10000 }
|
||||
);
|
||||
});
|
||||
|
||||
// Set current time as default
|
||||
(function () {
|
||||
const input = document.getElementById('entry-time');
|
||||
if (input && !input.value) {
|
||||
const now = new Date();
|
||||
const hh = String(now.getHours()).padStart(2, '0');
|
||||
const mm = String(now.getMinutes()).padStart(2, '0');
|
||||
input.value = hh + ':' + mm;
|
||||
}
|
||||
})();
|
||||
|
||||
// Image preview
|
||||
document.getElementById('image-input')?.addEventListener('change', function () {
|
||||
const preview = document.getElementById('image-preview');
|
||||
preview.innerHTML = '';
|
||||
Array.from(this.files).forEach(function (file) {
|
||||
if (!file.type.startsWith('image/')) return;
|
||||
const reader = new FileReader();
|
||||
reader.onload = function (e) {
|
||||
const img = document.createElement('img');
|
||||
img.src = e.target.result;
|
||||
preview.appendChild(img);
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
});
|
||||
});
|
||||
54
backend/internal/api/static/style.css
Normal file
54
backend/internal/api/static/style.css
Normal file
@@ -0,0 +1,54 @@
|
||||
/* Font + monochrome override */
|
||||
:root {
|
||||
--pico-font-family: 'Courier New', Courier, monospace;
|
||||
--pico-font-size: 14px;
|
||||
--pico-primary: #111;
|
||||
--pico-primary-background: #111;
|
||||
--pico-primary-border: #111;
|
||||
--pico-primary-hover: #333;
|
||||
--pico-primary-hover-background: #333;
|
||||
--pico-primary-hover-border: #333;
|
||||
--pico-primary-focus: rgba(0,0,0,.25);
|
||||
--pico-primary-inverse: #fff;
|
||||
--pico-primary-underline: rgba(0,0,0,.5);
|
||||
}
|
||||
|
||||
h1 { font-size: 1.4rem; font-weight: normal; letter-spacing: .05em; }
|
||||
h2 { font-size: 1rem; font-weight: normal; letter-spacing: .05em; }
|
||||
|
||||
.err { color: #c00; }
|
||||
.source-gps { color: #060; }
|
||||
.source-manual { color: #888; }
|
||||
|
||||
/* Top bar */
|
||||
.page-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1.5rem; }
|
||||
|
||||
/* GPS row */
|
||||
.gps-row { display: flex; gap: .4rem; align-items: center; }
|
||||
.gps-row input { flex: 1; margin-bottom: 0; }
|
||||
.gps-row button { white-space: nowrap; margin-bottom: 0; }
|
||||
|
||||
/* Two-column form */
|
||||
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
|
||||
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }
|
||||
|
||||
/* Image preview */
|
||||
.image-preview { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .8rem; }
|
||||
.image-preview img, .thumb { width: 80px; height: 80px; object-fit: cover; border: 1px solid var(--pico-muted-border-color); }
|
||||
.thumb { width: 100px; height: 100px; display: block; }
|
||||
|
||||
/* Journal entry cards */
|
||||
.entry-card {
|
||||
border-left: 3px solid var(--pico-primary);
|
||||
padding: .6rem 1rem;
|
||||
margin-bottom: 1rem;
|
||||
background: var(--pico-card-background-color);
|
||||
border-radius: 0 var(--pico-border-radius) var(--pico-border-radius) 0;
|
||||
}
|
||||
.entry-meta { font-size: .8rem; margin-bottom: .3rem; }
|
||||
.entry-title { font-size: 1rem; margin-bottom: .3rem; }
|
||||
.entry-desc { white-space: pre-wrap; font-size: .9rem; }
|
||||
.entry-images { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
|
||||
|
||||
/* Login */
|
||||
.login-box { max-width: 360px; margin: 4rem auto; }
|
||||
Reference in New Issue
Block a user