모바일: 검색결과스킨 마크업 및 스타일 수정

This commit is contained in:
whitedot
2013-05-16 11:38:40 +09:00
parent d8ad6a903a
commit 52f9068372
2 changed files with 126 additions and 120 deletions

View File

@ -2,129 +2,136 @@
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<link rel="stylesheet" href="<?php echo $search_skin_url ?>/style.css">
<form name="fsearch" onsubmit="return fsearch_submit(this);" method="get">
<input type="hidden" name="srows" value="<?php echo $srows ?>">
<fieldset id="sch_result_detail">
<fieldset id="sch_res_detail">
<legend>상세검색</legend>
<?php echo $group_select ?>
<script>document.getElementById("gr_id").value = "<?php echo $gr_id ?>";</script>
<div>
<?php echo $group_select ?>
<script>document.getElementById("gr_id").value = "<?php echo $gr_id ?>";</script>
<label for="sfl" class="sound_only">검색대상</label>
<select name="sfl" id="sfl">
<option value="wr_subject||wr_content"<?php echo get_selected($_GET['sfl'], "wr_subject||wr_content") ?>>제목+내용</option>
<option value="wr_subject"<?php echo get_selected($_GET['sfl'], "wr_subject") ?>>제목</option>
<option value="wr_content"<?php echo get_selected($_GET['sfl'], "wr_content") ?>>내용</option>
<option value="mb_id"<?php echo get_selected($_GET['sfl'], "mb_id") ?>>회원아이디</option>
<option value="wr_name"<?php echo get_selected($_GET['sfl'], "wr_name") ?>>이름</option>
</select>
<label for="sfl" class="sound_only">검색조건</label>
<select name="sfl" id="sfl">
<option value="wr_subject||wr_content"<?php echo get_selected($_GET['sfl'], "wr_subject||wr_content") ?>>제목+내용</option>
<option value="wr_subject"<?php echo get_selected($_GET['sfl'], "wr_subject") ?>>제목</option>
<option value="wr_content"<?php echo get_selected($_GET['sfl'], "wr_content") ?>>내용</option>
<option value="mb_id"<?php echo get_selected($_GET['sfl'], "mb_id") ?>>회원아이디</option>
<option value="wr_name"<?php echo get_selected($_GET['sfl'], "wr_name") ?>>이름</option>
</select>
</div>
<div>
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
<input type="text" name="stx" value="<?php echo $text_stx ?>" class="frm_input" required class="required" size="14" maxlength="20">
<input type="submit" class="btn_submit" value="검색">
<input type="text" name="stx" value="<?php echo $text_stx ?>" id="stx" required class="required" placeholder="검색어(필수)" maxlength="20">
<input type="submit" value="검색">
<script>
function fsearch_submit(f)
{
if (f.stx.value.length < 2) {
alert("검색어는 두글자 이상 입력하십시오.");
f.stx.select();
f.stx.focus();
return false;
}
<script>
function fsearch_submit(f)
{
if (f.stx.value.length < 2) {
alert("검색어는 두글자 이상 입력하십시오.");
f.stx.select();
f.stx.focus();
return false;
// 검색에 많은 부하가 걸리는 경우 이 주석을 제거하세요.
var cnt = 0;
for (var i=0; i<f.stx.value.length; i++) {
if (f.stx.value.charAt(i) == ' ')
cnt++;
}
if (cnt > 1) {
alert("빠른 검색을 위하여 검색어에 공백은 한개만 입력할 수 있습니다.");
f.stx.select();
f.stx.focus();
return false;
}
f.action = "";
return true;
}
// 검색에 많은 부하가 걸리는 경우 이 주석을 제거하세요.
var cnt = 0;
for (var i=0; i<f.stx.value.length; i++) {
if (f.stx.value.charAt(i) == ' ')
cnt++;
}
if (cnt > 1) {
alert("빠른 검색을 위하여 검색어에 공백은 한개만 입력할 수 있습니다.");
f.stx.select();
f.stx.focus();
return false;
}
f.action = "";
return true;
}
</script>
<input type="radio" id="sop_or" name="sop" value="or" <?php echo ($sop == "or") ? "checked" : ""; ?>>
<label for="sop_or">OR</label>
<input type="radio" id="sop_and" name="sop" value="and" <?php echo ($sop == "and") ? "checked" : ""; ?>>
<label for="sop_and">AND</label>
</script>
</div>
<div>
<input type="radio" value="or" <?php echo ($sop == "or") ? "checked" : ""; ?> id="sop_or" name="sop">
<label for="sop_or">OR</label>
<input type="radio" value="and" <?php echo ($sop == "and") ? "checked" : ""; ?> id="sop_and" name="sop">
<label for="sop_and">AND</label>
</div>
</fieldset>
</form>
<div id="sch_result">
<?php if ($stx) { ?>
<?php if ($board_count) { ?>
<dl id="sch_result_hd">
<dt>검색어 <strong><?php echo $stx ?></strong></dt>
<dd>
<ul>
<li>게시판 <span style="color:<?php echo $config['cf_search_color'] ?>"><?php echo $board_count ?></span>개</li>
<li>게시물 <span style="color:<?php echo $config['cf_search_color'] ?>"><?php echo number_format($total_count) ?></span>개</li>
<li><?php echo number_format($page) ?>/<?php echo number_format($total_page) ?> 페이지</li>
</ul>
</dd>
</dl>
<?php } ?>
<?php } ?>
<?php
if ($stx) {
if ($board_count) {
?>
<dl id="sch_result_bo">
<dt>검색결과가 있는 게시판 목록</dt>
<dd>
<ul>
<li><a href="?<?php echo $search_query ?>&amp;gr_id=<?php echo $gr_id ?>" <?php echo $sch_all ?>>전체게시판</a></li>
<?php echo $str_board_list; ?>
</ul>
</dd>
</dl>
<section id="sch_res_ov">
<h2><?php echo $stx ?> 전체검색 결과</h2>
<dl>
<dt>게시판</dt>
<dd><strong style="color:<?php echo $config['cf_search_color'] ?>"><?php echo $board_count ?>개</strong></dd>
<dt>게시물</dt>
<dd><strong style="color:<?php echo $config['cf_search_color'] ?>"><?php echo number_format($total_count) ?>개</strong></dd>
</dl>
<p><?php echo number_format($page) ?>/<?php echo number_format($total_page) ?> 페이지 열람 중</p>
</section>
<?php
}
}
?>
<?php
if ($stx) {
if ($board_count) {
?>
<ul id="sch_res_board">
<li><a href="?<?php echo $search_query ?>&amp;gr_id=<?php echo $gr_id ?>" <?php echo $sch_all ?>>전체게시판</a></li>
<?php echo $str_board_list; ?>
</ul>
<?php
} else {
?>
?>
<p>검색된 자료가 하나도 없습니다.</p>
<?php } } ?>
<?php } } ?>
<hr>
<?php if ($stx && $board_count) { ?><dl id="sch_result_atc"><?php } ?>
<?php if ($stx && $board_count) { ?><section class="sch_res_list"><?php } ?>
<?php
$k=0;
for ($idx=$table_index, $k=0; $idx<count($search_table) && $k<$rows; $idx++) {
$comment_def = "";
$comment_href = "";
?>
<dt><a href="./board.php?bo_table=<?php echo $search_table[$idx] ?>&amp;<?php echo $search_query ?>"><?php echo $bo_subject[$idx] ?>에서</a></dt>
<dd>
<ul>
<?php
for ($i=0; $i<count($list[$idx]) && $k<$rows; $i++, $k++) {
if ($list[$idx][$i][wr_is_comment])
{
$comment_def = "<span class=\"cmt_def\">댓글</span>";
$comment_href = "#c_".$list[$idx][$i][wr_id];
}
?>
<li>
<a href="<?php echo $list[$idx][$i][href] ?><?php echo $comment_href ?>" class="sch_result_title"><?php echo $comment_def ?><?php echo $list[$idx][$i][subject] ?></a>
<a href="<?php echo $list[$idx][$i][href] ?><?php echo $comment_href ?>" target="_blank">새창</a>
<p><?php echo $list[$idx][$i][content] ?></p>
<?php echo $list[$idx][$i][name] ?>
<span class="sch_datetime"><?php echo $list[$idx][$i][wr_datetime] ?></span>
</li>
<?php } ?>
</ul>
<div class="sch_more"><a href="./board.php?bo_table=<?php echo $search_table[$idx] ?>&amp;<?php echo $search_query ?>"><?php echo $bo_subject[$idx] ?> 더보기</a></div>
</dd>
<?php } ?>
<?php if ($stx && $board_count) { ?></dl><?php } ?>
?>
<h2><a href="./board.php?bo_table=<?php echo $search_table[$idx] ?>&amp;<?php echo $search_query ?>"><?php echo $bo_subject[$idx] ?> 게시판 내 결과</a></h2>
<ul>
<?php
for ($i=0; $i<count($list[$idx]) && $k<$rows; $i++, $k++) {
if ($list[$idx][$i][wr_is_comment])
{
$comment_def = "<span class=\"cmt_def\">댓글</span>";
$comment_href = "#c_".$list[$idx][$i][wr_id];
}
?>
<li>
<a href="<?php echo $list[$idx][$i][href] ?><?php echo $comment_href ?>" class="sch_res_title"><?php echo $comment_def ?><?php echo $list[$idx][$i][subject] ?></a>
<a href="<?php echo $list[$idx][$i][href] ?><?php echo $comment_href ?>" target="_blank">새창</a>
<p><?php echo $list[$idx][$i][content] ?></p>
<?php echo $list[$idx][$i][name] ?>
<span class="sch_datetime"><?php echo $list[$idx][$i][wr_datetime] ?></span>
</li>
<?php } ?>
</ul>
<div class="sch_more"><a href="./board.php?bo_table=<?php echo $search_table[$idx] ?>&amp;<?php echo $search_query ?>"><strong><?php echo $bo_subject[$idx] ?></strong> 결과 더보기</a></div>
<hr>
<?php } ?>
<?php if ($stx && $board_count) { ?></section><?php } ?>
<?php echo $write_pages ?>

