How to change the design the first reply in the topic?
-
Q1: Is it a Wiki function and Wiki style first post you are after?
Q2: Are you perhaps pasting everything into the title bar - title + content?
-
@Thangaraja-C said in How to change the design the first reply in the topic?:
As of now, the first thread/reply always stays on top. Is there a way to show it along with the topic title instead of showing it separatly?
I think you are asking about the old design where the first post was separated from the rest, and topic buttons were below the first post...
Unfortunately, that design has changed. I am also a fan of the old version but right now in order to separate the first post from the rest we use this custom CSS:
li[data-index="0"] .post-footer { border-bottom: 1px solid #eee; }
It is nothing close to the old version but still separates the first post from the rest.
-
Thanks. I will try this
-
@crazycells I also use a similar mechanism in sudonix.com where I set a background colour for the first post. The next iteration of theming on sudonix will also leverage colour for original poster etc.
-
@phenomlab said in How to change the design the first reply in the topic?:
@crazycells I also use a similar mechanism in sudonix.com where I set a background colour for the first post. The next iteration of theming on sudonix will also leverage colour for original poster etc.
Yes, actually we will move to the "box" system soon, our users find it easier to read so, all posts will be in boxes...
then I am planning to apply your codes to get the first post in the box with the same color as the category color.
-
This is what I exactly meant. I am not sure how to bring this back
-
@Thangaraja-C you'd need to modify the templates themselves to get that look.
-
I believe it is not very easy to do this.
For us, first posts are usually the most important and information-carrying long posts, so we also wanted to separate that from the rest, but putting topic buttons below the first post.
I tried to get this look before but since on the topic.tpl file posts are not separated it was impossible for me to do it. I kept breaking the page Then I gave up...
But, if there is an easy way to achieve this I appreciate any help
-
Hmm you should be able to display some content only after the first posts by adding a
if
in the topic.tpl. For example on this line https://github.com/NodeBB/nodebb-theme-persona/blob/master/templates/topic.tpl#L74You can add
{{{ if !posts.index }}} only visible on main post {{{ end }}}
Since the main posts has an index of 0, that content will only show in the main post.