bug 833468 - MWC corner badge
This commit is contained in:
Родитель
17aa831dfa
Коммит
ef1c26393f
|
@ -27,6 +27,8 @@
|
|||
data-close="{{ _('Close') }}"
|
||||
{% endblock %}
|
||||
|
||||
{% block mwc_badge %}{% endblock %}
|
||||
|
||||
{% block site_header %}
|
||||
<header id="masthead">
|
||||
<a href="http://www.mozilla.org/" id="tabzilla">{{ _('Mozilla') }}</a>
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
data-secondstextex="{{ _('seconds') }}"
|
||||
{% endblock %}
|
||||
|
||||
{% block mwc_badge %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<article id="main-content" role="main">
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
{{ js('mozorg-resp') }}
|
||||
{% endblock %}
|
||||
|
||||
{% block mwc_badge %}{% endblock %}
|
||||
|
||||
{% block site_header %}
|
||||
<header id="masthead">
|
||||
<a href="http://www.mozilla.org/" id="tabzilla">{{ _('Mozilla') }}</a>
|
||||
|
|
|
@ -719,6 +719,32 @@ nav.menu-bar {
|
|||
}
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* {{{ MWC badge */
|
||||
#mwc-badge {
|
||||
display: none;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
body.mwc2013 #mwc-badge {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#mwc-badge a {
|
||||
display: block;
|
||||
text-indent: -999em;
|
||||
overflow: hidden;
|
||||
width: 140px;
|
||||
height: 140px;
|
||||
background: url(/media/img/firefox/partners/mwc_badge-corner.png) no-repeat;
|
||||
color: #fff;
|
||||
border-bottom-right-radius: 100%;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ Responsive Grid */
|
||||
|
||||
/* Tablet Layout: 760px */
|
||||
|
@ -1044,6 +1070,10 @@ nav.menu-bar {
|
|||
top: -10px;
|
||||
}
|
||||
|
||||
#mwc-badge {
|
||||
display: none;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -289,6 +289,34 @@ input[type=text]:focus {
|
|||
}
|
||||
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ MWC badge */
|
||||
#mwc-badge {
|
||||
display: none;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
body.mwc2013 #mwc-badge {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#mwc-badge a {
|
||||
display: block;
|
||||
text-indent: -999em;
|
||||
overflow: hidden;
|
||||
width: 140px;
|
||||
height: 140px;
|
||||
background: url(/media/img/firefox/partners/mwc_badge-corner.png) no-repeat;
|
||||
color: #fff;
|
||||
border-bottom-right-radius: 100%;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ Less Framework Grid */
|
||||
|
||||
/* Default Layout: 992px.
|
||||
|
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 5.3 KiB |
|
@ -136,4 +136,8 @@
|
|||
}
|
||||
});
|
||||
});
|
||||
|
||||
// set a cookie
|
||||
document.cookie = 'seen_mwc2013=true;expires=Tue, 5 Mar 2013 00:00:01 UTC;path=/'
|
||||
|
||||
})(window, window.jQuery, window.enquire, window.Modernizr, window.trans);
|
||||
|
|
|
@ -44,4 +44,26 @@
|
|||
// Add class to reflect javascript availability for CSS
|
||||
h.className = h.className.replace(/\bno-js\b/, 'js');
|
||||
})();
|
||||
})();
|
||||
|
||||
|
||||
// Read cookies
|
||||
function readCookie(name) {
|
||||
var nameEQ = name + "=";
|
||||
var ca = document.cookie.split(';');
|
||||
for(var i=0;i < ca.length;i++) {
|
||||
var c = ca[i];
|
||||
while (c.charAt(0)==' ') c = c.substring(1,c.length);
|
||||
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded',function(){
|
||||
// Add class if MWC cookie is true
|
||||
var seen_mwc = readCookie('seen_mwc2013');
|
||||
if (seen_mwc === 'true') {
|
||||
document.body.className += ' mwc2013';
|
||||
}
|
||||
});
|
||||
|
||||
})();
|
||||
|
|
|
@ -33,6 +33,11 @@
|
|||
<body id="{% block body_id %}{% endblock %}" class="html-{{ DIR }} {% block body_class %}{% endblock %}"{% block body_attrs %}{% endblock %}>
|
||||
<div id="strings" {% block string_data %}{% endblock %}></div>
|
||||
<div id="outer-wrapper">
|
||||
|
||||
{% block mwc_badge %}
|
||||
<div id="mwc-badge"><a href="{{ php_url('/firefox/partners') }}">{{ _('Mobile World Congress') }}</a></div>
|
||||
{% endblock %}
|
||||
|
||||
<div id="wrapper">
|
||||
|
||||
{% block site_header %}
|
||||
|
|
|
@ -32,6 +32,11 @@
|
|||
|
||||
<body id="{% block body_id %}{% endblock %}" class="html-{{ DIR }} {% block body_class %}{% endblock %}"{% block body_attrs %}{% endblock %}>
|
||||
<div id="outer-wrapper">
|
||||
|
||||
{% block mwc_badge %}
|
||||
<div id="mwc-badge"><a href="{{ php_url('/firefox/partners') }}">{{ _('Mobile World Congress') }}</a></div>
|
||||
{% endblock %}
|
||||
|
||||
<div id="wrapper">
|
||||
|
||||
{% block site_header %}
|
||||
|
|
Загрузка…
Ссылка в новой задаче