View File

@ -1,28 +1,27 @@
/* 전체검색결과 스킨 */
#sch_result_detail {margin:0;padding:0.5em 1em;border:0}
#sch_result {padding:0 1em}
#sch_res_detail {padding:0 0 1em;border-bottom:1px solid #e9e9e9;text-align:center}
#sch_res_detail legend {position:absolute;font-size:0;line-height:0;overflow:hidden}
#sch_res_detail div {margin:0 0 0.5em}
#sch_res_detail .frm_input {height:2.5em;line-height:2.5em}
#sch_result_hd dt {width:0;height:0;overflow:hidden}
#sch_result_hd dd {margin:0}
#sch_result_hd ul {margin:0;padding:0;border-top:1px solid #eee;border-bottom:1px solid #eee;list-style:none}
#sch_result_hd ul:after {display:block;visibility:hidden;clear:both;content:""}
#sch_result_hd li {float:left;padding:0.5em 0;width:33%;text-align:center}
#sch_res_ov {padding:1em;border-bottom:1px solid #e9e9e9;background:#f5f6fa;zoom:1}
#sch_res_ov:after {display:block;visibility:hidden;clear:both;content:""}
#sch_res_ov h2 {margin:0 0 0.5em}
#sch_res_ov dl {margin:0 0 0.5em;zoom:1}
#sch_res_ov dl:after {display:block;visibility:hidden;clear:both;content:""}
#sch_res_ov dt {float:left}
#sch_res_ov dd {float:left;margin:0 1em 0 0.5em}
#sch_res_ov p {margin:0;padding:0}
#sch_result_bo dt {width:0;height:0;overflow:hidden}
#sch_result_bo dd {margin:0}
#sch_result_bo ul {margin:0;padding:0;list-style:none}
#sch_result_bo li {border-bottom:1px solid #fff;background:#f7f7f7}
#sch_result_bo a {display:block;padding:0.5em;color:#000;text-decoration:none}
#sch_result_bo .cnt_cmt {display:inline-block;margin:0 0 0 0.5em;color:#ff3061}
#sch_res_board {margin:0 0 1em;padding:0;list-style:none;zoom:1}
#sch_res_board:after {display:block;visibility:hidden;clear:both;content:""}
#sch_res_board a {display:block;position:relative;margin-left:-1px;padding:0.5em 1em;border-bottom:1px solid #e9e9e9;text-decoration:none;letter-spacing:-0.1em;line-height:1.2em;cursor:pointer}
#sch_res_board a:focus, #sch_res_board a:hover, #sch_res_board a:active {text-decoration:none}
#sch_res_board .cnt_cmt {font-weight:normal !important}
#sch_result_atc a {color:#000}
#sch_result_atc dt {padding:0.5em 1em;background:#484848;color:#fff}
#sch_result_atc dt a {color:#fff;text-decoration:none}
#sch_result_atc dd {margin:0}
#sch_result_atc ul {margin:0;padding:0;list-style:none}
#sch_result_atc li {padding:1em;border-bottom:1px solid #eee}
.sch_more {padding:10px 0 15px;text-align:right}
.sch_more a {}
.sch_datetime {display:inline-block;margin-right:15px;color:#999}
.sch_word {font-weight:bold} /* 검색어 강조 */
.sch_res_list {margin:0 0 1em;padding:1em 0}
.sch_res_list h2 {margin:0 0 1em;padding:0 1em;font-size:1.2em}
.sch_res_list ul {margin:0;padding:0;list-style:none}
.sch_res_list li {margin:0 0 1em;padding:0 1em 1em;border-bottom:1px solid #e9e9e9}
.sch_res_list a {text-decoration:none}
.sch_more {padding:0 1em;text-align:right}