🏗️ Finish the header attributes redesign.
This commit is contained in:
parent
f2ff0a5299
commit
cea7bd3bc0
@ -5,7 +5,7 @@
|
|||||||
{{- $pluginVen := $P.vendors.plugins -}}
|
{{- $pluginVen := $P.vendors.plugins -}}
|
||||||
{{- $pluginCDN := index $vendors $pluginVen -}}
|
{{- $pluginCDN := index $vendors $pluginVen -}}
|
||||||
{{- .Scratch.Set "pluginCDN" $pluginCDN -}}
|
{{- .Scratch.Set "pluginCDN" $pluginCDN -}}
|
||||||
{{ $posts := len .Site.RegularPages }}
|
{{ $posts := len (where .Page.Site.RegularPages "Section" "in" .Site.Params.mainSections) }}
|
||||||
{{- .Scratch.Set "posts" $posts -}}
|
{{- .Scratch.Set "posts" $posts -}}
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="{{ $lang }}">
|
<html lang="{{ $lang }}">
|
||||||
@ -31,7 +31,7 @@
|
|||||||
<main class="main">
|
<main class="main">
|
||||||
<header class="header" itemscope itemtype="http://schema.org/WPHeader">
|
<header class="header" itemscope itemtype="http://schema.org/WPHeader">
|
||||||
<div class="header-inner">
|
<div class="header-inner">
|
||||||
{{- partial "header" (dict "P" $P "Page" .Page "Scratch" .Scratch) }}
|
{{- partial "header.html" . }}
|
||||||
</div>
|
</div>
|
||||||
<!-- Sidebar -->
|
<!-- Sidebar -->
|
||||||
{{- if ne $P.sidebar.display "remove" }}
|
{{- if ne $P.sidebar.display "remove" }}
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
{{- partial "head/meta" . }}
|
{{- partial "head/meta.html" . }}
|
||||||
{{- if .Site.Params.openGraph.enable }}
|
{{- if .Site.Params.openGraph.enable }}
|
||||||
{{- partial "head/opengraph" . }}
|
{{- partial "head/opengraph.html" . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{ if isset .Site.Params.openGraph "twitter" }}
|
{{ if isset .Site.Params.openGraph "twitter" }}
|
||||||
{{- partial "head/twitter" . }}
|
{{- partial "head/twitter.html" . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if isset .Site.Params.openGraph "googleplus" }}
|
{{- if isset .Site.Params.openGraph "googleplus" }}
|
||||||
{{- partial "head/googleplus" . }}
|
{{- partial "head/googleplus.html" . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if isset .Site.Params.openGraph "facebook" }}
|
{{- if isset .Site.Params.openGraph "facebook" }}
|
||||||
{{- partial "head/facebook" . }}
|
{{- partial "head/facebook.html" . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{ partial "head/verify" . }}
|
{{ partial "head/verify.html" . }}
|
||||||
{{- partial "head/style" . }}
|
{{- partial "head/style.html" . }}
|
@ -1,2 +1,2 @@
|
|||||||
{{ partial "header/brand" . }}
|
{{ partial "header/brand.html" . }}
|
||||||
{{ partial "header/menus" . }}
|
{{ partial "header/menus.html" . }}
|
@ -1,4 +1,4 @@
|
|||||||
{{ $title := .Page.Site.Title }}
|
{{ $title := .Site.Title }}
|
||||||
<div class="site-brand-container">
|
<div class="site-brand-container">
|
||||||
<div class="site-nav-toggle">
|
<div class="site-nav-toggle">
|
||||||
<div class="toggle" aria-label="{{ T "NavToggleLabel" }}" role="button">
|
<div class="toggle" aria-label="{{ T "NavToggleLabel" }}" role="button">
|
||||||
@ -9,27 +9,27 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="site-meta">
|
<div class="site-meta">
|
||||||
{{- if and .P.customLogo (eq .P.scheme "Muse") }}
|
{{- if and .Site.Params.customLogo (eq .Site.Params.scheme "Muse") }}
|
||||||
<img class="custom-logo-image" src="{{ .P.customLogo }}" alt="{{ $title }}">
|
<img class="custom-logo-image" src="{{ .Site.Params.customLogo }}" alt="{{ $title }}">
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
<a href="{{ .Page.Site.BaseURL }}" class="brand" rel="start">
|
<a href="{{ .Site.BaseURL }}" class="brand" rel="start">
|
||||||
<i class="logo-line"></i>
|
<i class="logo-line"></i>
|
||||||
<h1 class="site-title">{{ $title }}</h1>
|
<h1 class="site-title">{{ $title }}</h1>
|
||||||
<i class="logo-line"></i>
|
<i class="logo-line"></i>
|
||||||
</a>
|
</a>
|
||||||
{{ if isset .P "subtitle" }}
|
{{ if isset .Site.Params "subtitle" }}
|
||||||
<p class="site-subtitle" itemprop="description">{{ .P.subtitle }}</p>
|
<p class="site-subtitle" itemprop="description">{{ .Site.Params.subtitle }}</p>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if and .P.customLogo (or (eq .P.scheme "Gemini") (eq .P.scheme "Pisces"))}}
|
{{- if and .Site.Params.customLogo (or (eq .Site.Params.scheme "Gemini") (eq .Site.Params.scheme "Pisces"))}}
|
||||||
<img class="custom-logo-image" src="{{ .P.customLogo }}" alt="{{ $title }}">
|
<img class="custom-logo-image" src="{{ .Site.Params.customLogo }}" alt="{{ $title }}">
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="site-nav-right">
|
<div class="site-nav-right">
|
||||||
<div class="toggle popup-trigger">
|
<div class="toggle popup-trigger">
|
||||||
{{ if or .P.algoliaSearch.enable .P.localSearch.enable }}
|
{{ if or .Site.Params.algoliaSearch.enable .Site.Params.localSearch.enable }}
|
||||||
<i class="fa fa-search fa-fw fa-lg"></i>
|
<i class="fa fa-search fa-fw fa-lg"></i>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,25 +1,25 @@
|
|||||||
{{- $ms := .P.menuSets }}
|
{{- $ms := .Site.Params.menuSets }}
|
||||||
{{- $curP := .Page }}
|
{{- $curP := .Page }}
|
||||||
{{- $post := .Scratch.Get "posts" }}
|
{{- $posts := .Scratch.Get "posts" }}
|
||||||
<nav class="site-nav">
|
<nav class="site-nav">
|
||||||
<ul class="main-menu menu">
|
<ul class="main-menu menu">
|
||||||
{{- range $curP.Site.Menus.main }}
|
{{- range $curP.Site.Menus.main }}
|
||||||
{{- $active := or ($curP.IsMenuCurrent "main" .) ($curP.HasMenuCurrent "main" .) }}
|
{{- $active := or ($curP.IsMenuCurrent "main" .) ($curP.HasMenuCurrent "main" .) }}
|
||||||
{{- $active = or $active (eq .URL "/")}}
|
{{- $active = or $active (eq .URL "/")}}
|
||||||
<li class="menu-item menu-item-{{ .Identifier }}">
|
<li class="menu-item menu-item-{{ .Identifier }}">
|
||||||
<a href="{{ .URL }}" class="{{if $active }} menu-item-active{{ end }}" rel="section">
|
<a href="{{ .URL }}" class="hvr-icon-pulse {{if $active }} menu-item-active{{ end }}" rel="section">
|
||||||
{{- if $ms.icons }}<i class="fa fa-{{ .Pre }}"></i>{{ end }}{{- .Name }}
|
{{- if $ms.icons }}<i class="fa fa-{{ .Pre }} hvr-icon"></i>{{ end }}{{- .Name }}
|
||||||
{{- if and $ms.badges (eq .Identifier "archives" ) }}
|
{{- if and $ms.badges (eq .Identifier "archives" ) }}
|
||||||
<span class="badge">{{ $post }}</span>
|
<span class="badge">{{ $posts }}</span>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- if or .P.algoliaSearch.enable .P.localSearch.enable }}
|
{{- if or .Site.Params.algoliaSearch.enable .Site.Params.localSearch.enable }}
|
||||||
<li class="menu-item menu-item-search">
|
<li class="menu-item menu-item-search">
|
||||||
<a role="button" class="popup-trigger">
|
<a role="button" class="popup-trigger hvr-icon-pulse">
|
||||||
{{- if $ms.icons }}<i class="fa fa-search fa-fw"></i>{{ end }}{{ T "MSearchLabel" }}
|
{{- if $ms.icons }}<i class="fa fa-search fa-fw hvr-icon"></i>{{ end }}{{ T "MSearchLabel" }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
Loading…
Reference in New Issue
Block a user