OSDN Git Service

Bootstrap型テンプレート「bootstrap_yeti」修正。 v2.8.11
authornaoki hirata <naoki@magic3.org>
Tue, 18 Mar 2014 02:01:26 +0000 (11:01 +0900)
committernaoki hirata <naoki@magic3.org>
Tue, 18 Mar 2014 02:01:26 +0000 (11:01 +0900)
include/manager/pageManager.php
include/sql/update/2014030501_to_2014031001.sql
templates/bootstrap_yeti/css/style.css
templates/bootstrap_yeti/css/style_layout.css
templates/bootstrap_yeti/html/modules.php [new file with mode: 0644]
templates/bootstrap_yeti/index.php

index 91473cc..54068d9 100644 (file)
@@ -3633,7 +3633,7 @@ class PageManager extends Core
                                                                                        $moduleContent = '';
                                                                                        if ($style == self::WIDGET_STYLE_NAVMENU){              // ナビゲーションバーメニューはメニュータイプのウィジェットのみ実行
                                                                                                if ($widgetType == 'menu') $moduleContent = $render->getMenuContents($style, $widgetContent, $title, $attr, $params, $pageDefParam, $templateVer);
-                                                                               
+                                                                       
                                                                                                // ナビゲーションバータイプで作成できないときはデフォルトの出力を取得
                                                                                                if (empty($moduleContent)) $moduleContent = $render->getModuleContents('xhtml', $widgetContent, $title, $attr, $params, $pageDefParam, $templateVer);
                                                                                        } else {
index e02f346..45c3c6a 100644 (file)
@@ -44,7 +44,7 @@ ALTER TABLE _widgets ADD wd_type_option   VARCHAR(10)    DEFAULT ''
 DELETE FROM _templates WHERE tm_id = 'bootstrap_yeti';
 INSERT INTO _templates
 (tm_id,                           tm_name,                         tm_type, tm_device_type, tm_mobile, tm_use_bootstrap, tm_available, tm_clean_type, tm_create_dt) VALUES
-('bootstrap_yeti',             'bootstrap_sample1',             10,       0,              false,     true,             true,        0,             now());
+('bootstrap_yeti',             'bootstrap_yeti',             10,       0,              false,     true,             true,        0,             now());
 
 -- *** システム標準テーブル ***
 
index 94a426c..cd00a21 100644 (file)
@@ -1,15 +1,26 @@
 
 /* メニューバー固定用 */
 body {
-       padding-top: 85px;
+       padding-top: 75px;
 }
 .button {
-       margin:5px;
-}
-#pos-fixed {
-       position:fixed;
+       margin: 5px;
 }
 #pos-slide.affix {
        position: fixed;
-       top:80px;
+       top: 70px;
+}
+@media(min-width: 768px){
+       #pos-fixed {
+               position: fixed;
+       }
+       
+       #pos-fixed, #pos-slide {
+               width: 160px;
+       }
+}
+@media(min-width: 992px){
+       #pos-fixed, #pos-slide {
+               width: auto;
+       }
 }
\ No newline at end of file
diff --git a/templates/bootstrap_yeti/html/modules.php b/templates/bootstrap_yeti/html/modules.php
new file mode 100644 (file)
index 0000000..2cf368a
--- /dev/null
@@ -0,0 +1,14 @@
+<?php
+defined('_JEXEC') or die;
+
+function modChrome_bootblock($module, &$params, &$attribs)
+{
+       if (!empty ($module->content)) : ?>
+               <div class="moduletable<?php echo $params->get('moduleclass_sfx'); ?>">
+               <?php if ($module->showtitle != 0) : ?>
+                       <h3><?php echo $module->title; ?></h3>
+               <?php endif; ?>
+                       <?php echo $module->content; ?>
+               </div>
+       <?php endif;
+}
\ No newline at end of file
index 2b8104e..ec1f344 100644 (file)
@@ -1,13 +1,6 @@
 <?php
 defined('_JEXEC') or die;
 
-/**
- * Template for Joomla! CMS, created with Artisteer.
- * See readme.txt for more details on how to use the template.
- */
-
-//require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'functions.php';
-
 // Create alias for $this object reference:
 $document = $this;
 
