123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253 |
- <header class="navbar-affixed-top" data-spy="affix" data-offset-top="62">
- <div class="navbar navbar-default yamm {{ if .Site.Params.dropdown_mouse_over }}mouseover{{ end }}" role="navigation"
- id="navbar">
- <div class="container">
- <div class="navbar-header">
- <a class="navbar-brand home" href="{{ " /" | relLangURL }}">
- {{ if default false .Site.Params.disabled_logo }}
- <h4>{{ .Site.Params.logo_text }}</h4>
- {{ else }}
- <img src="{{ .Site.Params.logo | relURL }}" alt="{{ .Title }} logo" class="hidden-xs hidden-sm" />
- <img src="{{ .Site.Params.logo_small | relURL }}" alt="{{ .Title }} logo" class="visible-xs visible-sm" />
- {{ end }}
- <span class="sr-only">{{ .Title }} - {{ i18n "navHome" }}</span>
- </a>
- <div class="navbar-buttons">
- <button type="button" class="navbar-toggle btn-template-main" data-toggle="collapse"
- data-target="#navigation">
- <span class="sr-only">{{ i18n "navToggle" }}</span>
- <i class="fas fa-align-justify"></i>
- </button>
- </div>
- </div>
- <!--/.navbar-header -->
- <div class="navbar-collapse collapse" id="navigation">
- <ul class="nav navbar-nav navbar-right">
- {{ $current := . }}
- {{ range .Site.Menus.main.ByWeight }}
- {{ $topLevel := replace .URL "/" "" }}
- {{ $active := "" }}
- {{ if eq $current.RelPermalink .URL }}
- {{ $active = "active" }}
- {{ end }}
- {{ if eq $current.Type $topLevel }}
- {{ $active = "active" }}
- {{ end }}
- {{ if and (or (eq $current.RelPermalink .URL) (eq "term" $current.Kind)) (in (slice "page" "term")
- $current.Kind) }}
- {{ range (split .URL "/") }}
- {{ if eq "blog" . }}
- {{ $active = "active" }}
- {{ end }}
- {{ end }}
- {{ end }}
- {{ if .HasChildren }}
- <!-- Check if the first child marks a menu section identifier -->
- {{ $hasSections := (hasPrefix (index .Children 0).Identifier "section.") }}
- <li class="dropdown{{ if $hasSections }} use-yamm yamm-fw{{end}} {{ $active }}">
- <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
- aria-expanded="false">{{ .Name }} <span class="caret"></span></a>
- {{ if $hasSections }}
- <ul class="dropdown-menu">
- <li>
- <div class="yamm-content">
- <div class="row">
- {{ if ne .URL "" }}
- <div class="col-sm-6">
- <img src="{{ .URL }}" class="img-responsive hidden-xs" />
- </div>
- {{ end }}
- <div class="col-sm-3">
- {{ range .Children.ByWeight }}
- {{ $column := printf "%s" .Post }}
- {{ if eq $column "1" }}
- <h5>{{ .Name }}</h5>
- {{ if .HasChildren }}
- <ul>
- {{ range .Children.ByWeight }}
- <li><a href="{{ .URL }}">{{ .Name }}</a></li>
- {{- end }}
- </ul>
- {{ end }}
- {{ end }}
- {{ end }}
- </div>
- <div class="col-sm-3">
- {{ range .Children.ByWeight }}
- {{ $column := printf "%s" .Post }}
- {{ if eq $column "2" }}
- <h5>{{ .Name }}</code></h5>
- {{ if .HasChildren }}
- <ul>
- {{ range .Children.ByWeight }}
- <li><a href="{{ .URL }}">{{ .Name }}</a></li>
- {{ end }}
- </ul>
- {{ end }}
- {{ end }}
- {{ end }}
- </div>
- {{ if eq .URL "" }}
- <div class="col-sm-3">
- {{ range .Children }}
- {{ $column := printf "%s" .Post }}
- {{ if eq $column "3" }}
- <h5>{{ .Name }}</code></h5>
- {{ if .HasChildren }}
- <ul>
- {{ range .Children.ByWeight }}
- <li><a href="{{ .URL }}">{{ .Name }}</a></li>
- {{ end }}
- </ul>
- {{ end }}
- {{ end }}
- {{ end }}
- </div>
- <div class="col-sm-3">
- {{ range .Children }}
- {{ $column := printf "%s" .Post }}
- {{ if eq $column "4" }}
- <h5>{{ .Name }}</code></h5>
- {{ if .HasChildren }}
- <ul>
- {{ range .Children.ByWeight }}
- <li><a href="{{ .URL }}">{{ .Name }}</a></li>
- {{ end }}
- </ul>
- {{ end }}
- {{ end }}
- {{ end }}
- </div>
- {{ end }}
- </div>
- </div>
- </li>
- </ul>
- {{ else }}
- <ul class="dropdown-menu">
- {{ range .Children.ByWeight }}
- <li><a href="{{ .URL }}">{{ .Name }}</a></li>
- {{ end }}
- </ul>
- {{ end }}
- </li>
- {{ else }}
- <li class="dropdown {{ $active }}">
- <a href="{{ .URL }}">{{ .Name }}</a>
- </li>
- {{ end }}
- {{ end }}
- </ul>
- </div>
- <!--/.nav-collapse -->
- <div class="collapse clearfix" id="search">
- <form class="navbar-form" role="search">
- <div class="input-group">
- <input type="text" class="form-control" placeholder="Search">
- <span class="input-group-btn">
- <button type="submit" class="btn btn-template-main"><i class="fas fa-search"></i></button>
- </span>
- </div>
- </form>
- </div>
- <!--/.nav-collapse -->
- </div>
- </div>
- </header>
- <!-- *** NAVBAR END ***-->
- <header>
- <nav class="navbar navbar-expand-lg navbar-dark p-0">
- <div class="container-fluid p-0">
- <div class="mx-auto">
- <a class="navbar-brand home" href="{{ " /" | relLangURL }}">
- {{ if default false .Site.Params.disabled_logo }}
- <h4>{{ .Site.Params.logo_text }}</h4>
- {{ else }}
- <img src="{{ .Site.Params.logo | relURL }}" alt="{{ .Title }} logo" class="hidden-xs hidden-sm" />
- <img src="{{ .Site.Params.logo_small | relURL }}" alt="{{ .Title }} logo" class="visible-xs visible-sm" />
- {{ end }}
- <span class="sr-only">{{ .Title }} - {{ i18n "navHome" }}</span>
- </a>
- </div>
- <button onclick="changeIcon(this)" class="navbar-toggler" type="button" data-bs-toggle="collapse"
- data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false"
- aria-label="Toggle navigation">
- <span data-toggle-class="icon" class="navbar-toggler-icon"></span>
- </button>
- <div class="collapse navbar-collapse" id="navbarSupportedContent">
- <ul class="navbar-nav align-items-lg-center mx-auto mb-2 mb-lg-0">
-
- <li class="navbar-logo">
- <a class="navbar-brand home" href="{{ " /" | relLangURL }}">
- {{ if default false .Site.Params.disabled_logo }}
- <h4>{{ .Site.Params.logo_text }}</h4>
- {{ else }}
- <img src="{{ .Site.Params.logo | relURL }}" alt="{{ .Title }} logo" class="hidden-xs hidden-sm" />
- <img src="{{ .Site.Params.logo_small | relURL }}" alt="{{ .Title }} logo" class="visible-xs visible-sm" />
- {{ end }}
- <span class="sr-only">{{ .Title }} - {{ i18n "navHome" }}</span>
- </a>
- </li>
- {{ $current := . }}
- {{ range .Site.Menus.main.ByWeight }}
- {{ $topLevel := replace .URL "/" "" }}
- {{ $active := "" }}
- {{ if eq $current.RelPermalink .URL }}
- {{ $active = "active" }}
- {{ end }}
- {{ if eq $current.Type $topLevel }}
- {{ $active = "active" }}
- {{ end }}
- {{ if and (or (eq $current.RelPermalink .URL) (eq "term" $current.Kind)) (in (slice "page" "term")
- $current.Kind) }}
- {{ range (split .URL "/") }}
- {{ if eq "blog" . }}
- {{ $active = "active" }}
- {{ end }}
- {{ end }}
- {{ end }}
- <li class="dropdown {{ $active }}">
- <a href="{{ .URL }}">{{ .Name }}</a>
- </li>
- {{ end }}
- <!-- <li class="">
- <a class="navbar-link" href="/collection.html">室內設計作品</a>
- </li>
- <li class="nav-item">
- <a class="navbar-link" href="/room_planner.html">成家設計服務</a>
- </li>
- <li class="nav-item">
- <a class="navbar-link" href="/frequently_asked_questions.html">服務常見QA</a>
- </li>
- <li class="nav-item">
- <a class="navbar-link" href="/categories.html">成家知識專欄</a>
- </li>
- <li class="nav-item">
- <a class="navbar-link" href="/furniture_design.html">小寶設計單品</a>
- </li>
- <li class="nav-item">
- <a class="navbar-link" href="/store.html">小寶優居門市</a>
- </li> -->
- </ul>
- </div>
- </div>
- </nav>
- </header>
|