feat: Change default themes to light/dark

Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>
This commit is contained in:
m.nabokikh 2020-11-08 02:12:06 +04:00
parent 71bbbee075
commit bcaddd4354
13 changed files with 34 additions and 44 deletions

View file

@ -80,7 +80,7 @@ func dirExists(dir string) error {
// //
func loadWebConfig(c webConfig) (http.Handler, http.Handler, *templates, error) { func loadWebConfig(c webConfig) (http.Handler, http.Handler, *templates, error) {
if c.theme == "" { if c.theme == "" {
c.theme = "coreos" c.theme = "light"
} }
if c.issuer == "" { if c.issuer == "" {
c.issuer = "dex" c.issuer = "dex"

View file

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" fill="#666" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 215 215" xml:space="preserve">
<g>
<g>
<path d="M107.479,1.075c-58.677,0-106.404,47.73-106.404,106.398c0,58.672,47.727,106.399,106.404,106.399
c58.659,0,106.39-47.727,106.39-106.399C213.869,48.805,166.138,1.075,107.479,1.075z M147.449,134.627
c-0.88,0.128-1.749,0.251-2.632,0.364c-8.03,1.038-16.602,1.743-25.561,2.078c-3.856,0.144-7.793,0.231-11.776,0.231
c-3.995,0-7.92-0.086-11.788-0.231c-8.948-0.335-17.526-1.04-25.549-2.078c-0.716-5.987-1.201-12.216-1.443-18.623
c-0.116-2.926-0.173-5.896-0.173-8.895c0-3.002,0.057-5.966,0.173-8.898c0.243-6.408,0.728-12.633,1.443-18.62
c0.144-1.246,0.306-2.485,0.473-3.709c5.241-38.04,19.752-65.408,36.863-65.408c53.364,0,96.632,43.262,96.633,96.635
C204.112,119.547,180.866,129.934,147.449,134.627z"/>
<path d="M147.448,80.316c-0.969-1.414-2.009-2.768-3.117-4.069c-8.866-10.451-22.074-17.092-36.852-17.092
c-4.791,0-9.057,7.333-11.788,18.72c-1.085,4.54-1.928,9.721-2.47,15.343c-0.428,4.505-0.658,9.297-0.658,14.255
s0.231,9.751,0.658,14.252c4.508,0.428,9.293,0.657,14.258,0.657c4.959,0,9.744-0.23,14.252-0.657
c9.911-0.94,18.466-2.846,24.527-5.357c5.986-2.476,9.528-5.559,9.528-8.895C155.786,97.407,152.712,88.057,147.448,80.316z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

View file

@ -53,22 +53,19 @@ body {
background-image: url(../static/img/email-icon.svg); 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 { .dex-btn-icon--github {
background-color: #F5F5F5; background-color: #F5F5F5;
background-image: url(../static/img/github-icon.svg); background-image: url(../static/img/github-icon.svg);
} }
.dex-btn-icon--gitlab { .dex-btn-icon--gitlab {
background-color: #F5F5F5;
background-image: url(../static/img/gitlab-icon.svg); background-image: url(../static/img/gitlab-icon.svg);
background-size: contain; background-size: contain;
} }
.dex-btn-icon--oidc { .dex-btn-icon--oidc {
background-color: #EBEBEE;
background-image: url(../static/img/oidc-icon.svg); background-image: url(../static/img/oidc-icon.svg);
background-size: contain; background-size: contain;
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

BIN
web/themes/dark/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
web/themes/dark/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View file

@ -1,11 +1,18 @@
.theme-body { .theme-body {
background-color: #1C425B; background-color: #1b282e;
color: #333; color: #a6b7bf;
font-family: 'Source Sans Pro', Helvetica, sans-serif; font-family: 'Source Sans Pro', Helvetica, sans-serif;
} }
.theme-navbar { .theme-navbar {
display: none; background-color: #233239;
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2);
color: #333;
font-size: 13px;
font-weight: 100;
height: 46px;
overflow: hidden;
padding: 0 10px;
} }
.theme-navbar__logo-wrap { .theme-navbar__logo-wrap {
@ -24,47 +31,48 @@
.theme-heading { .theme-heading {
font-size: 20px; font-size: 20px;
font-weight: 500; font-weight: 500;
padding-bottom: 10px;
margin-top: 0; margin-top: 0;
color: #a6b7bf;
} }
.theme-panel { .theme-panel {
background-color: #fff; background-color: #233239;
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: #fff; background-color: #2a4349;
color: #333; color: #a6b7bf;
min-width: 250px; min-width: 250px;
} }
.theme-btn-provider:hover { .theme-btn-provider:hover {
color: #999; background-color: #425f69;
color: #ffffff;
} }
.theme-btn--primary { .theme-btn--primary {
background-color: #2fc98e; background-color: #2a4549;
border: none; border: none;
color: #fff; color: #a6b7bf;
min-width: 200px; min-width: 200px;
padding: 6px 12px; padding: 6px 12px;
} }
.theme-btn--primary:hover { .theme-btn--primary:hover {
background-color: #25a071; background-color: #425f69;
color: #fff; color: #e9e9e9;
} }
.theme-btn--success { .theme-btn--success {
background-color: #2FC98E; background-color: #233239;
color: #fff; color: #e9e9e9;
width: 250px; width: 250px;
} }
.theme-btn--success:hover { .theme-btn--success:hover {
background-color: #49E3A8; background-color: #46add0;
} }
.theme-form-row { .theme-form-row {
@ -78,10 +86,9 @@
padding: 6px 12px; padding: 6px 12px;
font-size: 14px; font-size: 14px;
line-height: 1.42857143; line-height: 1.42857143;
color: #666;
border: 1px solid #CCC; border: 1px solid #CCC;
border-radius: 4px; 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; width: 250px;
margin: auto; margin: auto;
} }
@ -89,7 +96,7 @@
.theme-form-input:focus, .theme-form-input:focus,
.theme-form-input:active { .theme-form-input:active {
outline: none; outline: none;
border-color: #66AFE9; border-color: #1b282e;
} }
.theme-form-label { .theme-form-label {
@ -99,8 +106,13 @@
position: relative; position: relative;
font-size: 13px; font-size: 13px;
font-weight: 600; font-weight: 600;
color: #a6b7bf;
}
.theme-link-back {
margin-top: 4px;
} }
.dex-container { .dex-container {
margin: 60px auto; color: #a6b7bf;
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
web/themes/light/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB