we are looking to make it so that the Moderators can add Categories and do not want to give them full admin permissions.
Custom CSS for plugin on ACP.
-
I am in the process of writing a NdeBB plugin, but have not been able to add a CSS file to the ACP for the plugin. Is there something like
acpScripts
for CSS I could put inplugin.json
?Thanks for the help!
-
On v1.0.3? It used to read the css and less from the plugin.json, but it was removed.
I made an issue about it, but the fix didn't make it into 1.0.3. imo, it should have been back-ported.
-
So does that mean that there's no other way than to put styles in
<style>
tags in the template file? -
You could also use a link tag, linking to a css file in one of the
staticDirs
in your plugin.json, for instance, if your plugin has a file at/public/css/style.css
and the plugin.json with"staticDirs": { "public": "public" },
then in your template you could do
<link rel="stylesheet" type="text/css" href="/plugins/nodebb-plugin-yourplugin/public/css/style.css">
-
That's perfect, thanks!