s4

changeset 243:466ea3e4b039

Search box localted to the top of home page.
author HIROSE Yuuji <yuuji@gentei.org>
date Sun, 10 Jul 2016 20:39:37 +0859
parents 7dd85c224bbb
children 6a3e03ab19a6
files examples/common/default/default.css examples/common/default/home.m4.html s4-funcs.sh
diffstat 3 files changed, 24 insertions(+), 15 deletions(-) [+]
line diff
     1.1 --- a/examples/common/default/default.css	Fri Jul 08 19:26:09 2016 +0859
     1.2 +++ b/examples/common/default/default.css	Sun Jul 10 20:39:37 2016 +0859
     1.3 @@ -125,8 +125,14 @@
     1.4  div.xy120x120 {min-width: 120px; min-height: 140px;}
     1.5  div.xy96x96 {min-width: 96px; min-height: 116px;}
     1.6  div.xy50x50 {min-width: 50px; min-height: 70px;}
     1.7 -div.right {clear: both; float: right;}
     1.8 +div.right, div.search {clear: both; float: right;}
     1.9  *.clear {clear: both;}
    1.10 +div.search input[type="text"] {
    1.11 +    border: solid 1px #bbb; border-radius: 0.5ex; min-height: 20px;
    1.12 +    margin: 1em; padding: 0 0.5ex; padding-left: 18px;
    1.13 +    background: url("../../img/loupe.png") left center no-repeat
    1.14 +		   rgba(242,240,240,0.7);
    1.15 +}
    1.16  
    1.17  /*
    1.18   * PR Web
     2.1 --- a/examples/common/default/home.m4.html	Fri Jul 08 19:26:09 2016 +0859
     2.2 +++ b/examples/common/default/home.m4.html	Sun Jul 10 20:39:37 2016 +0859
     2.3 @@ -1,3 +1,4 @@
     2.4 +<div class="search">_SEARCH_</div>
     2.5  <h1>_TITLE_</h1>
     2.6  <p class="profimg">_PROFIMG_</p>
     2.7  <div class="home">
     3.1 --- a/s4-funcs.sh	Fri Jul 08 19:26:09 2016 +0859
     3.2 +++ b/s4-funcs.sh	Sun Jul 10 20:39:37 2016 +0859
     3.3 @@ -1421,6 +1421,18 @@
     3.4  EOF
     3.5  }
     3.6  
     3.7 +search_form() {
     3.8 +  cat<<-EOF
     3.9 +	<div class="fr">
    3.10 +	<form action="$myname">
    3.11 +	<input type="text" name="kwd" value=""
    3.12 +	 placeholder=" 全記事からの検索 " width="10">
    3.13 +	<input type="hidden" name="stage" value="searchart">
    3.14 +	</form>
    3.15 +	</div>
    3.16 +	EOF
    3.17 +}
    3.18 +
    3.19  showhome() {
    3.20    # $1=userRowIdToShow
    3.21    err showhome \$1=$1
    3.22 @@ -1450,8 +1462,9 @@
    3.23    fi
    3.24    . ./s4-blog.sh
    3.25  
    3.26 -  tf=$tmpd/title.$$ pf=$tmpd/profile.$$ bf=$tmpd/blogs.$$
    3.27 -  echo "$gecos さん" > $tf
    3.28 +  tf=$tmpd/title.$$ pf=$tmpd/profile.$$ bf=$tmpd/blogs.$$ sf=$tmpd/search.$$
    3.29 +  search_form		> $sf
    3.30 +  echo "$gecos さん"	> $tf
    3.31    viewtable $formdir/user.def user $1	> $pf
    3.32  
    3.33    sqcond="WHERE name='$uname' AND key='profimg' AND type LIKE 'file:image%'"
    3.34 @@ -1472,6 +1485,7 @@
    3.35  	    -D_PROFILE_="spaste(\`$pf')$conflink" \
    3.36  	    -D_PROFIMG_="spaste(\`$imf')" \
    3.37  	    -D_BLOGS_="spaste(\`$bf')" \
    3.38 +	    -D_SEARCH_="spaste(\`$sf')" \
    3.39  	    -D_NBLOG_="$nblog" \
    3.40  	    -D_GROUPS_="syscmd(\`cat')" \
    3.41  	    $layout/html.m4.html $layout/home.m4.html
    3.42 @@ -1532,18 +1546,6 @@
    3.43  	</div>
    3.44  	EOF
    3.45      fi
    3.46 -    cat<<EOF
    3.47 -<div class="fold">
    3.48 -`cgi_checkbox srchall yes id="sa"`<label
    3.49 - for="sa">SNS全体から検索</label>
    3.50 -<div>
    3.51 -EOF
    3.52 -    cgi_form searchart<<EOF
    3.53 -<label>`cgi_text kwd`という語を含む記事を全部から検索</label>
    3.54 -EOF
    3.55 -    cat<<EOF
    3.56 -</div></div>
    3.57 -EOF
    3.58    fi
    3.59    #
    3.60    # Record access log