s4

changeset 156:d46bce9072cd

Add link to '#bottom', recover function of auto href at the beg.of line
author HIROSE Yuuji <yuuji@gentei.org>
date Wed, 06 Jan 2016 23:07:05 +0859
parents 511406c0cbbe
children 3b2963de55ce
files s4-blog.sh
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line diff
     1.1 --- a/s4-blog.sh	Tue Jan 05 18:47:59 2016 +0859
     1.2 +++ b/s4-blog.sh	Wed Jan 06 23:07:05 2016 +0859
     1.3 @@ -282,9 +282,10 @@
     1.4      href2="<a href=\"?lshandout+$rowid\"> 提出状況 </a>"
     1.5      href3="(<a href=\"?gethandout+$rowid\">ファイル取得</a>)"
     1.6    fi
     1.7 +  href4='<a href="#bottom"> 末尾へ</a>'
     1.8    cat<<EOF | sq -html $db \
     1.9        | sed -e "s|\(<TR><TD>\),e,|\1 $href |" \
    1.10 -	    -e "s|,s,\(</TD>\)|$href2$href3\1|"
    1.11 +	    -e "s|,s,\(</TD>\)|$href2$href3$href4\1|"
    1.12  -- select val from $ts where key="title" and id="$id";
    1.13  select
    1.14   coalesce((select ",e," from blog where rowid=$rowid and author='$user'),'')
    1.15 @@ -371,12 +372,13 @@
    1.16    ON a.id=s.id;
    1.17  EOF
    1.18      while IFS='|' read id edit uid uname tm hte imgids; do
    1.19 -      cat<<EOF
    1.20 +      cat<<EOF |
    1.21  <tr id="$id">
    1.22  <td>${edit:+<a href="$elink+$edit">編集</a>}
    1.23  <a href="$hlink+$uid">$uname</a>
    1.24  $tm</td><td>`echo "$hte"|unhexize|htmlescape`
    1.25  EOF
    1.26 +      sed -e "s|^href=\([-A-Za-z0-9,.:/~_%#&+?]*\)|<a &>\1</a>|"
    1.27        for i in $imgids; do
    1.28  	mrid=${i%%:*}; i=${i#*:}; sz=`size_h ${i%%:*}`
    1.29  	fn=`echo "${i#*:}"|unhexize`
    1.30 @@ -721,7 +723,8 @@
    1.31    echo "$subtitle" > $tmpd/subtitle.$$
    1.32    ${BLOG_SHOW:-blog_showentry} blog $rowid \
    1.33        | m4 -D_TITLE_="spaste(\`$tmpd/title.$$')" -D_BODYCLASS_=general \
    1.34 -	   -D_FORMHEAD_="spaste(\`$tmpd/subtitle.$$')" -D_FORM_="" \
    1.35 +	   -D_FORMHEAD_="spaste(\`$tmpd/subtitle.$$')" \
    1.36 +	   -D_FORM_='' \
    1.37  	   -D_DUMPTABLE_="syscmd(cat)" -D_DUMPHEAD_="" \
    1.38  	   $layout/html.m4.html $layout/form+dump-whead.m4.html
    1.39  }