diff --git a/pesmi_export.txt b/pesmi_export.txt index ff0e716..3c4ccff 100644 --- a/pesmi_export.txt +++ b/pesmi_export.txt @@ -11,6 +11,7 @@ preizkus za vse znake tiste, ki v jeziku so nam blizu, jasne, svetle in pa čiste. + Vrstica dolga se razteza, čez rob platna skoraj steče, a oko jo hitro ujame, diff --git a/settings.json b/settings.json index 70e4aae..aae890e 100644 --- a/settings.json +++ b/settings.json @@ -1,11 +1,11 @@ -{ - "font_name": "Times New Roman", - "bg_color": "#000000", - "fg_color": "#FFFFFF", - "font_size": 36, - "screen_width_percent": 60, - "font_bold": true, - "show_song_info": true, - "split_by_stanza": false, - "web_port": 5000 -} \ No newline at end of file +{ + "font_name": "Noto Sans Display", + "bg_color": "#000000", + "fg_color": "#FFFFFF", + "font_size": 36, + "screen_width_percent": 60, + "font_bold": false, + "show_song_info": true, + "split_by_stanza": false, + "web_port": 5000 +} diff --git a/web/static/styles.css b/web/static/styles.css index ea94dd0..76f2016 100644 --- a/web/static/styles.css +++ b/web/static/styles.css @@ -11,6 +11,7 @@ body { display: flex; flex-direction: column; height: 100vh; + overflow: hidden; /* Prevent body scroll */ } .container { @@ -18,17 +19,19 @@ body { flex-direction: column; height: 100%; padding: 0; + overflow: hidden; } /* Gornja vrstica - Vnos pesmi */ .top-bar { background-color: #1a1a1a; - padding: 20px; + padding: 15px; border-bottom: 2px solid #333; display: flex; - gap: 15px; + gap: 10px; align-items: center; flex-wrap: wrap; + flex-shrink: 0; /* Keep fixed size */ } .top-bar label { @@ -80,47 +83,52 @@ body { .content { flex: 1; display: flex; - align-items: center; + align-items: flex-start; /* Better for scrolling long text */ justify-content: center; - padding: 40px; + padding: 20px; overflow-y: auto; background-color: #000000; + -webkit-overflow-scrolling: touch; /* Smooth scroll on iOS */ } .lyrics-display { text-align: center; - font-size: 32px; - line-height: 1.5; + font-size: 24px; /* Adjusted for mobile */ + line-height: 1.4; white-space: pre-wrap; word-wrap: break-word; - max-width: 90%; + max-width: 100%; + padding-bottom: 20px; } .status-message { color: #aaa; - font-size: 24px; + font-size: 20px; } /* Donja vrstica - Navigacijski gumbi */ .bottom-bar { background-color: #1a1a1a; - padding: 20px; + padding: 15px; border-top: 2px solid #333; display: flex; - justify-content: center; - gap: 20px; + justify-content: space-around; + gap: 10px; align-items: center; + flex-shrink: 0; /* Keep fixed size */ } .bottom-bar button { - padding: 15px 40px; - font-size: 18px; + padding: 12px 10px; + font-size: 16px; border: none; color: white; cursor: pointer; border-radius: 4px; transition: background-color 0.3s; - min-width: 150px; + flex: 1; + min-width: 0; /* Allow shrinking */ + max-width: 120px; } .btn-nav { @@ -139,7 +147,6 @@ body { .btn-dark { background-color: #8b4513; - min-width: 150px; } .btn-dark:hover { @@ -150,4 +157,74 @@ body { color: #999; font-size: 16px; min-width: 60px; +} + +/* ====== Viewport & varni odmik (mobilni) ====== */ + +/* Fallback: najprej uporabimo 100vh, potem nove enote (svh/dvh) kjer so podprte */ +:root { + --vh: 100vh; /* fallback */ + --container-min-h: 100vh; /* fallback */ + --bottom-bar-h: 60px; /* realna višina spodnje vrstice (glej .bottom-bar padding) */ +} + +/* Novejši brskalniki – stabilna višina toolbara */ +@supports (height: 100svh) { + :root { --vh: 100svh; --container-min-h: 100svh; } +} +/* Alternativa: dinamična višina (ko toolbar skrije/prikaže) */ +@supports (height: 100dvh) { + :root { --vh: 100dvh; } +} + +/* Odstrani zaklepanje scrolla – to pogosto povzroči prekrivanje na mobilnih */ +body { + /* odstrani prejšnje overflow: hidden; */ + overflow: auto !important; + min-height: var(--container-min-h); +} + +/* Glavni vsebnik naj razpne celoten pogled in upošteva varne robove */ +.container { + min-height: var(--vh); + padding-bottom: calc(var(--bottom-bar-h) + env(safe-area-inset-bottom, 0px)); + /* ostalo iz tvojega CSS lahko ostane */ +} + +/* Vsebinski del naj dopušča scroll, kot že imaš */ +.content { + /* ostane: flex:1; overflow-y:auto; ... */ + /* vendar dodamo malo dna, da zadnja vrstica besedila ne trči v panel */ + padding-bottom: 12px; +} + +/* Spodnja vrstica – naj bo vedno vidna in nad UI brskalnika */ +.bottom-bar { + position: sticky; /* ostane z dokumentom, a se prilepi na dno ob scrollu */ + bottom: 0; + z-index: 1000; /* nad vsebino */ + /* ozadje + robovi ostanejo */ + padding-bottom: calc(15px + env(safe-area-inset-bottom, 0px)); + /* poravnaj navidezno višino: */ + min-height: var(--bottom-bar-h); +} + +/* Gumbi v spodnjem panelu: malenkost večja višina za lažji tap */ +.bottom-bar button { + min-height: 44px; /* Apple/Google priporočilo za ‘tap targets’ */ +} + +/* Top bar: zadrži stabilno višino, a brez vpliva na dno */ +.top-bar { + position: sticky; + top: 0; + z-index: 1000; +} + +/* --- (Opcijsko) tema: prilagodi spodnji panel za boljši kontrast nad browser UI --- */ +@supports (backdrop-filter: blur(4px)) { + .bottom-bar { + background-color: rgba(26, 26, 26, 0.95); + backdrop-filter: saturate(120%) blur(4px); + } } \ No newline at end of file diff --git a/web/templates/index.html b/web/templates/index.html index 971bc71..d267352 100644 --- a/web/templates/index.html +++ b/web/templates/index.html @@ -2,7 +2,7 @@
- +