Skip to content

Commit

Permalink
default テンプレートをレスポンシブWebデザイン対応する #1065
Browse files Browse the repository at this point in the history
@bluestylejp-toya 氏提供のテンプレートを取り込み。

- data/class/SC_Display.php data/Smarty/templates/admin/design/subnavi.tpl の対応に関しては、議論が必要と認識している。
- #804 適用前でブランチを切った。master マージに辺り、#804 の再適用が必要。
  • Loading branch information
seasoftjapan committed Nov 26, 2024
1 parent c438132 commit c3fe9e3
Show file tree
Hide file tree
Showing 8 changed files with 462 additions and 91 deletions.
12 changes: 0 additions & 12 deletions data/Smarty/templates/admin/design/subnavi.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,4 @@
<li<!--{if $tpl_subno == 'up_down'}--> class="on"<!--{/if}--> id="navi-design-add-<!--{$smarty.const.DEVICE_TYPE_PC}-->"><a href="<!--{$smarty.const.ROOT_URLPATH}--><!--{$smarty.const.ADMIN_DIR}-->design/up_down.php?device_type_id=<!--{$smarty.const.DEVICE_TYPE_PC}-->"><span>テンプレート追加</span></a></li>
</ul>
</li>
<li class="on_level2">
<div><span>スマートフォン</span></div>
<ul class="level2">
<li<!--{if $tpl_subno == 'layout'}--> class="on"<!--{/if}--> id="navi-design-layout-<!--{$smarty.const.DEVICE_TYPE_SMARTPHONE}-->"><a href="<!--{$smarty.const.ROOT_URLPATH}--><!--{$smarty.const.ADMIN_DIR}-->design/<!--{$smarty.const.DIR_INDEX_PATH}-->?device_type_id=<!--{$smarty.const.DEVICE_TYPE_SMARTPHONE}-->"><span>レイアウト設定</span></a></li>
<li<!--{if $tpl_subno == 'main_edit'}--> class="on"<!--{/if}--> id="navi-design-main-<!--{$smarty.const.DEVICE_TYPE_SMARTPHONE}-->"><a href="<!--{$smarty.const.ROOT_URLPATH}--><!--{$smarty.const.ADMIN_DIR}-->design/main_edit.php?device_type_id=<!--{$smarty.const.DEVICE_TYPE_SMARTPHONE}-->"><span>ページ詳細設定</span></a></li>
<li<!--{if $tpl_subno == 'bloc'}--> class="on"<!--{/if}--> id="navi-design-bloc-<!--{$smarty.const.DEVICE_TYPE_SMARTPHONE}-->"><a href="<!--{$smarty.const.ROOT_URLPATH}--><!--{$smarty.const.ADMIN_DIR}-->design/bloc.php?device_type_id=<!--{$smarty.const.DEVICE_TYPE_SMARTPHONE}-->"><span>ブロック設定</span></a></li>
<li<!--{if $tpl_subno == 'header'}--> class="on"<!--{/if}--> id="navi-design-header-<!--{$smarty.const.DEVICE_TYPE_SMARTPHONE}-->"><a href="<!--{$smarty.const.ROOT_URLPATH}--><!--{$smarty.const.ADMIN_DIR}-->design/header.php?device_type_id=<!--{$smarty.const.DEVICE_TYPE_SMARTPHONE}-->"><span>ヘッダー/フッター設定</span></a></li>
<li<!--{if $tpl_subno == 'css'}--> class="on"<!--{/if}--> id="navi-design-css-<!--{$smarty.const.DEVICE_TYPE_SMARTPHONE}-->"><a href="<!--{$smarty.const.ROOT_URLPATH}--><!--{$smarty.const.ADMIN_DIR}-->design/css.php?device_type_id=<!--{$smarty.const.DEVICE_TYPE_SMARTPHONE}-->"><span>CSS設定</span></a></li>
<li<!--{if $tpl_subno == 'template'}--> class="on"<!--{/if}--> id="navi-design-template-<!--{$smarty.const.DEVICE_TYPE_SMARTPHONE}-->"><a href="<!--{$smarty.const.ROOT_URLPATH}--><!--{$smarty.const.ADMIN_DIR}-->design/template.php?device_type_id=<!--{$smarty.const.DEVICE_TYPE_SMARTPHONE}-->"><span>テンプレート設定</span></a></li>
<li<!--{if $tpl_subno == 'up_down'}--> class="on"<!--{/if}--> id="navi-design-add-<!--{$smarty.const.DEVICE_TYPE_SMARTPHONE}-->"><a href="<!--{$smarty.const.ROOT_URLPATH}--><!--{$smarty.const.ADMIN_DIR}-->design/up_down.php?device_type_id=<!--{$smarty.const.DEVICE_TYPE_SMARTPHONE}-->"><span>テンプレート追加</span></a></li>
</ul>
</li>
</ul>
4 changes: 4 additions & 0 deletions data/Smarty/templates/default/site_frame.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, user-scalable=yes">
<meta http-equiv="Content-Type" content="text/html; charset=<!--{$smarty.const.CHAR_CODE}-->" />
<title><!--{$arrSiteInfo.shop_name|h}--><!--{if $tpl_subtitle|strlen >= 1}--> / <!--{$tpl_subtitle|h}--><!--{elseif $tpl_title|strlen >= 1}--> / <!--{$tpl_title|h}--><!--{/if}--></title>
<meta http-equiv="Content-Script-Type" content="text/javascript" />
Expand Down Expand Up @@ -75,6 +76,9 @@
<!--{/if}-->
<!--{* ▲Head COLUMN*}-->
<!--{/strip}-->
<script type="text/javascript" src="https://ajaxzip3.github.io/ajaxzip3.js"></script>
<script type="text/javascript" src="/js/plg_ajaxzip3.js"></script
</head>
<!--BODY部 スタート -->
Expand Down
42 changes: 22 additions & 20 deletions data/Smarty/templates/default/site_main.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -73,27 +73,10 @@
<!--{/if}-->
<!--{* ▲TOP COLUMN*}-->

