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
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
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...]]''') }}
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% }}
I tested your solution because it has the potential to make a better layout but the result appears to be very unstable. On some page loads I get a colored div and on some other i get no styling : https://crea.coffee/wiki/Chantier:Page_d%27accueil
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.
Actually. That's why I'm trying to get masonery wring instead. I am a bit amazed since sometimes styling load and sometime not...
Do you have https://github.com/enterprisemediawiki/ImagesLoaded installed? MasonryMainPage has a dependency on it.
Yes, it is very strange... It sometimes load but when I try a few minute after masonry effect is gone... I tried refreshing browser cache. Chrome, last version.
https://crea.coffee/wiki/Chantier:Page_d%27accueil#Test_of_Masonry_plugin
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 ?
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?
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?