This commit is contained in:
Matt Claypotch 2011-07-21 00:58:29 -07:00
Родитель 2dd496e38b
Коммит 40a30bc998
6 изменённых файлов: 164 добавлений и 102 удалений

Просмотреть файл

@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "impala/base.html" %}
{% block title %}
{% if query.q %}
@ -8,107 +8,110 @@
{% endif %}
{% endblock %}
{% block bodyclass %}listing{% endblock %}
{% block extrahead %}
<meta name="WT.oss" content="{{ query.q }}">
<meta name="WT.oss_r" content="{{ pager.paginator.count }}">
{% endblock %}
{% block content %}
<section class="primary" role="main">
<header class="results-head">
{{ breadcrumbs([(None, _('Search'))]) }}
<h2>{{ _('Search Results') }}</h2>
<h3 class="results-count">{{ showing(query.q, query.tag, pager) }}</h3>
</header>
<section class="secondary refine" role="complementary">
<h2>{{ _('Refine Results') }}</h2>
<div class="listing results">
<div>
<h3>{{ _('Sort by') }}</h3>
<ul>
{% for val, choice in form.fields.sort.choices %}
<li {% if val == query.sort %}class="selected"{% endif %}>
<a href="{{ request.get_full_path()|urlparams(sort=val, page=None) }}">
{{ choice }}</a>
</li>
{% endfor %}
</ul>
</div>
<div>
<ul>
<li {% if not query.atype %}class="selected"{% endif %}>
<a href="{{ request.get_full_path()|urlparams(atype=None, cat=None, page=None) }}">{{ _('All Add-ons') }}</a>
</li>
{% for addon_type, cats in categories %}
<li {% if addon_type == query.atype and not query.cat %}class="selected"{% endif %}>
<a href="{{ request.get_full_path()|urlparams(atype=addon_type, cat=None, page=None) }}">{{ amo.ADDON_TYPES[addon_type] }}</a></li>
<li>
<ul>
{% for cat in cats %}
<li {%if cat.id == query.cat %}class="selected"{% endif %}>
<a href="{{ request.get_full_path()|urlparams(atype=addon_type, cat=cat.id, page=None) }}">{{ cat.name }}</a>
</li>
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>
</div>
<div>
<h3>{{ _('Compatible with') }}</h3>
<ul>
{% for version in versions if version|float not in APP.exclude_versions and version|float > APP.min_display_version %}
<li {% if version == query.appver %}class="selected"{% endif %}>
<a href="{{ request.get_full_path()|urlparams(appver=version, page=None) }}">
{{ version }}</a>
</li>
{% endfor %}
</ul>
</div>
<div>
<h3>{{ _('Platforms') }}</h3>
<ul>
{% for platform in APP.platforms.values() %}
{% if platform in (amo.PLATFORM_ALL, amo.PLATFORM_ALL_MOBILE)
or platform.id in platforms %}
<li {% if platform.id == query.platform %}class="selected"{% endif %}>
<a href="{{ request.get_full_path()|urlparams(platform=platform.shortname, page=None) }}">
{{ platform.name }}</a>
</li>
{% endif %}
{% endfor %}
</ul>
</div>
<div>
<h3>{{ _('Tags') }}</h3>
<ul>
{% for tag in qs.facets.tags %}
<li {% if tag.term == query.tag %}class="selected"{% endif %}>
<a href="{{ request.get_full_path()|urlparams(tag=tag.term, page=None) }}">
{{ tag.term }}</a>
</li>
{% endfor %}
</ul>
</div>
</section>
<section class="primary" role="main">
<div class="listing results island hero c">
<header>
<h2>{{ _('Search Results') }}</h2>
</header>
<header>
{{ impala_addon_listing_header(
request.get_full_path()|urlparams(page=None),
form.fields.sort.choices, query.sort) }}
</header>
{% if pager.object_list %}
<div class="results-inner">
{{ addon_listing_header(request.get_full_path()|urlparams(page=None),
form.fields.sort.choices, query.sort) }}
{{ addon_listing_items(pager.object_list, show_date=query.sort, src='search') }}
</div>
<div class="listing-footer">
{{ pager|paginator }}
</div>
{{ pager|impala_paginator }}
{{ impala_addon_listing_items(pager.object_list, show_date=query.sort,
src='search') }}
{{ pager|impala_paginator }}
{% else %}
{% include 'search/no_results.html' %}
{% endif %}
</div>
</section>
<section class="secondary" role="complementary">
<div id="refine-results" class="highlight">
<h3>{{ _('Refine Results') }}</h3>
<div id="refine-sort">
<h5>{{ _('Sort by') }}</h5>
<ul class="refinements">
{% for val, choice in form.fields.sort.choices %}
<li {% if val == query.sort %}class="selected"{% endif %}>
<a href="{{ request.get_full_path()|urlparams(sort=val, page=None) }}">
{{ choice }}</a>
</li>
{% endfor %}
</ul>
</div>
<div id="refine-category">
<h5>{{ _('Categories') }}</h5>
<ul class="refinements">
{% for addon_type, cats in categories %}
<li {% if addon_type == query.atype and not query.cat %}class="selected"{% endif %}>
<a href="{{ request.get_full_path()|urlparams(atype=addon_type, cat=None, page=None) }}">{{ amo.ADDON_TYPES[addon_type] }}</a></li>
<li>
<ul>
{% for cat in cats %}
<li {%if cat.id == query.cat %}class="selected"{% endif %}>
<a href="{{ request.get_full_path()|urlparams(atype=addon_type, cat=cat.id, page=None) }}">{{ cat.name }}</a>
</li>
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>
</div>
<div id="refine-compatibility">
<h5>{{ _('Compatible with') }}</h5>
<ul class="refinements">
{% for version in versions if version|float not in APP.exclude_versions and version|float > APP.min_display_version %}
<li {% if version == query.appver %}class="selected"{% endif %}>
<a href="{{ request.get_full_path()|urlparams(appver=version, page=None) }}">
{{ version }}</a>
</li>
{% endfor %}
</ul>
</div>
<div id="refine-platforms">
<h5>{{ _('Platforms') }}</h5>
<ul class="refinements">
{% for platform in APP.platforms.values() %}
{% if platform in (amo.PLATFORM_ALL, amo.PLATFORM_ALL_MOBILE)
or platform.id in platforms %}
<li {% if platform.id == query.platform %}class="selected"{% endif %}>
<a href="{{ request.get_full_path()|urlparams(platform=platform.shortname, page=None) }}">
{{ platform.name }}</a>
</li>
{% endif %}
{% endfor %}
</ul>
</div>
<div id="refine-tags">
<h5>{{ _('Tags') }}</h5>
<ul class="refinements">
{% for tag in qs.facets.tags %}
<li {% if tag.term == query.tag %}class="selected"{% endif %}>
<a href="{{ request.get_full_path()|urlparams(tag=tag.term, page=None) }}">
{{ tag.term }}</a>
</li>
{% endfor %}
</ul>
</div>
</div>
</section>
{% endblock %}

