From f38b9e1eb0c98dbbeb030a7c514031bbc2069639 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Je=CC=81re=CC=81my=20Fabre?= Date: Mon, 25 Jul 2016 16:05:16 +0200 Subject: [PATCH] Article detail and article card first implementation --- .../magazine/article/article_detail.html | 163 +++++------------- .../article/includes/article_card.html | 33 ++++ .../magazine/article/includes/post_card.html | 22 --- 3 files changed, 79 insertions(+), 139 deletions(-) create mode 100644 app/templates/magazine/article/includes/article_card.html delete mode 100644 app/templates/magazine/article/includes/post_card.html diff --git a/app/templates/magazine/article/article_detail.html b/app/templates/magazine/article/article_detail.html index 66ad853f..d95eaafd 100644 --- a/app/templates/magazine/article/article_detail.html +++ b/app/templates/magazine/article/article_detail.html @@ -1,5 +1,5 @@ -{% extends "magazine/article/article_list.html" %} -{% load mezzanine_tags comment_tags keyword_tags rating_tags i18n disqus_tags featured_tags %} +{% extends "pages/page.html" %} +{% load mezzanine_tags keyword_tags i18n featured_tags %} {% block meta_title %}{{ article.meta_title }}{% endblock %} @@ -9,139 +9,68 @@ {% endmetablock %}{% endblock %} {% block meta_description %}{% metablock %} -{{ article.description }} + {{ article.description }} {% endmetablock %}{% endblock %} -{% block title %} -{% editable article.title %}{{ article.title }}{% endeditable %} +{% block page_class %} + article {% endblock %} {% block breadcrumb_menu %} -{{ block.super }} -
  • {{ article.title }}
  • + {{ block.super }} +
  • {{ article.title }}
  • {% endblock %} -{% block main %} -{% block blog_post_detail_postedby %} -{% editable article.publish_date %} -
    - {% trans "published on" %} {{ article.publish_date|date:"DATE_FORMAT" }} -
    -{% endeditable %} -{% endblock %} -{% block blog_post_detail_commentlink %} -

    - {% if article.allow_comments %} - {% if settings.COMMENTS_DISQUS_SHORTNAME %} - ({% spaceless %} - {% trans "Comments" %} - {% endspaceless %}) - {% else %}({% spaceless %} - {% blocktrans count comments_count=article.comments_count %}{{ comments_count }} comment{% plural %}{{ comments_count }} comments{% endblocktrans %} - {% endspaceless %}) - {% endif %} - {% endif %} -

    -{% endblock %} - -{% comment %} -{% block blog_post_detail_featured_image %} -{% if settings.BLOG_USE_FEATURED_IMAGE and article.featured_image %} -

    -{% endif %} -{% endblock %} -{% endcomment %} +{% block page_title %} -{% if settings.COMMENTS_DISQUS_SHORTNAME %} -{% include "generic/includes/disqus_counts.html" %} -{% endif %} + {% editable article.title %} +

    {{ article.title }}

    + {% endeditable %} -{% block blog_post_detail_content %} -{% editable article.content %} -{{ article.content|richtext_filters|safe }} -{% endeditable %} {% endblock %} -{% block blog_post_detail_keywords %} -{% keywords_for article as tags %} -{% if tags %} -{% spaceless %} - -{% endspaceless %} -{% endif %} -{% endblock %} +{% block page_content %} -{% comment %} -{% block blog_post_detail_rating %} -
    -
    - {% rating_for article %} -
    -
    -{% endblock %} -{% endcomment %} + {% editable article.content %} + {{ article.content|richtext_filters|safe }} + {% endeditable %} -{% block event_detail_sharebuttons %} - {% with article as object %} - {% include "includes/share_buttons.html" %} - {% endwith %} {% endblock %} -{% block blog_post_previous_next %} - -{% endblock %} +{% block page_sub_content %} - -{% block blog_post_detail_related_posts %} -{% if related_posts or article.events.all %} - -{% endif %} -{% endblock %} + {% endif %} -{% block blog_post_detail_comments %} -{% if article.allow_comments %}{% comments_for article %}{% endif %} +
    + +
    +

    {% trans "Also discover" %}

    +
    + {% include 'magazine/article/includes/article_card.html' %} +
    +
    {% endblock %} +{% block page_sidebar %} + +
    + {% editable article.publish_date %} + + {% endeditable %} + {% with article as object %} + {% include "includes/share_buttons.html" %} + {% endwith %} +
    + {% endblock %} diff --git a/app/templates/magazine/article/includes/article_card.html b/app/templates/magazine/article/includes/article_card.html new file mode 100644 index 00000000..2ed7e949 --- /dev/null +++ b/app/templates/magazine/article/includes/article_card.html @@ -0,0 +1,33 @@ +{% load i18n pages_tags mezzanine_tags %} + +
    + +
    +
    + +
    +
    +
    + {% trans 'Actualité' %} +
    +
    + transmission +
    +
    +
    +
    +

    {{ article.title }}

    +
    + {{ article.publish_date|date:"DATE_FORMAT" }} + {% if article.categories %} + {% for category in article.categories.all %} + | {{ category }} + {% endfor %} + {% endif %} +
    +
    + {{ article.content|richtext_filters|safe }} +
    +
    +
    +
    diff --git a/app/templates/magazine/article/includes/post_card.html b/app/templates/magazine/article/includes/post_card.html deleted file mode 100644 index 3c1d4322..00000000 --- a/app/templates/magazine/article/includes/post_card.html +++ /dev/null @@ -1,22 +0,0 @@ -{% load i18n pages_tags mezzanine_tags %} - -
    -
    - -

    - - {{ article.title }} - -

    -

    - {{ article.description }} -

    - - {% if article.featured_image %} -
    - Article: {{ article.title }} -
    - {% endif %} -
    -
    -
    -- 2.39.5