diff --git a/octoprint/static/css/octoprint.less b/octoprint/static/css/octoprint.less index f030628..6e0b969 100644 --- a/octoprint/static/css/octoprint.less +++ b/octoprint/static/css/octoprint.less @@ -5,7 +5,6 @@ body { } .navbar-inner-text (@base) { - @text-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); @@ -22,9 +21,32 @@ body { } } +.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 */ @@ -36,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 { @@ -78,9 +104,12 @@ body { @base: #7728FF; .navbar-inner-color(@base); } - - .brand img { - vertical-align: bottom; + + .brand span { + background-size: 20px 20px; + background-position: left center; + padding-left: 24px; + background-repeat: no-repeat; } } diff --git a/octoprint/static/img/tentacle-20x20-light.png b/octoprint/static/img/tentacle-20x20-light.png new file mode 100644 index 0000000..555f4de 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 0000000..c7b2d92 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 0000000..f32db7c Binary files /dev/null and b/octoprint/static/img/tentacle-20x20@2x.png differ diff --git a/octoprint/templates/index.jinja2 b/octoprint/templates/index.jinja2 index 4c13837..86d167b 100644 --- a/octoprint/templates/index.jinja2 +++ b/octoprint/templates/index.jinja2 @@ -34,7 +34,7 @@