[pmwiki-users] Skin for Mobile Browsers
Ian Barton
lists at manor-farm.org
Thu Oct 12 12:02:16 CDT 2006
Thanks that's very useful. My wiki has several groups, so I want a short
horizontal list of links at the top of the site.
I have managed to get the sidebar to appear at the top. What I need to
find out now is how to detect which skin is being used so I can choose
horizontal or vertical text for the menu in the Sidebar wki page. Sort of:
if skin = grease
* Menu item 1
* Menu item 2
else if skin = mobile
Menu item1 Menu item2
Ian.
> Ian Barton wrote,
>> Has anyone got a skin suitable for a mobile browser? I want to be able
>> to read one of my sites on a mobile phone. Main requirements are:
>>
>> Minimal top bar.
>> No side bar.
>> Decent text formatting when the browser window is very narrow (about 240
>> pixels).
>
> I've got an extremely minimal skin on my http://benstallings.name/ wiki.
> The colorful border is just a style on the <body> tag; below is the
> template in its entirety. The extra links in the pagegroup div are
> necessary :
>
> <!DOCTYPE html
> PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html>
> <head>
> <title>$WikiTitle | {$Group} / {$Title} $Action</title>
> <meta http-equiv='Content-Style-Type' content='text/css' />
> <link rel='stylesheet' href='$SkinDirUrl/benstallings.css'
> type='text/css' />
> <!--HeaderText-->
> </head>
> <body>
> <div id='wikititle'>
> <div class='pagegroup'>
> <a href='{$ScriptUrl}/{$Group}'>{$Group}</a> /
> </div>
> <h1 class='pagetitle'>{$Title}</h1>
> </div>
> <!--PageText-->
> </body>
> </html>
>
> Of course I have to enter ?action=edit and so on from the address line,
> but I'm guessing you probably don't want to edit pages from your mobile
> phone anyway.
>
> You might consider putting a line in config.php to assign different
> skins based on browsers -- when it sees your phone's browser, it uses
> the minimalist skin, otherwise it uses something more capable.
>
> Can I just say that I love how easy PmWiki is to skin? Try doing a
> template like this in Joomla without pulling your hair out. --Ben
More information about the pmwiki-users
mailing list