dokuwiki-template-ad-hominem icon indicating copy to clipboard operation
dokuwiki-template-ad-hominem copied to clipboard

Links to PDF media files look bad since 2024-09-24

Open s09bQ5 opened this issue 3 months ago • 5 comments

Since the 2024-09-24 release css/links.less contains

a.media:link,
a.media:visited {
	display: block;
	line-height: 0;
}

This breaks the formatting of several pages in our wiki where links to PDFs (and some other non-image formats) are inline in the text, because now these links are always displayed on a separate line. Do we really need to use display: block on all media links? The DokuWiki default template doesn't.

s09bQ5 avatar Aug 27 '25 12:08 s09bQ5

Hi and thanks for reporting this. Could you send me a link to a page where this happens? That should make it easer for me to examine this.

saschaleib avatar Aug 27 '25 13:08 saschaleib

Unfortunately not, because our wiki is not public.

A simple example would be

Some text taking about a {{document.pdf|document}}.

With old versions of the template and with the default template the whole sentence would be on one line. But with the current version of the template there is a line break before and after the link.

s09bQ5 avatar Aug 27 '25 13:08 s09bQ5

I checked it on my dev machine, and changed the display setting to "inline-block", which should make this work. It also doesn't seem to have adverse effects on other media links.

Could you install the current "next" branch of the template to see if that works for you?

Simply go to the "Manual install" tab of the extension manager, past the following address in the URL field: https://github.com/saschaleib/dokuwiki-template-ad-hominem/archive/refs/heads/next.zip – please make sure to check the "Override existing files" checkbox, and then click "Install".

Should there be any problems with it, you can always roll back by clicking "Re-Install" on the entry in the "Installed templates" tab. But in my tests this should be safe.

saschaleib avatar Aug 27 '25 13:08 saschaleib

Yes, that works, thanks!

s09bQ5 avatar Aug 27 '25 13:08 s09bQ5

Excellent. I hope I can make that part of the next release – I just want to make one other fix which I can't test very well here (improving the file upload field) so I can only work on it when I'm back home (I'm on holidays now :-)

saschaleib avatar Aug 27 '25 14:08 saschaleib