[devdocsgjs/main: 645/1867] Remove redundant server-side styling
- From: Andy Holmes <andyholmes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devdocsgjs/main: 645/1867] Remove redundant server-side styling
- Date: Fri, 19 Nov 2021 23:47:22 +0000 (UTC)
commit aaf9904cb35a520addb5ffff10845d9b7c1bcdba
Author: Jasper van Merle <jaspervmerle gmail com>
Date: Sun Jul 7 15:21:29 2019 +0200
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 @@
<!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>
<meta charset="utf-8">
<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">
<%= stylesheet_tag 'application' %>
</head>
-<body<%= %( class="#{app_layout}") if app_layout %>>
+<body>
<noscript class="_fail">DevDocs requires JavaScript to run.</noscript>
<%= 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 @@
<!DOCTYPE html>
-<html lang="en" class="_booting _theme-<%= app_theme %>">
+<html lang="en" class="_booting">
<head>
<meta charset="utf-8">
<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">
<%= stylesheet_tag 'application' %>
</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>
<%= erb :app -%>
<%= javascript_tag 'application', asset_host: false %><% unless App.production? %>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]