After some more code digging and experiments I can answer my own question. A theme is a normal plugin and as such does not inherit any behavior from other plugins.
So you need to copy everything you need from the base theme library.js to your child theme. And of course, you need to declare client scripts explicitly.
Loading of missing templates from base theme is the only link between the base and the child theme.
[nodebb-theme-lavender] Lavender Theme for NodeBB
-
-
@julian said:
"words" is difficult, after all, what is a word, and how can we arbitrarily limit by word count?
"中国人" is considered three words in Chinese, whereas "Rindfleischetikettierungsüberwachungsaufgabenübertragungsgesetz" is considered one word in German.
We go by "height", and we do have a max of 200px per paragraph, although we should probably apply the 200px to the entire post block instead, since code blocks are exempt, and can span large heights on the Lavender theme.
@julian
you can just split the text after X characters without breaking word, regardless of its lenght (if total lenght is > len + 20% break the word too because it's too long) -
$ npm install nodebb-theme-lavender
npm http GET https://registry.npmjs.org/nodebb-theme-lavender/-/nodebb-theme-lavender-0.0.25-16.tgz
npm http 200 https://registry.npmjs.org/nodebb-theme-lavender/-/nodebb-theme-lavender-0.0.25-16.tgz
npm ERR! Error: shasum check failed for /home/fiag/tmp/npm-10579-bcA8O8kf/1405444943779-0.4835541208740324/tmp.tgz
npm ERR! Expected: 9819eed278a69ddd0af80c5f44965477b4cfc410
npm ERR! Actual: 57a3e1badecdd876b68680a3f19554a9e74797ba
npm ERR! at /usr/lib64/node_modules/npm/node_modules/sha/index.js:38:8
npm ERR! at ReadStream.<anonymous> (/usr/lib64/node_modules/npm/node_modules/sha/index.js:85:7)
npm ERR! at ReadStream.EventEmitter.emit (events.js:117:20)
npm ERR! at _stream_readable.js:920:16
npm ERR! at process._tickCallback (node.js:415:13) -
@fiag hmm lavender is a default theme... thats odd..
-
If you're having trouble npm installing this theme, you can just
cd node_modules
andgit clone https://github.com/NodeBB/nodebb-theme-lavender.git
You will get the latest development version, which may not be suitable for live environment, but at least it will work
I would try npm installing again, you may have just tried downloading on a bad time
-
@psychobunny Thanks a lot.The .tgz file from npm was really corrupted. I can use
git checkout tags/v0.0.68
to get the suitable version.