From ddc3a72474bbaf0fad5edb200e4e78815537d52e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Mon, 26 Jul 2021 15:10:20 +0200 Subject: [PATCH] Improved dialog, improved vidual spacing --- newdate.sh | 6 ++++-- webpoll.css | 16 ++++++++++------ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/newdate.sh b/newdate.sh index 32533b8..b71bdef 100755 --- a/newdate.sh +++ b/newdate.sh @@ -25,11 +25,13 @@ fs_timeofday() { } fs_splittimes() { - local day times time c + local days day times time c + days="$(DBM "$file" get dates)" cat <<-EOF [fieldset .splittimes [checkbox "none" "none" .splittimes checked disabled=disabled] [submit "splittimes" "no" Separate Time Options per Day] - $(for day in $(DBM "$file" get dates); do + $([ ! "$days" ] && printf '[p You have not selected any days yet.]\n') + $(for day in $days; do date -d $day +"[h2 . %A - %B %_d, %Y]" times=$(DBM "$file" get "tod_$day") for time in ${times:--}; do diff --git a/webpoll.css b/webpoll.css index 90d9d64..fafb9f4 100644 --- a/webpoll.css +++ b/webpoll.css @@ -41,7 +41,7 @@ body.newdate form fieldset.splittimes { width: 100%; } -@media(min-width: 48em) { +@media(min-width: 50em) { body.newdate form { width: 50em; } body.newdate form input[name=title], body.newdate form textarea[name=description] { @@ -52,6 +52,9 @@ body.newdate form fieldset.splittimes { body.newdate form fieldset.splittimes { width: 49.5%; width: calc(50% - .375ex); } + body.newdate form fieldset.date { padding-right: .75em; } + body.newdate form fieldset.timeofday, + body.newdate form fieldset.splittimes { padding-left: .75em; } } body.newdate form input[name=title], @@ -84,14 +87,14 @@ body.newdate form .date button[name=month]:before { color: #666; margin-top: .25em; } -body.newdate form .date table + button[name=month] { right: 0; } +body.newdate form .date table + button[name=month] { right: .75em; } body.newdate form .date table + button[name=month]:before { content: '>'; } body.newdate form .date table.calendar { background-color: #FFF; - font-size: 17.5pt; + font-size: 17pt; -vertical-align: middle; } @@ -102,17 +105,17 @@ body.newdate form .timeofday label.todend { font-weight: bold; text-align: left; font-size: .75em; - width: 49%; width: calc(50% - .5ex); + width: 49%; width: calc(50% - 2.5pt); } body.newdate form fieldset > input[name^=todstart], body.newdate form fieldset > input[name^=todend] { display: inline-block; margin: 0; - width: 49%; width: calc(50% - .5ex); + width: 49%; width: calc(50% - 2.5pt); text-align: right; } body.newdate form fieldset > input[name^=todend] { - width: 40%; widtfieldset% - 4.375ex); + width: 39%; width: calc( 50% - 4.375ex); } body.newdate form fieldset button[name^=addtime] { @@ -136,3 +139,4 @@ body.newdate form fieldset input.splittimes + *:before { body.newdate form fieldset input.splittimes:checked + *:before { content: '\2713'; background-color: #6AF;} body.newdate form .timeofday button[name=splittimes] { margin-top: 1.5em;} +body.newdate form .splittimes p { margin-top: 2em; padding: .5em; background: rgba(255,255,255,.5); } -- 2.39.2