Browse Source

Restore all template files by one button

Vova Tkach 5 years ago
parent
commit
3ddb8878fa

+ 31 - 31
hosts/localhost/template/footer.html

@@ -1,32 +1,32 @@
-						</div>
-						{{if or (eq $.Data.Module "index") (eq $.Data.Module "404") (eq $.Data.Module "blog") (eq $.Data.Module "blog-post") (eq $.Data.Module "blog-category")}}
-							<div class="col-sm-5 col-md-4 col-lg-3">
-								{{template "sidebar-right.html" .}}
-							</div>
-						{{end}}
-					</div>
-				</div>
-			</div>
-		</div>
-		<footer class="bg-light py-4">
-			<div class="container">
-				<p class="m-0 text-center text-black">
-					Copyright © Your Website {{if eq ($.Data.DateTimeFormat "2006") "2019"}}
-						{{$.Data.DateTimeFormat "2006"}}
-					{{else}}
-						2019-{{$.Data.DateTimeFormat "2006"}}
-					{{end}}
-				</p>
-			</div>
-		</footer>
-		<!-- Optional JavaScript -->
-		<!-- jQuery first, then Popper.js, then Bootstrap JS -->
-		<script src="{{$.System.PathJsJquery}}"></script>
-		<script src="{{$.System.PathJsPopper}}"></script>
-		<script src="{{$.System.PathJsBootstrap}}"></script>
-		<script src="{{$.System.PathJsLightGallery}}"></script>
-
-		<!-- Template JavaScript file from template folder -->
-		<script src="{{$.System.PathThemeScripts}}?v=3"></script>
-	</body>
+						</div>
+						{{if or (eq $.Data.Module "index") (eq $.Data.Module "404") (eq $.Data.Module "blog") (eq $.Data.Module "blog-post") (eq $.Data.Module "blog-category")}}
+							<div class="col-sm-5 col-md-4 col-lg-3">
+								{{template "sidebar-right.html" .}}
+							</div>
+						{{end}}
+					</div>
+				</div>
+			</div>
+		</div>
+		<footer class="bg-light py-4">
+			<div class="container">
+				<p class="m-0 text-center text-black">
+					Copyright © Your Website {{if eq ($.Data.DateTimeFormat "2006") "2019"}}
+						{{$.Data.DateTimeFormat "2006"}}
+					{{else}}
+						2019-{{$.Data.DateTimeFormat "2006"}}
+					{{end}}
+				</p>
+			</div>
+		</footer>
+		<!-- Optional JavaScript -->
+		<!-- jQuery first, then Popper.js, then Bootstrap JS -->
+		<script src="{{$.System.PathJsJquery}}"></script>
+		<script src="{{$.System.PathJsPopper}}"></script>
+		<script src="{{$.System.PathJsBootstrap}}"></script>
+		<script src="{{$.System.PathJsLightGallery}}"></script>
+
+		<!-- Template JavaScript file from template folder -->
+		<script src="{{$.System.PathThemeScripts}}?v=3"></script>
+	</body>
 </html>

+ 70 - 70
hosts/localhost/template/header.html

@@ -1,71 +1,71 @@
-<!doctype html>
-<html lang="en">
-	<head>
-		<!-- Required meta tags -->
-		<meta charset="utf-8">
-		<meta name="theme-color" content="#205081" />
-		<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
-
-		<!-- Bootstrap CSS -->
-		<link rel="stylesheet" href="{{$.System.PathCssBootstrap}}">
-		<link rel="stylesheet" href="{{$.System.PathCssLightGallery}}">
-
-		<title>{{$.Data.CachedBlock1}}</title>
-		<meta name="keywords" content="{{$.Data.Page.MetaKeywords}}" />
-		<meta name="description" content="{{$.Data.Page.MetaDescription}}" />
-		<link rel="shortcut icon" href="{{$.System.PathIcoFav}}" type="image/x-icon" />
-
-		<!-- Template CSS file from template folder -->
-		<link rel="stylesheet" href="{{$.System.PathThemeStyles}}?v=3">
-	</head>
-	<body class="fixed-top-bar">
-		<div id="wrap">
-			<nav class="navbar navbar-expand-lg navbar-light bg-light">
-				<div class="container">
-					<a class="navbar-brand" href="/">Fave {{$.System.InfoVersion}}</a>
-					<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
-						<span class="navbar-toggler-icon"></span>
-					</button>
-					<div class="collapse navbar-collapse" id="navbarResponsive">
-						<ul class="navbar-nav ml-auto">
-							<li class="nav-item{{if eq $.Data.Page.Alias "/"}} active{{end}}">
-								<a class="nav-link" href="/">Home</a>
-							</li>
-							<li class="nav-item">
-								<a class="nav-link{{if eq $.Data.Page.Alias "/another/"}} active{{end}}" href="/another/">Another</a>
-							</li>
-							<li class="nav-item">
-								<a class="nav-link{{if eq $.Data.Page.Alias "/about/"}} active{{end}}" href="/about/">About</a>
-							</li>
-							<li class="nav-item">
-								<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>
-							</li>
-							<li class="nav-item">
-								<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>
-							</li>
-							<li class="nav-item">
-								<a class="nav-link{{if eq $.Data.Module "404"}} active{{end}}" href="/not-existent-page/">404</a>
-							</li>
-						</ul>
-					</div>
-				</div>
-			</nav>
-			<div id="main">
-				<div class="bg-fave">
-					<div class="container">
-						<h1 class="text-left text-white m-0 p-0 py-5">{{$.Data.CachedBlock2}}</h1>
-					</div>
-				</div>
-				{{$.Data.CachedBlock3}}
-				<div class="container clear-top">
-					<div class="row pt-4">
-						{{if or (eq $.Data.Module "shop") (eq $.Data.Module "shop-category")}}
-							<div class="col-sm-5 col-md-4 col-lg-3">
-								{{template "sidebar-left.html" .}}
-							</div>
-						{{end}}
-						{{if or (eq $.Data.Module "shop-product")}}
-							<div class="col-md-12">
-						{{else}}
-							<div class="col-sm-7 col-md-8 col-lg-9">
+<!doctype html>
+<html lang="en">
+	<head>
+		<!-- Required meta tags -->
+		<meta charset="utf-8">
+		<meta name="theme-color" content="#205081" />
+		<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
+
+		<!-- Bootstrap CSS -->
+		<link rel="stylesheet" href="{{$.System.PathCssBootstrap}}">
+		<link rel="stylesheet" href="{{$.System.PathCssLightGallery}}">
+
+		<title>{{$.Data.CachedBlock1}}</title>
+		<meta name="keywords" content="{{$.Data.Page.MetaKeywords}}" />
+		<meta name="description" content="{{$.Data.Page.MetaDescription}}" />
+		<link rel="shortcut icon" href="{{$.System.PathIcoFav}}" type="image/x-icon" />
+
+		<!-- Template CSS file from template folder -->
+		<link rel="stylesheet" href="{{$.System.PathThemeStyles}}?v=3">
+	</head>
+	<body class="fixed-top-bar">
+		<div id="wrap">
+			<nav class="navbar navbar-expand-lg navbar-light bg-light">
+				<div class="container">
+					<a class="navbar-brand" href="/">Fave {{$.System.InfoVersion}}</a>
+					<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
+						<span class="navbar-toggler-icon"></span>
+					</button>
+					<div class="collapse navbar-collapse" id="navbarResponsive">
+						<ul class="navbar-nav ml-auto">
+							<li class="nav-item{{if eq $.Data.Page.Alias "/"}} active{{end}}">
+								<a class="nav-link" href="/">Home</a>
+							</li>
+							<li class="nav-item">
+								<a class="nav-link{{if eq $.Data.Page.Alias "/another/"}} active{{end}}" href="/another/">Another</a>
+							</li>
+							<li class="nav-item">
+								<a class="nav-link{{if eq $.Data.Page.Alias "/about/"}} active{{end}}" href="/about/">About</a>
+							</li>
+							<li class="nav-item">
+								<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>
+							</li>
+							<li class="nav-item">
+								<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>
+							</li>
+							<li class="nav-item">
+								<a class="nav-link{{if eq $.Data.Module "404"}} active{{end}}" href="/not-existent-page/">404</a>
+							</li>
+						</ul>
+					</div>
+				</div>
+			</nav>
+			<div id="main">
+				<div class="bg-fave">
+					<div class="container">
+						<h1 class="text-left text-white m-0 p-0 py-5">{{$.Data.CachedBlock2}}</h1>
+					</div>
+				</div>
+				{{$.Data.CachedBlock3}}
+				<div class="container clear-top">
+					<div class="row pt-4">
+						{{if or (eq $.Data.Module "shop") (eq $.Data.Module "shop-category")}}
+							<div class="col-sm-5 col-md-4 col-lg-3">
+								{{template "sidebar-left.html" .}}
+							</div>
+						{{end}}
+						{{if or (eq $.Data.Module "shop-product")}}
+							<div class="col-md-12">
+						{{else}}
+							<div class="col-sm-7 col-md-8 col-lg-9">
 						{{end}}

