forked from I2P_Developers/i2p.www
Use progressive enhancement instead of graceful degradation for mobile support
The default.css for duck's theme is the same content as the original theme, with some attributes removed or tweaked slightly. The original theme CSS overrides almost all of this file leaving the desktop style unchanged. Once the mobile CSS is more complete and the common CSS is identified, it can be removed from the desktop CSS. The mobile dropdown menu was obtained from http://astuteo.com/mobilemenu and as per the license on the page: "... it’s entirely free for you to download and use, modify for your own applications, or otherwise make millions off of."
This commit is contained in:
@@ -8,13 +8,17 @@
|
||||
<meta name="description" content="{% block metadesc %}{% endblock %}">
|
||||
{%- endif %}
|
||||
<link rel="canonical" href="{{ canonical() }}" />
|
||||
{% if g.exttheme %}<link rel="stylesheet" type="text/css" href="{{ g.exttheme }}" title="External theme" />{% else -%}
|
||||
<link media="Screen" rel="stylesheet" type="text/css" href="{{ url_for('static', filename='styles/' + g.theme + '/style.css') }}" title="{{ g.theme }}" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=2.0, user-scalable=yes" />
|
||||
<link media="handheld, only screen and (max-width: 480px), only screen and (max-device-width: 480px)" rel="stylesheet" type="text/css" href="{{ url_for('static', filename='styles/' + g.theme + '/mobile.css') }}" />
|
||||
{% if g.exttheme %}<link rel="stylesheet" type="text/css" href="{{ g.exttheme }}" title="External theme" />{% else -%}
|
||||
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='styles/' + g.theme + '/default.css') }}" media="screen, handheld, print, projection" />
|
||||
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='styles/' + g.theme + '/mobile.css') }}" media="screen and (min-device-width:320px) and (max-width:767px)" />
|
||||
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='styles/' + g.theme + '/desktop.css') }}" title="{{ g.theme }}" media="screen and (min-device-width:768px) and (min-width:768px), print, projection" />
|
||||
<!--[if IEMobile]>
|
||||
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='styles/' + g.theme + '/mobile.css') }}" media="screen" />
|
||||
<![endif]-->
|
||||
<!--[if lt IE 9]>
|
||||
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='styles/' + g.theme + '/desktop.css') }}" title="{{ g.theme }}" media="all" />
|
||||
<![endif]-->
|
||||
{%- endif %}
|
||||
<link rel="shortcut icon" type="image/x-icon" href="{{ url_for('static', filename='favicon.ico') }}" />
|
||||
<meta name="robots" content="NOODP" />
|
||||
|
Reference in New Issue
Block a user