diff options
| author | TheFrenchGhosty <47571719+TheFrenchGhosty@users.noreply.github.com> | 2020-11-28 20:54:45 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-28 20:54:45 +0000 |
| commit | fe73eccb90552084cef0a4de338b4141b54633e4 (patch) | |
| tree | 2c18e3625a90599e9e1adbeca89a5d256dcf62cf /src | |
| parent | b9544d9534cdc61d6b2cb1c88dfa57da440c8122 (diff) | |
| parent | 5f932e9749eb8326990ff2d60329176d39f5cd02 (diff) | |
| download | invidious-fe73eccb90552084cef0a4de338b4141b54633e4.tar.gz invidious-fe73eccb90552084cef0a4de338b4141b54633e4.tar.bz2 invidious-fe73eccb90552084cef0a4de338b4141b54633e4.zip | |
Merge pull request #1479 from saltycrys/theme-flash
Apply dark theme immediately
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious/views/embed.ecr | 3 | ||||
| -rw-r--r-- | src/invidious/views/template.ecr | 5 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/invidious/views/embed.ecr b/src/invidious/views/embed.ecr index 48dbc55f..dbb86009 100644 --- a/src/invidious/views/embed.ecr +++ b/src/invidious/views/embed.ecr @@ -9,12 +9,11 @@ <link rel="stylesheet" href="/css/videojs-overlay.css?v=<%= ASSET_COMMIT %>"> <script src="/js/videojs-overlay.min.js?v=<%= ASSET_COMMIT %>"></script> <link rel="stylesheet" href="/css/default.css?v=<%= ASSET_COMMIT %>"> - <link rel="stylesheet" href="/css/darktheme.css?v=<%= ASSET_COMMIT %>"> <link rel="stylesheet" href="/css/embed.css?v=<%= ASSET_COMMIT %>"> <title><%= HTML.escape(video.title) %> - Invidious</title> </head> -<body> +<body class="dark-theme"> <script id="video_data" type="application/json"> <%= { diff --git a/src/invidious/views/template.ecr b/src/invidious/views/template.ecr index abcfbe22..f6361d2d 100644 --- a/src/invidious/views/template.ecr +++ b/src/invidious/views/template.ecr @@ -17,13 +17,12 @@ <link rel="stylesheet" href="/css/grids-responsive-min.css?v=<%= ASSET_COMMIT %>"> <link rel="stylesheet" href="/css/ionicons.min.css?v=<%= ASSET_COMMIT %>"> <link rel="stylesheet" href="/css/default.css?v=<%= ASSET_COMMIT %>"> - <link rel="stylesheet" href="/css/darktheme.css?v=<%= ASSET_COMMIT %>" id="dark_theme" <% if env.get("preferences").as(Preferences).dark_mode != "dark" %>media="none"<% end %>> - <link rel="stylesheet" href="/css/lighttheme.css?v=<%= ASSET_COMMIT %>" id="light_theme" <% if env.get("preferences").as(Preferences).dark_mode == "dark" %>media="none"<% end %>> </head> <% locale = LOCALES[env.get("preferences").as(Preferences).locale]? %> +<% dark_mode = env.get("preferences").as(Preferences).dark_mode %> -<body> +<body class="<%= dark_mode.blank? ? "no" : dark_mode %>-theme"> <span style="display:none" id="dark_mode_pref"><%= env.get("preferences").as(Preferences).dark_mode %></span> <div class="pure-g"> <div class="pure-u-1 pure-u-md-2-24"></div> |
