Skip to content

Commit

Permalink
Corrige les titres et ajoute des métadonnées
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-D committed Jul 22, 2014
1 parent 5e533e3 commit 1edf20d
Show file tree
Hide file tree
Showing 19 changed files with 104 additions and 78 deletions.
3 changes: 2 additions & 1 deletion assets/scss/_all-supports.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,7 @@
height: 50px;
}

&:not(:first-child) {
&:not(.subtitle):not(:first-child) {
margin-top: 50px;
}
}
Expand All @@ -1029,6 +1029,7 @@
.subtitle {
font-size: 18px;
font-size: 1.8rem;
line-height: 23px;
color: #999;
margin-top: -15px;
margin-bottom: 15px;
Expand Down
4 changes: 2 additions & 2 deletions templates/article/includes/article_item.part.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% load captureas %}
{% load thumbnail %}

<article itemprop="itemListElement">
<article>
{% if not link %}
{# Public link by default #}
{% captureas link %}
Expand All @@ -16,7 +16,7 @@
{% endif %}

<div class="tutorial-infos {% if not article.image %}no-illu{% endif %}">
<h3>{{ article.title }}</h3>
<h3 itemprop="itemListElement">{{ article.title }}</h3>
<p class="article-metadata">
{{ article.pubdate|format_date|capfirst }} -
<a href="
Expand Down
4 changes: 2 additions & 2 deletions templates/article/member/history.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ <h1 {% if article.image %}class="illu"{% endif %}>
{% endif %}

{% if article.description %}
<h3 class="subtitle">
<h2 class="subtitle">
{{ article.description }}
</h3>
</h2>
{% endif %}

<ul class="taglist" itemprop="keywords">
Expand Down
4 changes: 2 additions & 2 deletions templates/article/member/view.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ <h1 {% if article.image %}class="illu"{% endif %}>
{% endif %}

{% if article.description %}
<h3 class="subtitle">
<h2 class="subtitle">
{{ article.description }}
</h3>
</h2>
{% endif %}

<ul class="taglist">
Expand Down
4 changes: 2 additions & 2 deletions templates/article/view.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ <h1 {% if article.image %}class="illu"{% endif %} itemprop="name">
{% endif %}

{% if article.description %}
<h3 class="subtitle">
<h2 class="subtitle">
{{ article.description }}
</h3>
</h2>
{% endif %}

<ul class="taglist" itemprop="keywords">
Expand Down
2 changes: 1 addition & 1 deletion templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@

<div class="clearfix sub-header">
<div class="wrapper">
<div class="breadcrumb" itemprop="breadcrumb" itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
<div class="breadcrumb" itemprop="breadcrumb">
<ol>
<li>
<a href="{% url "zds.pages.views.home" %}" rel="home" itemprop="url">
Expand Down
40 changes: 28 additions & 12 deletions templates/forum/category/forum.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,33 @@

{% block title %}
{{ forum.title }}
{% if request.GET.filter == "unsolve" %}
/ Sujets résolus
{% elif request.GET.filter == "solve" %}
/ Sujets non-résolus
{% endif %}
{% endblock %}



{% block breadcrumb %}
<li><a href="{{ forum.category.get_absolute_url }}">{{ forum.category.title }}</a></li>
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
<a href="{{ forum.category.get_absolute_url }}" itemprop="url">
<span itemprop="title">{{ forum.category.title }}</span>
</a>
</li>
<li>{{ forum.title }}</li>
{% endblock %}



{% block headline %}
{{ forum.title }}
{% if request.GET.filter == "unsolve" %}
/ Sujets résolus
{% elif request.GET.filter == "solve" %}
/ Sujets non-résolus
{% endif %}
{% endblock %}


Expand All @@ -39,15 +53,15 @@
{% include "misc/pagination.part.html" with position="top" %}

{% if sticky_topics %}
<div class="topic-list navigable-list">
<div class="topic-list navigable-list" itemscope itemtype="http://schema.org/ItemList">
{% for topic in sticky_topics %}
{% include "forum/includes/topic_row.part.html" %}
{% endfor %}
</div>
{% endif %}

{% if topics %}
<div class="topic-list navigable-list">
<div class="topic-list navigable-list" itemscope itemtype="http://schema.org/ItemList">
{% for topic in topics %}
{% include "forum/includes/topic_row.part.html" %}
{% endfor %}
Expand All @@ -71,25 +85,27 @@ <h3>Filtres</h3>
<ul>
<li>
<a href="{% url "zds.forum.views.details" forum.category.slug forum.slug %}?filter=solve"
class="ico-after tick green"
class="ico-after tick green {% if request.GET.filter == "solve" %}unread{% endif %}"
>
Sujets résolus
</a>
</li>
<li>
<a href="{% url "zds.forum.views.details" forum.category.slug forum.slug %}?filter=unsolve"
class="ico-after tick blue"
class="ico-after tick blue {% if request.GET.filter == "unsolve" %}unread{% endif %}"
>
Sujets non résolus
</a>
</li>
<li>
<a href="{% url "zds.forum.views.details" forum.category.slug forum.slug %}"
class="ico-after cross blue"
>
Annuler le filtre
</a>
</li>
{% if request.GET.filter %}
<li>
<a href="{% url "zds.forum.views.details" forum.category.slug forum.slug %}"
class="ico-after cross blue"
>
Annuler le filtre
</a>
</li>
{% endif %}
</ul>
</div>
{% endblock %}
2 changes: 1 addition & 1 deletion templates/forum/category/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@


{% block content %}
<div class="content-wrapper topic-list topic-list-small forum-list navigable-list">
<div class="content-wrapper topic-list topic-list-small forum-list navigable-list" itemscope itemtype="http://schema.org/ItemList">
{% include "forum/includes/forums.part.html" %}
</div>
{% endblock %}
62 changes: 31 additions & 31 deletions templates/forum/includes/forums.part.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,36 @@


{% for forum in forums %}
<div class="topic navigable-elem">
<div class="topic-description {% if user.is_authenticated and not forum.is_read %}unread{% endif %}">
<a href="{{ forum.get_absolute_url }}" class="navigable-link">
<h4 class="topic-title">
{{ forum.title }}
</h4>
</a>
<span class="topic-subtitle">
{{ forum.subtitle }}
</span>
</div>
<p class="topic-answers">
<span title="Nombre de sujets dans le forum">
{{ forum.get_topic_count }}
</span>
<span title="Nombre de messages dans le forum">
{{ forum.get_post_count }}
</span>
</p>
<p class="topic-last-answer">
{% with last_message=forum.get_last_message %}
{% if last_message %}
<a href="{{ last_message.topic.last_read_post.get_absolute_url }}">
<span class="forum-last-message">Dernier message :</span>
<span class="forum-last-message-title">{{ last_message.topic.title }}</span>
</a>
{% else %}
<span class="topic-no-last-answer">Aucun sujet</span>
{% endif %}
{% endwith %}
</p>
<div class="topic navigable-elem">
<div class="topic-description {% if user.is_authenticated and not forum.is_read %}unread{% endif %}">
<a href="{{ forum.get_absolute_url }}" class="navigable-link">
<h4 class="topic-title" itemprop="itemListElement">
{{ forum.title }}
</h4>
</a>
<span class="topic-subtitle">
{{ forum.subtitle }}
</span>
</div>
<p class="topic-answers">
<span title="Nombre de sujets dans le forum">
{{ forum.get_topic_count }}
</span>
<span title="Nombre de messages dans le forum">
{{ forum.get_post_count }}
</span>
</p>
<p class="topic-last-answer">
{% with last_message=forum.get_last_message %}
{% if last_message %}
<a href="{{ last_message.topic.last_read_post.get_absolute_url }}">
<span class="forum-last-message">Dernier message :</span>
<span class="forum-last-message-title">{{ last_message.topic.title }}</span>
</a>
{% else %}
<span class="topic-no-last-answer">Aucun sujet</span>
{% endif %}
{% endwith %}
</p>
</div>
{% endfor %}
3 changes: 2 additions & 1 deletion templates/forum/includes/topic_row.part.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@
{% with profile=topic.author|profile %}
<div class="topic-description">
<a href="{{ topic.get_absolute_url }}" class="topic-title-link navigable-link">
<span class="topic-title">{{ topic.title }}</span>
<span class="topic-title" itemprop="itemListElement">{{ topic.title }}</span>
<span class="topic-subtitle">{{ topic.subtitle }}</span>
</a>
<p class="topic-members">
<span class="topic-members-label">Créé par</span>
<em>
{% include "misc/member_item.part.html" with member=topic.author %}
</em>
<span class="topic-members-label">{{ topic.pubdate|format_date }}</span>
{% if topic.tags.all %}
- Tag{{ topic.tags.all|pluralize }} :
{% for tag in topic.tags.all %}
Expand Down
8 changes: 5 additions & 3 deletions templates/forum/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,13 @@
proposer des exercices au reste de la communauté.
</p>

<div class="content-wrapper topic-list topic-list-small forum-list navigable-list">
<div class="content-wrapper topic-list topic-list-small forum-list navigable-list" itemscope itemtype="http://schema.org/ItemList">
<meta itemprop="itemListOrder" content="Unordered">

{% for title, forums in categories.items %}
<h3 class="group-title content-wrapper">
<h2 class="group-title content-wrapper">
{{ title }}
</h3>
</h2>
{% include "forum/includes/forums.part.html" with forum=forums %}
{% endfor %}
</div>
Expand Down
4 changes: 2 additions & 2 deletions templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ <h2 class="ico-after ico-articles" itemprop="name">
<meta itemprop="itemListOrder" content="Descending">

{% for article in last_articles %}
<article itemprop="itemListElement">
<article>
{% if article.image %}
<a href="{{ article.get_absolute_url_online }}" tabindex="-1">
<img src="{{ article.image.article_illu.url }}" alt="" class="tutorial-img avatar">
</a>
{% endif %}
<div class="tutorial-infos {% if not article.image %}no-illu{% endif %}">
<h3>
<a href="{{ article.get_absolute_url_online }}" title="{{ article.title }}">
<a href="{{ article.get_absolute_url_online }}" title="{{ article.title }}" itemprop="itemListElement">
{{ article.title }}
</a>
</h3>
Expand Down
2 changes: 1 addition & 1 deletion templates/misc/message.part.html
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@

{% if upvote_link %}
<div class="message-karma">
{% if user.is_authenticated and helpful_link %}
{% if user.is_authenticated and helpful_link and not is_author %}
{% if message.author != user or perms_change %}
{% if topic.author = user or perms_change %}
<form action="{{ helpful_link }}" method="post">
Expand Down
4 changes: 3 additions & 1 deletion templates/tutorial/comment/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ <h1>Éditer le commentaire du tutoriel : {{ tutorial.title }}</h1>


{% block headline_sub %}
<h3 class="subtitle">{{ tutorial.description }}</h3>
<h2 class="subtitle">
{{ tutorial.description }}
</h2>
{% endblock %}


Expand Down
4 changes: 2 additions & 2 deletions templates/tutorial/includes/tutorial_item.part.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% load thumbnail %}

