From 2343164b291f305a9525aea0b462104f517a7739 Mon Sep 17 00:00:00 2001 From: Valentin Ivanov Date: Thu, 26 Apr 2018 16:59:26 -0400 Subject: [PATCH] Playing with colors --- assets/profile.css | 49 ++++++++--------- assets/profile.html.eex | 115 ++++++++++++++++++---------------------- 2 files changed, 78 insertions(+), 86 deletions(-) diff --git a/assets/profile.css b/assets/profile.css index 7b6ad6f..3a61517 100644 --- a/assets/profile.css +++ b/assets/profile.css @@ -1,15 +1,27 @@ /* Dark theme color palette */ .vscode-dark { + --color-language: #dbd5b9; + --color-primary: #E3C23D; + --color-secondary: #5D5535; + --color-bar-background: #303030; +} + +.vscode-dark1 { --color-language: #ddca7e; --color-primary: #dcc97e; - --color-secondary: #00ca7e; + --color-secondary: #318245; + --color-bar-background: #303030; } /* Light theme color palette */ .vscode-light { --color-language: blue; --color-primary: #00ca7e; -} +} + +.profile { + color: var(--color-language); +} h3 { text-align: center; @@ -18,6 +30,7 @@ h3 { sup { top: -.5em; font-size: 75%; + color: var(--color-primary); } .language-progress { @@ -59,23 +72,23 @@ circle { fill:transparent; } -circle.backg { - stroke: #424242; +circle.backg { + stroke: var(--color-bar-background); } circle.newxp { - stroke: #ddca7e; + stroke: var(--color-primary); } circle.oldxp { - stroke: #318245; + stroke: var(--color-secondary); } .language { padding-top: 2rem; margin: auto; text-align: center; - color: var(--color-language); + color: var(--color-language); } .language span { @@ -96,7 +109,7 @@ circle.oldxp { .progress { height: 20px; margin-bottom: 20px; - background-color: #303030; + background-color: var(--color-bar-background); border-radius: 4px; border: solid 1px; border-color: #424242; @@ -111,26 +124,14 @@ circle.oldxp { font-size: 12px; line-height: 20px; text-align: center; - background-color: #ddca7e; + + background-color: var(--color-secondary); -webkit-box-shadow: inset 0 -1px 0 rgba(0,0,0,.15); box-shadow: inset 0 -1px 0 rgba(0,0,0,.15); - -webkit-transition: width .6s ease; - -o-transition: width .6s ease; - transition: width .6s ease; } -.progress-bar-success { - background-color: #318245; +.progress-bar-new { + background-color: var(--color-primary); } -.sr-only { - position: absolute; - width: 1px; - height: 1px; - margin: -1px; - padding: 0; - overflow: hidden; - clip: rect(0,0,0,0); - border: 0; -} diff --git a/assets/profile.html.eex b/assets/profile.html.eex index e1f3717..11461bf 100644 --- a/assets/profile.html.eex +++ b/assets/profile.html.eex @@ -1,70 +1,61 @@ -

${profile.user} Level ${profile.level} (${profile.total_xp} XP) - <% if( profile.new_xp > 0 ) { %> - (+ - <%= profile.new_xp %>) +
+

${profile.user} ${profile.level} ${profile.total_xp} xp + <% if( profile.new_xp > 0 ) { %> + +<%= profile.new_xp %> <% } %> -

+

-
-
- Level progress ${profile.progress - profile.new_progress}%. -
-
- Recent level progress ${profile.new_progress}%. -
-
- -
- <% for( let l in languages) { %> -
-
- <%= languages[l].name %> - - <%= languages[l].level %> - -
- - <%=languages[l].xp %> XP - <% if( languages[l].new_xp > 0 ) { %> - (+ - <%= languages[l].new_xp %>) - <% } %> - - - - - - +
+
- <% } %> -
-

-

- <% for( let m in machines) { %> -
- - <%= machines[m].name %> - - - level <%= machines[m].level %> - - - (<%= machines[m].xp %> XP) - <% if( machines[m].new_xp > 0 ) { %> - (+ - <%= machines[m].new_xp %>) +
+
+
+ +
+ <% for( let l in languages) { %> +
+ + <%=languages[l].xp %> xp + <% if( languages[l].new_xp > 0 ) { %> + +<%= languages[l].new_xp %> + <% } %> + + + + + + +
+ <%= languages[l].name %> + + <%= languages[l].level %> + +
+
<% } %> - -
-
- Level progress ${machines[m].progress - machines[m].new_progress}%. -
-
- Recent level progress ${machines[m].new_progress}%. +
+

+ +

+ <% for( let m in machines) { %> +
+ + <%= machines[m].name %> + + <%= machines[m].level %> + <%= machines[m].xp %> xp + <% if( machines[m].new_xp > 0 ) { %> + +<%= machines[m].new_xp %> + <% } %> +
+
+
+
+
- -
<% } %> -
+
+
\ No newline at end of file