Skip to content

Commit aaf9904

Browse files
committed
Remove redundant server-side styling
1 parent 35dd78f commit aaf9904

3 files changed

Lines changed: 4 additions & 16 deletions

File tree

lib/app.rb

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -209,18 +209,6 @@ def app_size
209209
@app_size ||= memoized_cookies['size'].nil? ? '20rem' : "#{memoized_cookies['size']}px"
210210
end
211211

212-
def app_layout
213-
memoized_cookies['layout']
214-
end
215-
216-
def app_theme
217-
@app_theme ||= memoized_cookies['dark'].nil? ? 'default' : 'dark'
218-
end
219-
220-
def dark_theme?
221-
app_theme == 'dark'
222-
end
223-
224212
def bypass_cache?
225213
!memoized_cookies['bypassCache'].nil?
226214
end

views/index.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html prefix="og: http://ogp.me/ns#" lang="en" class="_booting _theme-<%= app_theme %>">
2+
<html prefix="og: http://ogp.me/ns#" lang="en" class="_booting">
33
<head>
44
<meta charset="utf-8">
55
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no,shrink-to-fit=no">
@@ -32,7 +32,7 @@
3232
<link rel="mask-icon" href="<%= App.cdn_origin %>/images/webkit-mask-icon.svg" color="#398df0">
3333
<%= stylesheet_tag 'application' %>
3434
</head>
35-
<body<%= %( class="#{app_layout}") if app_layout %>>
35+
<body>
3636
<noscript class="_fail">DevDocs requires JavaScript to run.</noscript>
3737
<%= erb :app -%>
3838
<%= javascript_tag 'application', asset_host: false %>

views/other.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html lang="en" class="_booting _theme-<%= app_theme %>">
2+
<html lang="en" class="_booting">
33
<head>
44
<meta charset="utf-8">
55
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
@@ -13,7 +13,7 @@
1313
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="Search DevDocs">
1414
<%= stylesheet_tag 'application' %>
1515
</head>
16-
<body<%= %( class="#{app_layout}") if app_layout %> data-doc="<%= CGI::escape_html @doc.to_json %>">
16+
<body data-doc="<%= CGI::escape_html @doc.to_json %>">
1717
<noscript class="_fail">DevDocs requires JavaScript to run.</noscript>
1818
<%= erb :app -%>
1919
<%= javascript_tag 'application', asset_host: false %><% unless App.production? %>

0 commit comments

Comments
 (0)