@import 'boxes/event-line-box';
@import 'boxes/job-line-box';
@import 'boxes/product-box';
+@import 'boxes/search-box';
// Sliders
@import 'sliders/slider-page';
}
+}
+
+.search-form {
+
input[type="text"] {
border: 0;
--- /dev/null
+$module: ".search-box";
+
+#{$module} {
+
+ position: relative;
+ @include margin-bottom(2);
+
+ &__title {
+ @include margin(0 0 1 0);
+ font-weight: weight(bold);
+ text-transform: uppercase;
+
+ i {
+ display: inline-block;
+ @include margin-left(.5);
+ font-size: 0.75em;
+ position: relative;
+ top: -5px;
+ }
+ }
+
+ &__subtitle {
+
+ @include font-size(m);
+ @include line-height(1);
+ @include typeface(sans-serif);
+
+ @include margin-top(-.5);
+ @include margin-bottom(1);
+
+ }
+
+ &__content {
+
+ @include font-size(s);
+ @include line-height(1);
+ @include typeface(serif);
+ font-weight: weight(light);
+
+ }
+
+}
+{% extends "core/inc/search_card.html" %}
{% load i18n future mezzanine_tags event_tags keyword_tags disqus_tags organization_tags %}
-<div class="row event-line-box">
+{% block title %}
+ {{ event.title }}
+{% endblock %}
- <div class="col-sm-2 col-md-3 col-lg-3 event-line-box__month">
-
- {% ifchanged event.start.month %}
- {{ event.start|date:'F' }}
- {% endifchanged %}
+{% block icon %}calendar-o{% endblock %}
+{% block subtitle %}
+ <div class="search-box__subtitle">
+ {% include 'agenda/includes/event_date_line.html' %}
</div>
-
- <div class="col-sm-10 col-md-9 col-lg-9 event-line-box__content">
-
- <div class="row">
-
- <div class="col-xs-3">
- {% with True as unit_booking %}
- {% include 'agenda/includes/event_metainfo_line.html' %}
- {% endwith %}
- </div>
- <div class="col-xs-3">
- {% with event.images.all|get_type:'card' as images %}
- {% if images %}
- <a href="{{ event.get_absolute_url }}">
- <img class="event-line-box__image" src="{{ MEDIA_URL }}{% thumbnail images.0.file 203 140 %}" width="203" height="140">
- </a>
- {% else %}
- {% with event.parent.images.all|get_type:'card' as images %}
- {% if images %}
- <a href="{{ event.get_absolute_url }}">
- <img class="event-line-box__image" src="{{ MEDIA_URL }}{% thumbnail images.0.file 203 140 %}" width="203" height="140">
- </a>
- {% endif %}
- {% endwith %}
- {% endif %}
- {% endwith %}
- </div>
- <div class="col-xs-6">
- {% keywords_for event as tags %}
- {% if event.departments.all.0 or tags %}
- <div class="event-line-box__tags">
- {% if event.departments.all.0 %}
- <div class="tag tag--small dashed">
- {{ event.departments.all.0.department.name }}
- </div>
- {% endif %}
- {% if event.category %}
- <div class="tag tag--small tag--category">
- {{ event.category }}
- </div>
- {% endif %}
- </div>
- {% endif %}
- <h2 class="event-line-box__title">
- <a href="{{ event.get_absolute_url }}">{{ event.title }}</a>
- </h2>
- <div class="event-line-box__desc">
- {{ event.description|slice:":100" }}
+{% endblock %}
+
+{% block tags %}
+ {% keywords_for event as tags %}
+ {% if event.departments.all.0 or tags %}
+ {% if event.departments.all.0 %}
+ <div class="event-line-box__tags">
+ <div class="tag tag--small dashed">
+ {{ event.departments.all.0.department.name }}
</div>
</div>
+ {% endif %}
+ {% endif %}
+{% endblock %}
- </div>
-
- </div>
+{% block url %}
+ {{ event.get_absolute_url }}
+{% endblock %}
-</div>
+{% block content %}
+ {{ event.description|slice:":100" }}
+{% endblock %}
+++ /dev/null
-{% extends "core/inc/generic_card.html" %}
-{% load i18n pages_tags mezzanine_tags media_tags organization_tags %}
-
-{% block image %}
- <img src="{{ MEDIA_URL }}{% thumbnail images.first.file 427 0 %}" data-src="{{ MEDIA_URL }}{% thumbnail images.0.file 427 286 %}" class="lazyload" alt="" />
-{% endblock %}
--- /dev/null
+<div class="search-box">
+
+ {% block tags %}
+ {% endblock %}
+
+ <a href="{% block url %}{% endblock %}">
+ <h2 class="search-box__title dotted">
+ {% block title %}
+ {% endblock %}
+ <i class="fa fa-{% block icon %}{% endblock %}"></i>
+ </h2>
+ </a>
+
+ {% block subtitle %}
+ {% endblock %}
+
+ <div class="search-box__content">
+
+ {% block content %}
+ {% endblock %}
+ </div>
+
+</div>
<div class="container">
<div class="row">
<div class="col-md-10">
- <form action="{% url "search" %}" role="search">
- <input class="form-control" placeholder="{% trans "Type something" %}" type="text" name="q" value="{{ request.GET.q }}">
+ <form action="{% url "search" %}" role="search" class="search-form">
+ <input class="form-control" placeholder="{% trans "Type something" %}" type="text" name="q" value="">
<button type="submit">
<i class="fa fa-search" aria-hidden="true"></i>
</button>
+{% extends "core/inc/search_card.html" %}
{% load i18n mezzanine_tags organization_tags %}
+
+{% block title %}
+ {{ result }}
+{% endblock %}
+
+{% block icon %}file-{{playlist.type}}-o{% endblock %}
+
+{% block tags %}
+ <div class="event-line-box__tags">
+ <div class="tag tag--small dashed dashed--gray">
+ {{playlist.type}}
+ </div>
+ </div>
+{% endblock %}
+
+{% block url %}
+ {{ playlist.get_absolute_url }}
+{% endblock %}
+
+{% block content %}
+ {% if playlist.description != playlist|stringformat:"s" %}
+ {{ playlist.description|truncatewords_html:200|safe }}
+ {% endif %}
+{% endblock %}
+
{% with playlist.get_absolute_url as playlist_url %}
{% if playlist.medias.first.media.poster_url %}
<!-- url of the media is distant. We can't generate back side thumbnail. Do it with css pliz -->
+{% extends "core/inc/search_card.html" %}
{% load i18n mezzanine_tags organization_tags %}
-{% with page.get_absolute_url as page_url %}
- <h5>
- {% if page_url %}
- <a href="{{ page_url }}">{{ result }}</a>
+
+{% block title %}
+ {{ result }}
+{% endblock %}
+
+{% block icon %}files-o{% endblock %}
+
+{% block tags %}
+ {% with page.get_ascendants|last as top_level_parent %}
+ {% if top_level_parent.get_content_model.title %}
+ <div class="event-line-box__tags">
+ <div class="tag tag--small dashed">
+ {{ top_level_parent.get_content_model.title }}
+ </div>
+ </div>
+ {% elif page.departmentpage %}
+ <div class="event-line-box__tags">
+ <div class="tag tag--small dashed">
+ {{ page.departmentpage.title }}
+ </div>
+ </div>
{% else %}
- {{ result }}
+ <div class="event-line-box__tags">
+ <div class="tag tag--small dashed dashed--gray">
+ {% trans "Link" %}
+ </div>
+ </div>
{% endif %}
- </h5>
+ {% endwith %}
+{% endblock %}
+
+{% block url %}
+ {{ page.get_absolute_url }}
+{% endblock %}
+
+{% block content %}
{% if result.description != result|stringformat:"s" %}
- <p>{{ result.description|truncatewords_html:200|safe }}</p>
+ {{ result.description|truncatewords_html:200|safe }}
{% endif %}
- {% if page_url %}
- <a href="{{ page_url }}">{% trans "read more" %}</a>
- {% endif %}
-{% endwith %}
+{% endblock %}
{% endblock %}
{% block breadcrumb_menu %}
-<li class="breadcrumb__item">
- <a href="{% url "home" %}">{% trans "Home" %}</a>
-</li>
-<li class="breadcrumb__item active">{% trans "Search Results" %}</li>
+ <li class="breadcrumb__item">
+ <a href="{% url "home" %}">{% trans "Home" %}</a>
+ </li>
+ <li class="breadcrumb__item active">{% trans "Search Results" %}</li>
{% endblock %}
{% block main %}
-<div class="row">
- <div class="col-lg-8 col-md-push-2">
- <h1 class="dotted">{% trans "Search Results" %}</h1>
- </div>
-</div>
-
-<div class="row">
- <div class="col-lg-8 col-lg-push-2">
- <p>
- {% if results.paginator.count == 0 %}
- {% blocktrans %}
- No results were found in {{ search_type }} matching your query: {{ query }}
- {% endblocktrans %}
- {% else %}
- {% blocktrans with start=results.start_index end=results.end_index total=results.paginator.count %}
- Showing {{ start }} to {{ end }} of {{ total }} results in {{ search_type }} matching your query: {{ query }}
- {% endblocktrans %}
- {% endif %}
- </p>
-
- <p>
- <h4>Filter:</h4>
- {% for key,value in filter_dict.items %}
- <a href="{{ value.url }}" title="{{ value.verbose_name }}">{{ value.verbose_name }} {{ value.count }}</a><br>
- {% endfor %}
- {% if cancel_filter_url %}
- <a href="{{ cancel_filter_url }}" title="">Cancel filter</a>
- {% endif %}
- </p>
- {% for result in results.object_list %}
- {{ result|classname }}
- {% if result|classname == 'Event' %}
- {% with result as event %}
- {% include 'agenda/includes/event_search.html' %}
- {% endwith %}
- {% elif result|classname == 'Playlist' %}
- {% with result as playlist %}
- {% include 'media/inc/playlist_search.html' %}
- {% endwith %}
- {% else %}
- {% with result as page %}
- {% include 'pages/includes/page_search.html' %}
- {% endwith %}
- {% endif %}
- {% endfor %}
+ <div class="page">
+ <div class="container">
+
+ <div class="row">
+ <div class="col-sm-9 col-sm-push-3 col-lg-9 col-lg-push-2 white-bg">
+
+ <form action="{% url "search" %}" role="search" class="search-form">
+ <input class="form-control" placeholder="{% trans "Type something" %}" type="text" name="q" value="{{ request.GET.q }}">
+ <button type="submit">
+ <i class="fa fa-search" aria-hidden="true"></i>
+ </button>
+ </form>
+
+ <div class="mt2 mb2">
+ <p>
+ {% if results.paginator.count == 0 %}
+ {% blocktrans %}
+ No results were found in {{ search_type }} matching your query: {{ query }}
+ {% endblocktrans %}
+ {% else %}
+ {% blocktrans with start=results.start_index end=results.end_index total=results.paginator.count %}
+ Showing {{ start }} to {{ end }} of {{ total }} results in {{ search_type }} matching your query: {{ query }}
+ {% endblocktrans %}
+ {% endif %}
+ </p>
+ </div>
+
+ </div>
+ </div>
+
+ <div class="row">
+
+ <div class="col-sm-3 col-lg-2 page__sidebar">
+
+ <div style="position: relative;">
+ <ul class="nav-tree nav-tree--level-0" data-sticky data-sticky-parent="row" data-sticky-offset="100" data-sticky-detach-at="971">
+ {% for key,value in filter_dict.items %}
+ <li class="nav-tree__item">
+ <a class="nav-tree__link nav-tree__link--filter" href="{{ value.url }}">
+ {{ value.verbose_name }} ({{ value.count }})
+ </a>
+ </li>
+ {% endfor %}
+ {% if cancel_filter_url %}
+ <li class="nav-tree__item">
+ <a class="nav-tree__link nav-tree__link--filter active" href="{{ cancel_filter_url }}" title="">Cancel filter</a>
+ </li>
+ {% endif %}
+ </ul>
+ </div>
+
+
+ </div>
+
+ <div class="mb2 col-sm-9 col-lg-8 white-bg page__content">
+
+ {% for result in results.object_list %}
+ {# result|classname #}
+ {% if result|classname == 'Event' %}
+ {% with result as event %}
+ {% include 'agenda/includes/event_search.html' %}
+ {% endwith %}
+ {% elif result|classname == 'Playlist' %}
+ {% with result as playlist %}
+ {% include 'media/inc/playlist_search.html' %}
+ {% endwith %}
+ {% else %}
+ {% with result as page %}
+ {% include 'pages/includes/page_search.html' %}
+ {% endwith %}
+ {% endif %}
+ {% endfor %}
+
+ </div>
+ </div>
+
+ </div>
{% pagination_for results %}
+
</div>
-</div>
{% endblock %}