<article itemprop="itemListElement">
<article>
<a href="
{% if beta %}
{{ tutorial.get_absolute_url_beta }}
Expand All @@ -12,7 +12,7 @@
<img src="{{ tutorial.image.physical.tutorial_illu.url }}" alt="" class="tutorial-img avatar">
{% endif %}
<div class="tutorial-infos {% if not tutorial.image.physical.tutorial_illu.url %}no-illu{% endif %}">
<h3>{{ tutorial.title }}</h3>
<h3 itemprop="itemListElement">{{ tutorial.title }}</h3>

<span class="article-metadata">
{% if tutorial.subcategory %}
Expand Down
4 changes: 3 additions & 1 deletion templates/tutorial/tutorial/history.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ <h1 {% if tutorial.image %}class="illu"{% endif %} itemprop="name">
</span>
{% endif %}

<h3 class="subtitle">{{ tutorial.description }}</h3>
<h2 class="subtitle">
{{ tutorial.description }}
</h2>

{% include 'tutorial/includes/tags_authors.part.html' %}
{% endblock %}
Expand Down
4 changes: 2 additions & 2 deletions templates/tutorial/tutorial/view.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ <h1 {% if tutorial.image %}class="illu"{% endif %}>
{% endif %}

{% if tutorial.description %}
<h3 class="subtitle">
<h2 class="subtitle">
{{ tutorial.description }}
</h3>
</h2>
{% endif %}

{% if user in tutorial.authors.all or perms.tutorial.change_tutorial %}
Expand Down
4 changes: 2 additions & 2 deletions templates/tutorial/tutorial/view_online.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ <h1 {% if tutorial.image %}class="illu"{% endif %} itemprop="name">
{% endif %}

{% if tutorial.description %}
<h3 class="subtitle" itemprop="description">
<h2 class="subtitle" itemprop="description">
{{ tutorial.description }}
</h3>
</h2>
{% endif %}

{% include "tutorial/includes/tags_authors.part.html" with tutorial=tutorial %}
Expand Down
Loading

0 comments on commit 1edf20d

Please sign in to comment.