diff --git a/octoprint/static/css/octoprint.less b/octoprint/static/css/octoprint.less index b61e3bbd..1251ae06 100644 --- a/octoprint/static/css/octoprint.less +++ b/octoprint/static/css/octoprint.less @@ -5,13 +5,48 @@ body { } .navbar-inner-text (@base) { - text-shadow: 0 1px 0 lighten(@base, 15%); - color: contrast(@base, #333333, #f2f2f2); + text-shadow: 0 1px 0 contrast(@base, lighten(@base, 15%), darken(@base, 15%)); + color: @text-color; + @caret-color: average(@base, @text-color); + @caret-hover-color: average(@caret-color, @text-color); + + .caret { + border-bottom-color: @caret-color; + border-top-color: @caret-color; + } + + &:hover .caret, &:focus .caret { + border-bottom-color: @caret-hover-color; + border-top-color: @caret-hover-color; + } +} + +.brand (@color, @dark, @light) when (@color = @dark) { + span { + background-image: url(../img/tentacle-20x20.png); + + @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { + background-image: url(../img/tentacle-20x20@2x.png); + } + } +} +.brand (@color, @dark, @light) when (@color = @light) { + span { + background-image: url(../img/tentacle-20x20-light.png); + + @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { + background-image: url(../img/tentacle-20x20-light@2x.png); + } + } } .navbar-inner-color (@base) { @top: lighten(@base, 25%); @bottom: darken(@base, 15%); + + @text-color-light: #f2f2f2; + @text-color-dark: #333333; + @text-color: contrast(@base, @text-color-dark, @text-color-light); background-color: @base; /* fallback color if gradients are not supported */ background-image: -webkit-linear-gradient(top, @top, @bottom); /* For Chrome and Safari */ @@ -23,6 +58,10 @@ body { .brand, .nav>li>a { .navbar-inner-text(@base); } + + .brand { + .brand(@text-color, @text-color-dark, @text-color-light); + } .nav { li.dropdown.open>.dropdown-toggle, li.dropdown.active>.dropdown-toggle, li.dropdown.open.active>.dropdown-toggle { @@ -65,9 +104,16 @@ body { @base: #7728FF; .navbar-inner-color(@base); } - - .brand img { - vertical-align: bottom; + &.black { + @base: #383838; + .navbar-inner-color(@base); + } + + .brand span { + background-size: 20px 20px; + background-position: left center; + padding-left: 24px; + background-repeat: no-repeat; } } @@ -525,4 +571,4 @@ ul.dropdown-menu li a { } } } -} \ No newline at end of file +} diff --git a/octoprint/static/img/tentacle-20x20-light.png b/octoprint/static/img/tentacle-20x20-light.png new file mode 100644 index 00000000..555f4de5 Binary files /dev/null and b/octoprint/static/img/tentacle-20x20-light.png differ diff --git a/octoprint/static/img/tentacle-20x20-light@2x.png b/octoprint/static/img/tentacle-20x20-light@2x.png new file mode 100644 index 00000000..c7b2d926 Binary files /dev/null and b/octoprint/static/img/tentacle-20x20-light@2x.png differ diff --git a/octoprint/static/img/tentacle-20x20@2x.png b/octoprint/static/img/tentacle-20x20@2x.png new file mode 100644 index 00000000..f32db7c2 Binary files /dev/null and b/octoprint/static/img/tentacle-20x20@2x.png differ diff --git a/octoprint/static/js/ui.js b/octoprint/static/js/ui.js index e2c76805..db51d5dc 100644 --- a/octoprint/static/js/ui.js +++ b/octoprint/static/js/ui.js @@ -1317,7 +1317,7 @@ function SettingsViewModel(loginStateViewModel, usersViewModel) { self.appearance_color = ko.observable(undefined); /* I did attempt to allow arbitrary gradients but cross browser support via knockout or jquery was going to be horrible */ - self.appearance_available_colors = ko.observable(["default", "red", "orange", "yellow", "green", "blue", "violet"]); + self.appearance_available_colors = ko.observable(["default", "red", "orange", "yellow", "green", "blue", "violet", "black"]); self.printer_movementSpeedX = ko.observable(undefined); self.printer_movementSpeedY = ko.observable(undefined); diff --git a/octoprint/templates/index.jinja2 b/octoprint/templates/index.jinja2 index 737d9eb2..8bd97c0f 100644 --- a/octoprint/templates/index.jinja2 +++ b/octoprint/templates/index.jinja2 @@ -35,7 +35,7 @@