diff --git a/media/css/mkt/desktop-header.less b/media/css/mkt/desktop-header.less new file mode 100644 index 0000000000..d4e81059d2 --- /dev/null +++ b/media/css/mkt/desktop-header.less @@ -0,0 +1,167 @@ +@import 'lib'; + +@media (min-width: @desktop) { + #site-header { + height: 110px; + #search, + #search-q { + width: 175px; + } + #search-q { + .border-radius(3px); + .box-shadow(0 1px 0 rgba(255,255,255,.1), + 0 1px 0 rgba(0,0,0,.5) inset, + 0 1px 1px rgba(0,0,0,.5) inset); + font-size: 14px; + font-weight: 300; + margin-top: -15px; + position: absolute; + top: 50%; + right: 0; + &:-moz-placeholder { + color: lighten(#48535d, 15%); + } + &::-moz-placeholder { + color: lighten(#48535d, 15%); + } + &::-webkit-input-placeholder { + color: lighten(#48535d, 15%); + } + + } + } + #page { + padding-top: 110px; + } + .incompatible-browser.active { + top: 110px; + } + + // TODO: These are temporary styles. Davor, remove this with bug 811356. + .search { + #page { + &:before { + background: @grain-src #566773; + background-size: 100px 100px; + border-bottom: 1px solid rgba(0,0,0,.2); + content: ""; + display: block; + position: fixed; + top: 110px; + height: 40px; + width: 100%; + z-index: 3; + } + } + .incompatible-browser.active { + top: 151px; + } + } + + // The logo is permanent in the header. + #site-header h1.title { + display: none; + } + + .force-mobile #site-header > section, + #site-header nav, + #search { + height: 100%; + } + + #search { + display: block; + position: absolute; + right: 70px; + } + + #site-header, .classic-header { + .box-shadow(~'0 -1px 0 rgba(0,0,0,.15) inset, 0 1px 0 rgba(255,255,255,.1) inset'); + background: darken(#3f4f5b, 5%) @grain-src; + background-size: 100px 100px; + } + + body, .home { + #site-header h1.site { + background: url(../../img/mkt/logos/large.png) 0 50% no-repeat; + text-indent: -9999px; + height: 100%; + left: 0; + max-width: 280px; + top: 0; + width: 280px; + a { + display: block; + height: 100%; + width: 100%; + } + } + } + .header-button { + float: none; + position: absolute; + top: 50%; + margin-top: -25px; + right: 0; + width: 50px; + &:after, + &.back, + &.home { + display: none !important; + } + + // TODO: These are temporary styles. Davor, remove this with bug 811356. + &.filter, + &.expand { + margin-top: 50px; + } + &.filter { + color: @black; + } + &.expand { + margin-right: 50px; + } + + &.settings { + display: block; + } + &.browserid { + .transition(.2s background); + background-position: 50% 0; + display: block; + height: 100%; + line-height: 110px; + margin: 0; + top: 0; + width: 60px; + &.loading-submit { + -webkit-animation-duration: 1.5s; + -webkit-animation-name: spin; + -webkit-animation-iteration-count: infinite; + -webkit-animation-timing-function: linear; + background: url(../../img/mkt/loading-16.png) center no-repeat; + text-indent: -9999px; + &:after { + display: none; + } + } + } + } + // TODO: These are temporary styles. Davor, remove this with bug 811356. + #search-results { + padding-top: 45px; + .listing { + border-top: 1px solid @light-gray; + } + } +} + +@media screen and (min-width: @desktop), + @retina { + body, .home { + #site-header h1.site { + background-image: url(../../img/mkt/logos/large-2x.png); + background-size: 280px auto; + } + } +} diff --git a/media/css/mkt/desktop.less b/media/css/mkt/desktop.less index f4f94c51ff..a5c264d569 100644 --- a/media/css/mkt/desktop.less +++ b/media/css/mkt/desktop.less @@ -6,6 +6,9 @@ } @media (min-width: @desktop) { + body, h1, h2, h3, h4 { + font-weight: 300; + } body { background: @white; } @@ -59,7 +62,9 @@ } } - footer { + #footer, + #directory-footer { + display: block; padding: 30px 0; .pad { margin: 0 auto; @@ -71,11 +76,6 @@ } } - #footer, - #directory-footer { - display: block; - } - #footer { background: @white; border-top-color: rgba(0,0,0,.08); diff --git a/media/css/mkt/forms.less b/media/css/mkt/forms.less index 9387a19c83..c8b4dbcd21 100644 --- a/media/css/mkt/forms.less +++ b/media/css/mkt/forms.less @@ -65,10 +65,13 @@ input:-moz-placeholder { input[placeholder] { // Because bug 673873 is stupidface. + // Yes, the order matters. Firefox 18 (and below) is clownshoes. &:-moz-placeholder:focus { color: transparent !important; } - // Yes, the order matters. WebKit is clownshoes. + &:focus::-moz-placeholder { + color: transparent !important; + } &:focus::-webkit-input-placeholder { color: transparent !important; } diff --git a/media/css/mkt/navigation.less b/media/css/mkt/navigation.less index 09be2f0beb..677b97e135 100644 --- a/media/css/mkt/navigation.less +++ b/media/css/mkt/navigation.less @@ -10,7 +10,7 @@ body { display: block; } } - #site-header h1 { + #site-header h1.page { display: none; } #search, #search-q { diff --git a/media/css/mkt/search.less b/media/css/mkt/search.less index 25c06654e1..633fa897b7 100644 --- a/media/css/mkt/search.less +++ b/media/css/mkt/search.less @@ -46,6 +46,9 @@ &:-moz-placeholder { color: lighten(#99abb9, 3%); } + &::-moz-placeholder { + color: lighten(#99abb9, 3%); + } &::-webkit-input-placeholder { color: lighten(#99abb9, 3%); } diff --git a/media/css/mkt/typography.less b/media/css/mkt/typography.less index ca14a7e0ce..6d2b5815d2 100644 --- a/media/css/mkt/typography.less +++ b/media/css/mkt/typography.less @@ -35,12 +35,10 @@ body { font-family: @open-stack; - font-weight: 300; font-size: 13px; } -// Headers -h1, h2, h3, h4 { +body, h1, h2, h3, h4 { font-weight: 300; } diff --git a/media/img/mkt/logos/large-2x.png b/media/img/mkt/logos/large-2x.png new file mode 100644 index 0000000000..b4150c5926 Binary files /dev/null and b/media/img/mkt/logos/large-2x.png differ diff --git a/media/img/mkt/logos/large.png b/media/img/mkt/logos/large.png new file mode 100644 index 0000000000..8140938bee Binary files /dev/null and b/media/img/mkt/logos/large.png differ diff --git a/media/js/mkt/navigation.js b/media/js/mkt/navigation.js index 6b51c9e97c..1453e2430b 100644 --- a/media/js/mkt/navigation.js +++ b/media/js/mkt/navigation.js @@ -117,12 +117,13 @@ var nav = (function() { function setTitle() { // Something something title joke. - var $h1 = $('#site-header h1'); + var $h1 = $('#site-header h1.page'); var title = $('#page').data('context').headertitle || ''; $h1.text(title); } function back() { + // Something something back joke. if (stack.length > 1) { stack.shift(); $(window).trigger('loadfragment', stack[0].path); diff --git a/mkt/asset_bundles.py b/mkt/asset_bundles.py index 89d2521df3..abb9735567 100644 --- a/mkt/asset_bundles.py +++ b/mkt/asset_bundles.py @@ -156,6 +156,7 @@ CSS.update({ # TODO: Split components into individual, appropriate stylesheets. 'css/devreg/footer.less', 'css/mkt/desktop.less', + 'css/mkt/desktop-header.less', ), }) diff --git a/mkt/templates/mkt/base_mobile.html b/mkt/templates/mkt/base_mobile.html index 5040ba0785..32a16e580d 100644 --- a/mkt/templates/mkt/base_mobile.html +++ b/mkt/templates/mkt/base_mobile.html @@ -70,7 +70,9 @@ {% block siteheader %} {% with headertitle = headertitle, titletag = titletag, - pagetitle = pagetitle %} + pagetitle = pagetitle, + category = category, + logged = logged %} {% include 'mkt/header.html' %} {% endwith %} {% endblock %} diff --git a/mkt/templates/mkt/header.html b/mkt/templates/mkt/header.html index 308009dca6..c9a93bbfef 100644 --- a/mkt/templates/mkt/header.html +++ b/mkt/templates/mkt/header.html @@ -1,13 +1,26 @@