Template talk:RandomEvent

From NeoDex
Jump to navigation Jump to search

Wrappable & other things[edit]

Today I made this template wrappable. This means that if an article image is floating to the left or the right of it, it will fit in the remaining space (if your window is wide enough) or move to the line below the image (if it isn't). Before, they just sort of super-imposed on top of each other. To do this, I changed it from using absolute position (which is also how it is done on the Neopets site) to using negative margins.

I also used the pointers-events property (which I don't think I've ever used before) so that you a) can click through Shh.png and, for example, highlight the text, b) don't end up visiting the image file page for Shh.png or the background. You can still click on the image for that particular random event (e.g. Image:Pant devil.png) to be taken to that image file page.

Since we now have all the random event background images uploaded onto the Neodex, I'm thinking about making it so that you can set the event background image in a more user-friendly way than remembering the image name - e.g. BGImage=moltara 3 gets translated automatically into Image:Bg moltara3.jpg. If I implement this, I will make sure that it still accepts entering the entire file url to continue to support pages that already use the template. --Macbeth (talk) 20:48, 29 October 2014 (UTC)