Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

Commit

Permalink
some base b2g mobile stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
potch committed May 24, 2012
1 parent 0d41a02 commit 9a27828
Show file tree
Hide file tree
Showing 7 changed files with 89 additions and 30 deletions.
17 changes: 17 additions & 0 deletions media/css/mkt/header.less
Expand Up @@ -255,7 +255,24 @@
}
}
}
.featured.slider {
background-image: url(../../img/mkt/grain.png),
linear-gradient(#394C58, #60747F);
background-image: url(../../img/mkt/grain.png),
-moz-linear-gradient(#394C58, #60747F);
background-image: url(../../img/mkt/grain.png),
-webkit-linear-gradient(#394C58, #60747F);
background-image: url(../../img/mkt/grain.png),
-webkit-gradient(linear, left bottom, left top, from(#60747F), to(#394C58));
}
#site-header {
height: 53px;
h1 {
padding: 1px 0 0;
}
.menu-button {
margin-top: 14px;
}
nav #flyout {
top: 115px;
&.active {
Expand Down
1 change: 1 addition & 0 deletions media/css/mkt/home.less
Expand Up @@ -29,6 +29,7 @@
-webkit-gradient(linear, left bottom, left top, from(#60747F), to(#394C58));
/*.gradient-two-color(#394C58, #60747F);*/
min-height: 320px;
overflow: hidden;
color: @white;
overflow: hidden;
text-shadow: 0 1px 0 rgba(0,0,0,.25);

This comment has been minimized.

Copy link
@cvan

cvan May 24, 2012

Contributor

we can get that weird hiccup where the header and #page meet (see). I removed the box-shadow hack when I started fiddling with things. maybe we can use the original hack - or hopefully we can ditch it and do something smarter. the latter would make @cvan 😆

Expand Down
2 changes: 1 addition & 1 deletion media/css/mkt/lib.less
Expand Up @@ -20,7 +20,7 @@
@spacing: @gutter * @px;

//Breakpoints
@3col: 0px;
@3col: 400px;
@4col: 480px;
@7col: 672px;
@10col: 1024px;
Expand Down
58 changes: 46 additions & 12 deletions media/css/mkt/site.less
Expand Up @@ -141,6 +141,26 @@ body {
}
}

#site-footer {
background-color: @pale-bg;
.grain;
padding: 16px;
text-align: center;
.footer-links {
a:before {
content: "\00b7";
margin: 0 4px;
color: @gray;
}
a:hover:before {
text-decoration: none;
}
a:first-child:before {
content: none;
}
}
}

// 10 columns (portrait tablet)
@media (max-width: @10col) {
#site-header, #page {
Expand All @@ -163,19 +183,40 @@ body {
#site-header section {
.width(5.5);
}
#search {
display: none;
}
#site-footer {
padding: 0;
.footer-links {
text-align: left;
a {
display: block;
padding: 10px;
font-size: 18px;
border-bottom: 1px solid black;
&:first-child {
border-top: 1px solid black;
}
&:before {
content: none;
}
}
}
}
}

// 3 columns (portrait smartphone)
@media (max-width: @3col) {
#site-header, #page {
> section, > section.full > div {
.width(3);
.border-box;
width: 100%;
min-width: 320px;
}
}
#site-header {
margin-bottom: 20px;
> section {
.width(3);
padding-left: 10px;
padding-right: 10px;
}
}
}
Expand Down Expand Up @@ -226,13 +267,6 @@ body {
}
}

#site-footer {
background-color: @pale-bg;
.grain;
padding: 16px;
text-align: center;
}

// Fixes z-index footer issue on login page.
.login #site-footer {
background: none;
Expand Down
7 changes: 7 additions & 0 deletions media/css/mkt/slider.less
Expand Up @@ -255,3 +255,10 @@
right: 5px;
}
}

@media (max-width: @4col) {
.promo-slider ul li {
margin-right: 11px;
}

}
7 changes: 5 additions & 2 deletions media/js/mkt/slider.js
Expand Up @@ -81,6 +81,9 @@ z.page.on('fragmentloaded', function() {
}

function initSliders() {
if (z.capabilities.touch) {
return;
}
$('.categories h3').linefit();
$('.promo-grid h3').lineclamp(2);
$('.slider').each(function() {
Expand All @@ -92,8 +95,8 @@ z.page.on('fragmentloaded', function() {
perPage = itemsPerPage($li),
maxPage = numPages($li, perPage);

$prevLink.click(_pd(prevPage));
$nextLink.click(_pd(nextPage));
$prevLink.on('touchstart', _pd(prevPage));

This comment has been minimized.

Copy link
@cvan

cvan May 24, 2012

Contributor

this breaks desktop though, right?

This comment has been minimized.

Copy link
@potch

potch May 24, 2012

Author Contributor

oops, yeah this bit was an accidental checkin

$nextLink.on('touchstart', _pd(nextPage));

var showNext = false,
$window = $(window),
Expand Down
27 changes: 12 additions & 15 deletions mkt/templates/mkt/base.html
Expand Up @@ -14,6 +14,7 @@
<meta name="robots" content="noindex">
{% endif %}
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
{% block extrameta %}{% endblock %}
<title>{% block title %}{{ _('Mozilla Marketplace') }}{% endblock %}</title>

Expand Down Expand Up @@ -69,32 +70,28 @@
{% else %}
{{ request.amo_user.email }}
{% endif %}
<a href="{{ url('users.logout') }}">(log out)</a>
<p>
{% endif %}
<nav class="footer-links">

This comment has been minimized.

Copy link
@cvan

cvan May 24, 2012

Contributor

this gets funny on desktop - we should probably add a max-width

This comment has been minimized.

Copy link
@potch

potch May 24, 2012

Author Contributor

That's an opinion 😁

{% if logged %}
<a href="{{ url('users.logout') }}">Log out</a>
{% for link in tools_links %}
<a href="{{ link.href }}">{{ link.text }}</a>
{% if not loop.last %}&middot;{% endif %}
{% if not loop.last %}{% endif %}
{% endfor %}
{% if tools_links|length > 2 %}
<br>
{% elif request.can_view_consumer %}
&middot;
{% endif %}
{% if request.can_view_consumer %}
<a href="{{ url('account.purchases') }}">
{{ _('Account History') }}</a>
&middot;
<a href="{{ url('account.settings') }}">
{{ _('Account Settings') }}</a>
{% endif %}
</p>
{% else %}
{% endif %}
<a href="{{ url('site.privacy') }}">{{ _('Privacy Policy') }}</a>
<a href="{{ url('site.terms') }}">{{ _('Terms of Use') }}</a>
</nav>
{% if not logged %}
<a class="button browserid" href="#">{{ _('Log in / Register') }}</a>
{% endif %}
{% include 'site/includes/languages.html' %}
<a href="{{ url('site.privacy') }}">{{ _('Privacy Policy') }}</a>
&middot;
<a href="{{ url('site.terms') }}">{{ _('Terms of Use') }}</a>
{% include 'site/includes/languages.html' %}
</footer>
{% endblock %}

Expand Down

0 comments on commit 9a27828

Please sign in to comment.