View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 2 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Sun Aug 30, 2009 6:50 pm 
Offline
Joined: Tue Oct 17, 2006 10:03 pm
Posts: 49
It's a pretty simple change to make, and makes the default page much more readable on any device with a width less than 480px, and the iPhone in particular (the "viewport" meta tag only works on iPhone Safari). Just edit the file index.html, and after this line (near the top):

Code:
<title>LinHES R6</title><link href="KnoppMyth.css" rel="stylesheet" type="text/css"></head>


add these lines:
Code:
<link media="only screen and (max-device-width: 480px)" href="iphone.css" type="text/css" rel="stylesheet" />
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />


Now create a file named iphone.css in the same directory (/data/srv/httpd/htdocs), with this in it:
Code:
body {
   background: #fff;
   font-family: Helvetica, Arial, sans-serif;
   margin: 0;
   padding: 0;
    width: 100%;
}

p {
   font-size: 1em;
}

p.headerimage {
   font-size: 2em;
}

img {
   width: 100%;
   height: auto;
}

table {
    width: 320px;
}


Now try it on your phone, and you should see that it's readable without needing to scale it down to a tiny size. All this is doing is telling users' web browsers that if their max browser width is less then 480px, then load the "iphone.css" stylesheet in addition to any other stylesheets that have been loaded. There's also the "viewport" meta tag, which tells the iPhone's Safari browser not to scale the page at all (default and max scaling = 1.0). You could redefine any elements you want in iphone.css, this one is minimal.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 30, 2009 7:45 pm 
Offline
Joined: Fri Oct 20, 2006 12:04 pm
Posts: 905
Location: LA, CA
Hey this is GREAT! Thanks.

Can anything be done to make the mythweb interface more iPhone friendly?

Any thoughts on streaming LiveTV to iPhone? (personally a killer app)


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 16 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu