Commit 02f2054c authored by alexandre's avatar alexandre

fix a few remarks

parent 7ec5a8f0
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
:root { :root {
--color: #835f19; --color: #835f19;
--color: #2f545a; --color: #2f545a;
--font-size: 20px; --font-size: 20px;
...@@ -146,7 +147,6 @@ body { ...@@ -146,7 +147,6 @@ body {
/* Ça serait bien de faire un test pour voir à quel point ça /* Ça serait bien de faire un test pour voir à quel point ça
rend le rendu plus lent cf https://bocoup.com/weblog/text-rendering */ rend le rendu plus lent cf https://bocoup.com/weblog/text-rendering */
text-rendering: optimizeLegibility; text-rendering: optimizeLegibility;
color: var(--color); color: var(--color);
} }
...@@ -190,9 +190,7 @@ input[type=text] { box-sizing: border-box; } ...@@ -190,9 +190,7 @@ input[type=text] { box-sizing: border-box; }
.proposal textarea, .proposal textarea,
.proposal input[type=email], .proposal input[type=email],
.proposal input[type=text] { .proposal input[type=text] { width: 100%; }
width: 100%;
}
label, label,
input { input {
...@@ -212,12 +210,12 @@ input { ...@@ -212,12 +210,12 @@ input {
.outer-wrapper { .outer-wrapper {
max-width: 1200px; max-width: 1200px;
padding: 0 20px 0; padding: 0 20px;
margin: 0 auto; margin: 0 auto;
} }
@media (--desktop) { @media (--desktop) {
.outer-wrapper { padding: 0 40px 0; } .outer-wrapper { padding: 0 40px; }
} }
...@@ -342,9 +340,7 @@ input { ...@@ -342,9 +340,7 @@ input {
.secondary-menu, .secondary-menu,
.newsletter, .newsletter,
.newsletter__form { .newsletter__form { display: inline; }
display: inline;
}
.newsletter__email { width: 200px; } .newsletter__email { width: 200px; }
...@@ -474,11 +470,11 @@ input { ...@@ -474,11 +470,11 @@ input {
font-family: erbarre; font-family: erbarre;
} }
.dna__item { break-inside: avoid; page-break-inside: avoid; } .dna__item { break-inside: avoid; page-break-inside: avoid;
}
.dna__item + .dna__item { margin-top: var(--line-height); } .dna__item + .dna__item { margin-top: var(--line-height); }
.bio { .bio {
margin-bottom: var(--line-height); margin-bottom: var(--line-height);
font-family: erbarre; font-family: erbarre;
...@@ -723,26 +719,27 @@ input { ...@@ -723,26 +719,27 @@ input {
#headlines { margin-bottom: 20px; } #headlines { margin-bottom: 20px; }
.other-headlines { column-width: 150px; } .other-headlines { column-width: 200px; }
.article--main-headline { text-align: center; position: relative; margin-bottom: var(--line-height);}
.article--main-headline {
position: relative;
margin-bottom: var(--line-height);
text-align: center;
}
.article--main-headline .article__head-group { .article--main-headline .article__head-group {
height: 100%;
position: absolute; position: absolute;
top: 0; top: 0;
width: 100%;
display: flex; display: flex;
width: 100%;
height: 100%;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
} }
.article--main-headline .article__headline { .article--main-headline .article__headline {
color: #fcf296;
padding: 0 15%; padding: 0 15%;
color: #fcf296;
text-shadow: 0 0px black, 1px 1px black, 2px 2px black, 3px 3px black; text-shadow: 0 0px black, 1px 1px black, 2px 2px black, 3px 3px black;
font-size: 48px; font-size: 48px;
line-height: 42px; line-height: 42px;
...@@ -753,17 +750,15 @@ input { ...@@ -753,17 +750,15 @@ input {
text-shadow: 0 0px black, 1px 1px black, 2px 2px black, 3px 3px black; text-shadow: 0 0px black, 1px 1px black, 2px 2px black, 3px 3px black;
} }
.article--list-item { .article--list-item {
break-inside: avoid; break-inside: avoid;
page-break-inside: avoid; page-break-inside: avoid;
} }
.article--list-item + .article--list-item { margin-top: 32px; } .article--list-item + .article--list-item { margin-top: 32px; }
.article a { color: inherit; } .article a { color: inherit; }
.article__thumb { height: 75px; } .article__thumb { height: 75px; }
.article__thumb--full { .article__thumb--full {
...@@ -793,7 +788,7 @@ input { ...@@ -793,7 +788,7 @@ input {
.article--list-item .article__topper { margin-bottom: 4px; } .article--list-item .article__topper { margin-bottom: 4px; }
.article__metadata { .article__metadata {
font-size: 20px; font-size: 18px;
line-height: 1; line-height: 1;
} }
...@@ -803,12 +798,12 @@ input { ...@@ -803,12 +798,12 @@ input {
.article__issue, .article__issue,
.article__rubric-title { .article__rubric-title {
background-color: white;
padding: 1px 4px; padding: 1px 4px;
border: solid 2px; border: solid 2px;
margin-right: 3px; margin-right: 3px;
background-color: white;
white-space: nowrap; white-space: nowrap;
letter-spacing: .5px; letter-spacing: 0.5px;
} }
.article__issue { .article__issue {
...@@ -824,9 +819,7 @@ input { ...@@ -824,9 +819,7 @@ input {
font-weight: bold; font-weight: bold;
} }
.article__headline { .article__headline { text-transform: uppercase; }
text-transform: uppercase;
}
.article--detail .article__headline { .article--detail .article__headline {
font-size: 68px; font-size: 68px;
...@@ -879,15 +872,17 @@ input { ...@@ -879,15 +872,17 @@ input {
.article--list-item .article__lead { .article--list-item .article__lead {
margin-top: 4px; margin-top: 4px;
font-size: 16px; font-size: 15px;
line-height: 19px; line-height: 18px;
} }
.article--list-item .article__lead img { display: none; } .article--list-item .article__lead img { display: none; }
.article--teaser .article__topper { margin-bottom: 6px; } .article--teaser .article__topper { margin-bottom: 6px; }
.article--teaser .article__headline {font-size: 36px; line-height: 36px; }
.article--teaser .article__headline { font-size: 36px; line-height: 36px;
}
.article--teaser .article__body { margin-top: 6px; } .article--teaser .article__body { margin-top: 6px; }
...@@ -897,9 +892,7 @@ input { ...@@ -897,9 +892,7 @@ input {
/* Article general body text /* Article general body text
========================================================================== */ ========================================================================== */
.article--detail .article__body { .article--detail .article__body { margin-top: var(--line-height); }
margin-top: var(--line-height);
}
.article__body h2 { .article__body h2 {
margin-top: var(--line-height); margin-top: var(--line-height);
...@@ -1128,8 +1121,11 @@ input { ...@@ -1128,8 +1121,11 @@ input {
.related-issue { font-family: Erbarre; } .related-issue { font-family: Erbarre; }
.other_issues { margin-top: 3em; text-align: center; } .other_issues { margin-top: 3em; text-align: center;
.other_issues__issue { margin-bottom: 4px; display: inline-block; width: 50px; } }
.other_issues__issue { display: inline-block; width: 50px; margin-bottom: 4px;
}
.other_issues__title { .other_issues__title {
margin-bottom: calc(var(--line-height)/4); margin-bottom: calc(var(--line-height)/4);
...@@ -1140,7 +1136,8 @@ input { ...@@ -1140,7 +1136,8 @@ input {
text-align: center; text-align: center;
} }
.other_issues__edition { font-family: Erbarre; font-size: 15px; } .other_issues__edition { font-family: Erbarre; font-size: 15px;
}
.other_issues__thumb { .other_issues__thumb {
width: 100%; width: 100%;
...@@ -1164,31 +1161,29 @@ input { ...@@ -1164,31 +1161,29 @@ input {
.issue-splash .pilotes { font-family: Erbarre; } .issue-splash .pilotes { font-family: Erbarre; }
.issue-toc { column-width: 150px; margin-top: 40px; } .issue-toc { margin-top: 40px; column-width: 150px;
}
.issue-toc .article { margin-bottom: 1em; } .issue-toc .article { margin-bottom: 1em; }
.btn { .btn {
background-color: #faa; display: inline-block;
padding: 6px 12px;
border: 2px solid; border: 2px solid;
background-color: #faa;
border-radius: 5px; border-radius: 5px;
box-shadow: 3px 3px black; box-shadow: 3px 3px black;
display: inline-block;
font-family: Alfphabet-Condensed; font-family: Alfphabet-Condensed;
/* font-family: Erbarre; */ /* font-family: Erbarre; */
font-size: initial; font-size: initial;
padding: 6px 12px;
} }
.btn--big { .btn--big {
text-transform: uppercase; text-transform: uppercase;
letter-spacing: .5px; letter-spacing: 0.5px;
font-size: 21px; font-size: 21px;
} }
.btn:hover { .btn:hover {
background-color: #2f545a; background-color: #2f545a;
color: white; color: white;
......
...@@ -4,76 +4,84 @@ ...@@ -4,76 +4,84 @@
{% block content %} {% block content %}
<div style="column-width: 200px">
{% for object in object_list %}
<article class="article article--{{ object.rubric.type }} article--list-item">
<header class="article__header">
<p class="article__topper">
{% spaceless %}
<span class="article__rubric-title">{{ object.rubric.title|safe }}</span>
{% with object.get_issue as issue %}
{% if issue %}
<span class="article__issue">N<sup>o</sup>{{ issue.issue }}</span>
{% else %}
<span class="article__issue">Exclu web</span>
{% endif %}
{% endwith %}
{% endspaceless %}
</p>
<h1 class="article__headline"><a href="{% url 'article-detail-site' object.slug %}">{{ object.title|typogrify|safe }}</a></h1> <article class="article grid grid--gutters article--detail">
{% if object.subtitle %} <div class="grid__col grid__col--3of4" style="column-width: 200px;">
<h2 class="article__subhead">{{ object.subtitle|typogrify|safe }}</h2> {% for object in object_list %}
{% endif %} <article class="article article--{{ object.rubric.type }} article--list-item">
<header class="article__header">
<p class="article__topper">
{% spaceless %}
<span class="article__rubric-title">{{ object.rubric.title|safe }}</span>
{% with object.get_issue as issue %}
{% if issue %}
<span class="article__issue">N<sup>o</sup>{{ issue.issue }}</span>
{% endif %}
{% endwith %}
{% endspaceless %}
</p>
<!-- <dl class="u-join pilotes"> --> <h1 class="article__headline"><a href="{% url 'article-detail-site' object.slug %}">{{ object.title|typogrify|safe }}</a></h1>
<!-- <dt>Par</dt> -->
<!-- {% spaceless %} -->
<!-- {% for contribution in object.contributions.all %} -->
<!-- <dd><a href="{{ contribution.contributor.get_absolute_url }}">{{ contribution }}</a></dd> -->
<!-- {% endfor %} -->
<!-- {% endspaceless %} -->
<!-- </dl> -->
<p class="article__metadata"> {% if object.subtitle %}
<span class="article__byline">{{ object.authors|typogrify|safe }}</span> <h2 class="article__subhead">{{ object.subtitle|typogrify|safe }}</h2>
{% if object.articlemembershipweb_set.first %} {% endif %}
|
<span class="article__dateline">
Publié le {{ object.articlemembershipweb_set.first.web_publish_date|date:"d/m/Y à H:i" }}
</span>
{% endif %}
</p>
<div class="article__lead">{{ object.lead|truncatewords_html_custom:20|safe }}</div>
</header>
</article>
{% endfor %}
{% if is_paginated %} <!-- <dl class="u-join pilotes"> -->
<nav> <!-- <dt>Par</dt> -->
<ul class="pagination"> <!-- {% spaceless %} -->
{% if page_obj.has_previous %} <!-- {% for contribution in object.contributions.all %} -->
<li class="pagination__nav pagination__nav--left"><a href="?page={{ page_obj.previous_page_number }}" rel="prev">précédente</a></li> <!-- <dd><a href="{{ contribution.contributor.get_absolute_url }}">{{ contribution }}</a></dd> -->
{% else %} <!-- {% endfor %} -->
<li class="pagination__nav pagination__nav--left pagination__nav--disabled">précédente</li> <!-- {% endspaceless %} -->
{% endif %} <!-- </dl> -->
<p class="article__metadata">
<span class="article__byline">{{ object.authors|typogrify|safe }}</span>
{% if object.articlemembershipweb_set.first %}
|
<span class="article__dateline">
Publié le {{ object.articlemembershipweb_set.first.web_publish_date|date:"d/m/Y à H:i" }}
</span>
{% endif %}
</p>
<div class="article__lead">{{ object.lead|truncatewords_html_custom:30|safe }}</div>
</header>
</article>
{% endfor %}
{% if is_paginated %}
<nav>
<ul class="pagination">
{% if page_obj.has_previous %}
<li class="pagination__nav pagination__nav--left"><a href="?page={{ page_obj.previous_page_number }}" rel="prev">précédente</a></li>
{% else %}
<li class="pagination__nav pagination__nav--left pagination__nav--disabled">précédente</li>
{% endif %}
{% for i in paginator.page_range %} {% for i in paginator.page_range %}
{% if page_obj.number == i %} {% if page_obj.number == i %}
<li class="pagination__page pagination__page--current"><span>{{ i }}</span></li> <li class="pagination__page pagination__page--current"><span>{{ i }}</span></li>
{% else %} {% else %}
<li><a class="pagination__page" href="?page={{ i }}">{{ i }}</a></li> <li><a class="pagination__page" href="?page={{ i }}">{{ i }}</a></li>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% if page_obj.has_next %} {% if page_obj.has_next %}
<li class="pagination__nav pagination__nav--right"><a href="?page={{ page_obj.next_page_number }}" rel="next">suivante</a></li> <li class="pagination__nav pagination__nav--right"><a href="?page={{ page_obj.next_page_number }}" rel="next">suivante</a></li>
{% else %} {% else %}
<li class="pagination__nav pagination__nav--right pagination__nav--disabled">suivante</li> <li class="pagination__nav pagination__nav--right pagination__nav--disabled">suivante</li>
{% endif %} {% endif %}
</ul> </ul>
</nav> </nav>
{% endif %} {% endif %}
</div>
<div class="grid__col grid__col--1of4">
search
</div>
</div> </div>
{% endblock %} {% endblock %}
...@@ -42,6 +42,8 @@ ...@@ -42,6 +42,8 @@
</span> </span>
</p> </p>
</header> </header>
{{ result.summary }}
</article> </article>
{% endwith %} {% endwith %}
{% empty %} {% empty %}
......
...@@ -21,7 +21,7 @@ urlpatterns = i18n_patterns( ...@@ -21,7 +21,7 @@ urlpatterns = i18n_patterns(
url(r'^filer/', include('filer.urls')), url(r'^filer/', include('filer.urls')),
url(r'^subscribe/', include('subscribe.urls')), url(r'^subscribe/', include('subscribe.urls')),
url(r'^buy/', include('buy.urls')), url(r'^buy/', include('buy.urls')),
url(r'^search/', include('haystack.urls')), # url(r'^search/', include('haystack.urls')),
url(r'^', include('publish.urls')), url(r'^', include('publish.urls')),
url(r'^', include('cms.urls')), url(r'^', include('cms.urls')),
) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) ) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
......
from django import forms from django import forms
from haystack.forms import SearchForm from haystack.forms import HighlightedSearchForm
class ArticleSearchForm(SearchForm): class ArticleSearchForm(HighlightedSearchForm):
def no_query_found(self): pass
""" # def no_query_found(self):
Determines the behavior when no query was found. # """
# Determines the behavior when no query was found.
By default, no results are returned (``EmptySearchQuerySet``).
Should you want to show all results, override this method in your
own ``SearchForm`` subclass and do ``return self.searchqueryset.all()``.
"""
# return self.searchqueryset.all()
return self.searchqueryset.filter()
# By default, no results are returned (``EmptySearchQuerySet``).
# Should you want to show all results, override this method in your
# own ``SearchForm`` subclass and do ``return self.searchqueryset.all()``.
# """
# return self.searchqueryset.all()
...@@ -45,16 +45,16 @@ ...@@ -45,16 +45,16 @@
{% if object.published_online %} {% if object.published_online %}
{{ object.body|safe }} {{ object.body|safe }}
{% else %} {% else %}
{{ object.body|truncatewords_html:200|safe }} {{ object.body|truncatewords_html_custom:200|safe }}
{% endif %} {% endif %}
</div> </div>
</div> </div>
<div class="related-issue grid__col grid__col--1of3"> <div class="related-issue grid__col grid__col--1of3">
{% with object.get_related_issue as related_issue %} {% with object.get_related_issue as related_issue %}
{% if related_issue.o %} {% if related_issue.0 %}
{% if related_issue.1.cover %} {% if related_issue.1.cover %}
<img src="{% thumbnail related_issue.1.cover 200x200 %}"> <img src="{% thumbnail related_issue.1.cover 300x300 %}">
{% endif %} {% endif %}
{% if related_issue.0 %} {% if related_issue.0 %}
......
...@@ -10,8 +10,6 @@ ...@@ -10,8 +10,6 @@
{% with object.get_issue as issue %} {% with object.get_issue as issue %}
{% if issue %} {% if issue %}
<span class="article__issue">N<sup>o</sup>{{ issue.issue }}</span> <span class="article__issue">N<sup>o</sup>{{ issue.issue }}</span>
{% else %}
<span class="article__issue">Exclu web</span>
{% endif %} {% endif %}
{% endwith %} {% endwith %}
{% endspaceless %} {% endspaceless %}
...@@ -37,7 +35,7 @@ ...@@ -37,7 +35,7 @@
</p> </p>
<div class="article__lead">{{ object.lead|truncatewords_html_custom:20|safe }}</div> <div class="article__lead">{{ object.lead|truncatewords_html_custom:30|safe }}</div>
</header> </header>
</article> </article>
{% endwith %} {% endwith %}
...@@ -15,8 +15,6 @@ ...@@ -15,8 +15,6 @@
{% with object.get_issue as issue %} {% with object.get_issue as issue %}
{% if issue %} {% if issue %}
<span class="article__issue">N<sup>o</sup>{{ issue.issue }}</span> <span class="article__issue">N<sup>o</sup>{{ issue.issue }}</span>
{% else %}
<span class="article__issue">Exclu web</span>
{% endif %} {% endif %}
{% endwith %} {% endwith %}
{% endspaceless %} {% endspaceless %}
...@@ -34,7 +32,7 @@ ...@@ -34,7 +32,7 @@
</p> </p>
</div> </div>
<div class="article__lead">{{ object.lead|truncatewords_html_custom:20|safe }}</div> <div class="article__lead">{{ object.lead|truncatewords_html_custom:30|safe }}</div>
</header> </header>
</article> </article>
{% endwith %} {% endwith %}
...@@ -4,7 +4,7 @@ from ..views import ArticleListView, ArticleDetailView, ArticleSearchView ...@@ -4,7 +4,7 @@ from ..views import ArticleListView, ArticleDetailView, ArticleSearchView
urlpatterns = [ urlpatterns = [
url(r'^foobar/$', ArticleSearchView.as_view(), name='haystack_search'), url(r'^rechercher/$', ArticleSearchView.as_view(), name='haystack-search'),
url(r'^$', ArticleListView.as_view(), name='article-list'), url(r'^$', ArticleListView.as_view(), name='article-list'),
url(r'^(?P<slug>[-\w]+)/$', ArticleDetailView.as_view(), name='article-detail-site'), url(r'^(?P<slug>[-\w]+)/$', ArticleDetailView.as_view(), name='article-detail-site'),
] ]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment