Skip to content

Commit

Permalink
Merge pull request #1858 from flant/light-dark-theme
Browse files Browse the repository at this point in the history
feat: Change default themes to light/dark
  • Loading branch information
sagikazarmark committed Dec 22, 2020
2 parents 2b9ef80 + 1e88cca commit bae6bbb
Show file tree
Hide file tree
Showing 13 changed files with 40 additions and 45 deletions.
6 changes: 5 additions & 1 deletion server/templates.go
Expand Up @@ -79,8 +79,12 @@ func dirExists(dir string) error {
// |- templates
//
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 == "" {
c.theme = "coreos"
c.theme = "light"
}
if c.issuer == "" {
c.issuer = "dex"
Expand Down
19 changes: 0 additions & 19 deletions web/static/img/coreos-icon.svg

This file was deleted.

7 changes: 2 additions & 5 deletions web/static/main.css
Expand Up @@ -53,22 +53,19 @@ body {
background-image: url(../static/img/email-icon.svg);
}

.dex-btn-icon--coreos {
/* B&W CoreOS SVG logo */
background-image: url(../static/img/coreos-icon.svg);
}

.dex-btn-icon--github {
background-color: #F5F5F5;
background-image: url(../static/img/github-icon.svg);
}

.dex-btn-icon--gitlab {
background-color: #F5F5F5;
background-image: url(../static/img/gitlab-icon.svg);
background-size: contain;
}

.dex-btn-icon--oidc {
background-color: #EBEBEE;
background-image: url(../static/img/oidc-icon.svg);
background-size: contain;
}
Expand Down
Binary file removed web/themes/coreos/favicon.png
Binary file not shown.
Binary file removed web/themes/coreos/logo.png
Binary file not shown.
Binary file added web/themes/dark/favicon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web/themes/dark/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 33 additions & 20 deletions web/themes/tectonic/styles.css → web/themes/dark/styles.css
@@ -1,11 +1,18 @@
.theme-body {
background-color: #1C425B;
color: #333;
background-color: #0f1218;
color: #c8d1d9;
font-family: 'Source Sans Pro', Helvetica, sans-serif;
}

.theme-navbar {
display: none;
background-color: #161b22;
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2);
color: #161B2B;
font-size: 13px;
font-weight: 100;
height: 46px;
overflow: hidden;
padding: 0 10px;
}

.theme-navbar__logo-wrap {
Expand All @@ -24,47 +31,49 @@
.theme-heading {
font-size: 20px;
font-weight: 500;
padding-bottom: 10px;
margin-top: 0;
color: #c8d1d9;
}

.theme-panel {
background-color: #fff;
background-color: #161b22;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
padding: 30px;
}

.theme-btn-provider {
background-color: #fff;
color: #333;
background-color: #1e242d;
color: #c8d1d9;
border: 1px solid #30373c;
min-width: 250px;
}

.theme-btn-provider:hover {
color: #999;
background-color: #25343a;
color: #ffffff;
}

.theme-btn--primary {
background-color: #2fc98e;
background-color: #1e242d;
border: none;
color: #fff;
color: #c8d1d9;
min-width: 200px;
padding: 6px 12px;
}

.theme-btn--primary:hover {
background-color: #25a071;
color: #fff;
background-color: #425f69;
color: #e9e9e9;
}

.theme-btn--success {
background-color: #2FC98E;
color: #fff;
background-color: #233239;
color: #e9e9e9;
width: 250px;
}

.theme-btn--success:hover {
background-color: #49E3A8;
background-color: #46add0;
}

.theme-form-row {
Expand All @@ -78,18 +87,17 @@
padding: 6px 12px;
font-size: 14px;
line-height: 1.42857143;
color: #666;
border: 1px solid #CCC;
border: 1px solid #c8d1d9;
border-radius: 4px;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgb(27, 40, 46);
width: 250px;
margin: auto;
}

.theme-form-input:focus,
.theme-form-input:active {
outline: none;
border-color: #66AFE9;
border-color: #1b282e;
}

.theme-form-label {
Expand All @@ -99,8 +107,13 @@
position: relative;
font-size: 13px;
font-weight: 600;
color: #c8d1d9;
}

.theme-link-back {
margin-top: 4px;
}

.dex-container {
margin: 60px auto;
color: #c8d1d9;
}
Binary file added web/themes/light/favicon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web/themes/light/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Binary file removed web/themes/tectonic/favicon.png
Binary file not shown.
Binary file removed web/themes/tectonic/logo.png
Binary file not shown.

0 comments on commit bae6bbb

Please sign in to comment.