# HG changeset patch # User HIROSE Yuuji # Date 1448841759 -32399 # Node ID 3d0de7bdbf404742b93580b5a169afccdd03ab97 # Parent 3b34c52fa4f0d65707b68a781aade87c1d051941 Profile image diff -r 3b34c52fa4f0 -r 3d0de7bdbf40 examples/common/default/default.css --- a/examples/common/default/default.css Thu Nov 05 21:59:46 2015 +0859 +++ b/examples/common/default/default.css Mon Nov 30 09:02:38 2015 +0859 @@ -75,6 +75,11 @@ .blog_replies td:nth-child(2) { vertical-align: top; min-width: 30em; height: 3em; } +p.profimg {float: left; max-width: 400px; max-height: 400px; + overflow: hidden; margin-right: 1em; + padding: 0; border: white 1px solid; box-shadow: 2px 3px 4px + } +div.home+* {clear: both;} div.fold {margin-top: 1em; border-top: 1px solid black; padding-top: 1em;} div.fold > div { diff -r 3b34c52fa4f0 -r 3d0de7bdbf40 examples/common/default/home.m4.html --- a/examples/common/default/home.m4.html Thu Nov 05 21:59:46 2015 +0859 +++ b/examples/common/default/home.m4.html Mon Nov 30 09:02:38 2015 +0859 @@ -1,4 +1,5 @@

_TITLE_

+

_PROFIMG_

_PROFILE_
diff -r 3b34c52fa4f0 -r 3d0de7bdbf40 s4-funcs.sh --- a/s4-funcs.sh Thu Nov 05 21:59:46 2015 +0859 +++ b/s4-funcs.sh Mon Nov 30 09:02:38 2015 +0859 @@ -1360,10 +1360,22 @@ tf=$tmpd/title.$$ pf=$tmpd/profile.$$ bf=$tmpd/blogs.$$ echo "$gecos さん" > $tf viewtable $formdir/user.def user $1 > $pf + + sqcond="WHERE name='$user' AND key='profimg' AND type LIKE 'file:image%'" + img=`query "SELECT type FROM user_m $sqcond LIMIT 1;"` + imf=tmp/profimg; touch $imf + if [ -n "$img" ]; then + { printf '%s' " $imf + fi listblog $uname > $bf listgroupbytable $formdir/grp.def $cond \ | m4 -D_BODYCLASS_=home -D_TITLE_="spaste(\`$tf')" \ -D_PROFILE_="spaste(\`$pf')$conflink" \ + -D_PROFIMG_="spaste(\`$imf')" \ -D_BLOGS_="spaste(\`$bf')" \ -D_GROUPS_="syscmd(\`cat')" \ $layout/html.m4.html $layout/home.m4.html