diff --git a/frontend/build/main.html b/frontend/build/main.html index 4956a1ac..93de97e7 100644 --- a/frontend/build/main.html +++ b/frontend/build/main.html @@ -98,8 +98,8 @@ - + - + diff --git a/frontend/build/stat.html b/frontend/build/stat.html index 40a9dcd4..1bc3b6d5 100644 --- a/frontend/build/stat.html +++ b/frontend/build/stat.html @@ -53,6 +53,6 @@ - + diff --git a/frontend/devmode/devmode.js b/frontend/devmode/devmode.js index a741c12b..bcc7e184 100644 --- a/frontend/devmode/devmode.js +++ b/frontend/devmode/devmode.js @@ -3,7 +3,7 @@ // This file is included only for developer mode linkage const buildvers = "0.8.4"; -const builddate = "2022.11.25"; +const builddate = "2022.11.26"; console.info("version: %s, builton: %s", buildvers, builddate); console.info("starts in developer mode"); diff --git a/frontend/devmode/main.html b/frontend/devmode/main.html index 1358d8ad..51eed6ea 100644 --- a/frontend/devmode/main.html +++ b/frontend/devmode/main.html @@ -110,7 +110,7 @@ - + diff --git a/frontend/devmode/mp3player.js b/frontend/devmode/mp3player.js index 1824fb5f..f3c778a1 100644 --- a/frontend/devmode/mp3player.js +++ b/frontend/devmode/mp3player.js @@ -248,6 +248,7 @@ const VuePlayer = { }, onrepeat() { this.repeatmode = (this.repeatmode + 1) % (this.sortedlist ? 3 : 2); + sessionStorage.setItem('repeatmode', this.repeatmode); if (this.media) { this.media.loop = this.repeatmode === 1; } @@ -309,6 +310,7 @@ const VuePlayer = { } }, created() { + this.repeatmode = storageGetNumber('repeatmode', 0); this.audioonly = storageGetBoolean('audioonly', false); }, mounted() { diff --git a/frontend/devmode/relmode.js b/frontend/devmode/relmode.js index a02ab7d9..501ec18e 100644 --- a/frontend/devmode/relmode.js +++ b/frontend/devmode/relmode.js @@ -3,7 +3,7 @@ // This file is included for release mode linkage const buildvers = "0.8.4"; -const builddate = "2022.11.25"; +const builddate = "2022.11.26"; const devmode = false; const traceajax = () => undefined; diff --git a/frontend/devmode/stat.html b/frontend/devmode/stat.html index 3bf0f938..28be716a 100644 --- a/frontend/devmode/stat.html +++ b/frontend/devmode/stat.html @@ -58,6 +58,6 @@ - + diff --git a/frontend/skin/blue/card.css b/frontend/skin/blue/card.css index 35076bf3..72ad8a92 100644 --- a/frontend/skin/blue/card.css +++ b/frontend/skin/blue/card.css @@ -64,7 +64,7 @@ } .bg-card button { - text-decoration: none; + line-height: 1; color: rgba(255, 255, 255, 0.5); } @@ -88,6 +88,16 @@ background-color: rgba(255, 255, 255, 0.25); } +.dropdown-item { + display: flex; + flex-direction: row; + align-items: center; +} + + .dropdown-item > .material-icons { + padding-right: 0.5rem; + } + .itemfont { line-height: 1.25; font-size: 0.72rem; diff --git a/frontend/skin/coffee-beans/card.css b/frontend/skin/coffee-beans/card.css index 2aa8d747..829c785d 100644 --- a/frontend/skin/coffee-beans/card.css +++ b/frontend/skin/coffee-beans/card.css @@ -69,7 +69,7 @@ } .bg-card button { - text-decoration: none; + line-height: 1; color: rgba(255, 255, 255, 0.5); } @@ -93,6 +93,16 @@ background: rgba(128, 0, 128, 0.5); /* Purple */ } +.dropdown-item { + display: flex; + flex-direction: row; + align-items: center; +} + + .dropdown-item > .material-icons { + padding-right: 0.5rem; + } + .itemfont { line-height: 1.25; font-size: 0.72rem; diff --git a/frontend/skin/coffee-beans/page.css b/frontend/skin/coffee-beans/page.css index 2e9aa4f5..b2a5d456 100644 --- a/frontend/skin/coffee-beans/page.css +++ b/frontend/skin/coffee-beans/page.css @@ -22,12 +22,12 @@ body { } a, .btn-link { - color: #B299CC; + color: goldenrod; text-decoration: none; } a:hover, .btn-link:hover { - color: #9877BB; + color: gold; text-decoration: underline; } diff --git a/frontend/skin/cup-of-coffee/card.css b/frontend/skin/cup-of-coffee/card.css index 6a4552f0..50c6468e 100644 --- a/frontend/skin/cup-of-coffee/card.css +++ b/frontend/skin/cup-of-coffee/card.css @@ -69,7 +69,7 @@ } .bg-card button { - text-decoration: none; + line-height: 1; color: rgba(255, 255, 255, 0.5); } @@ -93,6 +93,16 @@ background: rgba(128, 0, 128, 0.5); /* Purple */ } +.dropdown-item { + display: flex; + flex-direction: row; + align-items: center; +} + + .dropdown-item > .material-icons { + padding-right: 0.5rem; + } + .itemfont { line-height: 1.25; font-size: 0.72rem; diff --git a/frontend/skin/cup-of-coffee/page.css b/frontend/skin/cup-of-coffee/page.css index e13b7cf8..5cb1a3a9 100644 --- a/frontend/skin/cup-of-coffee/page.css +++ b/frontend/skin/cup-of-coffee/page.css @@ -25,6 +25,24 @@ body { background: #ad34cb; } +a, .btn-link { + color: darkviolet; + text-decoration: none; +} + + a:hover, .btn-link:hover { + color: blueviolet; + text-decoration: underline; + } + +.breadcrumb-item.active { + color: #7525c0; +} + +.breadcrumb-item + .breadcrumb-item::before { + color: #9966CC; /* Amethyst */ +} + .menu-scrollable { max-height: 20rem; overflow-y: scroll; diff --git a/frontend/skin/dark/card.css b/frontend/skin/dark/card.css index 6476c38e..efabb313 100644 --- a/frontend/skin/dark/card.css +++ b/frontend/skin/dark/card.css @@ -64,7 +64,7 @@ } .bg-card button { - text-decoration: none; + line-height: 1; color: rgba(255, 255, 255, 0.5); } @@ -88,6 +88,16 @@ background-color: rgba(255, 255, 255, 0.25); } +.dropdown-item { + display: flex; + flex-direction: row; + align-items: center; +} + + .dropdown-item > .material-icons { + padding-right: 0.5rem; + } + .itemfont { line-height: 1.25; font-size: 0.72rem; diff --git a/frontend/skin/daylight/card.css b/frontend/skin/daylight/card.css index b5c638b1..94a80345 100644 --- a/frontend/skin/daylight/card.css +++ b/frontend/skin/daylight/card.css @@ -64,7 +64,7 @@ } .bg-card button { - text-decoration: none; + line-height: 1; color: rgba(0, 0, 0, 0.5); } @@ -88,6 +88,16 @@ background: Tan; } +.dropdown-item { + display: flex; + flex-direction: row; + align-items: center; +} + + .dropdown-item > .material-icons { + padding-right: 0.5rem; + } + .itemfont { line-height: 1.25; font-size: 0.72rem; diff --git a/frontend/skin/light/card.css b/frontend/skin/light/card.css index 343cde87..de4c30c1 100644 --- a/frontend/skin/light/card.css +++ b/frontend/skin/light/card.css @@ -64,7 +64,7 @@ } .bg-card button { - text-decoration: none; + line-height: 1; color: rgba(0, 0, 0, 0.5); } @@ -88,6 +88,16 @@ background-color: rgba(0, 0, 0, 0.25); } +.dropdown-item { + display: flex; + flex-direction: row; + align-items: center; +} + + .dropdown-item > .material-icons { + padding-right: 0.5rem; + } + .itemfont { line-height: 1.25; font-size: 0.72rem; diff --git a/frontend/skin/neon/card.css b/frontend/skin/neon/card.css index f906f78e..541b2994 100644 --- a/frontend/skin/neon/card.css +++ b/frontend/skin/neon/card.css @@ -93,6 +93,16 @@ background: rgba(106, 90, 205, 0.5); /* SlateBlue */ } +.dropdown-item { + display: flex; + flex-direction: row; + align-items: center; +} + + .dropdown-item > .material-icons { + padding-right: 0.5rem; + } + .itemfont { line-height: 1.25; font-size: 0.72rem; diff --git a/frontend/skin/neon/page.css b/frontend/skin/neon/page.css index ea2464d7..cf699789 100644 --- a/frontend/skin/neon/page.css +++ b/frontend/skin/neon/page.css @@ -24,6 +24,16 @@ body { background: #723d98; } +a, .btn-link { + color: mediumpurple; + text-decoration: none; +} + + a:hover, .btn-link:hover { + color: #9966CC; /* Amethyst */ + text-decoration: underline; + } + .menu-scrollable { max-height: 20rem; overflow-y: scroll; diff --git a/frontend/skin/old-monitor/card.css b/frontend/skin/old-monitor/card.css index 4103232f..553c57e9 100644 --- a/frontend/skin/old-monitor/card.css +++ b/frontend/skin/old-monitor/card.css @@ -65,7 +65,7 @@ } .bg-card button { - text-decoration: none; + line-height: 1; color: rgba(255, 255, 255, 0.5); border-radius: 0; } @@ -91,6 +91,16 @@ background: rgba(255, 255, 255, 0.5); } +.dropdown-item { + display: flex; + flex-direction: row; + align-items: center; +} + + .dropdown-item > .material-icons { + padding-right: 0.5rem; + } + .itemfont { line-height: 1.25; font-size: 0.72rem; diff --git a/frontend/tmpl/card-ctgr.html b/frontend/tmpl/card-ctgr.html index 2806c272..20db4aaf 100644 --- a/frontend/tmpl/card-ctgr.html +++ b/frontend/tmpl/card-ctgr.html @@ -11,10 +11,10 @@ {{clslistmode}} diff --git a/frontend/tmpl/card-dir.html b/frontend/tmpl/card-dir.html index 8a8895b0..4e22c019 100644 --- a/frontend/tmpl/card-dir.html +++ b/frontend/tmpl/card-dir.html @@ -12,10 +12,10 @@ {{clslistmode}} diff --git a/frontend/tmpl/card-drive.html b/frontend/tmpl/card-drive.html index efd2e4b3..6056cc2f 100644 --- a/frontend/tmpl/card-drive.html +++ b/frontend/tmpl/card-drive.html @@ -16,10 +16,10 @@ {{clslistmode}} diff --git a/frontend/tmpl/card-file.html b/frontend/tmpl/card-file.html index 54ef01c0..5406f446 100644 --- a/frontend/tmpl/card-file.html +++ b/frontend/tmpl/card-file.html @@ -12,10 +12,10 @@ {{clssortmode}} @@ -25,10 +25,10 @@ {{clslistmode}} diff --git a/frontend/tmpl/card-tile.html b/frontend/tmpl/card-tile.html index b0e5703f..7b986b03 100644 --- a/frontend/tmpl/card-tile.html +++ b/frontend/tmpl/card-tile.html @@ -12,10 +12,10 @@ {{clssortmode}} diff --git a/readme.md b/readme.md index edbf3476..8c31cfe6 100644 --- a/readme.md +++ b/readme.md @@ -47,15 +47,12 @@ sudo chmod +x ./task/*.sh # Packages variations -By default script `pack.lua` produces full package with all icons collections in all supported formats: `webp`, `png`, and some icon sets with `jp2` for Safari browser, `avif` for Google-produced browsers. `webp` icons are more than 5x shorter than `png` and this format is supported by Android, Chrome, Opera, Edge, Firefox, but in some rarity used browsers it's can be needed `png` yet. +Script `pack.lua` helps to build resources pack with given at another lua-script set of skins and icons. Available formats for each icons set can be seen at `fulliconset` table. You can provide several formats for each icons set with given subsequence that will be used as list of `` tags in ``. In common case subsequence for formats can be followed: `avif`, `webp`, `jp2`, `png`, `gif`, `svg`. You can check on [caniuse.com](https://caniuse.com/) support of custom combination of formats. There is presents predefined scripts and tasks to build some resources combinations: -To make full package with `webp` icons only, use `hms-all.lua` script: - -```cmd -%GOPATH%/bin/wpkbuild.exe %GOPATH%/src/github.com/schwarzlichtbezirk/hms/frontend/task/hms-all.lua -``` - -To make package with minimal size, use `hms-tiny.lua` script. Script `hms-free.lua` produces package with icons, which have allowed commercial usage by their license. +* `hms-full` - full set of skins and icons with all available formats, can be useful for old browsers without `webp` support. +* `hms-tiny` - minimal set, with two `svg` icons set. Can be used on lightweight systems. +* `hms-webp` - full set with `webp` and `svg` formats only, useful for modern browsers. +* `hms-free` - set of icons with public license and allowed commercial usage. # Configuration diff --git a/task/build-linux.x64.cmd b/task/build-linux.x64.cmd new file mode 100644 index 00000000..68493ae5 --- /dev/null +++ b/task/build-linux.x64.cmd @@ -0,0 +1,10 @@ +@echo off +set wd=%~dp0.. + +for /F "tokens=*" %%g in ('git describe --tags') do (set buildvers=%%g) +set builddate=%date% +set buildtime=%time:~0,8% +if "%buildtime:~0,1%" == " " set buildtime=0%buildtime:~1,7% + +go env -w GOOS=linux GOARCH=amd64 +go build -o %GOPATH%/bin/hms.linux.x64.exe -v -ldflags="-X 'github.com/schwarzlichtbezirk/hms.BuildVers=%buildvers%' -X 'github.com/schwarzlichtbezirk/hms.BuildDate=%builddate%' -X 'github.com/schwarzlichtbezirk/hms.BuildTime=%buildtime%'" %wd%/cmd diff --git a/task/build-win.x64.sh b/task/build-win.x64.sh new file mode 100644 index 00000000..259e90db --- /dev/null +++ b/task/build-win.x64.sh @@ -0,0 +1,10 @@ +#!/bin/bash -u + +wd=$(realpath -s "$(dirname "$0")/..") + +buildvers=$(git describe --tags) +builddate=$(date +'%F') +buildtime=$(date +'%T') + +go env -w GOOS=windows GOARCH=amd64 +go build -o $GOPATH/bin/hms.win.x64.exe -v -ldflags="-X 'github.com/schwarzlichtbezirk/hms.BuildVers=$buildvers' -X 'github.com/schwarzlichtbezirk/hms.BuildDate=$builddate' -X 'github.com/schwarzlichtbezirk/hms.BuildTime=$buildtime'" $wd/cmd diff --git a/task/build-win.x86.sh b/task/build-win.x86.sh new file mode 100644 index 00000000..e35151a1 --- /dev/null +++ b/task/build-win.x86.sh @@ -0,0 +1,10 @@ +#!/bin/bash -u + +wd=$(realpath -s "$(dirname "$0")/..") + +buildvers=$(git describe --tags) +builddate=$(date +'%F') +buildtime=$(date +'%T') + +go env -w GOOS=windows GOARCH=386 +go build -o $GOPATH/bin/hms.win.x86.exe -v -ldflags="-X 'github.com/schwarzlichtbezirk/hms.BuildVers=$buildvers' -X 'github.com/schwarzlichtbezirk/hms.BuildDate=$builddate' -X 'github.com/schwarzlichtbezirk/hms.BuildTime=$buildtime'" $wd/cmd diff --git a/task/hms-all.lua b/task/hms-webp.lua similarity index 97% rename from task/hms-all.lua rename to task/hms-webp.lua index 10be11ab..9681e333 100644 --- a/task/hms-all.lua +++ b/task/hms-webp.lua @@ -4,7 +4,7 @@ cfg = { -- package info info = { - label = "hms-all", + label = "hms-webp", link = "github.com/schwarzlichtbezirk/hms", }, -- list of skins IDs, see 'id' tags of 'skinlist' in 'resmodel.json' file diff --git a/task/wpk-free.cmd b/task/wpk-free.cmd new file mode 100644 index 00000000..a0badafa --- /dev/null +++ b/task/wpk-free.cmd @@ -0,0 +1,2 @@ +@echo off +%GOPATH%\bin\wpkbuild.exe %~dp0hms-free.lua diff --git a/task/wpk-free.sh b/task/wpk-free.sh new file mode 100644 index 00000000..bf4525a5 --- /dev/null +++ b/task/wpk-free.sh @@ -0,0 +1,2 @@ +#!/bin/bash -u +$GOPATH/bin/wpkbuild.exe $(realpath -s "$(dirname $0)/hms-free.lua") diff --git a/task/wpk-webp.cmd b/task/wpk-webp.cmd new file mode 100644 index 00000000..05b1466c --- /dev/null +++ b/task/wpk-webp.cmd @@ -0,0 +1,2 @@ +@echo off +%GOPATH%\bin\wpkbuild.exe %~dp0hms-webp.lua diff --git a/task/wpk-webp.sh b/task/wpk-webp.sh new file mode 100644 index 00000000..c2409afa --- /dev/null +++ b/task/wpk-webp.sh @@ -0,0 +1,2 @@ +#!/bin/bash -u +$GOPATH/bin/wpkbuild.exe $(realpath -s "$(dirname $0)/hms-webp.lua")