Jump to content

Extension talk:MasonryMainPage

About this board

Making a blog like display on the main page

10
Thibdx (talkcontribs)

Hi,

Does someone have an idea to generate a list of recent articles with images on the main page ?

Something like : http://blog.crea.coffee/ ?

Regards

Darenwelsh (talkcontribs)

If you have Extension:Semantic MediaWiki you could do something like the following:

{{#ask: [[:+]]
 | format = ul
 | sort   = Modification date
 | order  = desc
 | limit  = 5
 | searchlabel=
}}

But instead of an unordered list, you could use the template format and use the template to display the article's primary image and introduction.

{{#masonry-block: title = [[{{{1|Featured Article}}}]]
 | width = 1
 | color = blue
 | body  = 
<div style="float:left;margin:6px;">[[File:{{#show: {{{1}}} | ?Primary image}}|265px|link={{{1}}}]]</div>
{{Clear}}

{{#show: {{{1}}} | ?Overview }} 

('''[[{{{1}}} |Full Article...]]''')

}}

Thibdx (talkcontribs)

Thanks !

I made something similar using DPL3. The code may be a little dirty, it could be improved.

{{#dpl:
|namespace= 
|format   = ,¶¶<div type="container" style="width:332px;height:310px;border:solid 1px lightgrey">[[Fichier:%PAGE%.jpg|330px|link=%PAGE%]]<br/><div style="font-size:150%;padding:20px;border-top:solid 1px lightgrey">[[%PAGE%]]</div></div>,
|columns=3
|rowcolformat=width=100%
}}
Thibdx (talkcontribs)
Darenwelsh (talkcontribs)

I'm not familiar with DPL3, but looking at your example and tinkering with it on help.gamepedia.com it seems like you're constrained to blocks that are always 310px tall. Is that true? What I like about Masonry is that it sizes each block based on the content.

Thibdx (talkcontribs)

Actually. That's why I'm trying to get masonery wring instead. I am a bit amazed since sometimes styling load and sometime not...

Darenwelsh (talkcontribs)
Thibdx (talkcontribs)
Thibdx (talkcontribs)

The behaviour is very strange. When I update the page it works 5 times an them it does not work anymore. Maybe a problem of ressources ?

Darenwelsh (talkcontribs)

When I load https://crea.coffee/wiki/Test with the browser console open, I see several 404 errors. I wonder if those errors are preventing the "images ready" from reporting completion, which would then prevent the masonry script from running. Can you try to clear those error messages and see if the masonry blocks will work then?

Reply to "Making a blog like display on the main page"

CSS won't load after publishing until clearing the page cache

1
Zaaach (talkcontribs)

Title says it all. Before I edit a page, the css works fine. After I click publish, the css is not applied. Any workarounds for this?

Reply to "CSS won't load after publishing until clearing the page cache"
There are no older topics