header_html_file.go 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. package template
  2. var VarHeaderHtmlFile = []byte(`<!doctype html>
  3. <html lang="en">
  4. <head>
  5. <!-- Required meta tags -->
  6. <meta charset="utf-8">
  7. <meta name="theme-color" content="#205081" />
  8. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  9. <!-- Bootstrap CSS -->
  10. <link rel="stylesheet" href="{{$.System.PathCssBootstrap}}">
  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=1">
  41. <!-- Template JavaScript file from template folder -->
  42. <script src="{{$.System.PathThemeScripts}}?v=1"></script>
  43. </head>
  44. <body class="fixed-top-bar1">
  45. <div id="wrap">
  46. <nav class="navbar navbar-expand-lg navbar-light bg-light">
  47. <div class="container">
  48. <a class="navbar-brand" href="/">Fave {{$.System.InfoVersion}}</a>
  49. <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
  50. <span class="navbar-toggler-icon"></span>
  51. </button>
  52. <div class="collapse navbar-collapse" id="navbarResponsive">
  53. <ul class="navbar-nav ml-auto">
  54. <li class="nav-item{{if eq $.Data.Page.Alias "/"}} active{{end}}">
  55. <a class="nav-link" href="/">Home</a>
  56. </li>
  57. <li class="nav-item">
  58. <a class="nav-link{{if eq $.Data.Page.Alias "/another/"}} active{{end}}" href="/another/">Another</a>
  59. </li>
  60. <li class="nav-item">
  61. <a class="nav-link{{if eq $.Data.Page.Alias "/about/"}} active{{end}}" href="/about/">About</a>
  62. </li>
  63. <li class="nav-item">
  64. <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>
  65. </li>
  66. <li class="nav-item">
  67. <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>
  68. </li>
  69. <li class="nav-item">
  70. <a class="nav-link{{if eq $.Data.Module "404"}} active{{end}}" href="/not-existent-page/">404</a>
  71. </li>
  72. </ul>
  73. </div>
  74. </div>
  75. </nav>
  76. <div id="main">
  77. <div class="bg-fave">
  78. <div class="container">
  79. <h1 class="text-left text-white m-0 p-0 py-5">
  80. {{if not (eq $.Data.Module "404")}}
  81. {{if eq $.Data.Module "index"}}
  82. {{if eq $.Data.Page.Alias "/"}}
  83. Welcome to home page
  84. {{else}}
  85. Welcome to some another page
  86. {{end}}
  87. {{else if or (eq $.Data.Module "blog") (eq $.Data.Module "blog-post") (eq $.Data.Module "blog-category")}}
  88. {{if eq $.Data.Module "blog-category"}}
  89. Blog category
  90. {{else if eq $.Data.Module "blog-post"}}
  91. Blog post
  92. {{else}}
  93. Blog
  94. {{end}}
  95. {{else if or (eq $.Data.Module "shop") (eq $.Data.Module "shop-product") (eq $.Data.Module "shop-category")}}
  96. {{if eq $.Data.Module "shop-category"}}
  97. Shop category
  98. {{else if eq $.Data.Module "shop-product"}}
  99. Shop product
  100. {{else}}
  101. Shop
  102. {{end}}
  103. {{end}}
  104. {{else}}
  105. Oops, page is not found...
  106. {{end}}
  107. </h1>
  108. </div>
  109. </div>
  110. <div class="container clear-top">
  111. <div class="row pt-4">
  112. {{if or (eq $.Data.Module "shop") (eq $.Data.Module "shop-category")}}
  113. <div class="col-sm-5 col-md-4 col-lg-3">
  114. {{template "sidebar-left.html" .}}
  115. </div>
  116. {{end}}
  117. {{if or (eq $.Data.Module "shop-product")}}
  118. <div class="col-md-12">
  119. {{else}}
  120. <div class="col-sm-7 col-md-8 col-lg-9">
  121. {{end}}`)