зеркало из https://github.com/mozilla/kitsune.git
Added top section for warnings to landing pages. [bug 638819]
This commit is contained in:
Родитель
47d0cd8756
Коммит
20efe76b8b
|
@ -19,6 +19,9 @@
|
|||
</div>
|
||||
</div>
|
||||
<div id="home-content">
|
||||
<div id="home-content-top">
|
||||
{% if top %}{{ top.html|safe }}{% endif %}
|
||||
</div>
|
||||
<div id="home-content-quick">
|
||||
{{ quick.html|safe }}
|
||||
</div>
|
||||
|
|
|
@ -7,6 +7,9 @@
|
|||
{% set include_showfor = True %}
|
||||
|
||||
{% block content %}
|
||||
<div id="home-content">
|
||||
{% if top %}{{ top.html|safe }}{% endif %}
|
||||
</div>
|
||||
<h2>{{ _('Common Questions') }}</h2>
|
||||
<div class="common-questions">
|
||||
{{ common.html|safe }}
|
||||
|
|
|
@ -1,26 +1,33 @@
|
|||
import jingo
|
||||
from mobility.decorators import mobile_template
|
||||
from tower import ugettext_lazy as _lazy
|
||||
|
||||
from sumo.parser import get_object_fallback
|
||||
from wiki.models import Document
|
||||
from wiki.views import SHOWFOR_DATA
|
||||
|
||||
|
||||
HOME_DOCS = {'quick': 'Home page - Quick', 'explore': 'Home page - Explore'}
|
||||
HOME_DOCS = {'quick': 'Home page - Quick', 'explore': 'Home page - Explore',
|
||||
'top': 'Home page - Top'}
|
||||
MOBILE_DOCS = {'quick': 'Mobile home - Quick',
|
||||
'explore': 'Mobile home - Explore'}
|
||||
SYNC_DOCS = {'quick': 'Sync home - Quick', 'explore': 'Sync home - Explore'}
|
||||
'explore': 'Mobile home - Explore',
|
||||
'top': 'Mobile home - Top'}
|
||||
SYNC_DOCS = {'quick': 'Sync home - Quick', 'explore': 'Sync home - Explore',
|
||||
'top': 'Sync home - Top'}
|
||||
FXHOME_DOCS = {'quick': 'FxHome home - Quick',
|
||||
'explore': 'FxHome home - Explore'}
|
||||
'explore': 'FxHome home - Explore',
|
||||
'top': 'FxHome home - Top'}
|
||||
HOME_DOCS_FOR_MOBILE = {'common':
|
||||
'Desktop home for mobile - Common Questions'}
|
||||
'Desktop home for mobile - Common Questions',
|
||||
'top': 'Home page - Top'}
|
||||
MOBILE_DOCS_FOR_MOBILE = {'common':
|
||||
'Mobile home for mobile - Common Questions'}
|
||||
'Mobile home for mobile - Common Questions',
|
||||
'top': 'Mobile home - Top'}
|
||||
SYNC_DOCS_FOR_MOBILE = {'common':
|
||||
'Sync home for mobile - Common Questions'}
|
||||
'Sync home for mobile - Common Questions',
|
||||
'top': 'Sync home - Top'}
|
||||
FXHOME_DOCS_FOR_MOBILE = {'common':
|
||||
'FxHome home for mobile - Common Questions'}
|
||||
'FxHome home for mobile - Common Questions',
|
||||
'top': 'FxHome home - Top'}
|
||||
|
||||
|
||||
@mobile_template('landings/{mobile/}home.html')
|
||||
|
@ -51,7 +58,6 @@ def _data(docs, locale):
|
|||
"""Add the documents and showfor data to the context data."""
|
||||
data = {}
|
||||
for side, title in docs.iteritems():
|
||||
message = _lazy(u'The template "%s" does not exist.') % title
|
||||
data[side] = get_object_fallback(Document, title, locale, message)
|
||||
data[side] = get_object_fallback(Document, title, locale)
|
||||
data.update(SHOWFOR_DATA)
|
||||
return data
|
||||
|
|
|
@ -74,6 +74,11 @@ html[lang=ja] body div#featured {
|
|||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
#home-content-top {
|
||||
font-size: 14px;
|
||||
margin: 20px 10px 0;
|
||||
}
|
||||
|
||||
#home-content-quick, #home-content-explore {
|
||||
float: left;
|
||||
font-size: 14px;
|
||||
|
@ -114,7 +119,7 @@ html[lang=ja] body div#featured {
|
|||
|
||||
#home-content-explore {
|
||||
border-left: 2px dotted #a8c4ef;
|
||||
margin-top: 40px;
|
||||
margin: 20px 0 0;
|
||||
padding-left: 20px;
|
||||
width: 460px;
|
||||
}
|
||||
|
|
|
@ -115,6 +115,13 @@ article p {
|
|||
margin: 14px 0;
|
||||
}
|
||||
|
||||
/*************************************/
|
||||
/* Landing Page - Top content */
|
||||
/*************************************/
|
||||
#home-content {
|
||||
margin: 21px 14px 0;
|
||||
}
|
||||
|
||||
/*************************************/
|
||||
/* Landing Page - Common Questions */
|
||||
/*************************************/
|
||||
|
|
Загрузка…
Ссылка в новой задаче