<!--{* ▼LEFT COLUMN *}-->
<!--{if !empty($arrPageLayout.LeftNavi)}-->
<div id="leftcolumn" class="side_column">
<!--{* ▼左ナビ *}-->
<!--{foreach key=LeftNaviKey item=LeftNaviItem from=$arrPageLayout.LeftNavi}-->
<!-- ▼<!--{$LeftNaviItem.bloc_name}--> -->
<!--{if $LeftNaviItem.php_path != ""}-->
<!--{include_php_ex file=$LeftNaviItem.php_path items=$LeftNaviItem}-->
<!--{else}-->
<!--{include file=$LeftNaviItem.tpl_path items=$LeftNaviItem}-->
<!--{/if}-->
<!-- ▲<!--{$LeftNaviItem.bloc_name}--> -->
<!--{/foreach}-->
<!--{* ▲左ナビ *}-->
</div>
<!--{/if}-->
<!--{* ▲LEFT COLUMN *}-->

<div id="main_column_frame">
<!--{* ▼CENTER COLUMN *}-->
<div id="main_column" <!--{**}-->
class="colnum<!--{$tpl_column_num|h}-->
class="colnum_order colnum<!--{$tpl_column_num|h}-->
<!--{if $tpl_column_num == 2}-->
<!--{" "}--><!--{if empty($arrPageLayout.LeftNavi)}-->left<!--{else}-->right<!--{/if}-->
<!--{/if}-->
Expand Down Expand Up @@ -133,9 +116,27 @@
</div>
<!--{* ▲CENTER COLUMN *}-->

<!--{* ▼LEFT COLUMN *}-->
<!--{if !empty($arrPageLayout.LeftNavi)}-->
<div id="leftcolumn" class="colnum_order side_column">
<!--{* ▼左ナビ *}-->
<!--{foreach key=LeftNaviKey item=LeftNaviItem from=$arrPageLayout.LeftNavi}-->
<!-- ▼<!--{$LeftNaviItem.bloc_name}--> -->
<!--{if $LeftNaviItem.php_path != ""}-->
<!--{include_php_ex file=$LeftNaviItem.php_path items=$LeftNaviItem}-->
<!--{else}-->
<!--{include file=$LeftNaviItem.tpl_path items=$LeftNaviItem}-->
<!--{/if}-->
<!-- ▲<!--{$LeftNaviItem.bloc_name}--> -->
<!--{/foreach}-->
<!--{* ▲左ナビ *}-->
</div>
<!--{/if}-->
<!--{* ▲LEFT COLUMN *}-->

<!--{* ▼RIGHT COLUMN *}-->
<!--{if !empty($arrPageLayout.RightNavi)}-->
<div id="rightcolumn" class="side_column">
<div id="rightcolumn" class="colnum_order side_column">
<!--{* ▼右ナビ *}-->
<!--{foreach key=RightNaviKey item=RightNaviItem from=$arrPageLayout.RightNavi}-->
<!-- ▼<!--{$RightNaviItem.bloc_name}--> -->
Expand All @@ -150,6 +151,7 @@
</div>
<!--{/if}-->
<!--{* ▲RIGHT COLUMN *}-->
</div>

