From c1b132e8af60a55d1a151526bbad9a9bdea986e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sat, 12 Apr 2025 19:16:34 -0400 Subject: [PATCH] real initial commit --- lib/controllers.js | 27 +---- templates/admin/plugins/persona.tpl | 24 ++++ templates/header.tpl | 130 +++++++++++++++++++++ templates/partials/categories/lastpost.tpl | 24 ++++ templates/topic.tpl | 127 ++++++++++++++++++++ theme.json | 8 +- 6 files changed, 314 insertions(+), 26 deletions(-) create mode 100644 templates/admin/plugins/persona.tpl create mode 100644 templates/header.tpl create mode 100644 templates/partials/categories/lastpost.tpl create mode 100644 templates/topic.tpl diff --git a/lib/controllers.js b/lib/controllers.js index 542318b..961e7fb 100644 --- a/lib/controllers.js +++ b/lib/controllers.js @@ -1,29 +1,12 @@ 'use strict'; -const Controllers = module.exports; - const accountHelpers = require.main.require('./src/controllers/accounts/helpers'); const helpers = require.main.require('./src/controllers/helpers'); +const Controllers = module.exports; + Controllers.renderAdminPage = (req, res) => { - res.render('admin/plugins/theme-quickstart', { - title: 'Quick Start Theme', + res.render('admin/plugins/persona', { + title: 'Persona Theme', }); -}; - -Controllers.renderThemeSettings = async (req, res, next) => { - const userData = await accountHelpers.getUserDataByUserSlug(req.params.userslug, req.uid, req.query); - if (!userData) { - return next(); - } - const lib = require('./theme'); - userData.theme = await lib.loadThemeConfig(userData.uid); - - userData.title = '[[themes/harmony:settings.title]]'; - userData.breadcrumbs = helpers.buildBreadcrumbs([ - { text: userData.username, url: `/user/${userData.userslug}` }, - { text: '[[themes/harmony:settings.title]]' }, - ]); - - res.render('account/theme', userData); -}; +}; \ No newline at end of file diff --git a/templates/admin/plugins/persona.tpl b/templates/admin/plugins/persona.tpl new file mode 100644 index 0000000..955f863 --- /dev/null +++ b/templates/admin/plugins/persona.tpl @@ -0,0 +1,24 @@ +
+ + +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+
+ + +
+
diff --git a/templates/header.tpl b/templates/header.tpl new file mode 100644 index 0000000..167091b --- /dev/null +++ b/templates/header.tpl @@ -0,0 +1,130 @@ + + + + {browserTitle} + {{{each metaTags}}}{function.buildMetaTag}{{{end}}} + + {{{each linkTags}}}{function.buildLinkTag}{{{end}}} + + + + + {{{if useCustomHTML}}} + {{customHTML}} + {{{end}}} + {{{if useCustomCSS}}} + + {{{end}}} + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/templates/partials/categories/lastpost.tpl b/templates/partials/categories/lastpost.tpl new file mode 100644 index 0000000..c7965cb --- /dev/null +++ b/templates/partials/categories/lastpost.tpl @@ -0,0 +1,24 @@ +
+ {{{ each ./posts }}} + {{{ if @first }}} +
+ +
+ + {./content} +
+
+ {{{ end }}} + {{{ end }}} + + {{{ if !./posts.length }}} +
+
+ [[category:no-new-posts]] +
+
+ {{{ end }}} +
diff --git a/templates/topic.tpl b/templates/topic.tpl new file mode 100644 index 0000000..d5c84fa --- /dev/null +++ b/templates/topic.tpl @@ -0,0 +1,127 @@ +
+ {{{each widgets.header}}} + {{widgets.header.html}} + {{{end}}} +
+
+
+ + + + + + + +
+
+
+

+
+ {title} +
+

+ +
+ + + [[topic:scheduled]] + + + {{{ if !pinExpiry }}}[[topic:pinned]]{{{ else }}}[[topic:pinned-with-expiry, {isoTimeToLocaleString(./pinExpiryISO, config.userLang)}]]{{{ end }}} + + + [[topic:locked]] + + + {{{ if privileges.isAdminOrMod }}}[[topic:moved-from, {oldCategory.name}]]{{{ else }}}[[topic:moved]]{{{ end }}} + + {{{each icons}}}{@value}{{{end}}} + + {function.buildCategoryLabel, category, "a", "border"} + + + {{{ if !feeds:disableRSS }}} + {{{ if rssFeedUrl }}}{{{ end }}} + {{{ end }}} + {{{ if browsingUsers }}} + + {{{ end }}} +
+ +
+
+
+
+
+
+ {{{ if merger }}} + + {{{ end }}} + + {{{ if forker }}} + + {{{ end }}} + + + {{{ if !scheduled }}} + + {{{ end }}} + +
    + {{{each posts}}} +
  • > + + + + + + +
  • + {{{ if (config.topicPostSort != "most_votes") }}} + {{{ each ./events}}} + + {{{ end }}} + {{{ end }}} + {{{end}}} +
+ + {{{ if browsingUsers }}} +
+ +
+
+ {{{ end }}} + + {{{ if config.enableQuickReply }}} + + {{{ end }}} + + {{{ if config.usePagination }}} + + {{{ end }}} + + +
+
+ {{{each widgets.sidebar}}} + {{widgets.sidebar.html}} + {{{end}}} +
+
+ +
+ {{{each widgets.footer}}} + {{widgets.footer.html}} + {{{end}}} +
+ +{{{ if !config.usePagination }}} + +{{{ end }}} diff --git a/theme.json b/theme.json index 81c5658..a66bab0 100644 --- a/theme.json +++ b/theme.json @@ -1,7 +1,7 @@ { - "id": "nodebb-theme-quickstart", - "name": "My Theme Name", - "description": "Enter a description here", + "id": "nodebb-theme-rockfic", + "name": "Rockfic", + "description": "Theme used on rockfic.com", "url": "https://github.com/nodebb/nodebb-theme-quickstart", - "baseTheme": "nodebb-theme-harmony" + "baseTheme": "nodebb-theme-persona" }