HungerStruck / Web

:globe_with_meridians: Website for HungerStruck
0 stars 0 forks source link

Forum structure #69

Open skipperguy12 opened 8 years ago

skipperguy12 commented 8 years ago

We'll discuss this more, but I think we should have a sidebar of some kind for quick navigation. I know others wanted a more standard layout, we'll think of something. Whatever it is, we can't leave it as is.

For forum styling: Create a new layout, /views/layouts/mongoid_forums/application.haml. Content should be identical to the main application.haml.

We should use partials, specifically for sidebar if we have one and each post.

For pagination, @LeonKoole can rework css that https://github.com/NJayDevelopment/kaminari-views-bootstrap uses OR we can just style it directly and refactor it later into another gem.

We should not worry about admin page at all for now.

koole commented 8 years ago

The forums use a seperate css file?

skipperguy12 commented 8 years ago

@LeonKoole No, so essentially here's the setup:

Views for forums are by default in the engine. I've already copied them into this project, and they override the engine views.

So now, if we want to change any forum view you just head over to app/views/mongoid_forums/ and change the file you need. To style it, you can edit a view and specify css classes, etc, whatever you need and it will work without issue. So you can handle CSS wherever you want (in the assets, as you're already doing) and if you want to apply it to anything in forums, you just need to add it into the view.

The forum styling in my original comment was aimed at Trevor I think. The point of the app/views/layouts/mongoid_forums/application.haml is to override the engine layout, and replace it with one identical to our main layout (with your brand new header and footer). Without the new layout, forums would not have a header or footer.

About structure, I was thinking we put all forum partials in app/views/mongoid_forums/partials, kind of like how it's done in branch master. Here we'd put the haml for rendering 1 topic in a list, rendering the sidebar (if we have one), rendering moderator tools, etc. You can see an example of this in master, in app/views/mongoid_forums/partials. Just something I'd like done for increased organization.