<!--{* ▼BOTTOM COLUMN*}-->
<!--{if !empty($arrPageLayout.BottomNavi)}-->
Expand Down
4 changes: 2 additions & 2 deletions data/class/SC_Display.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public function setDevice($device = DEVICE_TYPE_PC)
$this->setView(new SC_MobileView_Ex());
break;
case DEVICE_TYPE_SMARTPHONE:
$this->setView(new SC_SmartphoneView_Ex());
$this->setView(new SC_SiteView_Ex());
break;
case DEVICE_TYPE_PC:
$this->setView(new SC_SiteView_Ex());
Expand Down Expand Up @@ -155,7 +155,7 @@ public static function detectDevice($reset = FALSE)
//$nu = new Net_UserAgent_Mobile();
$su = new SC_SmartphoneUserAgent_Ex();
if ($su->isSmartphone()) {
SC_Display_Ex::$device = DEVICE_TYPE_SMARTPHONE;
SC_Display_Ex::$device = DEVICE_TYPE_PC;
} else {
SC_Display_Ex::$device = DEVICE_TYPE_PC;
}
Expand Down
83 changes: 60 additions & 23 deletions html/user_data/packages/default/css/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ body {
img.picture {
border: 1px solid #ccc;
}
img {
max-width: 100%;
}


/* ==============================================
Expand Down Expand Up @@ -44,6 +47,22 @@ img.picture {

/* メイン部
----------------------------------------------- */
@media screen and (min-width: 768px) {
#main_column_frame {
display: flex;
display: -webkit-flex;
display: -ms-flexbox;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
-webkit-justify-content: space-between;
flex-direction: row;
}
#main_column_frame .colnum_order:nth-child(1) { order: 2; }
#main_column_frame .colnum_order:nth-child(2) { order: 1; }
#main_column_frame .colnum_order:nth-child(3) { order: 3; }
}

#main_column {
padding: 10px 0 0;
}
Expand All @@ -62,20 +81,17 @@ img.picture {
/* 2カラム時 (メイン部が左) */
#main_column.colnum2.left {
padding-left: 1.5%;
float: left;
}

/* 2カラム時 (メイン部が右) */
#main_column.colnum2.right {
padding-right: 1.5%;
float: right;
}

/* 3カラム時 */
#main_column.colnum3 {
padding-left: 0.5%;
width: 59%;
float: left;
}

/* サイドカラム
Expand All @@ -84,11 +100,9 @@ img.picture {
padding: 10px 0 0;
}
#leftcolumn {
float: left;
width: 20%;
}
#rightcolumn {
float: right;
width: 20%;
}

Expand Down Expand Up @@ -300,10 +314,16 @@ div#undercolumn_login .login_area h4 {
#header {
margin: auto;
width: 980px;
display: flex;
display: -webkit-flex;
display: -ms-flexbox;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
-webkit-justify-content: space-between;
}
#header_utility {
float: right;
width: 580px;
width: 60%;
}
#errorHeader {
color: #F00;
Expand All @@ -319,8 +339,7 @@ div#undercolumn_login .login_area h4 {
----------------------------------------------- */
#logo_area {
padding-left: 10px;
float: left;
width: 390px;
width: 40%px;
text-align: left;
}
#site_description {
Expand All @@ -330,17 +349,22 @@ div#undercolumn_login .login_area h4 {

/* ヘッダーナビ
----------------------------------------------- */
div#header_navi {
float: right;
width: 409px;
#header_navi ul {
width: 100%;
height: 38px;
}
div#header_navi ul li {
display: flex;
display: -webkit-flex;
display: -ms-flexbox;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: flex-end;
-webkit-justify-content: flex-end;
}
#header_navi ul li {
display: block;
float: left;
}
div#header_navi ul li.mypage,
div#header_navi ul li.entry {
#header_navi ul li.mypage,
#header_navi ul li.entry {
margin-top: 6px;
}

Expand All @@ -362,12 +386,13 @@ div#header_navi ul li.entry {
}
#pagetop {
width: 210px;
float: right;
text-align: right;
position: fixed;
bottom: 40px;
right: 12px;
}
#copyright {
width: 740px;
float: left;
text-align: left;
font-size: 97%;
}
Expand All @@ -379,14 +404,26 @@ div#header_navi ul li.entry {
/* ボタン
----------------------------------------------- */
.btn_area {
margin-top: 10px;
width: 100%;
text-align: center;
margin: 10px auto;
width: 80%;
}
.btn_area ul {
display: flex;
display: -webkit-flex;
display: -ms-flexbox;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: flex-end;
-webkit-justify-content: flex-end;
}

.btn_area li {
padding-right: 10px;
display: inline;
-webkit-flex-grow: 1;
flex-grow: 1;
-webkit-box-sizing: border-box;
box-sizing: border-box;
text-align: center;
}


Expand Down
Loading

0 comments on commit c3fe9e3

Please sign in to comment.