Remove redundant server-side styling

pull/1022/head
Jasper van Merle 6 years ago
parent 35dd78f191
commit aaf9904cb3

@ -209,18 +209,6 @@ class App < Sinatra::Application
@app_size ||= memoized_cookies['size'].nil? ? '20rem' : "#{memoized_cookies['size']}px" @app_size ||= memoized_cookies['size'].nil? ? '20rem' : "#{memoized_cookies['size']}px"
end 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? def bypass_cache?
!memoized_cookies['bypassCache'].nil? !memoized_cookies['bypassCache'].nil?
end end

@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#" lang="en" class="_booting _theme-<%= app_theme %>"> <html prefix="og: http://ogp.me/ns#" lang="en" class="_booting">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no,shrink-to-fit=no"> <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no,shrink-to-fit=no">
@ -32,7 +32,7 @@
<link rel="mask-icon" href="<%= App.cdn_origin %>/images/webkit-mask-icon.svg" color="#398df0"> <link rel="mask-icon" href="<%= App.cdn_origin %>/images/webkit-mask-icon.svg" color="#398df0">
<%= stylesheet_tag 'application' %> <%= stylesheet_tag 'application' %>
</head> </head>
<body<%= %( class="#{app_layout}") if app_layout %>> <body>
<noscript class="_fail">DevDocs requires JavaScript to run.</noscript> <noscript class="_fail">DevDocs requires JavaScript to run.</noscript>
<%= erb :app -%> <%= erb :app -%>
<%= javascript_tag 'application', asset_host: false %> <%= javascript_tag 'application', asset_host: false %>

@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en" class="_booting _theme-<%= app_theme %>"> <html lang="en" class="_booting">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"> <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
@ -13,7 +13,7 @@
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="Search DevDocs"> <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="Search DevDocs">
<%= stylesheet_tag 'application' %> <%= stylesheet_tag 'application' %>
</head> </head>
<body<%= %( class="#{app_layout}") if app_layout %> data-doc="<%= CGI::escape_html @doc.to_json %>"> <body data-doc="<%= CGI::escape_html @doc.to_json %>">
<noscript class="_fail">DevDocs requires JavaScript to run.</noscript> <noscript class="_fail">DevDocs requires JavaScript to run.</noscript>
<%= erb :app -%> <%= erb :app -%>
<%= javascript_tag 'application', asset_host: false %><% unless App.production? %> <%= javascript_tag 'application', asset_host: false %><% unless App.production? %>

Loading…
Cancel
Save