From: paul Date: Fri, 3 Jul 2015 12:24:03 +0000 (+0000) Subject: css and markup improvements X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=10dc80cb808b22e1ffe613b3a6b5ec82691b08dc;p=lobster css and markup improvements svn path=/trunk/; revision=69 --- diff --git a/templates/attendees.css.sh b/templates/attendees.css.sh index e4038f0..6d375a1 100755 --- a/templates/attendees.css.sh +++ b/templates/attendees.css.sh @@ -83,47 +83,28 @@ input[type="radio"]:checked + label::before {content: '\29bf';} .card { display: block; + position: relative; border-style: solid; border-width: 1px; margin: .25em 2em; - padding: 0; + padding: 0 20ex 0 0; overflow: auto; background: #FFF; } -.card .section { - display: inline-block; - float:left; - width: 20ex; - margin: .125em .25ex .5ex .25ex; - padding: 0 .2em .2em .2em; - background: #EEE; -} -.card .section a.attendance { - display: inline-block; - margin-right: 1ex; - word-wrap: break-word; -} - -.card .attendance { - width: 83.5ex; -} -.card .attendance .check { - display: inline-block; - width: 27ex; -} - .card .control { - float: right; + display: inline-block; + position: absolute; + top: 0; right: 0; text-align: right; - margin-right: 0; background: #EEF; + margin: 0; + height: 100%; + width: 20ex; + max-width: 33%; + padding: .25em 1ex; } - -.card div.control { - width: 23ex; -} - .card .control .item { + display: block; color: #008; margin-top: .2em; margin-right: 1ex; @@ -140,19 +121,48 @@ input[type="radio"]:checked + label::before {content: '\29bf';} border-width: 1px 1px 1px 1px; } +.card .section { + display: inline-block; + vertical-align: top; + float: left; + width: 20ex; + min-width: 16.5%; + min-height: 6em; + margin: .125em 0 .5ex 0; + padding: 0 1ex .25em 1ex; +} +.card .section:nth-of-type(2n){ background: #EEE;} .card .section h2, .card .section h3 { font-size: 1em; display: block; font-weight: bold; - margin: .2em .2em .2em .2em; + margin: .25em -.5ex .25em -.5ex; + border-style: none none solid none; + border-width: 1px; } -.card .section .FN { +.card .section .FN { /* will override h2 */ font-size: 1.2em; + margin-top: 0; } +.card .section.attendance ul { margin: 0; padding: 0; } +.card .section.attendance ul li { + display: block; + word-wrap: break-word; +} + +form.card .attendance { + min-width: 66%; +} +form.card .attendance input[type=checkbox] + label { + display: inline-block; + width: 25ex; +} + + .card .section .item { display: block; - max-width: 20ex; + max-width: 100%; word-wrap: break-word; } @@ -164,8 +174,8 @@ input[type="radio"]:checked + label::before {content: '\29bf';} } .card .section .PHOTO { - width: 20ex; - max-heigth: 30ex; + width: 100%; + max-height: 10em; } diff --git a/templates/edit_attendee.sh b/templates/edit_attendee.sh index b8b4000..4513a3d 100755 --- a/templates/edit_attendee.sh +++ b/templates/edit_attendee.sh @@ -1,4 +1,4 @@ -# Copyright 2014 Paul Hänsch +# Copyright 2014, 2015 Paul Hänsch # # This file is part of Confetti. # @@ -32,111 +32,107 @@ SUP_FIELDS=(N NICKNAME GENDER BDAY X-ZACK-JOINDATE X-ZACK-LEAVEDATE EMAIL TEL IM [ -z "$values[UID]" ] && values[UID]="$(uuidgenerator)" -echo '
' -echo '
' -echo '' -echo '
' -echo '

'$(l10n N)'

' -echo ' ' -echo ' ' -echo ' ' -echo ' ' -echo ' ' - -echo ' ' - -for n in NICKNAME NICKNAME{0..10}; do [ -n "$values[$n]" ] &&\ - echo ' ' -done - -echo '

'$(l10n BDAY)'

' -echo ' ' - -echo '

'$(l10n X-ZACK-JOINDATE)'

' -echo ' ' -if [ -n "$values[X-ZACK-LEAVEDATE]" ]; then - echo '

'$(l10n X-ZACK-LEAVEDATE)'

' - echo ' ' -fi - -if [ -n "$values[SOUND]" ]; then - echo ' ' -fi -[ -n "$values[PHOTO]" ] &&\ - echo ' ' -[ -n "$values[LOGO]" ] &&\ - echo ' ' -echo '
' -echo '' -echo '
' -echo '

'$(l10n TEL)'

' - echo ' ' -for n in TEL{0..10}; do [ -n "$values[$n]" ] &&\ - echo ' ' -done -echo '
' -echo '' -echo '
' -echo '

'$(l10n EMAIL)'

' - echo ' ' -for n in EMAIL{0..10}; do [ -n "$values[$n]" ] &&\ - echo ' ' -done -[ -n "$values[IMPP]" ] && \ - echo '

'$(l10n IMPP)'

' -for n in IMPP IMPP{0..10}; do [ -n "$values[$n]" ] &&\ - echo ' ' -done -echo '
' -echo '' -echo '
' -echo '

'$(l10n ADR)'

' -echo ' ' -for n in ADR{0..10}; do [ -n "$values[$n]" ] &&\ - echo ' ' -done -[ -n "$values[URL]" ] && \ - echo '

'$(l10n URL)'

' -for n in URL URL{0..10}; do [ -n "$values[$n]" ] &&\ - echo ' ' -done -echo '
' -echo '' -echo '
' -echo '

'$(l10n NOTE)'

' -echo ' ' -for n in NOTE{0..10}; do [ -n "$values[$n]" ] &&\ - echo ' ' -done -echo '
' -echo '' -echo '
' -echo '

'$(l10n course_attendance)'

' -listcourses |while read each; do - cname="$(sed -rn 's:^SUMMARY\:(.*)$:\1:p' "$_DATA/ical/$each")" - echo ' ' -done -echo '
' -echo '' -echo '
' -echo ' ' -echo ' ' -echo ' ' -echo ' ' -echo ' ' -echo '
' -echo '' -echo '
' -echo '
' +cat < + +
+

$(l10n N)

+ + + + + + + + $(for n in NICKNAME NICKNAME{0..10}; do + echo "${values[$n]:+}" + done) + +

$(l10n BDAY)

+ + +

$(l10n X-ZACK-JOINDATE)

+ + $(if [ -n "$values[X-ZACK-LEAVEDATE]" ]; then + echo '

'$(l10n X-ZACK-LEAVEDATE)'

' + echo ' ' + fi) + + $(if [ -n "$values[SOUND]" ]; then + echo ' ' + fi) + ${values[PHOTO]:+} + ${values[LOGO]:+} +
+ +
+

$(l10n TEL)

+ + $(for n in TEL{0..10}; do + echo "${values[$n]:+}" + done) +
+ +
+

$(l10n EMAIL)

+ + $(for n in EMAIL{0..10}; do + echo "${values[$n]:+}" + done) + ${values[IMPP]:+

$(l10n IMPP)

} + $(for n in IMPP IMPP{0..10}; do + echo "${values[$n]:+}" + done) +
+ +
+

$(l10n ADR)

+ + $(for n in ADR{0..10}; do + echo "${values[$n]:+}" + done) + ${values[URL]:+

$(l10n URL)

} + $(for n in URL URL{0..10}; do + echo "${values[$n]:+}" + done) +
+ +
+

$(l10n NOTE)

+ + $(for n in NOTE{0..10}; do + echo "${values[$n]:+}" + done) +
+ +
+

$(l10n course_attendance)

+ $(listcourses |while read each; do + cname="$(sed -rn 's:^SUMMARY\:(.*)$:\1:p' "$_DATA/ical/$each")" + echo '' + done) +
+ +
+ + + + + +
+ + +END_HTML diff --git a/templates/frame.html.sh b/templates/frame.html.sh index 8a754ba..27d9466 100755 --- a/templates/frame.html.sh +++ b/templates/frame.html.sh @@ -28,6 +28,7 @@ cat <. -echo '
' -echo '
' -echo '

'$values[FN]'

' -[ -n "$values[GENDER]" ] && \ - echo ' '$(l10n $values[GENDER])'' -for n in NICKNAME NICKNAME{0..10}; do [ -n "$values[$n]" ] &&\ - echo ' aka. '$values[$n]'' -done -[ -n "$values[BDAY]" ] &&\ - echo ' *: '$values[BDAY]'' +cat < +
+

$values[FN]

+ ${values[GENDER]:+$(l10n $values[GENDER])} -[ -n "$values[X-ZACK-JOINDATE]" ] &&\ - echo ' '$(l10n label_join)': '$values[X-ZACK-JOINDATE]'' -[ -n "$values[X-ZACK-LEAVEDATE]" ] &&\ - echo ' '$(l10n label_leave)': '$values[X-ZACK-LEAVEDATE]'' + $(for n in NICKNAME NICKNAME{0..10}; do + echo "${values[$n]:+aka. $values[$n]}" + done) -if [ -n "$values[SOUND]" ]; then - echo ' ' -fi -[ -n "$values[PHOTO]" ] &&\ - echo ' ' -[ -n "$values[LOGO]" ] &&\ - echo ' ' -echo '
' -echo '' -echo '
' -echo '

'$(l10n TEL)'

' -for n in TEL TEL{0..10}; do [ -n "$values[$n]" ] &&\ - echo ' '$tags[${n}_TYPE]' '$values[$n]'' -done -echo '
' -echo '' -echo '
' -[ -n "$values[EMAIL]" ] && \ - echo '

'$(l10n EMAIL)'

' -for n in EMAIL EMAIL{0..10}; do [ -n "$values[$n]" ] &&\ - echo ' ' -done -[ -n "$values[IMPP]" ] && \ - echo '

'$(l10n IMPP)'

' -for n in IMPP IMPP{0..10}; do [ -n "$values[$n]" ] &&\ - echo ' '$tags[${n}_TYPE]' '$values[$n]'' -done -echo '
' -echo '' -echo '
' -echo '

'$(l10n ADR)'

' -for n in ADR ADR{0..10}; do [ -n "$values[$n]" ] &&\ - echo ' '$values[$n]'' -done -[ -n "$values[URL]" ] && \ - echo '

'$(l10n URL)'

' -for n in URL URL{0..10}; do [ -n "$values[$n]" ] &&\ - echo ' '$values[$n]'' -done -echo '
' -echo '' -echo '
' -echo '

'$(l10n NOTE)'

' -for n in NOTE NOTE{0..10}; do [ -n "$values[$n]" ] &&\ - echo ' '$values[$n]'' -done -echo '
' -echo '' -echo '
' -echo '

'$(l10n course_attendance)'

' -sed -rn 's:(.*)\t'$id'$:\1:p' "$_DATA/mappings/attendance" |while read each; do - cname="$(sed -rn 's:^SUMMARY\:(.*)$:\1:p' "$_DATA/ical/$each")" - echo ' '$cname'' -done -echo '
' -echo '' -echo '
' -echo ' '$(l10n edit)'' -echo ' '$(l10n vcf_export)'' -echo '
' -echo '
' + ${values[BDAY]:+*: $values[BDAY]} + ${values[X-ZACK-JOINDATE]:+$(l10n label_join): $values[X-ZACK-JOINDATE]} + ${values[X-ZACK-LEAVEDATE]:+$(l10n label_leave): $values[X-ZACK-LEAVEDATE]} + ${values[SOUND]:+} + ${values[PHOTO]:+} + ${values[LOGO]:+} +
+

$(l10n TEL)

+ $(for n in TEL TEL{0..10}; do + echo "${values[$n]:+$tags[${n}_TYPE] $values[$n]}" + done) +
+ ${values[EMAIL]:+

$(l10n EMAIL)

} + $(for n in EMAIL EMAIL{0..10}; do + echo "${values[$n]:+}" + done) + ${values[IMPP]:+

$(l10n IMPP)

} + $(for n in IMPP IMPP{0..10}; do + echo "${values[$n]:+$tags[${n}_TYPE] $values[$n]}" + done) +
+

$(l10n ADR)

+ $(for n in ADR ADR{0..10}; do + echo "${values[$n]:+$values[$n]}" + done) + ${values[URL]:+

$(l10n URL)

} + $(for n in URL URL{0..10}; do + echo "${values[$n]:+$values[$n]}" + done) +
+

$(l10n NOTE)

+ $(for n in NOTE NOTE{0..10}; do + echo "${values[$n]:+$values[$n]}" + done) +
+

$(l10n course_attendance)

+
    + $(sed -rn 's:(.*)\t'$id'$:\1:p' "$_DATA/mappings/attendance" |while read each; do + cname="$(sed -rn 's:^SUMMARY\:(.*)$:\1:p' "$_DATA/ical/$each")" + echo '
  • '$cname'
  • ' + done) +
+
+ +END_HTML