diff --git a/lib/Baser/Config/theme/bc_sample/Elements/crumbs.php b/lib/Baser/Config/theme/bc_sample/Elements/crumbs.php index 2bb2f2199f..c71c01337c 100755 --- a/lib/Baser/Config/theme/bc_sample/Elements/crumbs.php +++ b/lib/Baser/Config/theme/bc_sample/Elements/crumbs.php @@ -4,51 +4,60 @@ * Copyright (c) baserCMS Users Community * * @copyright Copyright (c) baserCMS Users Community - * @link https://basercms.net baserCMS Project + * @link https://basercms.net baserCMS Project * @package Baser.View * @since baserCMS v 4.4.0 * @license https://basercms.net/license/index.html */ /** - * パンくずナビゲーション + * [PUBLISH] ナビゲーション * - * BcBaserHelper::crumbsList() で呼び出す - * (例)BcBaser->crumbsList() ?> - * - * @var BcAppView $this + * ページタイトルが直属のカテゴリ名と同じ場合は、直属のカテゴリ名を省略する */ -?> - - -
-BcBaser->isHome()) { - echo ''. __('ホーム').''; -} else { - $crumbs = $this->BcBaser->getCrumbs(); - if (!empty($crumbs)) { - foreach ($crumbs as $key => $crumb) { - if ($this->BcArray->last($crumbs, $key + 1)) { - if ($crumbs[$key + 1]['name'] == $crumb['name']) { - continue; - } - } - if ($this->BcArray->last($crumbs, $key)) { - if ($this->viewPath != 'home' && $crumb['name']) { - $this->BcBaser->addCrumb('' . h($crumb['name']) . ''); - } - } else { - $this->BcBaser->addCrumb(h($crumb['name']), $crumb['url']); +if (!isset($separator)) { + $separator = ' > '; +} +if (!isset($home)) { + $home = __d('baser', 'ホーム'); +} +$crumbs = $this->BcBaser->getCrumbs(); +if (!empty($crumbs)) { + foreach($crumbs as $key => $crumb) { + if ($this->BcArray->last($crumbs, $key)) { + if ($this->viewPath != 'home' && $crumb['name']) { + $this->BcBaser->addCrumb(h($crumb['name'])); } + } else { + $this->BcBaser->addCrumb(h($crumb['name']), $crumb['url']); } } - elseif (empty($crumbs)) { - if ($this->name == 'CakeError') { - $this->BcBaser->addCrumb('404 NOT FOUND'); - } +} elseif (empty($crumbs)) { + if ($this->name == 'CakeError') { + $this->BcBaser->addCrumb('404 NOT FOUND'); } - $this->BcBaser->crumbs(' > ', __('ホーム')); } ?> + +
+ + BcBaser->isHome()) { + echo $home; + } else { + $this->BcBaser->crumbs($separator, $home); + } + ?> + +
    + BcBaser->isHome()): ?> +
  • + +
  • + + BcBaser->crumbs($separator, $home, true) ?> + +
+
diff --git a/lib/Baser/Config/theme/bc_sample/Layouts/default.php b/lib/Baser/Config/theme/bc_sample/Layouts/default.php index 4e020b2a5e..79928dab5e 100755 --- a/lib/Baser/Config/theme/bc_sample/Layouts/default.php +++ b/lib/Baser/Config/theme/bc_sample/Layouts/default.php @@ -55,7 +55,7 @@ BcBaser->mainImage(['all' => true, 'num' => 5, 'width' => '100%', 'class' => 'bs-main-image']) ?> - BcBaser->crumbsList(); ?> + BcBaser->crumbsList(['onSchema' => true]); ?>
diff --git a/lib/Baser/Config/theme/bc_sample/__assets/css/common/_parts.scss b/lib/Baser/Config/theme/bc_sample/__assets/css/common/_parts.scss index f567b0073b..89cf39663d 100755 --- a/lib/Baser/Config/theme/bc_sample/__assets/css/common/_parts.scss +++ b/lib/Baser/Config/theme/bc_sample/__assets/css/common/_parts.scss @@ -175,6 +175,7 @@ font-size: 12px; color: #CCC; box-sizing: border-box; + line-height: 2em; @include bs-mq() { box-sizing: border-box; width: 100%; @@ -197,6 +198,14 @@ color: #555; } } + + ul { + display: flex; + list-style: none; + margin-left: 0; + padding-left: 0; + flex-wrap: wrap; + } } /* Contents Navigation diff --git a/lib/Baser/Config/theme/bc_sample/css/style.css b/lib/Baser/Config/theme/bc_sample/css/style.css index ffe51a3a8b..ae002a93f7 100755 --- a/lib/Baser/Config/theme/bc_sample/css/style.css +++ b/lib/Baser/Config/theme/bc_sample/css/style.css @@ -902,7 +902,8 @@ body { padding: 15px 20px; font-size: 12px; color: #CCC; - box-sizing: border-box; } + box-sizing: border-box; + line-height: 2em; } @media screen and (max-width: 768px) { .bs-crumbs { box-sizing: border-box; @@ -917,6 +918,12 @@ body { color: #000; } .bs-crumbs a:hover { color: #555; } + .bs-crumbs ul { + display: flex; + list-style: none; + margin-left: 0; + padding-left: 0; + flex-wrap: wrap; } /* Contents Navigation ----------------------------------------------- */ diff --git a/lib/Baser/View/Elements/crumbs.php b/lib/Baser/View/Elements/crumbs.php index 9fdb8063f7..41212d6ccd 100755 --- a/lib/Baser/View/Elements/crumbs.php +++ b/lib/Baser/View/Elements/crumbs.php @@ -39,7 +39,7 @@ } ?> - +
BcBaser->isHome()) { @@ -57,4 +57,4 @@ - +