From c8363e304a90c6070dbc65326de609de591035f2 Mon Sep 17 00:00:00 2001 From: hossainemruz Date: Thu, 2 Jul 2020 23:28:29 +0600 Subject: [PATCH] Make color configurable --- exampleSite/data/sections/about.yaml | 15 ++++++++++++++- layouts/partials/progress/soft-skills.html | 16 ++++++++++++++-- static/assets/css/about.css | 6 +++--- 3 files changed, 31 insertions(+), 6 deletions(-) diff --git a/exampleSite/data/sections/about.yaml b/exampleSite/data/sections/about.yaml index 8fcce7b..048bff1 100644 --- a/exampleSite/data/sections/about.yaml +++ b/exampleSite/data/sections/about.yaml @@ -60,4 +60,17 @@ softSkills: color: pink - name: Hard Working percentage: 85 - color: green \ No newline at end of file + color: green +- name: Fast Learner + percentage: 85 + color: sky +- name: Problem Solving + percentage: 85 + color: orange +# you can also provide color code instead of pre-defined color name +# - name: Example 1 +# percentage: 75 +# color: "#00adb5" +# - name: Example 2 +# percentage: 65 +# color: "#8b8383" diff --git a/layouts/partials/progress/soft-skills.html b/layouts/partials/progress/soft-skills.html index 4c32067..cbdc0ae 100644 --- a/layouts/partials/progress/soft-skills.html +++ b/layouts/partials/progress/soft-skills.html @@ -1,12 +1,24 @@
-
+ {{ $predefinedColor:= true}} + {{ if hasPrefix .color "#"}} + {{ $predefinedColor = false }} + {{ end }} +
- +
{{ .name }}
diff --git a/static/assets/css/about.css b/static/assets/css/about.css index 918a3a4..96ce207 100644 --- a/static/assets/css/about.css +++ b/static/assets/css/about.css @@ -100,7 +100,7 @@ } .circular-progress.yellow .circular-progress-bar { - border-color: #ffc212; + border-color: #eebb4d; } .circular-progress.pink .circular-progress-bar { @@ -112,11 +112,11 @@ } .circular-progress.sky .circular-progress-bar { - border-color: #01e0fd; + border-color: #00c9e3; } .circular-progress.orange .circular-progress-bar { - border-color: #FF7D51; + border-color: #ff7c7c; } .circular-progress-percentage-50 {