Hello.
I am wondering if to introduce a comma (,) between authors in bootstrap theme is something hard to do.
Here is how the theme is now, the authors appears all together:
I want to put a comma between each author name, like this:
If it is something easy to improve…
Hi @Hugo_Melo
You may achieve what you want with a CSS chunck like this:
div.authors > strong:after {
content: ", ";
}
Regards,
Israel Cefrin
Public Knowledge Project Team
I am speechless. Are you really suggesting that the end user needs to muck with CSS in order to do something that should be handled within the Write or Input area! Hopefully i have misunderstood the question.
That code didn’t work, i added it to the magazine style sheet, and nothing.
I have no idea whats your answer means, i’ve read it like 10 times and it still like you are answering someone else. Hopefully someone who understands will enlight us.
Hi @Hugo_Melo
Did you clear your cache template and your local browser cache?
Could you access your css file bu browser and check if changes were reflect on it?
Regards,
Israel Cefrin
Public Knowledge Project Team
Hi @Hugo_Melo
Just to double check, could you please open your Chrome Console log and paste/run this chunck:
$(“head”).append($(‘div.authors > strong:after { content: ", " }’));
It will have same effect edit CSS, but for dev purpose only in your local browser.
Regards,
Israel Cefrin
Public Knowledge Project Team
NateWr
December 7, 2017, 11:45am
8
Hi everyone,
This is a known issue with the Bootstrap3 theme. You can see the original filed issue here:
opened 05:47PM - 16 Nov 17 UTC
closed 09:24AM - 10 Apr 18 UTC
On the article details page, article authors are not separated (e.g. via a ',') … and multiple authors simply flow together in a single string.
This will likely be fixed with the next update to the theme. For any intrepid coders, this would be a good way to contribute!
1 Like
$(“head”).append($(‘div.authors > strong:after { content: ", " }’));
VM433:1 Uncaught SyntaxError: Invalid or unexpected token
Hi @Hugo_Melo
Please try this:
`$(‘div.authors > strong:not(:last)’).append(", “);”
If it works for you then you can adjust in your JS or CSS code.
Regards,
Israel Cefrin
Public Knowledge Project Team
`$(‘div.authors > strong:not(:last)’).append(", “);”
VM351:1 Uncaught SyntaxError: Unterminated template literal
Hi @Hugo_Melo
Code hasn’t keeping correct syntax when pasted here (discourse format issue), see raw code in this link:
But anyway, have you attempt implement it in CSS?
Regards,
Israel Cefrin
Public Knowledge Project Team
Now It worked perfectly!
The first code i have implemented in the css, but nothing happened. How i I put this code now?
Thx for everything!
Hi @Hugo_Melo
Search by “CSS select all but last element” and it will return some examples and you will be able to adjust it as your needs.
Regards,
Israel Cefrin
Public Knowledge Project Team