header.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <!-- Required meta tags -->
  5. <meta charset="utf-8">
  6. <meta name="theme-color" content="#205081" />
  7. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  8. <!-- Bootstrap CSS -->
  9. <link rel="stylesheet" href="{{$.System.PathCssBootstrap}}">
  10. <link rel="stylesheet" href="{{$.System.PathCssLightGallery}}">
  11. <title>
  12. {{if not (eq $.Data.Module "404")}}
  13. {{if eq $.Data.Module "index"}}
  14. {{$.Data.Page.Name}}
  15. {{else if or (eq $.Data.Module "blog") (eq $.Data.Module "blog-post") (eq $.Data.Module "blog-category")}}
  16. {{if eq $.Data.Module "blog-category"}}
  17. Posts of category "{{$.Data.Blog.Category.Name}}" | Blog
  18. {{else if eq $.Data.Module "blog-post"}}
  19. {{$.Data.Blog.Post.Name}} | Blog
  20. {{else}}
  21. Latest posts | Blog
  22. {{end}}
  23. {{else if or (eq $.Data.Module "shop") (eq $.Data.Module "shop-product") (eq $.Data.Module "shop-category")}}
  24. {{if eq $.Data.Module "shop-category"}}
  25. Products of category "{{$.Data.Shop.Category.Name}}" | Shop
  26. {{else if eq $.Data.Module "shop-product"}}
  27. {{$.Data.Shop.Product.Name}} | Shop
  28. {{else}}
  29. Latest products | Shop
  30. {{end}}
  31. {{end}}
  32. {{else}}
  33. Error 404
  34. {{end}}
  35. </title>
  36. <meta name="keywords" content="{{$.Data.Page.MetaKeywords}}" />
  37. <meta name="description" content="{{$.Data.Page.MetaDescription}}" />
  38. <link rel="shortcut icon" href="{{$.System.PathIcoFav}}" type="image/x-icon" />
  39. <!-- Template CSS file from template folder -->
  40. <link rel="stylesheet" href="{{$.System.PathThemeStyles}}?v=3">
  41. </head>
  42. <body class="fixed-top-bar">
  43. <div id="wrap">
  44. <nav class="navbar navbar-expand-lg navbar-light bg-light">
  45. <div class="container">
  46. <a class="navbar-brand" href="/">Fave {{$.System.InfoVersion}}</a>
  47. <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
  48. <span class="navbar-toggler-icon"></span>
  49. </button>
  50. <div class="collapse navbar-collapse" id="navbarResponsive">
  51. <ul class="navbar-nav ml-auto">
  52. <li class="nav-item{{if eq $.Data.Page.Alias "/"}} active{{end}}">
  53. <a class="nav-link" href="/">Home</a>
  54. </li>
  55. <li class="nav-item">
  56. <a class="nav-link{{if eq $.Data.Page.Alias "/another/"}} active{{end}}" href="/another/">Another</a>
  57. </li>
  58. <li class="nav-item">
  59. <a class="nav-link{{if eq $.Data.Page.Alias "/about/"}} active{{end}}" href="/about/">About</a>
  60. </li>
  61. <li class="nav-item">
  62. <a class="nav-link{{if or (eq $.Data.Module "blog") (eq $.Data.Module "blog-post") (eq $.Data.Module "blog-category")}} active{{end}}" href="/blog/">Blog</a>
  63. </li>
  64. <li class="nav-item">
  65. <a class="nav-link{{if or (eq $.Data.Module "shop") (eq $.Data.Module "shop-product") (eq $.Data.Module "shop-category")}} active{{end}}" href="/shop/">Shop</a>
  66. </li>
  67. <li class="nav-item">
  68. <a class="nav-link{{if eq $.Data.Module "404"}} active{{end}}" href="/not-existent-page/">404</a>
  69. </li>
  70. </ul>
  71. </div>
  72. </div>
  73. </nav>
  74. <div id="main">
  75. <div class="bg-fave">
  76. <div class="container">
  77. <h1 class="text-left text-white m-0 p-0 py-5">
  78. {{if not (eq $.Data.Module "404")}}
  79. {{if eq $.Data.Module "index"}}
  80. {{if eq $.Data.Page.Alias "/"}}
  81. Welcome to home page
  82. {{else}}
  83. Welcome to some another page
  84. {{end}}
  85. {{else if or (eq $.Data.Module "blog") (eq $.Data.Module "blog-post") (eq $.Data.Module "blog-category")}}
  86. {{if eq $.Data.Module "blog-category"}}
  87. Blog category
  88. {{else if eq $.Data.Module "blog-post"}}
  89. Blog post
  90. {{else}}
  91. Blog
  92. {{end}}
  93. {{else if or (eq $.Data.Module "shop") (eq $.Data.Module "shop-product") (eq $.Data.Module "shop-category")}}
  94. {{if eq $.Data.Module "shop-category"}}
  95. Shop category
  96. {{else if eq $.Data.Module "shop-product"}}
  97. Shop product
  98. {{else}}
  99. Shop
  100. {{end}}
  101. {{end}}
  102. {{else}}
  103. Oops, page is not found...
  104. {{end}}
  105. </h1>
  106. </div>
  107. </div>
  108. <nav class="navbar navbar-expand-lg navbar-light bg-light navbar-cats">
  109. <div class="container">
  110. <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
  111. <span class="navbar-toggler-icon"></span>
  112. </button>
  113. <div class="collapse navbar-collapse" id="navbarSupportedContent">
  114. <ul class="navbar-nav mr-auto">
  115. {{range $.Data.Shop.Categories 0 1}}
  116. {{if .HaveChilds}}
  117. <li class="nav-item dropdown">
  118. <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{.Name}}</a>
  119. <div class="dropdown-menu" aria-labelledby="navbarDropdown">
  120. <a class="dropdown-item" href="{{.Permalink}}">All products</a>
  121. <div class="dropdown-divider"></div>
  122. {{range $index, $subcat := $.Data.Shop.Categories .Id 1}}
  123. <a class="dropdown-item" href="{{$subcat.Permalink}}">{{$subcat.Name}}</a>
  124. {{end}}
  125. </div>
  126. </li>
  127. {{else}}
  128. <li class="nav-item">
  129. <a class="nav-link" href="{{.Permalink}}">{{.Name}}</a>
  130. </li>
  131. {{end}}
  132. {{end}}
  133. </ul>
  134. </div>
  135. </div>
  136. </nav>
  137. {{if or (eq $.Data.Module "blog") (eq $.Data.Module "blog-category") (eq $.Data.Module "blog-post")}}
  138. <div class="container clear-top pt-4">
  139. <nav aria-label="breadcrumb">
  140. <ol class="breadcrumb mb-0">
  141. {{if eq $.Data.Module "blog"}}
  142. <li class="breadcrumb-item">Blog</li>
  143. {{else}}
  144. <li class="breadcrumb-item"><a href="/blog/">Blog</a></li>
  145. {{end}}
  146. {{if eq $.Data.Module "blog-category"}}
  147. {{if $.Data.Blog.Category.Parent.Parent.Parent.Parent.Parent}}
  148. <li class="breadcrumb-item"><a href="{{$.Data.Blog.Category.Parent.Parent.Parent.Parent.Parent.Permalink}}">{{$.Data.Blog.Category.Parent.Parent.Parent.Parent.Parent.Name}}</a></li>
  149. {{end}}
  150. {{if $.Data.Blog.Category.Parent.Parent.Parent.Parent}}
  151. <li class="breadcrumb-item"><a href="{{$.Data.Blog.Category.Parent.Parent.Parent.Parent.Permalink}}">{{$.Data.Blog.Category.Parent.Parent.Parent.Parent.Name}}</a></li>
  152. {{end}}
  153. {{if $.Data.Blog.Category.Parent.Parent.Parent}}
  154. <li class="breadcrumb-item"><a href="{{$.Data.Blog.Category.Parent.Parent.Parent.Permalink}}">{{$.Data.Blog.Category.Parent.Parent.Parent.Name}}</a></li>
  155. {{end}}
  156. {{if $.Data.Blog.Category.Parent.Parent}}
  157. <li class="breadcrumb-item"><a href="{{$.Data.Blog.Category.Parent.Parent.Permalink}}">{{$.Data.Blog.Category.Parent.Parent.Name}}</a></li>
  158. {{end}}
  159. {{if $.Data.Blog.Category.Parent}}
  160. <li class="breadcrumb-item"><a href="{{$.Data.Blog.Category.Parent.Permalink}}">{{$.Data.Blog.Category.Parent.Name}}</a></li>
  161. {{end}}
  162. <li class="breadcrumb-item">{{$.Data.Blog.Category.Name}}</li>
  163. {{end}}
  164. {{if eq $.Data.Module "blog-post"}}
  165. {{if $.Data.Blog.Post.Category.Id}}
  166. {{if $.Data.Blog.Post.Category.Parent.Parent.Parent.Parent.Parent}}
  167. <li class="breadcrumb-item"><a href="{{$.Data.Blog.Post.Category.Parent.Parent.Parent.Parent.Parent.Permalink}}">{{$.Data.Blog.Post.Category.Parent.Parent.Parent.Parent.Parent.Name}}</a></li>
  168. {{end}}
  169. {{if $.Data.Blog.Post.Category.Parent.Parent.Parent.Parent}}
  170. <li class="breadcrumb-item"><a href="{{$.Data.Blog.Post.Category.Parent.Parent.Parent.Parent.Permalink}}">{{$.Data.Blog.Post.Category.Parent.Parent.Parent.Parent.Name}}</a></li>
  171. {{end}}
  172. {{if $.Data.Blog.Post.Category.Parent.Parent.Parent}}
  173. <li class="breadcrumb-item"><a href="{{$.Data.Blog.Post.Category.Parent.Parent.Parent.Permalink}}">{{$.Data.Blog.Post.Category.Parent.Parent.Parent.Name}}</a></li>
  174. {{end}}
  175. {{if $.Data.Blog.Post.Category.Parent.Parent}}
  176. <li class="breadcrumb-item"><a href="{{$.Data.Blog.Post.Category.Parent.Parent.Permalink}}">{{$.Data.Blog.Post.Category.Parent.Parent.Name}}</a></li>
  177. {{end}}
  178. {{if $.Data.Blog.Post.Category.Parent}}
  179. <li class="breadcrumb-item"><a href="{{$.Data.Blog.Post.Category.Parent.Permalink}}">{{$.Data.Blog.Post.Category.Parent.Name}}</a></li>
  180. {{end}}
  181. <li class="breadcrumb-item"><a href="{{$.Data.Blog.Post.Category.Permalink}}">{{$.Data.Blog.Post.Category.Name}}</a></li>
  182. {{end}}
  183. <li class="breadcrumb-item active">{{$.Data.Blog.Post.Name}}</li>
  184. {{end}}
  185. </ol>
  186. </nav>
  187. </div>
  188. {{end}}
  189. {{if or (eq $.Data.Module "shop") (eq $.Data.Module "shop-category") (eq $.Data.Module "shop-product")}}
  190. <div class="container clear-top pt-4">
  191. <nav aria-label="breadcrumb">
  192. <ol class="breadcrumb mb-0">
  193. {{if eq $.Data.Module "shop"}}
  194. <li class="breadcrumb-item">Shop</li>
  195. {{else}}
  196. <li class="breadcrumb-item"><a href="/shop/">Shop</a></li>
  197. {{end}}
  198. {{if eq $.Data.Module "shop-category"}}
  199. {{if $.Data.Shop.Category.Parent.Parent.Parent.Parent.Parent}}
  200. <li class="breadcrumb-item"><a href="{{$.Data.Shop.Category.Parent.Parent.Parent.Parent.Parent.Permalink}}">{{$.Data.Shop.Category.Parent.Parent.Parent.Parent.Parent.Name}}</a></li>
  201. {{end}}
  202. {{if $.Data.Shop.Category.Parent.Parent.Parent.Parent}}
  203. <li class="breadcrumb-item"><a href="{{$.Data.Shop.Category.Parent.Parent.Parent.Parent.Permalink}}">{{$.Data.Shop.Category.Parent.Parent.Parent.Parent.Name}}</a></li>
  204. {{end}}
  205. {{if $.Data.Shop.Category.Parent.Parent.Parent}}
  206. <li class="breadcrumb-item"><a href="{{$.Data.Shop.Category.Parent.Parent.Parent.Permalink}}">{{$.Data.Shop.Category.Parent.Parent.Parent.Name}}</a></li>
  207. {{end}}
  208. {{if $.Data.Shop.Category.Parent.Parent}}
  209. <li class="breadcrumb-item"><a href="{{$.Data.Shop.Category.Parent.Parent.Permalink}}">{{$.Data.Shop.Category.Parent.Parent.Name}}</a></li>
  210. {{end}}
  211. {{if $.Data.Shop.Category.Parent}}
  212. <li class="breadcrumb-item"><a href="{{$.Data.Shop.Category.Parent.Permalink}}">{{$.Data.Shop.Category.Parent.Name}}</a></li>
  213. {{end}}
  214. <li class="breadcrumb-item">{{$.Data.Shop.Category.Name}}</li>
  215. {{end}}
  216. {{if eq $.Data.Module "shop-product"}}
  217. {{if $.Data.Shop.Product.Category.Id}}
  218. {{if $.Data.Shop.Product.Category.Parent.Parent.Parent.Parent.Parent}}
  219. <li class="breadcrumb-item"><a href="{{$.Data.Shop.Product.Category.Parent.Parent.Parent.Parent.Parent.Permalink}}">{{$.Data.Shop.Product.Category.Parent.Parent.Parent.Parent.Parent.Name}}</a></li>
  220. {{end}}
  221. {{if $.Data.Shop.Product.Category.Parent.Parent.Parent.Parent}}
  222. <li class="breadcrumb-item"><a href="{{$.Data.Shop.Product.Category.Parent.Parent.Parent.Parent.Permalink}}">{{$.Data.Shop.Product.Category.Parent.Parent.Parent.Parent.Name}}</a></li>
  223. {{end}}
  224. {{if $.Data.Shop.Product.Category.Parent.Parent.Parent}}
  225. <li class="breadcrumb-item"><a href="{{$.Data.Shop.Product.Category.Parent.Parent.Parent.Permalink}}">{{$.Data.Shop.Product.Category.Parent.Parent.Parent.Name}}</a></li>
  226. {{end}}
  227. {{if $.Data.Shop.Product.Category.Parent.Parent}}
  228. <li class="breadcrumb-item"><a href="{{$.Data.Shop.Product.Category.Parent.Parent.Permalink}}">{{$.Data.Shop.Product.Category.Parent.Parent.Name}}</a></li>
  229. {{end}}
  230. {{if $.Data.Shop.Product.Category.Parent}}
  231. <li class="breadcrumb-item"><a href="{{$.Data.Shop.Product.Category.Parent.Permalink}}">{{$.Data.Shop.Product.Category.Parent.Name}}</a></li>
  232. {{end}}
  233. <li class="breadcrumb-item"><a href="{{$.Data.Shop.Product.Category.Permalink}}">{{$.Data.Shop.Product.Category.Name}}</a></li>
  234. {{end}}
  235. <li class="breadcrumb-item active">{{$.Data.Shop.Product.Name}}</li>
  236. {{end}}
  237. </ol>
  238. </nav>
  239. </div>
  240. {{end}}
  241. <div class="container clear-top">
  242. <div class="row pt-4">
  243. {{if or (eq $.Data.Module "shop") (eq $.Data.Module "shop-category")}}
  244. <div class="col-sm-5 col-md-4 col-lg-3">
  245. {{template "sidebar-left.html" .}}
  246. </div>
  247. {{end}}
  248. {{if or (eq $.Data.Module "shop-product")}}
  249. <div class="col-md-12">
  250. {{else}}
  251. <div class="col-sm-7 col-md-8 col-lg-9">
  252. {{end}}