diff options
author | Meitar Moscovitz <meitarm@gmail.com> | 2009-02-11 03:03:16 +1100 |
---|---|---|
committer | Meitar Moscovitz <meitarm@gmail.com> | 2009-02-11 03:03:16 +1100 |
commit | c9e8b1e5c380904e479927e2f24754d8709f590e (patch) | |
tree | 252c9c239ee896753e4a1bef9da71260965085a8 /lib/action.php | |
parent | 47a5d2b7f06cd1612734c47ad21fc397bbff5276 (diff) |
Add streamlined mobile device-friendly styles when enabled in config.
A new mobile-specific style sheet is added and loaded only if the
`$config['site']['mobile']` configuration variable is set to true.
Diffstat (limited to 'lib/action.php')
-rw-r--r-- | lib/action.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/action.php b/lib/action.php index ce92addf5..ce37f4760 100644 --- a/lib/action.php +++ b/lib/action.php @@ -170,6 +170,13 @@ class Action extends HTMLOutputter // lawsuit } $this->comment('[if IE]><link rel="stylesheet" type="text/css" '. 'href="'.theme_path('css/ie.css', null).'?version='.LACONICA_VERSION.'" /><![endif]'); + if (common_config('site', 'mobile')) { + $this->element('link', array('rel' => 'stylesheet', + 'type' => 'text/css', + 'href' => theme_path('css/mobile.css', 'base') . '?version=' . LACONICA_VERSION, + // TODO: "handheld" CSS for other mobile devices + 'media' => 'screen and (max-device-width: 480px)')); // Mobile WebKit + } } /** |