HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Masonry/ "Best of..."-style view on all categories
egroeg
New
Hi there,
was wondering, how to set up something like the "Best of..." view in this very forum. (Dug up this older thread but seems like the user had a different question or is just inactive now.)
- Is this some hidden function in vanilla or is it CSS/JS only? (couldn't find a plug in either)
- Would it be possible to turn any category into a view like this? (not based on ratings but based on date)
As a side note: I am not a web developer and have limited CSS skills (JS close to none). 😬
thanks,
g
1
Comments
Hi ^^
The Best Of option you see here is the one that comes with Vanilla Cloud only, not the open source one.
But, you can find an addon called "YAGA" that mimics this feature for Vanilla Open Source. The up-to-date one is seen at https://vanillaskins.com/plugins.html#yaga (the one available on vanillaforums.com will not work correctly in 3.3)
thanks @K17 for the info. I am actually using the YAGA plugin already. unfortunatelly i can only access said "best of" page. I was hoping for a way to get a list of any category/ tag page in that same masonry view. but that's not possible, correct? (the hosted service of vanilla with almost 700$/month is sadly not an option for us.)
is there a way to change how post lists are displayed in general? would like to see the content including posted media of the first post in the list.
thanks
That's no function of the hosted version either.
You can format lists any way you want with css. Showing discussion information on list pages needs a plugin. Both requirements shouldn't be too complicated. The problem would be to show images in a special way. If you can forget about that, the solution is quite simple. Do you have a custom theme? I think it would best fit there.
If not, I threw together a quick plugin. As always the css could be improved, I'd say.
Please give feedback and I will consider uploading it here to the addons section.
I threw together a quick plugin
thanks @R_J this is great! probably have mentioned this before, but u r a rockstar. 🤟😁
works like a charm. am using the Keystone theme with a few CSS tweaks.
Regarding feedback for a plugin upload:
!important
to your CSSThanks again. Above are only nice-to-have suggestions. But the current version works fine already.
"mobileFriendly": false
which should make Vanilla ignore that plugin when page is viewed from mobile. Obviously that doesn't work anymore...Do you have a GitHub account and can you create a pull request for the media query change?
1 - bluring content or just cut it off after x lines/symbols as know of other CMS excerpt function?
2 - nice
3 - yeah, it can work either way, I guess. but it's just convenient on pages where old posts/images should appear at the bottom and new ones at the top. e.g. on this portfolio page where old projects should not appear second in line at the top. Got this example from https://masonry.desandro.com/ which seems like a nice library(?).
4 - yes, apparently there is an entry in _lists.scss (
/themes/keystone/design/custom_dark.css?v=1.0.0
) according to the Firefox inspector. but I have no idea how to edit those css files.Do you have a GitHub account and can you create a pull request for the media query change?
...have an account but have no idea how GitHub works or a "pull request". 🙈
4. Never change css like : overwrite your own rules. YOu can either use plugin CSSEdit pockets plugin insert custom css rules. In css, selector has to be "overwritten", which in the end means you simply have to use the same selector in your css and you css has to be applied after that rule. Look here (I've changed it in the css in my repo):
If you have changed any css already in the Keystone theme folder, I strongly advice to put those changes into the CSSEdit plugin.
2. That Comments button has been easy.
1. Cutting off is not as easy as it sounds: it would mean cutting off html which is not trivial when cutting of is right behind some opened and unclosed tags. Simply not showing content is easy, too. Having some switch to reveal it is far more complicated. I would need to have something that determines if content is hidden or not. Implementing that would require advanced JavaScript I guess.
The beauty of such a plugin for me has been its simplicity. With the requirement to expand content its complexity grows. Not sure if I implement that. In my opinion reading a discussion in that format isn't fun at all. A user should know already if he is interested in visiting that discussion
4 - ah, got it. next fix will be through CSSEdit. :)
EDIT: btw. the last-child needs to be in there too. sorry, didn't see that before.
2 - kool! updated the plugin. thanks.
but seems like the comments link is not working for me?
the button links to
/discussion/comment/#Comment_
(the ID is missing, right?)but Vanilla uses the following for permanent links, i think?
/discussion/comment/123/#Comment_123
I've added a css rule for the last-child. But I don't like that dark sub theme, therefore I have to confess that I haven't tested this combination.
Yes, I was too hasty with that comment links. I've fixed that