+ 2 - 2
hosts/localhost/template/robots.txt

@@ -1,2 +1,2 @@
-User-agent: *
-Disallow: /
+User-agent: *
+Disallow: /

+ 17 - 17
hosts/localhost/template/scripts.js

@@ -1,18 +1,18 @@
-$(document).ready(function() {
-	$('#product_thumbnails').lightGallery({
-		pager: false,
-		showThumbByDefault: false,
-		toogleThumb: false,
-		controls: false,
-		download: false
-	});
-	$('#product_image img').css('cursor', 'pointer').click(function() {
-		$($('#product_thumbnails a.thumbnail').get($(this).data('index'))).click();
-    });
-	$('#product_thumbnails a.thumbnail').each(function() {
-		$(this).mouseover(function() {
-			$('#product_image img').attr('src', $(this).data('hover'));
-			$('#product_image img').data('index', $(this).data('index'));
-		});
-    });
+$(document).ready(function() {
+	$('#product_thumbnails').lightGallery({
+		pager: false,
+		showThumbByDefault: false,
+		toogleThumb: false,
+		controls: false,
+		download: false
+	});
+	$('#product_image img').css('cursor', 'pointer').click(function() {
+		$($('#product_thumbnails a.thumbnail').get($(this).data('index'))).click();
+    });
+	$('#product_thumbnails a.thumbnail').each(function() {
+		$(this).mouseover(function() {
+			$('#product_image img').attr('src', $(this).data('hover'));
+			$('#product_image img').data('index', $(this).data('index'));
+		});
+    });
 });

+ 60 - 60
hosts/localhost/template/shop-category.html

@@ -1,61 +1,61 @@
-{{template "header.html" .}}
-<div class="mb-4">
-	{{if $.Data.Shop.HaveProducts}}
-		<div class="grid-products">
-			{{range $.Data.Shop.Products}}
-				<div class="card card-product">
-					<div class="card-img-link">
-						<a href="{{.Permalink}}">
-							{{if .HaveImages }}
-								<img class="card-img-top" src="{{.Image.Thumbnail1}}" alt="{{$.Data.EscapeString .Name}}">
-							{{else}}
-								<img class="card-img-top" src="data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%22286%22%20height%3D%22180%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20286%20180%22%20preserveAspectRatio%3D%22none%22%3E%3Cdefs%3E%3Cstyle%20type%3D%22text%2Fcss%22%3E%23holder_16c7e5ac360%20text%20%7B%20fill%3Argba(255%2C255%2C255%2C.75)%3Bfont-weight%3Anormal%3Bfont-family%3AHelvetica%2C%20monospace%3Bfont-size%3A14pt%20%7D%20%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cg%20id%3D%22holder_16c7e5ac360%22%3E%3Crect%20width%3D%22286%22%20height%3D%22180%22%20fill%3D%22%23777%22%3E%3C%2Frect%3E%3Cg%3E%3Ctext%20x%3D%22107.0078125%22%20y%3D%2296.234375%22%3E286x180%3C%2Ftext%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E" alt="{{$.Data.EscapeString .Name}}">
-							{{end}}
-						</a>
-					</div>
-					<div class="card-body">
-						<h5 class="card-title">
-							<a href="{{.Permalink}}">
-								{{.Name}}
-							</a>
-						</h5>
-						<div class="card-text">{{.Briefly}}</div>
-					</div>
-					<div class="card-footer">
-						<span class="price">{{.PriceFormat "%.2f"}} {{.Currency.Code}}</span><a href="{{.Permalink}}" class="btn btn-primary">View</a>
-					</div>
-				</div>
-			{{end}}
-		</div>
-	{{else}}
-		<div class="card">
-			<div class="card-body">
-				Sorry, no products matched your criteria
-			</div>
-		</div>
-	{{end}}
-</div>
-{{if $.Data.Shop.HaveProducts}}
-	{{if gt $.Data.Shop.ProductsMaxPage 1 }}
-		<nav>
-			<ul class="pagination mb-4">
-				{{if $.Data.Shop.PaginationPrev}}
-					<li class="page-item{{if $.Data.Shop.PaginationPrev.Current}} disabled{{end}}">
-						<a class="page-link" href="{{$.Data.Shop.PaginationPrev.Link}}">Previous</a>
-					</li>
-				{{end}}
-				{{range $.Data.Shop.Pagination}}
-					<li class="page-item{{if .Current}} active{{end}}">
-						<a class="page-link" href="{{.Link}}">{{.Num}}</a>
-					</li>
-				{{end}}
-				{{if $.Data.Shop.PaginationNext}}
-					<li class="page-item{{if $.Data.Shop.PaginationNext.Current}} disabled{{end}}">
-						<a class="page-link" href="{{$.Data.Shop.PaginationNext.Link}}">Next</a>
-					</li>
-				{{end}}
-			</ul>
-		</nav>
-	{{end}}
-{{end}}
+{{template "header.html" .}}
+<div class="mb-4">
+	{{if $.Data.Shop.HaveProducts}}
+		<div class="grid-products">
+			{{range $.Data.Shop.Products}}
+				<div class="card card-product">
+					<div class="card-img-link">
+						<a href="{{.Permalink}}">
+							{{if .HaveImages }}
+								<img class="card-img-top" src="{{.Image.Thumbnail1}}" alt="{{$.Data.EscapeString .Name}}">
+							{{else}}
+								<img class="card-img-top" src="data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%22286%22%20height%3D%22180%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20286%20180%22%20preserveAspectRatio%3D%22none%22%3E%3Cdefs%3E%3Cstyle%20type%3D%22text%2Fcss%22%3E%23holder_16c7e5ac360%20text%20%7B%20fill%3Argba(255%2C255%2C255%2C.75)%3Bfont-weight%3Anormal%3Bfont-family%3AHelvetica%2C%20monospace%3Bfont-size%3A14pt%20%7D%20%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cg%20id%3D%22holder_16c7e5ac360%22%3E%3Crect%20width%3D%22286%22%20height%3D%22180%22%20fill%3D%22%23777%22%3E%3C%2Frect%3E%3Cg%3E%3Ctext%20x%3D%22107.0078125%22%20y%3D%2296.234375%22%3E286x180%3C%2Ftext%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E" alt="{{$.Data.EscapeString .Name}}">
+							{{end}}
+						</a>
+					</div>
+					<div class="card-body">
+						<h5 class="card-title">
+							<a href="{{.Permalink}}">
+								{{.Name}}
+							</a>
+						</h5>
+						<div class="card-text">{{.Briefly}}</div>
+					</div>
+					<div class="card-footer">
+						<span class="price">{{.PriceFormat "%.2f"}} {{.Currency.Code}}</span><a href="{{.Permalink}}" class="btn btn-primary">View</a>
+					</div>
+				</div>
+			{{end}}
+		</div>
+	{{else}}
+		<div class="card">
+			<div class="card-body">
+				Sorry, no products matched your criteria
+			</div>
+		</div>
+	{{end}}
+</div>
+{{if $.Data.Shop.HaveProducts}}
+	{{if gt $.Data.Shop.ProductsMaxPage 1 }}
+		<nav>
+			<ul class="pagination mb-4">
+				{{if $.Data.Shop.PaginationPrev}}
+					<li class="page-item{{if $.Data.Shop.PaginationPrev.Current}} disabled{{end}}">
+						<a class="page-link" href="{{$.Data.Shop.PaginationPrev.Link}}">Previous</a>
+					</li>
+				{{end}}
+				{{range $.Data.Shop.Pagination}}
+					<li class="page-item{{if .Current}} active{{end}}">
+						<a class="page-link" href="{{.Link}}">{{.Num}}</a>
+					</li>
+				{{end}}
+				{{if $.Data.Shop.PaginationNext}}
+					<li class="page-item{{if $.Data.Shop.PaginationNext.Current}} disabled{{end}}">
+						<a class="page-link" href="{{$.Data.Shop.PaginationNext.Link}}">Next</a>
+					</li>
+				{{end}}
+			</ul>
+		</nav>
+	{{end}}
+{{end}}
 {{template "footer.html" .}}

+ 118 - 118
hosts/localhost/template/shop-product.html

@@ -1,119 +1,119 @@
-{{template "header.html" .}}
-<div class="card mb-4">
-	<div class="card-body product-full">
-		<h2 class="card-title">{{$.Data.Shop.Product.Name}}</h2>
-		<ul class="nav nav-tabs" id="myTab" role="tablist">
-			<li class="nav-item">
-				<a class="nav-link active" id="all-tab" data-toggle="tab" href="#all" role="tab" aria-controls="all" aria-selected="true">All about product</a>
-			</li>
-			{{if $.Data.Shop.Product.HaveSpecs}}
-				<li class="nav-item">
-					<a class="nav-link" id="specifications-tab" data-toggle="tab" href="#specifications" role="tab" aria-controls="specifications" aria-selected="false">Specifications</a>
-				</li>
-			{{end}}
-		</ul>
-		<div class="tab-content" id="myTabContent">
-			<div class="tab-pane no-fade pt-3 show active" id="all" role="tabpanel" aria-labelledby="all-tab">
-				<div class="row">
-					<div class="col-md-6">
-						<div class="card" id="product_image">
-							{{if $.Data.Shop.Product.HaveImages}}
-								<img class="card-img-top" src="{{$.Data.Shop.Product.Image.Thumbnail3}}" alt="{{$.Data.EscapeString $.Data.Shop.Product.Name}}">
-							{{else}}
-								<img class="card-img-top" src="data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%22286%22%20height%3D%22180%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20286%20180%22%20preserveAspectRatio%3D%22none%22%3E%3Cdefs%3E%3Cstyle%20type%3D%22text%2Fcss%22%3E%23holder_16c7e5ac360%20text%20%7B%20fill%3Argba(255%2C255%2C255%2C.75)%3Bfont-weight%3Anormal%3Bfont-family%3AHelvetica%2C%20monospace%3Bfont-size%3A14pt%20%7D%20%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cg%20id%3D%22holder_16c7e5ac360%22%3E%3Crect%20width%3D%22286%22%20height%3D%22180%22%20fill%3D%22%23777%22%3E%3C%2Frect%3E%3Cg%3E%3Ctext%20x%3D%22107.0078125%22%20y%3D%2296.234375%22%3E286x180%3C%2Ftext%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E" alt="{{$.Data.EscapeString $.Data.Shop.Product.Name}}">
-							{{end}}
-						</div>
-						{{if $.Data.Shop.Product.HaveImages}}
-							<div class="card mt-1">
-								<div id="product_thumbnails" class="thumbnails d-flex flex-wrap">
-									{{range $index, $img := $.Data.Shop.Product.Images}}
-										<a class="thumbnail{{if gt $index 5}} thumbnail-hidden{{end}}" href="{{.ThumbnailFull}}" data-src="{{.ThumbnailFull}}" data-hover="{{.Thumbnail3}}" data-index="{{$index}}">
-											<img class="img-responsive" alt="" src="{{.Thumbnail0}}" />
-										</a>
-									{{end}}
-								</div>
-							</div>
-						{{end}}
-					</div>
-					<div class="col-md-6">
-						<div class="card mt-3 mt-sm-3 mt-md-0 mt-lg-0">
-							<div class="card-body">
-								<h3 class="price mb-0 mr-4">{{$.Data.Shop.Product.PriceFormat "%.2f"}} {{$.Data.Shop.Product.Currency.Code}}</h3><a href="" class="btn btn-success btn-buy">Buy</a>
-							</div>
-						</div>
-						<div class="card mt-3">
-							<div class="card-header">Payment</div>
-							<div class="card-body">
-								<p class="card-text">Non-cash, Cash</p>
-							</div>
-						</div>
-					</div>
-				</div>
-				<div class="row">
-					<div class="col-md-12">
-						{{if ne $.Data.Shop.Product.Content ""}}
-							<hr>
-							<h3>Description</h3>
-							<hr>
-							<div class="product-description">
-								{{$.Data.Shop.Product.Content}}
-							</div>
-						{{end}}
-						{{if $.Data.Shop.Product.HaveSpecs}}
-							<hr>
-							<h3>Specifications</h3>
-							<hr>
-							<table class="table table-striped table-bordered mb-0 table-specifications">
-								<tbody>
-									{{range $.Data.Shop.Product.Specs}}
-										<tr>
-											<td class="tcol-1">{{.FilterName}}</td>
-											<td class="tcol-2">{{.FilterValue}}</td>
-										</tr>
-									{{end}}
-								</tbody>
-							</table>
-						{{end}}
-					</div>
-				</div>
-			</div>
-			{{if $.Data.Shop.Product.HaveSpecs}}
-				<div class="tab-pane no-fade pt-3" id="specifications" role="tabpanel" aria-labelledby="specifications-tab">
-					<div class="row">
-						<div class="col-md-8">
-							{{if $.Data.Shop.Product.HaveSpecs}}
-								<table class="table table-striped table-bordered mb-0 table-specifications">
-									<tbody>
-										{{range $.Data.Shop.Product.Specs}}
-											<tr>
-												<td class="tcol-1">{{.FilterName}}</td>
-												<td class="tcol-2">{{.FilterValue}}</td>
-											</tr>
-										{{end}}
-									</tbody>
-								</table>
-							{{end}}
-						</div>
-						<div class="col-md-4">
-							<div class="card mt-3 mt-sm-3 mt-md-0 mt-lg-0">
-								<div class="card-body">
-									{{if $.Data.Shop.Product.HaveImages}}
-										<img class="card-img-top" src="{{$.Data.Shop.Product.Image.Thumbnail2}}" alt="{{$.Data.EscapeString $.Data.Shop.Product.Name}}">
-									{{else}}
-										<img class="card-img-top" src="data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%22286%22%20height%3D%22180%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20286%20180%22%20preserveAspectRatio%3D%22none%22%3E%3Cdefs%3E%3Cstyle%20type%3D%22text%2Fcss%22%3E%23holder_16c7e5ac360%20text%20%7B%20fill%3Argba(255%2C255%2C255%2C.75)%3Bfont-weight%3Anormal%3Bfont-family%3AHelvetica%2C%20monospace%3Bfont-size%3A14pt%20%7D%20%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cg%20id%3D%22holder_16c7e5ac360%22%3E%3Crect%20width%3D%22286%22%20height%3D%22180%22%20fill%3D%22%23777%22%3E%3C%2Frect%3E%3Cg%3E%3Ctext%20x%3D%22107.0078125%22%20y%3D%2296.234375%22%3E286x180%3C%2Ftext%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E" alt="{{$.Data.EscapeString $.Data.Shop.Product.Name}}">
-									{{end}}
-								</div>
-							</div>
-							<div class="card mt-3">
-								<div class="card-body">
-									<h3 class="price mb-0 mr-4">{{$.Data.Shop.Product.PriceFormat "%.2f"}} {{$.Data.Shop.Product.Currency.Code}}</h3><a href="" class="btn btn-success btn-buy">Buy</a>
-								</div>
-							</div>
-						</div>
-					</div>
-				</div>
-			{{end}}
-		</div>
-	</div>
-</div>
+{{template "header.html" .}}
+<div class="card mb-4">
+	<div class="card-body product-full">
+		<h2 class="card-title">{{$.Data.Shop.Product.Name}}</h2>
+		<ul class="nav nav-tabs" id="myTab" role="tablist">
+			<li class="nav-item">
+				<a class="nav-link active" id="all-tab" data-toggle="tab" href="#all" role="tab" aria-controls="all" aria-selected="true">All about product</a>
+			</li>
+			{{if $.Data.Shop.Product.HaveSpecs}}
+				<li class="nav-item">
+					<a class="nav-link" id="specifications-tab" data-toggle="tab" href="#specifications" role="tab" aria-controls="specifications" aria-selected="false">Specifications</a>
+				</li>
+			{{end}}
+		</ul>
+		<div class="tab-content" id="myTabContent">
+			<div class="tab-pane no-fade pt-3 show active" id="all" role="tabpanel" aria-labelledby="all-tab">
+				<div class="row">
+					<div class="col-md-6">
+						<div class="card" id="product_image">
+							{{if $.Data.Shop.Product.HaveImages}}
+								<img class="card-img-top" src="{{$.Data.Shop.Product.Image.Thumbnail3}}" alt="{{$.Data.EscapeString $.Data.Shop.Product.Name}}">
+							{{else}}
+								<img class="card-img-top" src="data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%22286%22%20height%3D%22180%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20286%20180%22%20preserveAspectRatio%3D%22none%22%3E%3Cdefs%3E%3Cstyle%20type%3D%22text%2Fcss%22%3E%23holder_16c7e5ac360%20text%20%7B%20fill%3Argba(255%2C255%2C255%2C.75)%3Bfont-weight%3Anormal%3Bfont-family%3AHelvetica%2C%20monospace%3Bfont-size%3A14pt%20%7D%20%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cg%20id%3D%22holder_16c7e5ac360%22%3E%3Crect%20width%3D%22286%22%20height%3D%22180%22%20fill%3D%22%23777%22%3E%3C%2Frect%3E%3Cg%3E%3Ctext%20x%3D%22107.0078125%22%20y%3D%2296.234375%22%3E286x180%3C%2Ftext%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E" alt="{{$.Data.EscapeString $.Data.Shop.Product.Name}}">
+							{{end}}
+						</div>
+						{{if $.Data.Shop.Product.HaveImages}}
+							<div class="card mt-1">
+								<div id="product_thumbnails" class="thumbnails d-flex flex-wrap">
+									{{range $index, $img := $.Data.Shop.Product.Images}}
+										<a class="thumbnail{{if gt $index 5}} thumbnail-hidden{{end}}" href="{{.ThumbnailFull}}" data-src="{{.ThumbnailFull}}" data-hover="{{.Thumbnail3}}" data-index="{{$index}}">
+											<img class="img-responsive" alt="" src="{{.Thumbnail0}}" />
+										</a>
+									{{end}}
+								</div>
+							</div>
+						{{end}}
+					</div>
+					<div class="col-md-6">
+						<div class="card mt-3 mt-sm-3 mt-md-0 mt-lg-0">
+							<div class="card-body">
+								<h3 class="price mb-0 mr-4">{{$.Data.Shop.Product.PriceFormat "%.2f"}} {{$.Data.Shop.Product.Currency.Code}}</h3><a href="" class="btn btn-success btn-buy">Buy</a>
+							</div>
+						</div>
+						<div class="card mt-3">
+							<div class="card-header">Payment</div>
+							<div class="card-body">
+								<p class="card-text">Non-cash, Cash</p>
+							</div>
+						</div>
+					</div>
+				</div>
+				<div class="row">
+					<div class="col-md-12">
+						{{if ne $.Data.Shop.Product.Content ""}}
+							<hr>
+							<h3>Description</h3>
+							<hr>
+							<div class="product-description">
+								{{$.Data.Shop.Product.Content}}
+							</div>
+						{{end}}
+						{{if $.Data.Shop.Product.HaveSpecs}}
+							<hr>
+							<h3>Specifications</h3>
+							<hr>
+							<table class="table table-striped table-bordered mb-0 table-specifications">
+								<tbody>
+									{{range $.Data.Shop.Product.Specs}}
+										<tr>
+											<td class="tcol-1">{{.FilterName}}</td>
+											<td class="tcol-2">{{.FilterValue}}</td>
+										</tr>
+									{{end}}
+								</tbody>
+							</table>
+						{{end}}
+					</div>
+				</div>
+			</div>
+			{{if $.Data.Shop.Product.HaveSpecs}}
+				<div class="tab-pane no-fade pt-3" id="specifications" role="tabpanel" aria-labelledby="specifications-tab">
+					<div class="row">
+						<div class="col-md-8">
+							{{if $.Data.Shop.Product.HaveSpecs}}
+								<table class="table table-striped table-bordered mb-0 table-specifications">
+									<tbody>
+										{{range $.Data.Shop.Product.Specs}}
+											<tr>
+												<td class="tcol-1">{{.FilterName}}</td>
+												<td class="tcol-2">{{.FilterValue}}</td>
+											</tr>
+										{{end}}
+									</tbody>
+								</table>
+							{{end}}
+						</div>
+						<div class="col-md-4">
+							<div class="card mt-3 mt-sm-3 mt-md-0 mt-lg-0">
+								<div class="card-body">
+									{{if $.Data.Shop.Product.HaveImages}}
+										<img class="card-img-top" src="{{$.Data.Shop.Product.Image.Thumbnail2}}" alt="{{$.Data.EscapeString $.Data.Shop.Product.Name}}">
+									{{else}}
+										<img class="card-img-top" src="data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%22286%22%20height%3D%22180%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20286%20180%22%20preserveAspectRatio%3D%22none%22%3E%3Cdefs%3E%3Cstyle%20type%3D%22text%2Fcss%22%3E%23holder_16c7e5ac360%20text%20%7B%20fill%3Argba(255%2C255%2C255%2C.75)%3Bfont-weight%3Anormal%3Bfont-family%3AHelvetica%2C%20monospace%3Bfont-size%3A14pt%20%7D%20%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cg%20id%3D%22holder_16c7e5ac360%22%3E%3Crect%20width%3D%22286%22%20height%3D%22180%22%20fill%3D%22%23777%22%3E%3C%2Frect%3E%3Cg%3E%3Ctext%20x%3D%22107.0078125%22%20y%3D%2296.234375%22%3E286x180%3C%2Ftext%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E" alt="{{$.Data.EscapeString $.Data.Shop.Product.Name}}">
+									{{end}}
+								</div>
+							</div>
+							<div class="card mt-3">
+								<div class="card-body">
+									<h3 class="price mb-0 mr-4">{{$.Data.Shop.Product.PriceFormat "%.2f"}} {{$.Data.Shop.Product.Currency.Code}}</h3><a href="" class="btn btn-success btn-buy">Buy</a>
+								</div>
+							</div>
+						</div>
+					</div>
+				</div>
+			{{end}}
+		</div>
+	</div>
+</div>
 {{template "footer.html" .}}

+ 64 - 64
hosts/localhost/template/shop.html

@@ -1,65 +1,65 @@
-{{template "header.html" .}}
-<div class="mb-4">
-	{{if $.Data.Shop.HaveProducts}}
-		<div class="grid-products">
-			{{range $.Data.Shop.Products}}
-				<div class="card card-product">
-					<div class="card-img-link">
-						<a href="{{.Permalink}}">
-							{{if .HaveImages }}
-								<img class="card-img-top" src="{{.Image.Thumbnail1}}" alt="{{$.Data.EscapeString .Name}}">
-							{{else}}
-								<img class="card-img-top" src="data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%22286%22%20height%3D%22180%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20286%20180%22%20preserveAspectRatio%3D%22none%22%3E%3Cdefs%3E%3Cstyle%20type%3D%22text%2Fcss%22%3E%23holder_16c7e5ac360%20text%20%7B%20fill%3Argba(255%2C255%2C255%2C.75)%3Bfont-weight%3Anormal%3Bfont-family%3AHelvetica%2C%20monospace%3Bfont-size%3A14pt%20%7D%20%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cg%20id%3D%22holder_16c7e5ac360%22%3E%3Crect%20width%3D%22286%22%20height%3D%22180%22%20fill%3D%22%23777%22%3E%3C%2Frect%3E%3Cg%3E%3Ctext%20x%3D%22107.0078125%22%20y%3D%2296.234375%22%3E286x180%3C%2Ftext%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E" alt="{{$.Data.EscapeString .Name}}">
-							{{end}}
-						</a>
-					</div>
-					<div class="card-body">
-						<h5 class="card-title">
-							<a href="{{.Permalink}}">
-								{{.Name}}
-							</a>
-						</h5>
-						<div class="card-text">{{.Briefly}}</div>
-					</div>
-					<div class="card-footer">
-						<span class="price">{{.PriceFormat "%.2f"}} {{.Currency.Code}}</span><a href="{{.Permalink}}" class="btn btn-primary">View</a>
-					</div>
-				</div>
-			{{end}}
-		</div>
-	{{else}}
-		<div class="card">
-			<div class="card-body">
-				Sorry, no products matched your criteria
-			</div>
-		</div>
-	{{end}}
-</div>
-{{if $.Data.Shop.HaveProducts}}
-	{{if gt $.Data.Shop.ProductsMaxPage 1 }}
-		<nav>
-			<ul class="pagination mb-4">
-				{{if $.Data.Shop.PaginationPrev}}
-					<li class="page-item{{if $.Data.Shop.PaginationPrev.Current}} disabled{{end}}">
-						<a class="page-link" href="{{$.Data.Shop.PaginationPrev.Link}}">Previous</a>
-					</li>
-				{{end}}
-				{{range $.Data.Shop.Pagination}}
-					{{if .Dots}}
-						<li class="page-item disabled"><a class="page-link" href="">...</a></li>
-					{{else}}
-						<li class="page-item{{if .Current}} active{{end}}">
-							<a class="page-link" href="{{.Link}}">{{.Num}}</a>
-						</li>
-					{{end}}
-				{{end}}
-				{{if $.Data.Shop.PaginationNext}}
-					<li class="page-item{{if $.Data.Shop.PaginationNext.Current}} disabled{{end}}">
-						<a class="page-link" href="{{$.Data.Shop.PaginationNext.Link}}">Next</a>
-					</li>
-				{{end}}
-			</ul>
-		</nav>
-	{{end}}
-{{end}}
+{{template "header.html" .}}
+<div class="mb-4">
+	{{if $.Data.Shop.HaveProducts}}
+		<div class="grid-products">
+			{{range $.Data.Shop.Products}}
+				<div class="card card-product">
+					<div class="card-img-link">
+						<a href="{{.Permalink}}">
+							{{if .HaveImages }}
+								<img class="card-img-top" src="{{.Image.Thumbnail1}}" alt="{{$.Data.EscapeString .Name}}">
+							{{else}}
+								<img class="card-img-top" src="data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%22286%22%20height%3D%22180%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20286%20180%22%20preserveAspectRatio%3D%22none%22%3E%3Cdefs%3E%3Cstyle%20type%3D%22text%2Fcss%22%3E%23holder_16c7e5ac360%20text%20%7B%20fill%3Argba(255%2C255%2C255%2C.75)%3Bfont-weight%3Anormal%3Bfont-family%3AHelvetica%2C%20monospace%3Bfont-size%3A14pt%20%7D%20%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cg%20id%3D%22holder_16c7e5ac360%22%3E%3Crect%20width%3D%22286%22%20height%3D%22180%22%20fill%3D%22%23777%22%3E%3C%2Frect%3E%3Cg%3E%3Ctext%20x%3D%22107.0078125%22%20y%3D%2296.234375%22%3E286x180%3C%2Ftext%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E" alt="{{$.Data.EscapeString .Name}}">
+							{{end}}
+						</a>
+					</div>
+					<div class="card-body">
+						<h5 class="card-title">
+							<a href="{{.Permalink}}">
+								{{.Name}}
+							</a>
+						</h5>
+						<div class="card-text">{{.Briefly}}</div>
+					</div>
+					<div class="card-footer">
+						<span class="price">{{.PriceFormat "%.2f"}} {{.Currency.Code}}</span><a href="{{.Permalink}}" class="btn btn-primary">View</a>
+					</div>
+				</div>
+			{{end}}
+		</div>
+	{{else}}
+		<div class="card">
+			<div class="card-body">
+				Sorry, no products matched your criteria
+			</div>
+		</div>
+	{{end}}
+</div>
+{{if $.Data.Shop.HaveProducts}}
+	{{if gt $.Data.Shop.ProductsMaxPage 1 }}
+		<nav>
+			<ul class="pagination mb-4">
+				{{if $.Data.Shop.PaginationPrev}}
+					<li class="page-item{{if $.Data.Shop.PaginationPrev.Current}} disabled{{end}}">
+						<a class="page-link" href="{{$.Data.Shop.PaginationPrev.Link}}">Previous</a>
+					</li>
+				{{end}}
+				{{range $.Data.Shop.Pagination}}
+					{{if .Dots}}
+						<li class="page-item disabled"><a class="page-link" href="">...</a></li>
+					{{else}}
+						<li class="page-item{{if .Current}} active{{end}}">
+							<a class="page-link" href="{{.Link}}">{{.Num}}</a>
+						</li>
+					{{end}}
+				{{end}}
+				{{if $.Data.Shop.PaginationNext}}
+					<li class="page-item{{if $.Data.Shop.PaginationNext.Current}} disabled{{end}}">
+						<a class="page-link" href="{{$.Data.Shop.PaginationNext.Link}}">Next</a>
+					</li>
+				{{end}}
+			</ul>
+		</nav>
+	{{end}}
+{{end}}
 {{template "footer.html" .}}

+ 13 - 13
hosts/localhost/template/sidebar-left.html

@@ -1,14 +1,14 @@
-<div class="card mb-4">
-	<h5 class="card-header">Shop categories</h5>
-	<div class="card-body">
-		<ul class="m-0 p-0 pl-4">
-			{{$.Data.CachedBlock4}}
-		</ul>
-	</div>
-</div>
-<!-- <div class="card mb-4">
-	<h5 class="card-header">Shop filter</h5>
-	<div class="card-body">
-		Filter
-	</div>
+<div class="card mb-4">
+	<h5 class="card-header">Shop categories</h5>
+	<div class="card-body">
+		<ul class="m-0 p-0 pl-4">
+			{{$.Data.CachedBlock4}}
+		</ul>
+	</div>
+</div>
+<!-- <div class="card mb-4">
+	<h5 class="card-header">Shop filter</h5>
+	<div class="card-body">
+		Filter
+	</div>
 </div> -->

+ 16 - 16
hosts/localhost/template/sidebar-right.html

@@ -1,17 +1,17 @@
-<div class="card mb-4">
-	<h5 class="card-header">Blog categories</h5>
-	<div class="card-body">
-		<ul class="m-0 p-0 pl-4">
-			{{$.Data.CachedBlock5}}
-		</ul>
-	</div>
-</div>
-<div class="card mb-4">
-	<h5 class="card-header">Useful links</h5>
-	<div class="card-body">
-		<ul class="m-0 p-0 pl-4">
-			<li><a href="https://github.com/vladimirok5959/golang-fave" target="_blank">Project on GitHub</a></li>
-			<li><a href="https://github.com/vladimirok5959/golang-fave/wiki" target="_blank">Wiki on GitHub</a></li>
-		</ul>
-	</div>
+<div class="card mb-4">
+	<h5 class="card-header">Blog categories</h5>
+	<div class="card-body">
+		<ul class="m-0 p-0 pl-4">
+			{{$.Data.CachedBlock5}}
+		</ul>
+	</div>
+</div>
+<div class="card mb-4">
+	<h5 class="card-header">Useful links</h5>
+	<div class="card-body">
+		<ul class="m-0 p-0 pl-4">
+			<li><a href="https://github.com/vladimirok5959/golang-fave" target="_blank">Project on GitHub</a></li>
+			<li><a href="https://github.com/vladimirok5959/golang-fave/wiki" target="_blank">Wiki on GitHub</a></li>
+		</ul>
+	</div>
 </div>

+ 266 - 266
hosts/localhost/template/styles.css

@@ -1,267 +1,267 @@
-/* Fix bootstrap */
-@media (max-width: 991.98px) {
-	.navbar-expand-lg>.container,
-	.navbar-expand-lg>.container-fluid {
-		padding-right: 15px;
-		padding-left: 15px;
-	}
-}
-
-@media (max-width: 575px) {
-	.navbar-expand-lg>.container,
-	.navbar-expand-lg>.container-fluid {
-		padding-right: 0px;
-		padding-left: 0px;
-	}
-}
-
-@media (min-width: 992px) {
-	.navbar-expand-lg .navbar-nav {
-		margin-right: -.5rem;
-	}
-}
-
-/* Set base bootstrap width */
-@media (min-width: 1200px) {
-	.container {
-		 max-width: 1000px; 
-		/*background: red;*/
-	}
-	.navbar-expand-lg .navbar-nav {
-		margin-right: -.5rem;
-	}
-}
-
-/* Base font and colors */
-body {
-	color: #444;
-	font-size: 1.0rem;
-	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
-}
-
-.h1,
-.h2,
-.h3,
-.h4,
-.h5,
-.h6,
-h1,
-h2,
-h3,
-h4,
-h5,
-h6,
-footer {
-	color: #000;
-}
-
-.navbar-brand {
-	font-weight: bold;
-}
-
-h1 {
-	font-size: 250%;
-}
-
-/* Nice sticky footer */
-html,
-body {
-	height: 100%;
-}
-
-#wrap {
-	min-height: 100%;
-}
-
-#main {
-	overflow: auto;
-	padding-bottom: 4.5rem;
-}
-
-footer {
-	position: relative;
-	margin-top: -4.5rem;
-	height: 4.5rem;
-	clear: both;
-}
-
-/* Sticky top nav bar, body class "fixed-top-bar" */
-.fixed-top-bar .navbar {
-	position: fixed;
-	top: 0;
-	right: 0;
-	left: 0;
-	z-index: 1030;
-}
-
-.fixed-top-bar #main {
-	padding-top: 3.5rem;
-}
-
-/* Fave background */
-.bg-fave {
-	background: #205081 url(/assets/sys/bg.png) repeat 0 0;
-}
-
-/* Fix content marging */
-.page-content p:last-child {
-	margin-bottom: 0px;
-}
-
-/* Borders */
-.navbar {
-	border-bottom: 1px solid rgba(0, 0, 0, .125);
-}
-
-footer {
-	border-top: 1px solid rgba(0, 0, 0, .125);
-}
-
-/* Shop */
-.grid-products {
-	display: flex;
-	flex-flow: row wrap;
-	padding-top: 1px;
-	padding-left: 1px;
-	margin-right: -4px;
-}
-
-.grid-products .card-product {
-	width: 100%;
-	border-radius: 0;
-	margin-top: -1px;
-	margin-left: -1px;
-}
-
-@media (min-width: 768px) { .grid-products .card-product { width: 50%; } }
-@media (min-width: 992px) { .grid-products .card-product { width: 33.33333%; } }
-@media (min-width: 1200px) { .grid-products .card-product { width: 33.33333%; } }
-
-.grid-products .card-product:hover {
-	background-color: #f2f4f6;
-}
-
-.grid-products .card-product .card-img-link {
-	display: block;
-	padding: 1.25rem;
-	padding-bottom: 0;
-}
-
-.grid-products .card-product .card-img-link img {
-	display: block;
-	border-radius: 0;
-}
-
-.grid-products .card-product .card-title {
-	font-size: 1rem;
-}
-
-.grid-products .card-product .card-text {
-	font-size: 0.7rem;
-}
-
-.grid-products .card-product .card-footer {
-	padding-top: 0;
-	border-radius: 0;
-	border-top: 0;
-	background: transparent;
-	padding-bottom: 1.25rem;
-}
-
-.grid-products .card-product .price {
-	font-weight: bold;
-}
-
-.grid-products .card-product .btn {
-	float: right;
-}
-
-.product-full .price {
-	display: inline-block;
-	vertical-align: middle;
-}
-
-.product-full .btn-buy {
-	display: inline-block;
-	vertical-align: middle;
-}
-
-.product-full .product-description {
-	font-size: 1rem;
-}
-
-.product-full .product-description p:last-child {
-	margin-bottom: 0px;
-}
-
-.product-full .thumbnails {
-	padding: 2px;
-}
-
-.product-full .thumbnails .thumbnail {
-	width: 16.666666667%;
-	padding: 2px;
-}
-
-.product-full .thumbnails .thumbnail-hidden {
-	display: none;
-}
-
-.product-full .thumbnails .thumbnail img {
-	width: 100%;
-	border-radius: 4px;
-}
-
-.table-specifications .tcol-1,
-.table-specifications .tcol-2 {
-	width: 100%;
-	display: block;
-}
-
-.table-specifications .tcol-1 {
-	font-weight: bold;
-	border-bottom: none;
-	padding-bottom: 0px;
-}
-
-.table-specifications .tcol-2 {
-	border-top: none;
-	padding-top: 0px;
-}
-
-@media (min-width: 768px) {
-	.table-specifications .tcol-1,
-	.table-specifications .tcol-2 {
-		width: 50%;
-		display: table-cell;
-		font-weight: normal;
-		border: 1px solid #dee2e6;
-		padding: .75rem;
-	}
-}
-
-@media (min-width: 992px) {
-	.table-specifications .tcol-1,
-	.table-specifications .tcol-2 {
-		width: 50%;
-		display: table-cell;
-		font-weight: normal;
-		border: 1px solid #dee2e6;
-		padding: .75rem;
-	}
-}
-
-@media (min-width: 1200px) {
-	.table-specifications .tcol-1,
-	.table-specifications .tcol-2 {
-		width: 50%;
-		display: table-cell;
-		font-weight: normal;
-		border: 1px solid #dee2e6;
-		padding: .75rem;
-	}
-}
-
-.fixed-top-bar .navbar.navbar-cats {
-	position: static;
+/* Fix bootstrap */
+@media (max-width: 991.98px) {
+	.navbar-expand-lg>.container,
+	.navbar-expand-lg>.container-fluid {
+		padding-right: 15px;
+		padding-left: 15px;
+	}
+}
+
+@media (max-width: 575px) {
+	.navbar-expand-lg>.container,
+	.navbar-expand-lg>.container-fluid {
+		padding-right: 0px;
+		padding-left: 0px;
+	}
+}
+
+@media (min-width: 992px) {
+	.navbar-expand-lg .navbar-nav {
+		margin-right: -.5rem;
+	}
+}
+
+/* Set base bootstrap width */
+@media (min-width: 1200px) {
+	.container {
+		 max-width: 1000px; 
+		/*background: red;*/
+	}
+	.navbar-expand-lg .navbar-nav {
+		margin-right: -.5rem;
+	}
+}
+
+/* Base font and colors */
+body {
+	color: #444;
+	font-size: 1.0rem;
+	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+}
+
+.h1,
+.h2,
+.h3,
+.h4,
+.h5,
+.h6,
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+footer {
+	color: #000;
+}
+
+.navbar-brand {
+	font-weight: bold;
+}
+
+h1 {
+	font-size: 250%;
+}
+
+/* Nice sticky footer */
+html,
+body {
+	height: 100%;
+}
+
+#wrap {
+	min-height: 100%;
+}
+
+#main {
+	overflow: auto;
+	padding-bottom: 4.5rem;
+}
+
+footer {
+	position: relative;
+	margin-top: -4.5rem;
+	height: 4.5rem;
+	clear: both;
+}
+
+/* Sticky top nav bar, body class "fixed-top-bar" */
+.fixed-top-bar .navbar {
+	position: fixed;
+	top: 0;
+	right: 0;
+	left: 0;
+	z-index: 1030;
+}
+
+.fixed-top-bar #main {
+	padding-top: 3.5rem;
+}
+
+/* Fave background */
+.bg-fave {
+	background: #205081 url(/assets/sys/bg.png) repeat 0 0;
+}
+
+/* Fix content marging */
+.page-content p:last-child {
+	margin-bottom: 0px;
+}
+
+/* Borders */
+.navbar {
+	border-bottom: 1px solid rgba(0, 0, 0, .125);
+}
+
+footer {
+	border-top: 1px solid rgba(0, 0, 0, .125);
+}
+
+/* Shop */
+.grid-products {
+	display: flex;
+	flex-flow: row wrap;
+	padding-top: 1px;
+	padding-left: 1px;
+	margin-right: -4px;
+}
+
+.grid-products .card-product {
+	width: 100%;
+	border-radius: 0;
+	margin-top: -1px;
+	margin-left: -1px;
+}
+
+@media (min-width: 768px) { .grid-products .card-product { width: 50%; } }
+@media (min-width: 992px) { .grid-products .card-product { width: 33.33333%; } }
+@media (min-width: 1200px) { .grid-products .card-product { width: 33.33333%; } }
+
+.grid-products .card-product:hover {
+	background-color: #f2f4f6;
+}
+
+.grid-products .card-product .card-img-link {
+	display: block;
+	padding: 1.25rem;
+	padding-bottom: 0;
+}
+
+.grid-products .card-product .card-img-link img {
+	display: block;
+	border-radius: 0;
+}
+
+.grid-products .card-product .card-title {
+	font-size: 1rem;
+}
+
+.grid-products .card-product .card-text {
+	font-size: 0.7rem;
+}
+
+.grid-products .card-product .card-footer {
+	padding-top: 0;
+	border-radius: 0;
+	border-top: 0;
+	background: transparent;
+	padding-bottom: 1.25rem;
+}
+
+.grid-products .card-product .price {
+	font-weight: bold;
+}
+
+.grid-products .card-product .btn {
+	float: right;
+}
+
+.product-full .price {
+	display: inline-block;
+	vertical-align: middle;
+}
+
+.product-full .btn-buy {
+	display: inline-block;
+	vertical-align: middle;
+}
+
+.product-full .product-description {
+	font-size: 1rem;
+}
+
+.product-full .product-description p:last-child {
+	margin-bottom: 0px;
+}
+
+.product-full .thumbnails {
+	padding: 2px;
+}
+
+.product-full .thumbnails .thumbnail {
+	width: 16.666666667%;
+	padding: 2px;
+}
+
+.product-full .thumbnails .thumbnail-hidden {
+	display: none;
+}
+
+.product-full .thumbnails .thumbnail img {
+	width: 100%;
+	border-radius: 4px;
+}
+
+.table-specifications .tcol-1,
+.table-specifications .tcol-2 {
+	width: 100%;
+	display: block;
+}
+
+.table-specifications .tcol-1 {
+	font-weight: bold;
+	border-bottom: none;
+	padding-bottom: 0px;
+}
+
+.table-specifications .tcol-2 {
+	border-top: none;
+	padding-top: 0px;
+}
+
+@media (min-width: 768px) {
+	.table-specifications .tcol-1,
+	.table-specifications .tcol-2 {
+		width: 50%;
+		display: table-cell;
+		font-weight: normal;
+		border: 1px solid #dee2e6;
+		padding: .75rem;
+	}
+}
+
+@media (min-width: 992px) {
+	.table-specifications .tcol-1,
+	.table-specifications .tcol-2 {
+		width: 50%;
+		display: table-cell;
+		font-weight: normal;
+		border: 1px solid #dee2e6;
+		padding: .75rem;
+	}
+}
+
+@media (min-width: 1200px) {
+	.table-specifications .tcol-1,
+	.table-specifications .tcol-2 {
+		width: 50%;
+		display: table-cell;
+		font-weight: normal;
+		border: 1px solid #dee2e6;
+		padding: .75rem;
+	}
+}
+
+.fixed-top-bar .navbar.navbar-cats {
+	position: static;
 }

