coderedcms
coderedcms copied to clipboard
Default template changes
After having worked with a few different sites now, I think that our default article_page.html
template is a bit too styled. It should probably be more plain and include less custom css in the way of the cover image, article body etc.
Since all pages have a cover_image
attribute, the best thing to do would probably be to put that in web_page.html
, web_page_notitle.html
, or possibly base.html
(although maybe not in base, as base is kind of ideal as a bare-bones template for doing whatever you want).
That would make the article page template a little less unique, and make all page templates a bit more common, which seems to be favorable when doing custom designs.
Requirement: All templates provided by coderedcms should have each individual element inside a {% block %}
for easy overriding in client projects (or future themes).
I agree the article_page.html template
it is too styled as is, but there are also problems with it.
- The container used is transparent. It really needs
class="bg-white"
added so the article is readable. - If a cover image is defined and a responsive row is used inside the body, the row gets rendered with a box-shadow. This is inherited from
.codered-article.has-img .container
I think that using cover-image as the image associated with the article when listed in an article index is wrong. It needs a separate image for that purpose. These things are, of course, easily fixed by overriding the template but ought to be resolved for a 1.0 release IMHO.
I agree with your points about the design. It should be changed and simplified.
Regarding the preview image, we already have a field for OpenGraph image under SEO settings tab that gets rendered in a <meta>
tag for purposes of social media previews, etc. So you could definitely modify/override the article index page or latest pages block HTML templates in your project to use that instead of the cover image!