공통: 상단 마크업 수정, 모바일: 상단 디자인 및 스타일 수정

This commit is contained in:
whitedot
2013-12-05 18:22:58 +09:00
parent d2f2f1193c
commit 6e80e62585
4 changed files with 70 additions and 50 deletions

View File

@ -22,45 +22,60 @@ include_once(G5_LIB_PATH.'/popular.lib.php');
<a href="<?php echo G5_URL ?>"><img src="<?php echo G5_IMG_URL ?>/logo.jpg" alt="처음으로"></a>
</div>
<fieldset id="sch">
<legend>사이트 내 전체검색</legend>
<form name="fsearchbox" action="<?php echo G5_BBS_URL ?>/search.php" onsubmit="return fsearchbox_submit(this);" method="get">
<input type="hidden" name="sfl" value="wr_subject||wr_content">
<input type="hidden" name="sop" value="and">
<input type="text" name="stx" id="sch_stx" placeholder="검색어(필수)" required class="required" maxlength="20">
<input type="image" alt="검색" src="<?php echo G5_IMG_URL ?>/btn_search.jpg" id="sch_submit" width="24" height="24">
</form>
<button type="button" id="hd_sch_open">검색<span class="sound_only"> 열기</span></button>
<script>
function fsearchbox_submit(f)
{
if (f.stx.value.length < 2) {
alert("검색어는 두글자 이상 입력하십시오.");
f.stx.select();
f.stx.focus();
return false;
<aside id="hd_sch">
<div class="sch_inner">
<h2>사이트 내 전체검색</h2>
<form name="fsearchbox" action="<?php echo G5_BBS_URL ?>/search.php" onsubmit="return fsearchbox_submit(this);" method="get">
<input type="hidden" name="sfl" value="wr_subject||wr_content">
<input type="hidden" name="sop" value="and">
<input type="text" name="stx" id="sch_stx" placeholder="검색어(필수)" required class="frm_input required" maxlength="20">
<input type="submit" value="검색" class="btn_submit">
</form>
<script>
function fsearchbox_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;
}
return true;
}
</script>
</div>
</aside>
<script>
$(function (){
var $hd_sch = $("#hd_sch");
$("#hd_sch_open").click(function(){
$hd_sch.css("display","block");
});
$("#hd_sch .pop_close").click(function(){
$hd_sch.css("display","none");
});
});
</script>
// 검색에 많은 부하가 걸리는 경우 이 주석을 제거하세요.
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;
}
return true;
}
</script>
</fieldset>
<ul id="mb_nb">
<ul id="hd_nb">
<li><a href="<?php echo G5_BBS_URL ?>/qalist.php" id="snb_new">1:1문의</a></li>
<li><a href="<?php echo G5_BBS_URL ?>/current_connect.php" id="snb_cnt">접속자 <?php echo connect(); // 현재 접속자수 ?></a></li>
<li><a href="<?php echo G5_BBS_URL ?>/new.php" id="snb_new">새글</a></li>