2013-04-11 02:24:08 -04:00
|
|
|
<%- unless SiteCustomization.override_default_style(session[:preview_style]) %>
|
2013-12-11 11:17:55 -05:00
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
(function() {
|
2013-12-12 23:17:05 -05:00
|
|
|
var h = document.getElementsByTagName('html')[0];
|
|
|
|
window.isMobileView = (localStorage && localStorage.mobileView) ? (localStorage.mobileView === 'true') :
|
|
|
|
Modernizr.mq("only screen and (max-width: 480px), only screen and (max-device-width: 480px)");
|
2013-12-11 11:17:55 -05:00
|
|
|
|
|
|
|
h.className += (isMobileView ? ' mobile-view' : ' desktop-view');
|
2013-12-12 23:17:05 -05:00
|
|
|
if(isMobileView) {
|
|
|
|
document.write(<%= stylesheet_links(:mobile).inspect.html_safe %>);
|
|
|
|
} else {
|
|
|
|
document.write(<%= stylesheet_links(:desktop).inspect.html_safe %>);
|
|
|
|
}
|
2013-12-11 11:17:55 -05:00
|
|
|
})();
|
|
|
|
</script>
|
|
|
|
|
2013-04-11 02:24:08 -04:00
|
|
|
<%- end %>
|
2013-02-11 06:41:23 -05:00
|
|
|
|
2013-12-11 11:17:55 -05:00
|
|
|
<noscript>
|
|
|
|
<%= stylesheet_link_tag "desktop" %>
|
|
|
|
</noscript>
|
|
|
|
|
2013-05-02 03:22:27 -04:00
|
|
|
<%- if staff? %>
|
2013-04-11 02:24:08 -04:00
|
|
|
<%= stylesheet_link_tag "admin"%>
|
|
|
|
<%-end%>
|