Create a mobile css manifest

This commit is contained in:
Neil Lalonde 2013-08-27 16:40:30 -04:00
parent 9efa29e688
commit 3cfc9a7bba
7 changed files with 32 additions and 24 deletions

View File

@ -1,9 +0,0 @@
{{#if postStream.loaded}}
<div class='container'>
Mobile Topic Page Loaded!
</div>
{{else}}
<div class='container'>
<div class='spinner'>{{i18n loading}}</div>
</div>
{{/if}}

View File

@ -1,17 +1,4 @@
// Manifest // Manifest
// //
//= require ./vendor/normalize //= require common
//= require ./vendor/bootstrap
//= require ./foundation/base
//= require ./vendor/font_awesome/font-awesome
//= require ./vendor/chosen
//= require_tree ./components
//= require_tree ./application //= require_tree ./application
//= require ./foundation/helpers
<%
# TODO this is very tricky, we want to add a dependency here on files that may not yet exist
# otherwise in dev we are often stuck nuking the tmp/cache directory
DiscoursePluginRegistry.stylesheets.each do |css|
require_asset(css)
end
%>

View File

@ -0,0 +1,16 @@
// Manifest
//
//= require ./vendor/normalize
//= require ./vendor/bootstrap
//= require ./foundation/base
//= require ./vendor/font_awesome/font-awesome
//= require ./vendor/chosen
//= require_tree ./components
//= require ./foundation/helpers
<%
# TODO this is very tricky, we want to add a dependency here on files that may not yet exist
# otherwise in dev we are often stuck nuking the tmp/cache directory
DiscoursePluginRegistry.stylesheets.each do |css|
require_asset(css)
end
%>

View File

@ -0,0 +1,9 @@
// Manifest
//
//= require common
//= require_tree ./mobile
//
// For now, include all desktop css. But once we add files in ./mobile that override
// files in ./application, we'll need to only include the files we need:
//
//= require_tree ./application

View File

View File

@ -1,8 +1,13 @@
<%- unless SiteCustomization.override_default_style(session[:preview_style]) %> <%- unless SiteCustomization.override_default_style(session[:preview_style]) %>
<%=stylesheet_link_tag "application"%> <% if mobile_view? %>
<%= stylesheet_link_tag "mobile" %>
<% else %>
<%= stylesheet_link_tag "application" %>
<% end %>
<%- end %> <%- end %>
<%- if staff? %> <%- if staff? %>
<%= stylesheet_link_tag "admin"%> <%= stylesheet_link_tag "admin"%>
<%-end%> <%-end%>
<%=SiteCustomization.custom_stylesheet(session[:preview_style])%> <%=SiteCustomization.custom_stylesheet(session[:preview_style])%>