From aaf9904cb35a520addb5ffff10845d9b7c1bcdba Mon Sep 17 00:00:00 2001 From: Jasper van Merle Date: Sun, 7 Jul 2019 15:21:29 +0200 Subject: [PATCH] Remove redundant server-side styling --- lib/app.rb | 12 ------------ views/index.erb | 4 ++-- views/other.erb | 4 ++-- 3 files changed, 4 insertions(+), 16 deletions(-) diff --git a/lib/app.rb b/lib/app.rb index 4e2b749c..c89328ad 100644 --- a/lib/app.rb +++ b/lib/app.rb @@ -209,18 +209,6 @@ class App < Sinatra::Application @app_size ||= memoized_cookies['size'].nil? ? '20rem' : "#{memoized_cookies['size']}px" end - def app_layout - memoized_cookies['layout'] - end - - def app_theme - @app_theme ||= memoized_cookies['dark'].nil? ? 'default' : 'dark' - end - - def dark_theme? - app_theme == 'dark' - end - def bypass_cache? !memoized_cookies['bypassCache'].nil? end diff --git a/views/index.erb b/views/index.erb index 8e42c3c7..c161fe3c 100644 --- a/views/index.erb +++ b/views/index.erb @@ -1,5 +1,5 @@ - + @@ -32,7 +32,7 @@ <%= stylesheet_tag 'application' %> -> + <%= erb :app -%> <%= javascript_tag 'application', asset_host: false %> diff --git a/views/other.erb b/views/other.erb index ee9b8de1..63577029 100644 --- a/views/other.erb +++ b/views/other.erb @@ -1,5 +1,5 @@ - + @@ -13,7 +13,7 @@ <%= stylesheet_tag 'application' %> - data-doc="<%= CGI::escape_html @doc.to_json %>"> + <%= erb :app -%> <%= javascript_tag 'application', asset_host: false %><% unless App.production? %>