Make dark theme even darker, add fallback for legacy themes

Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>
This commit is contained in:
m.nabokikh 2020-12-22 11:07:28 +04:00
parent bcaddd4354
commit 1e88cca59a
2 changed files with 20 additions and 15 deletions

View File

@ -79,6 +79,10 @@ func dirExists(dir string) error {
// |- templates // |- templates
// //
func loadWebConfig(c webConfig) (http.Handler, http.Handler, *templates, error) { func loadWebConfig(c webConfig) (http.Handler, http.Handler, *templates, error) {
// fallback to the default theme if the legacy theme name is provided
if c.theme == "coreos" || c.theme == "tectonic" {
c.theme = ""
}
if c.theme == "" { if c.theme == "" {
c.theme = "light" c.theme = "light"
} }

View File

@ -1,13 +1,13 @@
.theme-body { .theme-body {
background-color: #1b282e; background-color: #0f1218;
color: #a6b7bf; color: #c8d1d9;
font-family: 'Source Sans Pro', Helvetica, sans-serif; font-family: 'Source Sans Pro', Helvetica, sans-serif;
} }
.theme-navbar { .theme-navbar {
background-color: #233239; background-color: #161b22;
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2); box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2);
color: #333; color: #161B2B;
font-size: 13px; font-size: 13px;
font-weight: 100; font-weight: 100;
height: 46px; height: 46px;
@ -32,30 +32,31 @@
font-size: 20px; font-size: 20px;
font-weight: 500; font-weight: 500;
margin-top: 0; margin-top: 0;
color: #a6b7bf; color: #c8d1d9;
} }
.theme-panel { .theme-panel {
background-color: #233239; background-color: #161b22;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
padding: 30px; padding: 30px;
} }
.theme-btn-provider { .theme-btn-provider {
background-color: #2a4349; background-color: #1e242d;
color: #a6b7bf; color: #c8d1d9;
border: 1px solid #30373c;
min-width: 250px; min-width: 250px;
} }
.theme-btn-provider:hover { .theme-btn-provider:hover {
background-color: #425f69; background-color: #25343a;
color: #ffffff; color: #ffffff;
} }
.theme-btn--primary { .theme-btn--primary {
background-color: #2a4549; background-color: #1e242d;
border: none; border: none;
color: #a6b7bf; color: #c8d1d9;
min-width: 200px; min-width: 200px;
padding: 6px 12px; padding: 6px 12px;
} }
@ -86,7 +87,7 @@
padding: 6px 12px; padding: 6px 12px;
font-size: 14px; font-size: 14px;
line-height: 1.42857143; line-height: 1.42857143;
border: 1px solid #CCC; border: 1px solid #c8d1d9;
border-radius: 4px; border-radius: 4px;
box-shadow: inset 0 1px 1px rgb(27, 40, 46); box-shadow: inset 0 1px 1px rgb(27, 40, 46);
width: 250px; width: 250px;
@ -106,13 +107,13 @@
position: relative; position: relative;
font-size: 13px; font-size: 13px;
font-weight: 600; font-weight: 600;
color: #a6b7bf; color: #c8d1d9;
} }
.theme-link-back { .theme-link-back {
margin-top: 4px; margin-top: 4px;
} }
.dex-container { .dex-container {
color: #a6b7bf; color: #c8d1d9;
} }