+ 3 - 2
modules/module_template.go

@@ -90,14 +90,15 @@ func (this *Modules) RegisterModule_Template() *Module {
 							return `<div class="form-group n1">` +
 								`<div class="row">` +
 								`<div class="col-7">` +
-								`<div>` +
+								`<div style="position:relative;">` +
+								`<button type="button" class="btn btn-success" onclick="return fave.ActionRestoreThemeFile('template-restore-file','` + selected_file + `','Are you sure want to restore theme file?');" style="position:absolute;right:0;">Restore</button>` +
 								`<select class="form-control ignore-lost-data" id="lbl_file" name="file" onchange="setTimeout(function(){$('#lbl_file').val('` + selected_file + `')},500);document.location='/cp/` + wrap.CurrModule + `/?file='+encodeURI(this.value);">` +
 								list_of_files +
 								`</select>` +
 								`</div>` +
 								`</div>` +
 								`<div class="col-5">` +
-								`<button type="button" class="btn btn-danger" onclick="return fave.ActionRestoreThemeFile('template-restore-file','` + selected_file + `','Are you sure want to restore theme file?');">Restore</button>` +
+								`<button type="button" class="btn btn-danger" onclick="return fave.ActionRestoreThemeFile('template-restore-file-all','all','WARNING! Are you sure want to restore all theme files?');">Restore All</button>` +
 								`</div>` +
 								`</div>` +
 								`</div>`

+ 36 - 0
modules/module_template_act_restore_file_all.go

@@ -0,0 +1,36 @@
+package modules
+
+import (
+	"io/ioutil"
+	"os"
+
+	ThemeFiles "golang-fave/assets/template"
+	"golang-fave/engine/wrapper"
+)
+
+func (this *Modules) RegisterAction_TemplateRestoreFileAll() *Action {
+	return this.newAction(AInfo{
+		WantDB:    true,
+		Mount:     "template-restore-file-all",
+		WantAdmin: true,
+	}, func(wrap *wrapper.Wrapper) {
+		pf_file := wrap.R.FormValue("file")
+
+		if pf_file != "all" {
+			wrap.MsgError(`Inner system error`)
+			return
+		}
+
+		for file, data := range ThemeFiles.AllData {
+			if err := ioutil.WriteFile(wrap.DTemplate+string(os.PathSeparator)+file, data, 0664); err != nil {
+				wrap.MsgError(err.Error())
+				return
+			}
+		}
+
+		wrap.ResetCacheBlocks()
+
+		// Reload current page
+		wrap.Write(`window.location.reload(false);`)
+	})
+}