[pmwiki-users] Gemini skin and extendedmarkup (selfreference vs selflink)
Hans
design at flutesong.net
Thu Apr 14 14:22:05 CDT 2005
Thursday, April 14, 2005, 6:44:20 PM, Patrick wrote:
> On Thu, Apr 14, 2005 at 06:02:51PM +0100, Hans wrote:
>> Both are not styled by the GeminiTwo skin. If you use extendmarkup.php
>> you could change the styling there (ca line 84). I don't understand
>> why you say the selflinks are not styled correctly.
> Note that for easier upgrading, one can also place local CSS styles
> in pub/css/local.css (create the pub/css/ directory if it doesn't
> already exist).
thanks Pm!
I looked at selflink vs selfreference more closely:
extendmarkup.php makes $LinkPageSelfFmt into a bold <b>tag,
which does not go well in gemini skin's sidebar, since all the
list-items are links and <a>tags and styled as such.
So for the sake of the sidebar it is better to disable in
extendmarkup.php (ca line 476):
$LinkPageSelfFmt = "<b class='selflink'>\$LinkText</b>";
but that also effects the selflinks in the page content.
So I came up with the following solution:
In local/config.php place after calling extendmarkup.php
# changes to extended markup:
$LinkPageSelfFmt = "<a class='selflink'>\$LinkText</a>";
$HTMLStylesFmt[] = "
a.selflink { color:#000; text-decoration:none }
#sidebar a:hover.selflink {background:none; color:#000}
";
This redefines $LinkPageSelfFmt to nearly the pmwiki default, but
leaves out the href=... bit, so the link does not point to anything
anymore, but still is an anchor and gets treated the same in the
sidebar as the other <a>tags. The subsequent style definition will
hide the link character and makes it appear as black text.
Question about this:
Perhaps
$LinkPageSelfFmt = "<a class='selflink'>\$LinkText</a>";
has an advantage over
$LinkPageSelfFmt = "<a class='selflink' href='\$LinkUrl'>\$LinkText</a>";
or are there any problems with this?
Best,
~Hans
More information about the pmwiki-users
mailing list