Просмотреть файл

@ -1,6 +1,8 @@
// Colors
@link: #447BC4;
@note-gray: #999;
@dark-gray: #333;
@light-gray: #ccc;
@red: #C63717;
@error-red: #C00000;
@orange: #D16B00;
@ -9,8 +11,8 @@
// Font Stacks
@sans-stack: "trebuchet ms", Helvetica, Arial, sans-serif;
@head-sans: "trebuchet ms", sans-serif;
@sans-stack: "Helvetica Neue", Arial, sans-serif;
@head-sans: "Trebuchet MS", sans-serif;
@serif-stack: Georgia, serif;
@mono-stack: "andale mono", monospace;

Просмотреть файл

@ -158,6 +158,13 @@ header .feed {
color: #666;
}
}
.paginator + .item {
margin-top: 1em;
}
.item + .paginator {
padding-top: 1em;
border-top: 1px dotted @border-blue;
}
.html-rtl .listing .primary .item {
.collector-note,

Просмотреть файл

@ -0,0 +1,43 @@
@import 'lib';
.refine {
padding-top: 16px;
h2 {
padding: 0;
line-height: 1;
}
h3 {
font-size: 14px;
margin-bottom: 4px;
font-weight: bold;
}
div {
margin-top: 14px;
padding-top: 14px;
border-top: 1px solid @border-blue;
}
ul {
margin: 0;
}
li {
border: 0;
a {
line-height: 18px;
padding: 0;
}
&.selected a {
font-weight: bold;
color: @orange;
}
ul {
padding-left: 12px;
}
}
}
.html-rtl {
.refine {
li ul {
padding: 0 12px 0 0;
}
}
}

Просмотреть файл

@ -49,7 +49,7 @@ pre, code, kbd, tt, samp, tt {
.primary, .modal {
h2 {
color: #333;
color: @dark-gray;
font-family: @serif-stack;
font-style: italic;
}
@ -70,7 +70,7 @@ pre, code, kbd, tt, samp, tt {
}
}
.popup h3 {
color: #333;
color: @dark-gray;
font-family: @serif-stack;
font-style: italic;
}
@ -119,14 +119,20 @@ pre, code, kbd, tt, samp, tt {
}
}
.secondary h2 {
font-family: @sans-stack;
font-style: normal;
font-weight: bold;
text-transform: uppercase;
color: #484848;
.seeall {
.defaultlink
.secondary {
h2 {
font-family: @sans-stack;
font-style: normal;
font-weight: bold;
text-transform: uppercase;
color: @dark-gray;
.seeall {
.defaultlink
}
}
h3 {
font-family: @sans-stack;
color: @dark-gray;
}
}

Просмотреть файл

@ -436,6 +436,7 @@ MINIFY_BUNDLES = {
'css/impala/listing.less',
'css/impala/users.less',
'css/impala/collections.less',
'css/impala/search.less',
),
'zamboni/discovery-pane': (
'css/zamboni/discovery-pane.css',