thestudentlife/Manhattan-Project

View on GitHub
mainsite/templates/article.html

Summary

Maintainability
Test Coverage
{% extends 'base.html' %}
{% load static from staticfiles %}

{% block title_block %}
    <title>{{ article.title }}</title>
    <style rel="stylesheet" type="text/css" href="{% static 'share_buttons.css' %}"></style>
    <link rel="stylesheet" href="{% static 'photoslide/photoswipe.css' %}">
    <link rel="stylesheet" href="{% static 'photoslide/default-skin/default-skin.css' %}">
    <meta property="og:description" content="{{ article.content_with_no_images | truncatechars:150 | safe | striptags}}" />
    {% if article.album.photo_set.all.count == 0 %}
        <meta property="og:image" content="http://tsl.news/static/share_thumbnail.jpg" />
        <meta property="og:image:width" content="2048" />
        <meta property="og:image:height" content="1266" />
    {% endif %}
{% endblock %}

{% block body_block %}
    <div class="tsl-container">
        <div class="article_block col-xs-12 col-sm-8 col-md-8 col-lg-8">
            {% include 'long_article_partial.html' %}
        </div>
        {% include 'side_menu.html' %}
    </div>
    <div class="text-center">{% include 'share_buttons_large.html' %}</div>
    <div class="tsl-disqus col-sm-8 col-md-8 col-lg-8">
        {% include 'disqus_partial.html' %}
    </div>
{% endblock %}

{% block script_block %}
    <script src="{% static 'ElementQueries.js' %}"></script>
     <script src="{% static 'ResizeSensor.js' %}"></script>
    <script src="{% static 'social_button.js' %}"></script>
    <script src="{% static 'resize_image.js' %}"></script>
    <script src="{% static 'imageCaption.js' %}"></script>
    <script src="{% static 'photoslide/photoswipe.min.js' %}"></script>
    <script src="{% static 'photoslide/photoswipe-ui-default.min.js' %}"></script>

    {% if article.has_photo %}
        {% include 'photo_slide.html' %}
    {% endif %}
{% endblock %}