diff --git a/library.js b/library.js index 9996cb1..ccc03a9 100644 --- a/library.js +++ b/library.js @@ -13,4 +13,56 @@ library.getTeasers = function(data, callback) { callback(null, data); }; -module.exports = library; \ No newline at end of file +library.defineWidgetAreas = function(areas, callback) { + areas = areas.concat([ + { + name: "Categories Sidebar", + template: "categories.tpl", + location: "sidebar" + }, + { + name: "Category Sidebar", + template: "category.tpl", + location: "sidebar" + }, + { + name: "Topic Sidebar", + template: "topic.tpl", + location: "sidebar" + }, + { + name: "Categories Header", + template: "categories.tpl", + location: "header" + }, + { + name: "Category Header", + template: "category.tpl", + location: "header" + }, + { + name: "Topic Header", + template: "topic.tpl", + location: "header" + }, + { + name: "Categories Footer", + template: "categories.tpl", + location: "footer" + }, + { + name: "Category Footer", + template: "category.tpl", + location: "footer" + }, + { + name: "Topic Footer", + template: "topic.tpl", + location: "footer" + } + ]); + + callback(null, areas); +}; + +module.exports = library; diff --git a/plugin.json b/plugin.json index 2413b30..4fa47f9 100644 --- a/plugin.json +++ b/plugin.json @@ -2,7 +2,8 @@ "id": "nodebb-theme-persona", "library": "library.js", "hooks": [ - { "hook": "filter:teasers.get", "method": "getTeasers" } + { "hook": "filter:teasers.get", "method": "getTeasers" }, + { "hook": "filter:widgets.getAreas", "method": "defineWidgetAreas" } ], "scripts": [ "lib/persona.js", diff --git a/templates/categories.tpl b/templates/categories.tpl index 51baf42..5038d97 100644 --- a/templates/categories.tpl +++ b/templates/categories.tpl @@ -1,7 +1,14 @@ -

[[pages:categories]]

- +
+
+
+

[[pages:categories]]

+ +
+
+
+
diff --git a/templates/category.tpl b/templates/category.tpl index ee4a954..004d63c 100644 --- a/templates/category.tpl +++ b/templates/category.tpl @@ -1,41 +1,46 @@ -
- - - - - -
- - - - - [[category:guest-login-post]] - - - - - - - - + +
+
+
+ + + + +
+ + + + + [[category:guest-login-post]] + + + + + + + + +
+ + + + + + +
+ [[category:no_topics]] +
+ + + + + + +
- - - - - - -
- [[category:no_topics]] -
- - - - - - - +
+
@@ -44,4 +49,3 @@ - diff --git a/templates/topic.tpl b/templates/topic.tpl index a5f5ff3..57088fa 100644 --- a/templates/topic.tpl +++ b/templates/topic.tpl @@ -1,62 +1,67 @@ + +
-
- +
+
-

+

- {title} + {title} - -

+ + -
[[topic:deleted_message]]
+
[[topic:deleted_message]]
-
+
-
    - -
  • > - +
      + +
    • > + - - + + - - -
      - -
    • - -
    + + +
    + +
  • + +
-
- -
+
+ +
- - - - -
-
-
- - - - - + + + + +
+
+
+ + + + + +
+
-
+
+ - \ No newline at end of file +