Only mobile view

GK User
Mon Oct 13, 2014 4:32 pm
Hi there,

is there a way to switch the template to "only mobile view"?

I mean, if you visited the website by a pc or mac you will redirected to a info site (Website only available for mobile devices).
If you visit the website with your mobile browser you will see the mobile view of the template.

Regards Manuel
User avatar
Fresh Boarder

GK User
Mon Oct 13, 2014 4:58 pm
Hi,
by default no, but you can use additional solutions like: MobileKIT plugin
User avatar
Platinum Boarder

GK User
Mon Oct 13, 2014 5:00 pm
or set very low screensize settings in template settings (Layout tab) - this should work is theory.
User avatar
Platinum Boarder

GK User
Tue Oct 14, 2014 4:24 pm
Thank you...

but can you tell me which file in the template detects the browser and decide which css to use ?
User avatar
Fresh Boarder

GK User
Tue Oct 14, 2014 4:40 pm
In your template code you should find something like this
Code: Select all
<link rel="stylesheet" href=".templates/gk_john_s/css/small.desktop.css" media="(max-width: 1400px)" />
<link rel="stylesheet" href="templates/gk_john_s/css/tablet.css" media="(max-width: 640px)" />
<link rel="stylesheet" href="templates/gk_john_s/css/small.tablet.css" media="(max-width: 480px)" />
<link rel="stylesheet" href="templates/gk_john_s/css/mobile.css" media="(max-width: 320px)" />

of course with steak name,
and it check screen size - when is smaller it'll load & use .... mobile/tablet .css

Real source code is here: gk_steakhouse\lib\framework\helper.layout.php
there is also some code for menu.
User avatar
Platinum Boarder


cron