header.html 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  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. <title>
  11. {{if not (eq $.Data.Module "404")}}
  12. {{if eq $.Data.Module "index"}}
  13. {{$.Data.Page.Name}}
  14. {{else if or (eq $.Data.Module "blog") (eq $.Data.Module "blog-post") (eq $.Data.Module "blog-category")}}
  15. {{if eq $.Data.Module "blog-category"}}
  16. Posts of category "{{$.Data.Blog.Category.Name}}" | Blog
  17. {{else if eq $.Data.Module "blog-post"}}
  18. {{$.Data.Blog.Post.Name}} | Blog
  19. {{else}}
  20. Latest posts | Blog
  21. {{end}}
  22. {{else if or (eq $.Data.Module "shop") (eq $.Data.Module "shop-product") (eq $.Data.Module "shop-category")}}
  23. {{if eq $.Data.Module "shop-category"}}
  24. Products of category "{{$.Data.Shop.Category.Name}}" | Shop
  25. {{else if eq $.Data.Module "shop-product"}}
  26. {{$.Data.Shop.Product.Name}} | Shop
  27. {{else}}
  28. Latest products | Shop
  29. {{end}}
  30. {{end}}
  31. {{else}}
  32. Error 404
  33. {{end}}
  34. </title>
  35. <meta name="keywords" content="{{$.Data.Page.MetaKeywords}}" />
  36. <meta name="description" content="{{$.Data.Page.MetaDescription}}" />
  37. <link rel="shortcut icon" href="{{$.System.PathIcoFav}}" type="image/x-icon" />
  38. <!-- Template CSS file from template folder -->
  39. <link rel="stylesheet" href="{{$.System.PathThemeStyles}}?v=2">
  40. </head>
  41. <body class="fixed-top-bar">
  42. <div id="wrap">
  43. <nav class="navbar navbar-expand-lg navbar-light bg-light">
  44. <div class="container">
  45. <a class="navbar-brand" href="/">Fave {{$.System.InfoVersion}}</a>
  46. <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
  47. <span class="navbar-toggler-icon"></span>
  48. </button>
  49. <div class="collapse navbar-collapse" id="navbarResponsive">
  50. <ul class="navbar-nav ml-auto">
  51. <li class="nav-item{{if eq $.Data.Page.Alias "/"}} active{{end}}">
  52. <a class="nav-link" href="/">Home</a>
  53. </li>
  54. <li class="nav-item">
  55. <a class="nav-link{{if eq $.Data.Page.Alias "/another/"}} active{{end}}" href="/another/">Another</a>
  56. </li>
  57. <li class="nav-item">
  58. <a class="nav-link{{if eq $.Data.Page.Alias "/about/"}} active{{end}}" href="/about/">About</a>
  59. </li>
  60. <li class="nav-item">
  61. <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>
  62. </li>
  63. <li class="nav-item">
  64. <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>
  65. </li>
  66. <li class="nav-item">
  67. <a class="nav-link{{if eq $.Data.Module "404"}} active{{end}}" href="/not-existent-page/">404</a>
  68. </li>
  69. </ul>
  70. </div>
  71. </div>
  72. </nav>
  73. <div id="main">
  74. <div class="bg-fave">
  75. <div class="container">
  76. <h1 class="text-left text-white m-0 p-0 py-5">
  77. {{if not (eq $.Data.Module "404")}}
  78. {{if eq $.Data.Module "index"}}
  79. {{if eq $.Data.Page.Alias "/"}}
  80. Welcome to home page
  81. {{else}}
  82. Welcome to some another page
  83. {{end}}
  84. {{else if or (eq $.Data.Module "blog") (eq $.Data.Module "blog-post") (eq $.Data.Module "blog-category")}}
  85. {{if eq $.Data.Module "blog-category"}}
  86. Blog category
  87. {{else if eq $.Data.Module "blog-post"}}
  88. Blog post
  89. {{else}}
  90. Blog
  91. {{end}}
  92. {{else if or (eq $.Data.Module "shop") (eq $.Data.Module "shop-product") (eq $.Data.Module "shop-category")}}
  93. {{if eq $.Data.Module "shop-category"}}
  94. Shop category
  95. {{else if eq $.Data.Module "shop-product"}}
  96. Shop product
  97. {{else}}
  98. Shop
  99. {{end}}
  100. {{end}}
  101. {{else}}
  102. Oops, page is not found...
  103. {{end}}
  104. </h1>
  105. </div>
  106. </div>
  107. <nav class="navbar navbar-expand-lg navbar-light bg-light navbar-cats">
  108. <div class="container">
  109. <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
  110. <span class="navbar-toggler-icon"></span>
  111. </button>
  112. <div class="collapse navbar-collapse" id="navbarSupportedContent">
  113. <ul class="navbar-nav mr-auto">
  114. {{range $.Data.Shop.Categories 1}}
  115. <li class="nav-item dropdown">
  116. <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{.Name}}</a>
  117. <div class="dropdown-menu" aria-labelledby="navbarDropdown">
  118. <a class="dropdown-item" href="{{.Permalink}}">All products</a>
  119. <div class="dropdown-divider"></div>
  120. <a class="dropdown-item" href="#">Sub category 1</a>
  121. <a class="dropdown-item" href="#">Sub category 2</a>
  122. </div>
  123. </li>
  124. {{end}}
  125. </ul>
  126. </div>
  127. </div>
  128. </nav>
  129. {{if or (eq $.Data.Module "shop") (eq $.Data.Module "shop-category") (eq $.Data.Module "shop-product")}}
  130. <div class="container clear-top pt-4">
  131. <nav aria-label="breadcrumb">
  132. <ol class="breadcrumb mb-0">
  133. {{if eq $.Data.Module "shop"}}
  134. <li class="breadcrumb-item">Shop</li>
  135. {{else}}
  136. <li class="breadcrumb-item"><a href="/shop/">Shop</a></li>
  137. {{end}}
  138. {{if eq $.Data.Module "shop-category"}}
  139. <li class="breadcrumb-item">{{$.Data.Shop.Category.Name}}</li>
  140. {{end}}
  141. {{if eq $.Data.Module "shop-product"}}
  142. {{if $.Data.Shop.Product.Category.Id}}
  143. <li class="breadcrumb-item"><a href="{{$.Data.Shop.Product.Category.Permalink}}">{{$.Data.Shop.Product.Category.Name}}</a></li>
  144. {{end}}
  145. <li class="breadcrumb-item active">{{$.Data.Shop.Product.Name}}</li>
  146. {{end}}
  147. </ol>
  148. </nav>
  149. </div>
  150. {{end}}
  151. <div class="container clear-top">
  152. <div class="row pt-4">
  153. {{if or (eq $.Data.Module "shop") (eq $.Data.Module "shop-category")}}
  154. <div class="col-sm-5 col-md-4 col-lg-3">
  155. {{template "sidebar-left.html" .}}
  156. </div>
  157. {{end}}
  158. {{if or (eq $.Data.Module "shop-product")}}
  159. <div class="col-md-12">
  160. {{else}}
  161. <div class="col-sm-7 col-md-8 col-lg-9">
  162. {{end}}