From 39f638dd53ac1b49b1e8e7f6c5c2fb7bd07a9799 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Mon, 1 Feb 2021 15:19:41 -0500 Subject: [PATCH] Categories refactor (#516) * feat: pagination on /categories and /category page for sub categories * feat: show subcategories left * fix: rename categories to allCategories on /search * feat: add component for subcategory container --- less/category.less | 4 ++++ templates/categories.tpl | 1 + templates/partials/category/subcategory.tpl | 11 ++++++++--- templates/search.tpl | 6 +++--- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/less/category.less b/less/category.less index ab69767..58b78f6 100644 --- a/less/category.less +++ b/less/category.less @@ -109,6 +109,10 @@ font-weight: bold; } } + + .subcategory { + margin-bottom: 10px; + } } .category, .categories, .subcategory { diff --git a/templates/categories.tpl b/templates/categories.tpl index f96a1b8..d1da411 100644 --- a/templates/categories.tpl +++ b/templates/categories.tpl @@ -12,6 +12,7 @@ {{{end}}} +
{{{each widgets.sidebar}}} diff --git a/templates/partials/category/subcategory.tpl b/templates/partials/category/subcategory.tpl index 01cec9e..86fbfcd 100644 --- a/templates/partials/category/subcategory.tpl +++ b/templates/partials/category/subcategory.tpl @@ -1,9 +1,14 @@ +{{{ if children.length }}}
-

[[category:subcategories]]

+

[[category:subcategories]]

-
    +
      {{{each children}}} {{{end}}}
    -
\ No newline at end of file + {{{ if hasMoreSubCategories}}} + + {{{ end }}} +
+{{{ end }}} \ No newline at end of file diff --git a/templates/search.tpl b/templates/search.tpl index 46d150c..6f2ac42 100644 --- a/templates/search.tpl +++ b/templates/search.tpl @@ -48,9 +48,9 @@
- + {{{each allCategories}}} + {{{end}}} [[search:search-child-categories]]