ror-community / ror-site

ROR main site
https://ror.org
MIT License
3 stars 5 forks source link

Create a secondary page layout #55

Closed mariagould closed 1 year ago

mariagould commented 2 years ago

The ROR website has a few different page layouts: homepage, regular page, recent blog posts, and blog page. I would like to have an additional layout option for the regular pages that website editors can choose from. This would look something like main text on the left-hand two-thirds of the page and graphics or callouts in the right-hand third.

Screen Shot 2022-07-14 at 8 19 21 AM

cazinc commented 2 years ago

Hi @mariagould we've rejigged the existing columns shortcakes a bit to enable this for you, it's a bit more flexible than a secondary template. This is committed to the Summer-2022-updates branch.

You can see it in action on http://localhost:1313/test/ if you build this locally, and if you look at ../content/test/_index.md you can see how it's implemented with shortcodes.

I think the primary advantages of this model for you are probably that you can use it anywhere, so on a Blog post too, and also that you can more easily control alignment because you can setup "rows". If the whole page were just 2 columns, it would nearly impossible to line up items (like images) in the right column with related text in the left.

Just let me know if any thoughts or questions on this.

cazinc commented 2 years ago

Also - sorry, forgot to mention! - we've moved the site to a wider width in order to allow for the new 60/40 columns. Before the main content was constrained to the left 2/3rds of the page, l think perhaps because it was a pre-existing theme that expected some subnav at right. We've made it full width so everything is a bit wider, and pages are a bit shorter. As above, let me know what you think.