diff --git a/newsbox/templates/newsbox/inc/detail.html b/newsbox/templates/newsbox/inc/detail.html index 285d6304344b7e33f3d05c7ae15ca97b4a6cdb6e..849a790fc600cf3b493f54d2eb4f413874d32289 100644 --- a/newsbox/templates/newsbox/inc/detail.html +++ b/newsbox/templates/newsbox/inc/detail.html @@ -1,6 +1,6 @@ {% load i18n %} -<article class="newsbox_detail {{ model_opts.app_label }}_{{ model_opts.model_name }} {{ object.is_published|yesno:',draft' }}"> +<article class="mod__content-detail newsbox {{ model_opts.app_label }}-{{ model_opts.model_name }} {{ object.is_published|yesno:',draft' }}"> {% if newsbox_seo %} {% block extrahead %} {{ block.super }} @@ -21,13 +21,13 @@ {% block newsbox_detail_header %} <h1>{{ object.newsbox_title }}</h1> {% if object.newsbox_date and object.newsbox_date != object.newsbox_publication_start_date %} - <time class="event_date" datetime="{{ object.newsbox_date }}">{{ object.newsbox_date|date:'DATE_FORMAT' }}</time> + <time datetime="{{ object.newsbox_date }}">{{ object.newsbox_date|date:'DATE_FORMAT' }}</time> {% endif %} - <time class="publication_date" datetime="{{ object.newsbox_publication_start_date }}" pubdate="pubdate">{% blocktrans with date=object.newsbox_publication_start_date|date:'SHORT_DATE_FORMAT' %}published on {{ date }}{% endblocktrans %}</time> + <time datetime="{{ object.newsbox_publication_start_date }}" pubdate="pubdate">{% blocktrans with date=object.newsbox_publication_start_date|date:'SHORT_DATE_FORMAT' %}published on {{ date }}{% endblocktrans %}</time> {% endblock %} </header> - <div class="content"> + <div> {% block newsbox_detail_content %} {% if object.newsbox_body %} {{ object.newsbox_body|linebreaks }} diff --git a/newsbox/templates/newsbox/inc/list-item.html b/newsbox/templates/newsbox/inc/list-item.html index dcbbe232604e42c3a522de77ec928d11531796d5..c78153457686dcb94fe273c8be7279d628de7b4e 100644 --- a/newsbox/templates/newsbox/inc/list-item.html +++ b/newsbox/templates/newsbox/inc/list-item.html @@ -1,25 +1,24 @@ {% load i18n %} -<article class="{{ object.is_published|yesno:',draft' }}"> +<article class="comp__content-item {{ object.is_published|yesno:',draft' }}"> <header> {% block newsbox_list_item_header %} <h2> <a href="{{ object.get_absolute_url }}"> - - {% if object.newsbox_date and object.newsbox_date != object.newsbox_publication_start_date %} - <time class="event_date" datetime="{{ object.newsbox_date }}">{{ object.newsbox_date|date:'SHORT_DATE_FORMAT' }}</time> - - {% endif %} {{ object.newsbox_title }} </a> + {% if object.newsbox_date and object.newsbox_date != object.newsbox_publication_start_date %} + <time datetime="{{ object.newsbox_date }}">{{ object.newsbox_date|date:'SHORT_DATE_FORMAT' }}</time> + {% endif %} </h2> - <time class="publication_date" datetime="{{ object.newsbox_publication_start_date }}" pubdate="pubdate">{% blocktrans with date=object.newsbox_publication_start_date|date:'SHORT_DATE_FORMAT' %}published on {{ date }}{% endblocktrans %}</time> + <time datetime="{{ object.newsbox_publication_start_date }}" pubdate="pubdate">{% blocktrans with date=object.newsbox_publication_start_date|date:'SHORT_DATE_FORMAT' %}published on {{ date }}{% endblocktrans %}</time> {% endblock %} </header> - <div class="content"> + <div> {% block newsbox_list_item_content %} {% if object.newsbox_summary %} {{ object.newsbox_summary|linebreaks }} - + {% if object.newsbox_body %} <a class="readmore" href="{{ object.get_absolute_url }}">{% trans "Read more" %}</a> {% endif %} @@ -27,4 +26,4 @@ {% endblock %} </div> -</article> \ No newline at end of file +</article> diff --git a/newsbox/templates/newsbox/inc/list.html b/newsbox/templates/newsbox/inc/list.html index e07dcc7d12f601fb2acc0055cb8947fe5bd329a1..35c662c0865ff911b626d81ffa2b184fbf83b841 100644 --- a/newsbox/templates/newsbox/inc/list.html +++ b/newsbox/templates/newsbox/inc/list.html @@ -1,6 +1,6 @@ {% if object_list|length > 0 %} {% load i18n %} - <section class="newsbox_list {{ model_opts.app_label }}_{{ model_opts.model_name }}"> + <section class="mod__content-list newsbox {{ model_opts.app_label }}-{{ model_opts.model_name }}"> {% block newsbox_list_header %} {% if title %} @@ -18,7 +18,7 @@ {% block newsbox_list_filters %} {% if date_list_period and date_list_period != 'year' or date_list|length > 1 %} - <ul class="date_list {{ date_list_period }}s_list"> + <ul class="comp__date-filter {{ date_list_period }}s-list"> {% if date_list_period == 'year' %} <li>{% trans "All dates" %}</li> {% else %} @@ -55,7 +55,7 @@ {% endblock newsbox_list_filters %} {% block newsbox_list %} - <div class="list"> + <div class="comp__content-list"> {% for object in object_list %} {% block newsbox_list_item %} @@ -63,28 +63,27 @@ {% endblock %} {% endfor %} + </div> - {% block newsbox_pager %} - {% if is_paginated and page_obj %} - <div class="pager"> - {% if page_obj.has_previous %} - <a class="prev" href="?page={{ page_obj.previous_page_number }}">{% trans "Previous news" %}</a> - {% endif %} - - <span class="current"> - {% blocktrans with page_obj.number as number and paginator.num_pages as total %}Page {{ number }} on {{ total }}{% endblocktrans %} - </span> + {% block newsbox_pager %} + {% if is_paginated and page_obj %} + <div class="comp__pager"> + {% if page_obj.has_previous %} + <a class="prev" href="?page={{ page_obj.previous_page_number }}">{% trans "Previous news" %}</a> + {% endif %} - {% if page_obj.has_next %} - <a class="next" href="?page={{ page_obj.next_page_number }}">{% trans "Next news" %}</a> - {% endif %} - </div> - {% elif all_news_url %} - <a class="readmore" href="{{ all_news_url }}">{% trans "See all news" %}</a> - {% endif %} - {% endblock %} + <span class="current"> + {% blocktrans with page_obj.number as number and paginator.num_pages as total %}Page {{ number }} on {{ total }}{% endblocktrans %} + </span> - </div> + {% if page_obj.has_next %} + <a class="next" href="?page={{ page_obj.next_page_number }}">{% trans "Next news" %}</a> + {% endif %} + </div> + {% elif all_news_url %} + <a class="readmore" href="{{ all_news_url }}">{% trans "See all news" %}</a> + {% endif %} + {% endblock %} {% endblock %} </section> {% else %} diff --git a/newsbox_cms/templates/newsbox_cms/inc/list.html b/newsbox_cms/templates/newsbox_cms/inc/list.html index 4db3661e3fecadf958b9685e65a3ad85a96848ce..d8966ff371a3a38db560f36146e72525fbad087b 100644 --- a/newsbox_cms/templates/newsbox_cms/inc/list.html +++ b/newsbox_cms/templates/newsbox_cms/inc/list.html @@ -16,8 +16,8 @@ <div class="summary"> {{ object.newsbox_summary|safe }} {% render_placeholder object.newsbox_body as body %} - {% if body %} - <a class="readmore" href="{{ object.get_absolute_url }}">{% trans "Read more" %}</a> - {% endif %} </div> + {% if body %} + <a class="readmore" href="{{ object.get_absolute_url }}">{% trans "Read more" %}</a> + {% endif %} {% endblock %}