[pmwiki-users] Skin for Mobile Browsers

Ben Stallings Ben at InterdependentWeb.com
Thu Oct 12 10:04:30 CDT 2006


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