Permalink
Browse files

Merge pull request #853 from tx2z/bug-838224

Bug 838224 - "Interim" homepage banners (to support MWC)
  • Loading branch information...
2 parents 07d2cc3 + 66a01da commit 01ba1001805ea20194398628f1edba7e586d131b @darkwing darkwing committed Feb 12, 2013
@@ -79,47 +79,38 @@
<section id="home-promos" class="home-promos">
- <div class="promo" id="promo-learn">
- <a href="{{ url('learn') }}">
- <h2>{{_("Learn")}}</h2>
- <p>{{_("Our collection of resources shows you how to use the technologies that power the Web.")}}</p>
+ <div class="promo" id="promo-webapps">
+ <a href="{{ devmo_url('apps') }}">
+ <h2>{{ _('Create<br />Web Apps') | safe}}</h2>
+ <p>{{ _('Develop apps using Web standards and open technologies') }}</p>
</a>
<div></div>
</div>
- <div class="promo" id="promo-demos">
- <a href="{{ url('demos') }}">
- <h2>{{_("Demos")}}</h2>
- <p>{{_("Check out what developers are doing with the latest Web standards and open technologies.")}}</p>
+ <div class="promo" id="promo-fosdev">
+ <a href="{{ devmo_url('Mozilla/Firefox_OS') }}">
+ <h2>{{ _('Firefox OS<br />for developers') | safe }}</h2>
+ <p>{{ _('Open source mobile OS built with HTML, JavaScript, & WebAPIs') }}</p>
</a>
<div></div>
</div>
- <div class="promo" id="promo-foxdev">
- <a href="{{ devmo_url('Firefox_for_developers') }}">
- <h2>{{_("Firefox for Devs")}}</h2>
- <p>{{_("See what's new for Web developers in the latest version of Firefox.")}}</p>
+ <div class="promo" id="promo-fosmob">
+ <a href="{{ devmo_url('Mozilla/Firefox_for_Android')}}">
+ <h2>{{ _('Firefox MOBILE<br />for developers') | safe }}</h2>
+ <p>{{ _('How to use device APIs, test sites, & build mobile add-ons') }}</p>
</a>
<div></div>
</div>
- {% if waffle.switch('social_promo') %}
- <div class="promo" id="promo-social">
- <a href="{{_("docs/Social_API")}}">
- <h2>{{_("Make Firefox more social")}}</h2>
- <p>{{_("Learn about the social API")}} &raquo;</p>
- </a>
- <div></div>
- </div>
- {% else %}
- <div class="promo" id="promo-aurora">
- <a href="{{_("http://www.mozilla.com/en-US/firefox/channel/")}}">
- <h2>{{_("Firefox Aurora")}}</h2>
- <p>{{_("Experience the latest desktop and mobile features in Aurora and help shape the future of Firefox.")}}</p>
+ <div class="promo" id="promo-fxdev">
+ <a href="{{ devmo_url('Firefox_for_developers') }}">
+ <h2>{{ _('Firefox<br />for developers') | safe }}</h2>
+ <p>{{ _('See what’s new for web developers in the latest version of Firefox') }}</p>
</a>
<div></div>
</div>
- {% endif %}
+
</section><!-- /#home-promos -->
@@ -1,20 +1,18 @@
from nose.tools import eq_, ok_
from pyquery import PyQuery as pq
import test_utils
-from waffle.models import Switch
import constance.config
from sumo.tests import LocalizingClient
from sumo.urlresolvers import reverse
-def get_promos(client, url):
+def get_promos(client, url, selector):
r = client.get(url, follow=True)
eq_(200, r.status_code)
doc = pq(r.content)
- aurora_promo = doc.find('#promo-aurora')
- social_promo = doc.find('#promo-social')
- return aurora_promo, social_promo
+ promo = doc.find(selector)
+ return promo
class HomeTests(test_utils.TestCase):
@@ -23,16 +21,8 @@ def setUp(self):
def test_social_promo(self):
url = reverse('landing.views.home')
-
- aurora_promo, social_promo = get_promos(self.client, url)
- ok_(aurora_promo)
- ok_(not social_promo)
-
- Switch.objects.create(name="social_promo", active=True)
-
- aurora_promo, social_promo = get_promos(self.client, url)
- ok_(not aurora_promo)
- ok_(social_promo)
+ promo = get_promos(self.client, url, '#promo-fosdev')
+ ok_(promo)
def test_google_analytics(self):
url = reverse('landing.views.home')
View
@@ -416,11 +416,12 @@ footer .languages { float: right; text-align: right; margin: 0 0 .5em; }
/*** @Promos *********/
#home-promos { clear: both; overflow: hidden; }
-.home-promos .promo { float: left; position: relative; width: 218px; min-height: 163px; margin: 0 20px 40px 0; border: 1px solid rgba(0,0,0,.1); color: #fff; font-size: .714em; text-align: center; background: #666 url("../img/bg-check-dk.png"); -moz-box-shadow: 0 2px 2px rgba(0,0,0,.15); -webkit-box-shadow: 0 2px 2px rgba(0,0,0,.15); box-shadow: 0 2px 2px rgba(0,0,0,.15); }
+.home-promos .promo { float: left; position: relative; width: 218px; min-height: 163px; margin: 0 20px 40px 0; border: 1px solid #333; color: #fff; font-size: .714em; background: #666 url("../img/bg-check-dk.png"); -moz-box-shadow: 0 2px 2px rgba(0,0,0,.15); -webkit-box-shadow: 0 2px 2px rgba(0,0,0,.15); box-shadow: 0 2px 2px rgba(0,0,0,.15); }
.home-promos .promo:last-child { margin-right: 0; }
.home-promos .promo a { position: absolute; left: 0; top: 0; z-index: 10; display: block; height: 133px; width: 188px; padding: 15px; color: #fff; text-decoration: none; }
.home-promos .promo h2 { margin: 0 0 .1em; font: 2.4em/1 "Bebas Neue"; text-transform: uppercase; letter-spacing: .5px; }
.home-promos .promo .more { font-size: 1.3em; }
+.home-promos .promo p { width: 125px; }
.home-promos .promo div { position: absolute; z-index: 5; height: 163px; width: 218px; background: url("../img/bg-homepromos.png") no-repeat;
opacity: .6;
-moz-transition-property: opacity, background-position;
@@ -469,6 +470,22 @@ html[lang="en-US"] #promo-social div { background: url("../img/bg-social-promo-n
#promo-apps:hover .more { margin-top: -.1em; font-size: 1.4em; text-shadow: 2px 3px 5px rgba(0,0,0,.25); -moz-transition: all .2s ease-in; -webkit-transition: all .2s ease-in; -o-transition: all .2s ease-in; transition: all .2s ease-in; }
#promo-apps:hover div { box-shadow: inset 0 0 30px rgba(150,30,0,.25); -moz-transition: box-shadow .2s ease-in; -webkit-transition: box-shadow .2s ease-in; -o-transition: box-shadow .2s ease-in; transition: box-shadow .2s ease-in; }
+.home-promos .promo { background-image: url("../img/bg-promos-homepage.jpg"); }
+.home-promos .promo div { background-image: url("../img/bg-promos-top-homepage.jpg"); }
+.home-promos .promo#promo-webapps { background-color: #667680; background-position: 0 0; }
+.home-promos .promo#promo-webapps div { background-position: 10px 0; }
+.home-promos .promo#promo-webapps:hover div, .home-promos .promo#promo-webapps:active div, .home-promos .promo#promo-webapps:focus div { background-position: -12px 0; }
+.home-promos .promo#promo-fosdev { background-color: #088dd2; background-position: 0 489px; }
+.home-promos .promo#promo-fosdev div { background-position: 10px -163px; }
+.home-promos .promo#promo-fosdev:hover div, .home-promos .promo#promo-fosdev:active div, .home-promos .promo#promo-fosdev:focus div { background-position: -12px -163px; }
+.home-promos .promo#promo-fosmob { background-color: #de5d0a; background-position: 0 326px; }
+.home-promos .promo#promo-fosmob div { background-position: 10px -326px; }
+.home-promos .promo#promo-fosmob:hover div, .home-promos .promo#promo-fosmob:active div, .home-promos .promo#promo-fosmob:focus div { background-position: -12px -326px; }
+.home-promos .promo#promo-fxdev { background-color: #022856; background-position: 0 163px; }
+.home-promos .promo#promo-fxdev div { background-position: 10px -489px; }
+.home-promos .promo#promo-fxdev:hover div, .home-promos .promo#promo-fxdev:active div, .home-promos .promo#promo-fxdev:focus div { background-position: -12px -489px; }
+
+
.home-extra #webfwd-promo { margin: -15px 0 1.5em; }
.home-extra #snippet-promo a { background: url("../img/features/labs_snippets_landing.png"); width:456px; height:150px; position:relative; display: block; font-family: "Open Sans", sans-serif; text-shadow: 1px 1px 0 #fff; }
.home-extra #snippet-promo a span.heading { display: block; color: #484848; font-size: 1.9em; position: absolute; top:20px; left: 20px; display: inline-block; line-height: 1.2em; }
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 01ba100

Please sign in to comment.