diff --git a/themes/berkarar/layouts/default.htm b/themes/berkarar/layouts/default.htm index 55cd0d9..5458d7b 100644 --- a/themes/berkarar/layouts/default.htm +++ b/themes/berkarar/layouts/default.htm @@ -66,12 +66,12 @@ function onStart(){ - + - {{ this.page.title }} + Berkarar {% styles %} diff --git a/themes/berkarar/pages/category.htm b/themes/berkarar/pages/category.htm new file mode 100644 index 0000000..0a05817 --- /dev/null +++ b/themes/berkarar/pages/category.htm @@ -0,0 +1,95 @@ +title = "category" +url = "/category/:id/:category" +layout = "default" +is_hidden = 0 +== +param('id'); + // $this["category"] = $this->param('category'); + + $this['category'] = Tps\Shops\Models\Category::where("id", $id)->get()->first(); + + } +?> +== +
+
+
+
+ + + + + + + Главная + + +

+ {{category.top_category.name}} +

+

+ {{category.name}} +

+
+
+
+
+ +
+
+ +
+
\ No newline at end of file diff --git a/themes/berkarar/pages/shop.htm b/themes/berkarar/pages/shop.htm new file mode 100644 index 0000000..6a26db5 --- /dev/null +++ b/themes/berkarar/pages/shop.htm @@ -0,0 +1,196 @@ +title = "shop" +url = "/shop/:id/:name" +layout = "default" +is_hidden = 0 +== +param('id'); + // $this["category"] = $this->param('category'); + + $this['shop'] = Tps\Shops\Models\Shop::where("id", $id)->get()->first(); + + $this['others'] = Tps\Shops\Models\Shop::where("id", "!=", $id)->where("category_id", $this['shop']->category_id)->get(); + if(!$this['others']->isEmpty()){ + $this['others'] = $this['others']->random($this['others']->count() > 4 ? 4 : $this['others']->count())->values(); + } + } +?> +== +
+
+
+
+ + + + + + + Главная + + +

+ {{shop.category.top_category.name}} +

+

+ + {{shop.category.name}} + + +

+

+ {{shop.name}} +

+
+
+
+
+ +
+
+
+
+ + +
+ restaurant-photo +
+
+ + {% if others|length > 0 %} + +

+ Другие рестораны +

+ +
+ {% for item in others %} +
+
+ restaurant-photo +
+ +
+
+ {{item.name}} +
+

+ {{item.category.top_category.name}}, {{item.category.name}} +

+ +
+
+ {{item.floor}} Этаж +
+ + + + + + + + + + + {{item.instagram_name}} + +
+
+
+ {% endfor %} +
+ +
+ + Посмотреть все + + + + + + + +
+ {% endif %} +
+
+
\ No newline at end of file diff --git a/themes/berkarar/partials/home/shops.htm b/themes/berkarar/partials/home/shops.htm index c1c78da..65b6bb2 100644 --- a/themes/berkarar/partials/home/shops.htm +++ b/themes/berkarar/partials/home/shops.htm @@ -17,6 +17,7 @@
{% for shop in shop_all%} +
restaurant-photo @@ -73,6 +74,7 @@
+ {% endfor%} {% for category in shop_categories %} diff --git a/themes/berkarar/partials/site/footer.htm b/themes/berkarar/partials/site/footer.htm index 573312c..5fd6168 100644 --- a/themes/berkarar/partials/site/footer.htm +++ b/themes/berkarar/partials/site/footer.htm @@ -12,7 +12,7 @@ {{top_category.name}} {% for category in top_category.getCategories(i.limit) %} - {{category.name}} + {{category.name}} {% endfor %} {% endfor %} diff --git a/themes/berkarar/partials/site/header.htm b/themes/berkarar/partials/site/header.htm index b7a9415..9f7a204 100644 --- a/themes/berkarar/partials/site/header.htm +++ b/themes/berkarar/partials/site/header.htm @@ -1,9 +1,7 @@ == activeLocale .'.png'; - } ?> == @@ -37,9 +35,9 @@ function onStart(){ - +
{% if user %} diff --git a/themes/berkarar/partials/site/navigation.htm b/themes/berkarar/partials/site/navigation.htm index 1e91b60..fbd0faf 100644 --- a/themes/berkarar/partials/site/navigation.htm +++ b/themes/berkarar/partials/site/navigation.htm @@ -76,7 +76,7 @@ function onStart(){ {{top_category.name}} {% for category in top_category.getCategories(i.limit) %} - {{category.name}} + {{category.name}} {% endfor %}