Skip to content

Commit 73008f6

Browse files
authored
Merge pull request #41 from adorade/v1-dev
New color scheme
2 parents 958e496 + 86ae58c commit 73008f6

22 files changed

+190
-27
lines changed

README.md

+29-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ To build the theme or customize it with your preferences you must have **Node**,
5858
1. Open your command-line and navigate to your projects folder
5959
2. Clone this repo locally: `git clone https://github.com/adorade/boodark .`
6060
3. Install project dependecies: `yarn install`
61-
4. Do any modifications you want
61+
4. Do any modifications you want (eg. change color scheme)
6262
5. Compile `scss` files to `css`
6363

6464
```sh
@@ -70,6 +70,34 @@ To build the theme or customize it with your preferences you must have **Node**,
7070

7171
6. Theme files are in `themes/boodark`.
7272

73+
## Color Scheme
74+
75+
BooDark has several color schemes: _cyan_ (default), _teal_, _nord_ and _orange_. There is currently no way to change the color scheme in GUI.
76+
77+
**How to change color scheme?**
78+
79+
Option 1. Edit `scss/_variables.scss` (see [Building](#building))
80+
81+
```scss
82+
// Theme color scheme
83+
// Values: "cyan", "teal", "nord", "orange"
84+
// Default: "cyan"
85+
// Set this value for the desired color scheme
86+
// Change cyan
87+
$color-scheme: cyan !default;
88+
// to nord
89+
$color-scheme: nord !default;
90+
91+
// then run `yarn run build`
92+
```
93+
94+
Option 2. Replace the CSS files. For example:
95+
96+
```sh
97+
mv themes/boodark/css/theme.css themes/boodark/css/theme-cyan.css
98+
mv themes/boodark/css/theme-nord.css themes/boodark/css/theme.css
99+
```
100+
73101
## Bugs and feature requests
74102

75103
Have a bug or a feature request? Please search for existing and closed issues. If your problem or idea is not addressed yet, [please open a new issue](https://github.com/adorade/boodark/issues/new).

themes/boodark/css/theme-nord.css

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

themes/boodark/css/theme-nord.css.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

themes/boodark/css/theme-orange.css

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

themes/boodark/css/theme-orange.css.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

themes/boodark/css/theme-teal.css

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

themes/boodark/css/theme-teal.css.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

themes/boodark/css/theme.css

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

themes/boodark/css/theme.css.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

themes/boodark/css/theme.rtl.css

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

themes/boodark/screen.png

4.86 KB
Loading

themes/boodark/scss/_common.scss

+3-3
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ div#tablestatistics table {
468468

469469
.dropdown-toggle {
470470
&::after {
471-
color: $pma-cyan;
471+
color: $pma-link-color;
472472
}
473473
}
474474
}
@@ -1473,7 +1473,7 @@ input#auto_increment_opt {
14731473
background: none;
14741474

14751475
&:hover {
1476-
color: $pma-cyan;
1476+
color: $pma-link-color;
14771477
cursor: pointer;
14781478
}
14791479
}
@@ -1713,7 +1713,7 @@ table.show_create {
17131713
background: rgba($pma-body-bg, .8);
17141714
height: 100%;
17151715
z-index: 999;
1716-
color: $pma-cyan;
1716+
color: $pma-link-color;
17171717
font-size: 30pt;
17181718
text-align: center;
17191719
padding-top: 20%;

themes/boodark/scss/_forms.scss

+46-8
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ input {
4545
// }
4646
}
4747

48-
&[type=checkbox]:not(.form-check-input:not(.form-check-input)),
49-
&[type=radio]:not(.form-check-input:not(.form-check-input)) {
48+
&[type=checkbox]:not(.form-check-input),
49+
&[type=radio]:not(.form-check-input) {
5050
width: $form-check-input-width;
5151
height: $form-check-input-width;
5252
margin-top: ($line-height-base - $form-check-input-width) * .75;
@@ -105,15 +105,53 @@ input {
105105
}
106106
}
107107

108-
&[type=file]::file-selector-button {
109-
@extend .btn-dark;
110-
border-width: 1px;
111-
border-style: solid;
108+
&[type=file] {
109+
// display: block;
110+
// width: 100%;
111+
display: inline-block;
112+
width: auto;
113+
padding: $input-padding-y $input-padding-x;
114+
font-family: $input-font-family;
115+
@include font-size($input-font-size);
116+
font-weight: $input-font-weight;
117+
line-height: $input-line-height;
118+
color: $input-color;
119+
background-color: $input-bg;
120+
background-clip: padding-box;
121+
border: $input-border-width solid $input-border-color;
122+
appearance: none; // Fix appearance for date inputs in Safari
123+
124+
// Note: This has no effect on <select>s in some browsers, due to the limited stylability of `<select>`s in CSS.
125+
@include border-radius($input-border-radius, 0);
126+
127+
@include box-shadow($input-box-shadow);
128+
@include transition($input-transition);
129+
130+
&::file-selector-button {
131+
padding: $input-padding-y $input-padding-x;
132+
margin: (-$input-padding-y) (-$input-padding-x);
133+
margin-inline-end: $input-padding-x;
134+
color: $form-file-button-color;
135+
@include gradient-bg($form-file-button-bg);
136+
pointer-events: none;
137+
border-color: inherit;
138+
border-style: solid;
139+
border-width: 0;
140+
border-inline-end-width: $input-border-width;
141+
border-radius: 0;
142+
@include transition($btn-transition);
143+
}
112144
}
113145

114146
&:hover:not(:disabled):not([readonly])::file-selector-button {
115-
background-color: $pma-blue !important;
116-
border-color: $pma-blue !important;
147+
background-color: $form-file-button-hover-bg;
148+
color: color-contrast($form-file-button-hover-bg);
149+
}
150+
}
151+
152+
.form-control {
153+
&:hover:not(:disabled):not([readonly])::file-selector-button {
154+
color: color-contrast($form-file-button-hover-bg);
117155
}
118156
}
119157

themes/boodark/scss/_icons.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Icons
44

55
// Icon Colors
6-
$svg-color: $pma-link-color; // #0dcaf0, $pma-cyan
6+
$svg-color: $pma-link-color; // #0dcaf0, default color scheme: cyan
77
$disable-color: $pma-disable-color; // #adb5bd
88
$ajax-color: $pma-body-color; // #fff
99
$green-color: $pma-green; // #198754

themes/boodark/scss/_list-group.scss

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// List group
2+
3+
#li_select_theme {
4+
form::after {
5+
padding-top: 0.325rem;
6+
padding-left: calc(var(--bs-gutter-x) * .5);
7+
content: "Scheme: #{$color-scheme} / Version: #{$pma-theme-version}";
8+
color: $pma-link-color;
9+
10+
@include media-breakpoint-up(lg) {
11+
padding-top: 0;
12+
}
13+
}
14+
}

themes/boodark/scss/_nav.scss

+8
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,11 @@
77
.nav-tabs {
88
background-color: $nav-tabs-bg;
99
}
10+
11+
.nav-pills {
12+
.nav-link.active {
13+
.icon {
14+
filter: brightness(0) invert(0);
15+
}
16+
}
17+
}

themes/boodark/scss/_navbar.scss

+17-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,23 @@
1313
.navbar-light {
1414
.navbar-nav {
1515
.nav-item.active {
16-
color: $component-active-color;
17-
background-color: $component-active-bg;
16+
@include button-variant($component-active-bg, $component-active-bg);
17+
color: var(--bs-btn-color);
18+
background-color: var(--bs-btn-bg);
19+
border-top-left-radius: $nav-item-border-radius;
20+
border-top-right-radius: $nav-item-border-radius;
21+
22+
&:first-child {
23+
border-top-left-radius: 0;
24+
}
25+
26+
.nav-link {
27+
color: var(--bs-btn-color);
28+
}
29+
30+
.icon {
31+
filter: brightness(0) invert(0);
32+
}
1833
}
1934
}
2035
}

themes/boodark/scss/_variables.scss

+36-6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// Variables
33
// =============================================================================
44

5+
// Theme version
6+
$pma-theme-version: "1.0.4-dev";
7+
58
// PMA color system
69
// -----------------------------------------------------------------------------
710
$white: #fff;
@@ -34,6 +37,7 @@ $pma-yellow: #ffc107;
3437
$pma-green: #198754;
3538
$pma-teal: #20c997;
3639
$pma-cyan: #0dcaf0;
40+
$pma-nord: #88c0d0;
3741

3842
// Theme Colors
3943
$pma-theme-colors: (
@@ -57,17 +61,34 @@ $pma-theme-colors: (
5761
"yellow": $pma-yellow,
5862
"green": $pma-green,
5963
"teal": $pma-teal,
60-
"cyan": $pma-cyan
64+
"cyan": $pma-cyan,
65+
"nord": $pma-nord
6166
);
6267

68+
// Theme color scheme
69+
// Values: "cyan", "teal", "nord", "orange"
70+
// Default: "cyan"
71+
// Set this value for the desired color scheme
72+
$color-scheme: cyan !default;
73+
$pma-color-scheme: $pma-cyan;
74+
75+
@if $color-scheme == teal {
76+
$pma-color-scheme: $pma-teal;
77+
} @else if $color-scheme == nord {
78+
$pma-color-scheme: $pma-nord;
79+
} @else if $color-scheme == orange {
80+
$pma-color-scheme: $pma-orange;
81+
}
82+
6383
// PMA Base Style
6484
// -----------------------------------------------------------------------------
85+
$pma-primary: $pma-color-scheme;
6586
$pma-body-color: $white;
6687
$pma-body-bg: $pma-gray-900;
6788
$pma-component-bg: $pma-gray-800;
6889
$pma-component-hover-bg: $pma-gray-600;
69-
$pma-component-active-color: $white;
70-
$pma-component-active-bg: $pma-blue;
90+
$pma-component-active-color: $black;
91+
$pma-component-active-bg: $pma-primary;
7192
$pma-table-bg: $pma-gray-700;
7293
$pma-form-border-color: $pma-gray-900;
7394
$pma-selected-bg: $pma-gray-700;
@@ -76,14 +97,15 @@ $pma-fieldset-bg: $pma-gray-600;
7697
$pma-border-color: $pma-gray-600;
7798
$pma-disable-color: $pma-gray-500;
7899
$pma-cond-border-color: $black;
79-
$pma-button-color: $pma-cyan;
80-
$pma-link-color: $pma-cyan;
100+
$pma-button-color: $pma-primary;
101+
$pma-link-color: $pma-primary;
81102
$pma-link-hover-color: $pma-red;
82103
$pma-custom-color: $pma-orange;
83104

84105
// Bootstrap variables
85106
// -----------------------------------------------------------------------------
86107
// Color system
108+
$primary: $pma-primary;
87109
$secondary: $pma-gray-700;
88110
$light: $pma-gray-800;
89111
// Options
@@ -128,17 +150,23 @@ $input-group-addon-bg: $pma-component-bg;
128150
$form-check-input-border: 1px solid rgba($pma-body-color, .4);
129151
$form-select-indicator-color: $pma-body-color;
130152
$form-switch-color: rgba($pma-body-color, .75);
153+
$form-file-button-color: color-contrast($pma-gray-900);
154+
$form-file-button-bg: $pma-gray-900;
155+
$form-file-button-hover-bg: $pma-primary;
131156
// Form validation
132157
// Z-index master list
133-
// Navs
158+
// Nav Tabs
134159
$nav-tabs-bg: rgba($pma-body-bg, .5);
135160
$nav-tabs-border-color: rgba($pma-body-bg, .5);
136161
$nav-tabs-border-width: 0;
137162
$nav-tabs-link-hover-border-color: transparent;
138163
$nav-tabs-link-active-color: $pma-component-active-color;
139164
$nav-tabs-link-active-bg: $pma-component-active-bg;
140165
$nav-tabs-link-active-border-color: rgba($pma-body-bg, .5);
166+
// Nav Pills
141167
$nav-pills-bg: $pma-body-bg;
168+
$nav-pills-link-active-color: $pma-component-active-color;
169+
$nav-pills-link-active-bg: $pma-component-active-bg;
142170
// Navbar
143171
$navbar-light-color: $white;
144172
$navbar-light-hover-color: rgba($white, .65);
@@ -158,6 +186,7 @@ $navbar-dark-toggler-icon-bg: url("data:image/svg+xml,<svg xmlns='http://w
158186
$navbar-dark-toggler-border-color: rgba($white, .1);
159187
$navbar-dark-brand-color: $navbar-dark-active-color;
160188
$navbar-dark-brand-hover-color: $navbar-dark-active-color;
189+
$nav-item-border-radius: .375rem;
161190
// Dropdowns
162191
$dropdown-color: $pma-body-color;
163192
$dropdown-bg: $pma-body-bg;
@@ -187,6 +216,7 @@ $accordion-bg: $pma-component-bg;
187216
$accordion-button-bg: darken($pma-component-bg, 2.5%);
188217
$accordion-button-active-bg: darken($pma-component-bg, 3.5%);
189218
$accordion-button-active-color: $pma-body-color;
219+
$accordion-border-color: $pma-form-border-color;
190220
// Tooltips
191221
// Popovers
192222
// Toasts

themes/boodark/scss/theme-nord.scss

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// stylelint-disable no-invalid-position-at-import-rule
2+
// Theme: boodark - color scheme nord
3+
4+
$color-scheme: nord;
5+
6+
@import "theme";

themes/boodark/scss/theme-orange.scss

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// stylelint-disable no-invalid-position-at-import-rule
2+
// Theme: boodark - color scheme orange
3+
4+
$color-scheme: orange;
5+
6+
@import "theme";

themes/boodark/scss/theme-teal.scss

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// stylelint-disable no-invalid-position-at-import-rule
2+
// Theme: boodark - color scheme teal
3+
4+
$color-scheme: teal;
5+
6+
@import "theme";

themes/boodark/scss/theme.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
@import "breadcrumb";
2828
// @import "pagination";
2929
// @import "alert";
30-
// @import "list-group";
30+
@import "list-group";
3131
@import "modal";
3232
@import "console";
3333
@import "settings";

0 commit comments

Comments
 (0)