mirror of
https://github.com/freeCodeCamp/devdocs
synced 2024-11-18 10:07:11 +01:00
a30fcf9d9a
* Switch from SASS variables to CSS variables for most styling These are the simple cases, and the more complex ones will be covered by future commits. I’ve also replaced $fooZ ± 1 with the appropriate variable to avoid a runtime `calc()`. * Eliminate the `$style` variable 🔥 I’ve added a `--absolute` variable that’s `white` in dark mode and `black` in regular mode. * Remove `$inputFocusBorder` 🔥 * Switch the Prism styles to CSS variables * Convert `$mediumScreen` to a mixin * 🔥 `$selectionText` * Eliminate the final uses of SCSS variables I’ve dropped the 95% opacity on the background of the method source code overlay in RDoc since the difference isn’t noticeable but it makes implementation a lot easier. * Misc fixes * Extract the common variables from the two themes to a new file * Remove illegal usages of CSS variables in SCSS functions This flattens out the buttons on the settings page which makes the styles simpler (and more modern-looking IMO) and removes the box-shadow on the button, which was completely invisible to me. * Fix usages of SCSS functions in CSS variables * Use `html._theme-*` selectors * Eliminate `application-dark.css`; switch themes by toggling classes This also means that the Application Cache doesn’t have to get updated when toggling themes, and a new CSS file that’s nearly the same doesn’t need to be downloaded.
22 lines
1.4 KiB
Text
22 lines
1.4 KiB
Text
<!DOCTYPE html>
|
|
<html lang="en" class="_booting _theme-<%= app_theme %>">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
|
|
<% if doc_index_page? %><meta name="description" content="<%= @doc['name'] %> <%= @doc['release'] %> API documentation with instant search, offline support, keyboard shortcuts, mobile version, and more."><% else %><meta name="robots" content="noindex"><% end %>
|
|
<meta name="format-detection" content="telephone=no">
|
|
<meta property="og:image" content="<%= App.cdn_origin %>/images/icon-320.png">
|
|
<title>DevDocs<%= " — #{@doc['full_name']} documentation" if doc_index_page? %></title>
|
|
<link rel="canonical" href="<%= canonical_origin %><%= request.path %>">
|
|
<link rel="manifest" href="/manifest.json">
|
|
<link rel="icon" type="image/x-icon" href="<%= App.cdn_origin %>/favicon.ico">
|
|
<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 %>">
|
|
<noscript class="_fail">DevDocs requires JavaScript to run.</noscript>
|
|
<%= erb :app -%>
|
|
<%= javascript_tag 'application', asset_host: false %><% unless App.production? %>
|
|
<%= javascript_tag 'debug' %><% end %>
|
|
</body>
|
|
</html>
|