LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Mobile (https://www.linuxquestions.org/questions/linux-mobile-81/)
-   -   mobile version website -- m.website.com (https://www.linuxquestions.org/questions/linux-mobile-81/mobile-version-website-m-website-com-948730/)

fhleung 06-05-2012 11:56 PM

mobile version website -- m.website.com
 
I having few websites which host by hosting company using PHP + MySQL
It is so common that website having mobile version.

The address link of mobile version website usually like this: m.website.com

I wondering howto develop a mobile version add on my current normal website?
Could anyone share their experience on making of mobile version?



found something after google:
Code:

<link href='css/480.css' media='only screen and (max-width: 480px)' rel='stylesheet' type='text/css'>
http://protofluid.com/#launchProtoFluid


source: http://mobile.smashingmagazine.com/2...-your-website/

fhleung 07-27-2014 08:30 PM

http://en.wikipedia.org/wiki/List_of..._pixel_density

sundialsvcs 07-30-2014 09:13 AM

When any browser talks to you, one piece of metadata that it provides is whether it claims to be a "mobile" device or not. (Incidentally, browsers on mobile devices normally allow you to switch that on or off ...)

When the "main" web site observes this metadata, it normally issues a redirect to the "m." site (which does the opposite).

Then, whether or not there are actually two separate services on the back-end providing the output in each case, the two follow different paths: most especially, the use of different templates to handle the generation of appropriate HTML.

In programming-language terms, I happen to like to define "the web service" as a programming-language object in three parts: (1) a base-class; (2) a "non-mobile" child class; and (3) a "mobile" one. Any of which might be further subdivided, e.g. to handle browser-differences or mobile-device differences. Where differences exist, the child-classes override the appropriate handlers while passing most of the actual work to their inherited parent. What I am consciously trying to do here is to factor-out the complexity that otherwise can very-easily permeate the source-code of the application.

I also define an object for "a request" (and "the response"), and each of these specifically has an attribute such as is_mobile, so that there is "one, and only one, Official Way™" to recognize the two cases in code that is common.

Remember that we certainly have not seen the end of the evolution of just what "a mobile device" means, nor of what such a thing can do. Design for the future, knowing that the future will very-quickly arrive.

fhleung 08-04-2014 09:50 PM

ratio of mobile device -- screen.height divide by screen.width
 
The above link got the info of screen size, dimension, pixel of many mobile devices.

What the following code do is:
By the height and width of the pixel screen size, then get the ratio/scale of mobile device, and so redirect to different .html/css file.


Please check, have a look anything wrong the following code. Simply copy and paste into a .html file

Code:

<script type="text/javascript">
if ( screen.height / screen.width = 1.3 ) { window.location = "m1.html"; }
else if ( screen.height / screen.width = 1.5 ) { window.location = "m2.html"; }
else ( screen.height / screen.width = 3.0 ) { window.location = "m3.html"; }
</SCRIPT>


fhleung 11-06-2014 02:07 AM

I got another question about web page, viewing in mobile machine / phone

The question is about text size viewing in mobile phone. The problem I having was, I can't view the text in scale. For example please visit this page: http://54205029.com/career

It just simply html text only page, like a line of text with no <BR> tag, can't format in the whole phone screen width, but it sepearate with servel lines... I mean it didn't use whole width.

fhleung 04-13-2015 03:28 AM

If I ask in another way...

for most of the mobile phone devices, the screen size is small anyway compare to desktop screen...
to read text on mobile phone devices screen, what is the css font size should be?

again, just please give me a font size number, so able to read text on mobile phone screen easily. thank you

joescript 09-19-2019 09:22 AM

New Slackware Website
 
Hello Fellow Slackers

I want to say thank you Slackware, for giving the skills and ability to continue using this awesome distro. I have learned a lot during the years, and a lot of it is because of Slackware. There is something to be said about Slackware that keeps drawing me back to this distro, and sometimes I feel like the industry can be overwhelming with changes or other things just for the sake of it, but can always return to Slackware and still feel at home. That being said, I would like to propose a website for Slackware. As you know, the site has not changed for years, and it's OK, but more people and users of all kind are using smart devices, tablets, touch, etc. and having a responsive website would help the project a lot. Also, the reason I propose this is because of a few things.

- one I want to bring more users to the community and help it grow more as it could reach out to more users.
- I am trying to break into development and want to contribute my time to a project I care and has a lot of history.
- with more users, pat could get more support than he needs.

I can break the phase it creating this, of course, all of this will be pro-bono and opensource. I was. I am thinking of creating the site on Github and create a organization. Once Pat and others are happy, I can transfer ownership to him or his choosing. This way, someone can audit the code and know its opensource. Let me know your thoughts.

davelady 10-15-2019 03:34 PM

what you are looking for is a css philosophy like bootstrap, where you can use a grid pattern to adjust content based upon the browsers display area.

This is much easier than redirects and other ways.

https://getbootstrap.com/

kimzeylouise 07-03-2020 12:00 AM

Need Help
 
I have facing the problem on my website it's mobile version is perfect but I have reload my main web page all the content is mixed how can I solve this.

ondoho 07-03-2020 03:34 AM

Quote:

Originally Posted by kimzeylouise (Post 6140809)
I have facing the problem on my website it's mobile version is perfect but I have reload my main web page all the content is mixed how can I solve this.

The exact same message as here, sans the link.

Necrobumping spammer.


All times are GMT -5. The time now is 10:59 PM.