Commit 02f2054c by alexandre

fix a few remarks

parent 7ec5a8f0
......@@ -23,6 +23,7 @@
:root {
--color: #835f19;
--color: #2f545a;
--font-size: 20px;
......@@ -146,7 +147,6 @@ body {
/* Ça serait bien de faire un test pour voir à quel point ça
rend le rendu plus lent cf https://bocoup.com/weblog/text-rendering */
text-rendering: optimizeLegibility;
color: var(--color);
}
......@@ -190,9 +190,7 @@ input[type=text] { box-sizing: border-box; }
.proposal textarea,
.proposal input[type=email],
.proposal input[type=text] {
width: 100%;
}
.proposal input[type=text] { width: 100%; }
label,
input {
......@@ -212,12 +210,12 @@ input {
.outer-wrapper {
max-width: 1200px;
padding: 0 20px 0;
padding: 0 20px;
margin: 0 auto;
}
@media (--desktop) {
.outer-wrapper { padding: 0 40px 0; }
.outer-wrapper { padding: 0 40px; }
}
......@@ -342,9 +340,7 @@ input {
.secondary-menu,
.newsletter,
.newsletter__form {
display: inline;
}
.newsletter__form { display: inline; }
.newsletter__email { width: 200px; }
......@@ -474,11 +470,11 @@ input {
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); }
.bio {
margin-bottom: var(--line-height);
font-family: erbarre;
......@@ -723,26 +719,27 @@ input {
#headlines { margin-bottom: 20px; }
.other-headlines { column-width: 150px; }
.article--main-headline { text-align: center; position: relative; margin-bottom: var(--line-height);}
.other-headlines { column-width: 200px; }
.article--main-headline {
position: relative;
margin-bottom: var(--line-height);
text-align: center;
}
.article--main-headline .article__head-group {
height: 100%;
position: absolute;
top: 0;
width: 100%;
display: flex;
width: 100%;
height: 100%;
flex-direction: column;
justify-content: center;
}
.article--main-headline .article__headline {
color: #fcf296;
padding: 0 15%;
color: #fcf296;
text-shadow: 0 0px black, 1px 1px black, 2px 2px black, 3px 3px black;
font-size: 48px;
line-height: 42px;
......@@ -753,17 +750,15 @@ input {
text-shadow: 0 0px black, 1px 1px black, 2px 2px black, 3px 3px black;
}
.article--list-item {
break-inside: avoid;
page-break-inside: avoid;
.article--list-item {
break-inside: avoid;
page-break-inside: avoid;
}
.article--list-item + .article--list-item { margin-top: 32px; }
.article a { color: inherit; }
.article__thumb { height: 75px; }
.article__thumb--full {
......@@ -793,7 +788,7 @@ input {
.article--list-item .article__topper { margin-bottom: 4px; }
.article__metadata {
font-size: 20px;
font-size: 18px;
line-height: 1;
}
......@@ -803,12 +798,12 @@ input {
.article__issue,
.article__rubric-title {
background-color: white;
padding: 1px 4px;
border: solid 2px;
margin-right: 3px;
background-color: white;
white-space: nowrap;
letter-spacing: .5px;
letter-spacing: 0.5px;
}
.article__issue {
......@@ -824,9 +819,7 @@ input {
font-weight: bold;
}
.article__headline {
text-transform: uppercase;
}
.article__headline { text-transform: uppercase; }
.article--detail .article__headline {
font-size: 68px;
......@@ -879,15 +872,17 @@ input {
.article--list-item .article__lead {
margin-top: 4px;
font-size: 16px;
line-height: 19px;
font-size: 15px;
line-height: 18px;
}
.article--list-item .article__lead img { display: none; }
.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; }
......@@ -897,9 +892,7 @@ input {
/* Article general body text
========================================================================== */
.article--detail .article__body {
margin-top: var(--line-height);
}
.article--detail .article__body { margin-top: var(--line-height); }
.article__body h2 {
margin-top: var(--line-height);
......@@ -1128,8 +1121,11 @@ input {
.related-issue { font-family: Erbarre; }
.other_issues { margin-top: 3em; text-align: center; }
.other_issues__issue { margin-bottom: 4px; display: inline-block; width: 50px; }
.other_issues { margin-top: 3em; text-align: center;
}
.other_issues__issue { display: inline-block; width: 50px; margin-bottom: 4px;
}
.other_issues__title {
margin-bottom: calc(var(--line-height)/4);
......@@ -1140,7 +1136,8 @@ input {
text-align: center;
}
.other_issues__edition { font-family: Erbarre; font-size: 15px; }
.other_issues__edition { font-family: Erbarre; font-size: 15px;
}
.other_issues__thumb {
width: 100%;
......@@ -1164,31 +1161,29 @@ input {
.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; }
.btn {
background-color: #faa;
display: inline-block;
padding: 6px 12px;
border: 2px solid;
background-color: #faa;
border-radius: 5px;
box-shadow: 3px 3px black;
display: inline-block;
font-family: Alfphabet-Condensed;
/* font-family: Erbarre; */
font-size: initial;
padding: 6px 12px;
}
.btn--big {
text-transform: uppercase;
letter-spacing: .5px;
letter-spacing: 0.5px;
font-size: 21px;
}
.btn:hover {
background-color: #2f545a;
color: white;
......
......@@ -4,76 +4,84 @@
{% 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 %}
<h2 class="article__subhead">{{ object.subtitle|typogrify|safe }}</h2>
{% endif %}
<div class="grid__col grid__col--3of4" 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>
{% endif %}
{% endwith %}
{% endspaceless %}
</p>
<!-- <dl class="u-join pilotes"> -->
<!-- <dt>Par</dt> -->
<!-- {% spaceless %} -->
<!-- {% for contribution in object.contributions.all %} -->
<!-- <dd><a href="{{ contribution.contributor.get_absolute_url }}">{{ contribution }}</a></dd> -->
<!-- {% endfor %} -->
<!-- {% endspaceless %} -->
<!-- </dl> -->
<h1 class="article__headline"><a href="{% url 'article-detail-site' object.slug %}">{{ object.title|typogrify|safe }}</a></h1>
<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:20|safe }}</div>
</header>
</article>
{% endfor %}
{% if object.subtitle %}
<h2 class="article__subhead">{{ object.subtitle|typogrify|safe }}</h2>
{% endif %}
{% 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 %}
<!-- <dl class="u-join pilotes"> -->
<!-- <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">
<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 %}
{% if page_obj.number == i %}
<li class="pagination__page pagination__page--current"><span>{{ i }}</span></li>
{% else %}
<li><a class="pagination__page" href="?page={{ i }}">{{ i }}</a></li>
{% endif %}
{% endfor %}
{% for i in paginator.page_range %}
{% if page_obj.number == i %}
<li class="pagination__page pagination__page--current"><span>{{ i }}</span></li>
{% else %}
<li><a class="pagination__page" href="?page={{ i }}">{{ i }}</a></li>
{% endif %}
{% endfor %}
{% 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>
{% else %}
<li class="pagination__nav pagination__nav--right pagination__nav--disabled">suivante</li>
{% endif %}
</ul>
</nav>
{% endif %}
{% 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>
{% else %}
<li class="pagination__nav pagination__nav--right pagination__nav--disabled">suivante</li>
{% endif %}
</ul>
</nav>
{% endif %}
</div>
<div class="grid__col grid__col--1of4">
search
</div>
</div>
{% endblock %}
......@@ -42,6 +42,8 @@
</span>
</p>
</header>
{{ result.summary }}
</article>
{% endwith %}
{% empty %}
......
......@@ -21,7 +21,7 @@ urlpatterns = i18n_patterns(
url(r'^filer/', include('filer.urls')),
url(r'^subscribe/', include('subscribe.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('cms.urls')),
) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
......
from django import forms
from haystack.forms import SearchForm
from haystack.forms import HighlightedSearchForm
class ArticleSearchForm(SearchForm):
def no_query_found(self):
"""
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()
class ArticleSearchForm(HighlightedSearchForm):
pass
# def no_query_found(self):
# """
# 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()
......@@ -45,16 +45,16 @@
{% if object.published_online %}
{{ object.body|safe }}
{% else %}
{{ object.body|truncatewords_html:200|safe }}
{{ object.body|truncatewords_html_custom:200|safe }}
{% endif %}
</div>
</div>
<div class="related-issue grid__col grid__col--1of3">
{% with object.get_related_issue as related_issue %}
{% if related_issue.o %}
{% if related_issue.0 %}
{% if related_issue.1.cover %}
<img src="{% thumbnail related_issue.1.cover 200x200 %}">
<img src="{% thumbnail related_issue.1.cover 300x300 %}">
{% endif %}
{% if related_issue.0 %}
......
......@@ -10,8 +10,6 @@
{% 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 %}
......@@ -37,7 +35,7 @@
</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>
</article>
{% endwith %}
......@@ -15,8 +15,6 @@
{% 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 %}
......@@ -34,7 +32,7 @@
</p>
</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>
</article>
{% endwith %}
......@@ -4,7 +4,7 @@ from ..views import ArticleListView, ArticleDetailView, ArticleSearchView
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'^(?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