Page 1 of 1

2k11: adjust sidebar width?

Posted: Thu May 17, 2012 8:38 am
by chris_goe
Hi,

I really like the 2k11 and already use it, but I find the sidebar (on the right, with the calendar, the category list and HTML nuggets installed) a bit too wide.

I'm a total CSS noob, is there anyone who can tell me which knob to tweak in templates/2k11/ to make the sidebar smaller (and more space / line-width for the actual content).

Thanks!
unnecessary linebreaks
unnecessary linebreaks
blog-1.png (52.83 KiB) Viewed 6488 times

Re: 2k11: adjust sidebar width?

Posted: Thu May 17, 2012 9:34 am
by Timbalu
This is easy to solve. Use the 2k11 user.css Generator at http://yellowled.github.com/ to adjust the content/sidebar width and enable the user.css use in your 2k11 config.

Additional note:
If you have linebreaks in your content which you did not write into and don't want them there, this might be the result of the default event plugin "nl2br", which just adds a "<br />" after each Cursor ENTER-linebreak of your entries content, e.g. in html structured entries. This is also easy to avoid, if you know about this behaviour.

Re: 2k11: adjust sidebar width?

Posted: Thu May 17, 2012 9:47 am
by chris_goe
Timbalu wrote:This is easy to solve.
Indeed, it was! Thanks for the hint, yellowled.github.com did the trick!

Regarding the linebreaks: no, nl2br is not installed. When I switched to 2k11 the <pre>-formatted parts in older entries were wrapped in "unusual" places because the new layout was too narrow to display them properly. Now with "#sidebar_right { width: 25%; }" it looks kinda normal again.

Thanks again for the speedy response!

Re: 2k11: adjust sidebar width?

Posted: Thu May 17, 2012 9:53 am
by Timbalu
I know that was not your problem. But to say nl2br is installed in every case, as it is default... until you have disabled it, which is not recommended, as it has influences to nearly every databased output.

Re: 2k11: adjust sidebar width?

Posted: Thu May 17, 2012 10:24 am
by chris_goe
Hm, I think I have disabled nl2br a long time ago. I remember it looked weird for certain entries. I just started manually adding <br> tags where needed. When I enable nl2br now, all the <br> tags are doubled in older entries so I've disabled it again :-)

Re: 2k11: adjust sidebar width?

Posted: Thu May 17, 2012 11:32 am
by Timbalu
Well, I understand, thats odd.
But nl2br influences at least entries, extended entries, staticpages, sidebar "HTML Nugget" and comments. Disabling it in total isn't good - you should turn it on again and disable only the entry parts in its config (if you have to).

For all others, with Serendipity 1.7 extended nl2br plugin you will be able to use some easy no-br clasps to avoid newline breaks in entry parts.

Re: 2k11: adjust sidebar width?

Posted: Thu May 17, 2012 11:46 am
by onli
Ian, it's perfectly fine to disable nl2br. It only makes newlines visible. That's not a necessary feature, as you can do that yourself (or just use textile). The op already stated he understands what he is doing.