From: paul Date: Wed, 12 Mar 2014 16:16:05 +0000 (+0000) Subject: stubs for email display X-Git-Url: https://git.plutz.net/?p=confetti;a=commitdiff_plain;h=072f4ed13e865cf9f3c8a488048a482b9d8b4cc4 stubs for email display svn path=/trunk/; revision=42 --- diff --git a/pages/email.sh b/pages/email.sh index b37b62a..f05b3e0 100755 --- a/pages/email.sh +++ b/pages/email.sh @@ -1,12 +1,31 @@ #!/bin/sh +[ -z "$_GET[\"order\"]" ] && _GET["order"]=DOW + +listcards() { + ls -1 ${_DATA}/vcard/*vcf 2>/dev/null |while read file; do + fn=$(sed -rn 's:^N(;.+)*\:([^;]*;){1} *([^;]*).*$:\3:p' "$file") + echo "$fn\t$file" + done |sort |sed -r 's:^.*\t(.*/)([^/]+)$:\2:' +} + +listcourses() { + ls -1 ${_DATA}/ical/*ics |while read file; do + icstime="$(sed -rn 's:^DTSTART\:(TZID=.*\:)?([0-9]{4})([0-9]{2})([0-9]{2})T([0-9]{2})([0-9]{2})([0-9]{2})Z?\r$:\2-\3-\4 \5\:\6\:\7:p' "$file")" + echo "$(date -d "$icstime" "+%u %H%M%S")\t$file" + done |sort |sed -r 's:^.*\t(.*/)([^/]+)$:\2:' +} + case "$1" in title) - echo "Email" + echo "Email" ;; css) + . ${_EXEC}/templates/email.css.sh ;; body) + . ${_EXEC}/templates/text_email.sh + . ${_EXEC}/templates/email.html.sh ;; esac diff --git a/templates/email.css.sh b/templates/email.css.sh new file mode 100644 index 0000000..006bd95 --- /dev/null +++ b/templates/email.css.sh @@ -0,0 +1,143 @@ +cat < .label { + display: block; + font-weight: bold; + font-size: 1.2em; + border-style: none none solid none; + border-width: 1px; + margin: 0em 0ex .5em 0ex; + background: #EEF; +} + +.filter .search { + margin: 0em 2ex .5em 2ex; +} +.filter .search .label { + display: inline-block; + width: 12ex; + font-weight: bold; + margin-top: .5em; +} +.filter .search input[type="radio"] { + margin-top: .5em; + margin-left: 1ex; +} +.filter .search button { + margin-top: .5em; +} + +.filter .search input[type="text"] { + width: 124ex; +} + +.newcard { + display: block; + width: 126ex; + border-width: 1px; + border-style: solid; + border-radius: 0 0 4px 4px; + margin: .25em auto 1em auto; + padding: .25em 2ex .25em 2ex; + background: #EFF; +} + +.cardlist .card { + display: block; + width: 130ex; + border-style: solid; + border-width: 1px; + margin: .25em auto; + padding: 0; + overflow: auto; + background: #FFF; +} + +.cardlist .card .section { + display: inline-block; + float:left; + width: 20ex; + margin: .125em .25ex .5ex .25ex; + padding: 0 .2em .2em .2em; + background: #EEE; +} +.cardlist .card .section a.attendance { + display: inline-block; + margin-right: 1ex; + word-wrap: break-word; +} + +.cardlist .card .attendance { + width: 83.5ex; +} +.cardlist .card .attendance .check { + display: inline-block; + width: 27ex; +} + +.cardlist .card .control { + float: right; + text-align: right; + margin-right: 0; + background: #EEF; +} +.cardlist .card .control .item { + color: #008; + margin-top: .2em; + margin-right: 1ex; +} +.cardlist .card .control a.item { + min-width: 10ex; + border-style: solid double solid solid; + border-width: 1px 3px 1px 1px; + border-color: #000; + padding: .1em 1ex; + background: #FFF; +} +.cardlist .card .control a.item:hover{ + border-width: 1px 1px 1px 1px; +} + +.cardlist .card .section .sectitle { + display: block; + font-weight: bold; + margin: .2em .2em .2em .2em; +} + +.cardlist .card .section .item { + display: block; + max-width: 20ex; + word-wrap: break-word; +} + +.cardlist .card .section textarea.NOTE { + min-height: 6em; +} +.cardlist .card .section textarea.ADR { + min-height: 4em; +} + +.cardlist .card .section .PHOTO { + width: 20ex; + max-heigth: 30ex; +} + +.cardlist .card .section .FN { + font-weight: bold; + font-size: 1.2em; +} + +EOF + +# vi:set filetype=css: diff --git a/templates/email.html.sh b/templates/email.html.sh new file mode 100644 index 0000000..195742a --- /dev/null +++ b/templates/email.html.sh @@ -0,0 +1,43 @@ + +cat < + $(l10n filter_label) + + + +
+$( +) +
+EOF + +# vi:set filetype=html: