aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/views/layouts/default.html.erb17
-rw-r--r--config/general.yml-example3
-rw-r--r--lib/configuration.rb1
3 files changed, 17 insertions, 4 deletions
diff --git a/app/views/layouts/default.html.erb b/app/views/layouts/default.html.erb
index 93b3c3698..a6724468e 100644
--- a/app/views/layouts/default.html.erb
+++ b/app/views/layouts/default.html.erb
@@ -40,7 +40,9 @@
<% if @no_crawl %>
<meta name="robots" content="noindex, nofollow">
<% end %>
-
+ <% if AlaveteliConfiguration::responsive_styling || params[:responsive] %>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <% end %>
<%= render :partial => 'general/before_head_end' %>
</head>
<body class="<%= 'front' if params[:action] == 'frontpage' %>">
@@ -84,7 +86,11 @@
</span>
<span class="popup-close"><a href="#top" ><%= _('Close') %></a></span>
</div>
- <%= render :partial => 'general/header' %>
+ <% if AlaveteliConfiguration::responsive_styling || params[:responsive] %>
+ <%= render :partial => 'general/responsive_header' %>
+ <% else %>
+ <%= render :partial => 'general/header' %>
+ <% end %>
<div id="wrapper">
<div id="content">
<% if flash[:notice] %>
@@ -100,8 +106,11 @@
<div style="clear:both"></div>
</div>
</div>
-
- <%= render :partial => 'general/footer' %>
+ <% if AlaveteliConfiguration::responsive_styling || params[:responsive] %>
+ <%= render :partial => 'general/responsive_footer' %>
+ <% else %>
+ <%= render :partial => 'general/footer' %>
+ <% end %>
</div>
<div id="link_box"><span class="close-button">X</span>
diff --git a/config/general.yml-example b/config/general.yml-example
index ec9bdb6b5..6e223406e 100644
--- a/config/general.yml-example
+++ b/config/general.yml-example
@@ -253,3 +253,6 @@ SHARED_DIRECTORIES:
# user via the user admin page.
ALLOW_BATCH_REQUESTS: false
+
+# Should we use the responsive stylesheets?
+RESPONSIVE_STYLING: false
diff --git a/lib/configuration.rb b/lib/configuration.rb
index bd705b777..d525bf712 100644
--- a/lib/configuration.rb
+++ b/lib/configuration.rb
@@ -58,6 +58,7 @@ module AlaveteliConfiguration
:RECAPTCHA_PUBLIC_KEY => 'x',
:REPLY_LATE_AFTER_DAYS => 20,
:REPLY_VERY_LATE_AFTER_DAYS => 40,
+ :RESPONSIVE_STYLING => false,
:SITE_NAME => 'Alaveteli',
:SKIP_ADMIN_AUTH => false,
:SPECIAL_REPLY_VERY_LATE_AFTER_DAYS => 60,