Discourse Sidebar Blocks


(Cheng Trang) #61

Layout error with category box style


(Penar Musaraj) #62

Are you sure this is related to the sidebar blocks plugin? I don’t see the plugin in your screenshot, maybe a larger screenshot might help. Or a URL to the page.


(Cheng Trang) #63

Here…

Can you see here https://xeom.info/c/xe-om-cong-nghe


(Penar Musaraj) #64

Yeah, I see the issue better now. So, the plugin doesn’t really cause any problems directly, but the problem arises from the narrow main container area, and the fact that the logos in that group have a set height, and no max-width. Some logos (Uber, T.net) are too wide.

You can fix this by changing the height of these logos with css:

.category-boxes .category-box .logo {
    height: 25px;
}

(Cheng Trang) #65

Yes, thank so much…i have a question.
I want input code Google adsense into sidebar custom content, but it not display.
How can do it?
Thank again :*


(Tom Ruh) #66

As is mentioned here. This plugin does not work with mobile. However, it still reserves that margin on mobile. Is there a way to disable it for mobile completely

?


(Evgeny) #67
  1. Remove the second option css in your topic.

  1. Add the following code to the design theme (css) or sidebar.scss:
html.mobile-view {
     .sidebar {display: none;}
}

Try to select css to the next two lines. You can do absolutely anything you want.

2


(Tom Ruh) #68

Perfect man, thank you


#69

A collapse button of some sort would be a wonderful addition to this plugin!


(Penar Musaraj) #70

That’s interesting. Do you mean a button to collapse the whole sidebar, or a button to collapse each block in the sidebar?


#71

I meant a button to collapse the whole sidebar (a small icon like an arrow could work), since collapsing each block individually does not grant any additional space


(James) #72
  1. There’s an issue where new topics created don’t show up in the latest posts/replies plugin.

  2. Also, for some reason people see only 2 latest topics. This started to happen just today. Please fix :slight_smile:


(Per Torstensson) #73

Awesome plugin, much appreciated!

Really like how it is put to use at peshkupauje.com and have two questions on how it is configured there:

  1. Multiple columns - How do you achieve multiple columns for sidebar blocks?
  2. Topics previews - How do you render topic previews in a sidebar block?

Also, would it be possible to render the topic author on the listed topics in a sidebar block?


(Per Torstensson) #74

Additionally, it seems you don’t get the header/category name when adding sub-category slugs, i.e. category-name/sub-category-name to the sidebar. The posts render seemingly correct, but the title is empty.


(Penar Musaraj) #75

I did this a while ago, and it’s in a branch of the repository at https://github.com/pmusaraj/discourse-sidebar-blocks/tree/two-columns

That branch does both the two-column layout and adds a widget with thumbnails. See this widget for the thumbnails.

For the subcategories, you are likely right, this hasn’t been tested with subcategories.


#76

Thank you for your work - is there a way to display latest post from a wordpress blog on the sidebar?


(Penar Musaraj) #77

Not that I know of, no.


#78

Thank you! Also I’ve noticed a “bug”:

When I set a “thin” banner (say 120x600px), the width of the sidebar doesn’t adjust and there’s a lot of wide space around the banner


(Penar Musaraj) #79

That’s normal. The sidebar’s width is set as a percentage, so you might have to play with the SCSS values in a theme component to get your desired width. This is the SCSS file you would need to override.