For my custom theme I need some data like number of total posts on forum. How would I menage to get that data?
Can you just tell me in short lines what is the way of accomplishing this or some similar task ?
I would be very thankful for any help.
velikikomsa
Posts
-
Number of total posts on forum. -
How to access to public dir in my custom themeI got it man. I've needed to add the package.json file to the theme root directory.
:
THANK YOU !!!. -
How to access to public dir in my custom themeyariplus thank you for your replay.
Actually I've done that.
My plugin.json looks like this:{
"id": "nodebb-theme-mytheme",
"staticDirs":{
"fonts":"static/fonts"
},
"hooks": [],
"scripts": [
"static/lib/categories.js"
]
}My dir strucutre is:
- nodebb-theme-mytheme
- static
- fonts
- ...font files ..
- lib
-categories.js
- fonts
- static
But it's not loading script nor I could access the font directorty from my less file.
@font-face {
font-family: "my-font";
src:url("/plugins/nodebb-theme-mytheme/fonts/gem.eot");
src:url("/plugins/nodebb-theme-mytheme/fonts/gem.eot?#iefix") format("embedded-opentype"),
url("/plugins/nodebb-theme-mytheme/fonts/gem.woff") format("woff"),
url("/plugins/nodebb-theme-mytheme/fonts/gem.ttf") format("truetype"),
url("/plugins/nodebb-theme-mytheme/fonts/gem.svg#gem") format("svg");
font-weight: normal;
font-style: normal;}
It seems I'm missing something and I'm kicking the wall right now
- nodebb-theme-mytheme
-
How to access to public dir in my custom themeI have the directory called static inside of the root dir of my custom theme.
I've put my fonts dir inside the static dir.
How to reference that folder from my less file?
Same with the scripts. I don't know how to include my custom scripts in a nodebb template?
I would be very thankful for any help. -
Activating my own custom theme...Hi guys,
I'm newbie to the Nodebb and currently I'm trying to play around with creating a new theme.
I've downloaded the repo from Quickstart theme.
I've added the nodebb-them-quickstart folder to the node_modules folder.
When I go to the admin page and load all the available themes, my new theme is listed under the installed themes.
After selecting it, it says that I should restart NodeBB to fully activate the selected theme.
After I do that and after I refresh admin page, I'm in situation where previously active them is still the active one.
In other words new custom theme is not activated.
This is the case with every theme I made.
But when I switch to the nodebb-theme-lavander, everything goes fine.
I'm really struggling to make this happen with my own custom theme.
I would be very thankful if some would tell me what is going on.