@@ -33,11 +26,15 @@ $templateUrl = $document->baseurl . '/templates/' . $document->template;
 $(function(){
     $('.button').addClass('btn btn-default');
        
-       $('#pos-slide').affix({
-               offset: {
-                       top: 100
-               }
-       });
+<?php global $gPageManager;if (!$gPageManager->isLayout()): ?>
+       if ($(window).width() >= 768){
+               $('#pos-slide').affix({
+                       offset: {
+                               top: $('#pos-slide').offset().top -70
+                       }
+               });
+       }
+<?php endif; ?>
 });
 //]]>
 </script>
@@ -49,20 +46,20 @@ $(function(){
 <div class="row">
 <?php if ($document->countModules('left') || $document->countModules('left-fixed') || $document->countModules('left-hide') || $document->countModules('left-slide')): ?>
     <div class="col-sm-3"><div class="row">
-       <?php if ($document->countModules('left-fixed')): ?><div class="col-sm-12 hidden-xs"><div id="pos-fixed"><jdoc:include type="modules" name="left-fixed" style="none" /></div></div><?php endif; ?>
-       <?php if ($document->countModules('left')): ?><div class="col-sm-12"><jdoc:include type="modules" name="left" style="none" /></div><?php endif; ?>
-       <?php if ($document->countModules('left-hide')): ?><div class="col-sm-12 hidden-xs"><jdoc:include type="modules" name="left-hide" style="none" /></div><?php endif; ?>
-       <?php if ($document->countModules('left-slide')): ?><div class="col-sm-12"><div id="pos-slide"><jdoc:include type="modules" name="left-slide" style="none" /></div></div><?php endif; ?>
+       <?php if ($document->countModules('left-fixed')): ?><div class="col-sm-12 hidden-xs"><div id="pos-fixed"><jdoc:include type="modules" name="left-fixed" style="bootblock" /></div></div><?php endif; ?>
+       <?php if ($document->countModules('left')): ?><div class="col-sm-12"><jdoc:include type="modules" name="left" style="bootblock" /></div><?php endif; ?>
+       <?php if ($document->countModules('left-hide')): ?><div class="col-sm-12 hidden-xs"><jdoc:include type="modules" name="left-hide" style="bootblock" /></div><?php endif; ?>
+       <?php if ($document->countModules('left-slide')): ?><div class="col-sm-12"><div id="pos-slide"><jdoc:include type="modules" name="left-slide" style="bootblock" /></div></div><?php endif; ?>
        </div></div>
     <div class="col-sm-9"><div class="row">
-       <?php if ($document->countModules('banner')): ?><div class="col-sm-12"><jdoc:include type="modules" name="banner" style="none" /></div><?php endif; ?>
-       <div class="col-sm-12"><jdoc:include type="component" style="none" /></div>
-       <?php if ($document->countModules('center-hide')): ?><div class="col-sm-12 hidden-xs"><jdoc:include type="modules" name="center-hide" style="none" /></div><?php endif; ?>
+       <?php if ($document->countModules('banner')): ?><div class="col-sm-12"><jdoc:include type="modules" name="banner" style="bootblock" /></div><?php endif; ?>
+       <div class="col-sm-12"><jdoc:include type="component" style="bootblock" /></div>
+       <?php if ($document->countModules('center-hide')): ?><div class="col-sm-12 hidden-xs"><div id="pos-slide"><jdoc:include type="modules" name="center-hide" style="bootblock" /></div></div><?php endif; ?>
        </div></div>
 <?php else: ?>
-       <?php if ($document->countModules('banner')): ?><div class="col-sm-12"><jdoc:include type="modules" name="banner" style="none" /></div><?php endif; ?>
-       <div class="col-sm-12"><jdoc:include type="component" style="none" /></div>
-       <?php if ($document->countModules('center-hide')): ?><div class="col-sm-12 hidden-xs"><jdoc:include type="modules" name="center-hide" style="none" /></div><?php endif; ?>
+       <?php if ($document->countModules('banner')): ?><div class="col-sm-12"><jdoc:include type="modules" name="banner" style="bootblock" /></div><?php endif; ?>
+       <div class="col-sm-12"><jdoc:include type="component" style="bootblock" /></div>
+       <?php if ($document->countModules('center-hide')): ?><div class="col-sm-12 hidden-xs"><jdoc:include type="modules" name="center-hide" style="bootblock" /></div><?php endif; ?>
 <?php endif; ?>
 </div>
 <jdoc:include type="modules" name="bottom" style="none" />