Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions make_mozilla/projects/templates/projects/index.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
{% extends "projects/base.html" %}

{% if query %}
{% block page_title %}Filtered by {{ filters }} | {{ super() }}{% endblock %}
{% endif %}

{% block page_id %}projects-index{% endblock %}
{% block page_class %}{{ super() }} brochure-page{% endblock %}
{% block page_class %}{{ super() }} brochure-page {% if query %}filtered{% endif %}{% endblock %}

{% block content %}
{% if featured %}
{% if featured and not query %}
<div id="featured">
<h3>Featured Projects</h3>
<ul>
Expand All @@ -26,7 +30,7 @@ <h4><a href="{{ project.get_absolute_url() }}">
</div>
{% endif %}

<form action="#filter" id="filter">
<form action="" id="filter">
<div class="wrapper">
<h3 class="item">Filter projects by</h3>
{% for field in filter_form %}
Expand All @@ -37,7 +41,7 @@ <h3 class="item">Filter projects by</h3>
</form>

{% if projects %}
<h3>Webmaker Projects:</h3>
<h3>Webmaker Projects{% if query %} - filtered by {{ filters }}{% endif %}:</h3>
<ul class="project-flyer-list">
{% for project in projects %}
<li><div class="project-flyer">
Expand Down
7 changes: 4 additions & 3 deletions make_mozilla/projects/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,15 @@ def __call__(self, request):
'pagination': pagination,
'filter_form': filter_form,
'invitation': invitation,
'query': qs
'query': qs,
'filters': ", ".join(query.values())
})

index = Index()


def submit(request):
return jingo.render(request, 'projects/submit.html');
return jingo.render(request, 'projects/submit.html')


def details(request, slug):
Expand All @@ -126,4 +127,4 @@ def details(request, slug):

return jingo.render(request, 'projects/detail.html', {
'project': project
});
})
11 changes: 11 additions & 0 deletions media/css/base.less
Original file line number Diff line number Diff line change
Expand Up @@ -2772,6 +2772,17 @@ ul.tri-set img {
margin-top: -91px;
position: relative;
}
#projects-index.filtered #content {
border-top: none;
margin-top: 0;
}
#projects-index.filtered #content::before {
background: transparent;
height: 0;
}
#projects-index.filtered #content .constrained {
margin-top: 0;
}

#projects-index #featured {
position: absolute;
Expand Down