Thread:Andrewds1021/@comment-45310000-20200417112550/@comment-9605025-20200421052032

Not yet for UCP wikis. I am not sure what you are thinking about with the div tag but there isn't a way to access the default link color. At least, not as far as I am aware. There might be some way to do it with JS that I just don't know about.

Which image style are you trying to imitate, the larger images under "Trending Pages" or the smaller images in the list? The two are done slightly different and so the solutions would differ as well. Both styles force the image into a 4:3 ratio but the larger image is made by cropping while the smaller one is done by stretching.

Here is what I see as potential solutions.

To replicate the smaller image behavior, you would need to use site CSS. You would probably also need to enclose the file link in a dummy tag so that the CSS has something to target. Obviously, this solution won't work until UCP wikis have site CSS enabled. None the less, I believe something along these lines would be the solution.

On Page In CSS To replicate the larger image behavior, you could hotlink the image. Doing this would allow you to deviate from the default URL to take advantage of Vignette.

To this end, I have created Module:HotlinkVignette. The module is 99% done but I have a ways to go with the test cases/debugging and documentation. It is based on a template I had previously created that accomplished the task using parser functions. Needless to say, the template version is far more messy than the Lua version; hence the conversion.

I do not have the final template version online (it is in a text file on my computer) but the documentation for a previous version can be found here. This should give you a sense of how to use the module; though some things have been slightly changed.

While UCP wikis can use Lua, there are two issues. First, UCP wikis are not yet able to conveniently import modules from the dev wiki. The workaround is to just copy-paste the module onto the wiki but then the wiki must maintain its own independent copy. I suppose that is more of an annoyance than an actual issue.

The second issue is that UCP wikis do not currently allow hotlinking. Rather than displaying the image itself, UCP wikis provide a link to the file. Also, when an image is used via hotlinking, it is not counted in the maintenance reports. For instance, if Example.png is used solely via hotlinking, then the wiki will report Example.png as being unused.