|
1 | 1 | {% extends "base.html" %} |
| 2 | +{% load staticfiles %} |
2 | 3 | {% block title %}{{ object.title }} - {{ block.super }}{% endblock %} |
3 | 4 | {% block canonical_url %}https://{{ request.get_host }}{% url 'detail_post_page' slug=object.slug %}{% endblock %} |
4 | 5 |
|
|
32 | 33 | <div class="post" id="printable"> |
33 | 34 | <h2><a href="{% url "detail_post_page" slug=object.slug %}">{{ object.title }}</a></h2> |
34 | 35 | <div class="meta"> |
35 | | - Created: {{ object.created }} - Modified: {{ object.modified }}<br /> |
36 | | - Author: <a href="{% url 'author_posts_page' username=object.author.user.username %}">{{ object.author }}</a> |
37 | | - |
38 | | - <div class="pull-right"> |
39 | | - <i>Your IP:</i> <span class="label label-danger">{{ get_client_ip }}</span> |
40 | | - <i>Views:</i> <span class="label label-primary">{{ visitor_counter }}</span> |
41 | | - </div> |
| 36 | + By: <a href="{% url 'author_posts_page' username=object.author.user.username %}" style="text-transform:uppercase">{{ object.author }}</a> ● |
| 37 | + at {{ object.created }} ● and modified at {{ object.modified }}<br /> |
| 38 | + Posted under: |
| 39 | + {% for tag in object.tags.all %} |
| 40 | + <a href="{% url 'tag_posts_page' slug=tag.slug %}">#{{ tag }}</a>{% if not forloop.last %}, {% endif %} |
| 41 | + {% empty %}Uncategories |
| 42 | + {% endfor %} |
| 43 | + <br /> |
| 44 | + Your ip address: {{ get_client_ip }} ● views: {{ visitor_counter }} times. |
42 | 45 | </div> |
43 | | - <hr> |
44 | 46 |
|
45 | 47 | <p> |
46 | 48 | {% if object.cover %} |
47 | 49 | <caption align="bottom"> |
48 | | - <img class="cover-post" src="/media/{{ object.cover }}" title="{{ object.title }}" alt="{{ object.title }}"/> |
| 50 | + <img style="width:100%" class="cover-post" src="//{{ request.get_host }}/media/{{ object.cover }}" title="{{ object.title }}" alt="{{ object.title }}"/> |
49 | 51 | <span style="margin-left: 1px;background: #F2F4F3; padding: 0 5px; text-shadow: 1px 1px 1px #fff;">{{ object.title }}</span> |
50 | 52 | </caption> |
51 | 53 | {% endif %} |
52 | 54 | </p> |
53 | 55 | {{ object.description|safe }} |
54 | 56 |
|
55 | | - <p> |
56 | | - Tagged under: |
57 | | - {% for tag in object.tags.all %} |
58 | | - <a href="{% url 'tag_posts_page' slug=tag.slug %}">#{{ tag }}</a>{% if not forloop.last %}, {% endif %} |
59 | | - {% empty %}Uncategories |
60 | | - {% endfor %} |
61 | | - </p> |
62 | | - |
63 | | -<div class="share panel-body" id="non-printable"> |
64 | | - <span>Share on: </span> |
65 | | - <a class="btn btn-sm btn-primary cst__radius" href="https://www.facebook.com/sharer/sharer.php?u=https://python.web.id{% url "detail_post_page" slug=object.slug %}" target="_blank">Facebook</a> |
66 | | - <a class="btn btn-sm btn-danger cst__radius" href="https://plus.google.com/share?url=https://python.web.id{% url "detail_post_page" slug=object.slug %}" target="_blank">Google+</a> |
67 | | - <a class="btn btn-sm btn-info cst__radius" href="https://twitter.com/share" target="_blank">Twitter</a> |
68 | | - <a class="btn btn-sm btn-success cst__radius" href="javascript:window.print()">Print Page</a> |
69 | | -</div> |
| 57 | + <div class="share panel-body" id="non-printable"> |
| 58 | + <span>Share on: </span> |
| 59 | + <a class="btn btn-sm btn-primary cst__radius" href="https://www.facebook.com/sharer/sharer.php?u=https://python.web.id{% url "detail_post_page" slug=object.slug %}" target="_blank">Facebook</a> |
| 60 | + <a class="btn btn-sm btn-danger cst__radius" href="https://plus.google.com/share?url=https://python.web.id{% url "detail_post_page" slug=object.slug %}" target="_blank">Google+</a> |
| 61 | + <a class="btn btn-sm btn-info cst__radius" href="https://twitter.com/share" target="_blank">Twitter</a> |
| 62 | + <a class="btn btn-sm btn-success cst__radius" href="javascript:window.print()">Print Page</a> |
| 63 | + </div> |
70 | 64 |
|
71 | | -<style type="text/css" media="print"> |
72 | | - @media print { |
73 | | - #non-printable, .ip-client { display: none; } |
74 | | - #printable { display: block; width: 100%;height: 100%;} |
75 | | - a[href]::after {content: "";} /*content: " (" attr(href) ")"*/ |
76 | | - } |
77 | | -</style> |
| 65 | + <style type="text/css" media="print"> |
| 66 | + @media print { |
| 67 | + #non-printable, .ip-client { display: none; } |
| 68 | + #printable { display: block; width: 100%;height: 100%;} |
| 69 | + a[href]::after {content: "";} /*content: " (" attr(href) ")"*/ |
| 70 | + } |
| 71 | + </style> |
78 | 72 |
|
79 | | -<div class="panel panel-default" id="non-printable"> |
80 | | -<div class="panel-heading">Author</div> |
81 | | - <div class="panel-body"> |
82 | | - <div class="media"> |
83 | | - <div class="media-left media-middle" style="float: left;margin-right: 10px;"> |
84 | | - <a href="{% url 'author_posts_page' username=object.author.user.username %}"> |
85 | | - <img class="media-object" alt="{{ object.author }}" title="{{ object.author }}" src="{% if object.author.avatar %}/media/{{ object.author.avatar }}{% else %}/static/assets/icons/avatar.jpeg{% endif %}" style="width: 64px; height: 64px;"> |
86 | | - </a> |
| 73 | + <div class="panel panel-default" id="non-printable"> |
| 74 | + <div class="panel-heading">Author</div> |
| 75 | + <div class="panel-body"> |
| 76 | + <div class="media"> |
| 77 | + <div class="media-left media-middle" style="float: left;margin-right: 10px;"> |
| 78 | + <a href="{% url 'author_posts_page' username=object.author.user.username %}"> |
| 79 | + <img class="media-object" alt="{{ object.author }}" title="{{ object.author }}" src="{% if object.author.avatar %}/media/{{ object.author.avatar }}{% else %}/static/assets/icons/avatar.jpeg{% endif %}" style="width: 64px; height: 64px;"> |
| 80 | + </a> |
| 81 | + </div> |
| 82 | + <div class="media-body"> |
| 83 | + <h4 class="media-heading">{{ object.author }}</h4> |
| 84 | + {{ object.author.about|safe }}<br /> |
| 85 | + Website: <a href="{{ object.author.website }}" target="_blank">{{ object.author.website }}</a> |
| 86 | + </div> |
| 87 | + </div> |
87 | 88 | </div> |
88 | | - <div class="media-body"> |
89 | | - <h4 class="media-heading">{{ object.author }}</h4> |
90 | | - {{ object.author.about|safe }}<br /> |
91 | | - Website: <a href="{{ object.author.website }}" target="_blank">{{ object.author.website }}</a> |
| 89 | + </div> |
| 90 | + |
| 91 | + <div class="panel panel-default related" id="non-printable"> |
| 92 | + <div class="panel-heading"> |
| 93 | + <h3 class="panel-title">Related Posts</h3> |
92 | 94 | </div> |
| 95 | + <ul class="list-group"> |
| 96 | + {% for post in related_posts %} |
| 97 | + <li class="list-group-item"><a href="{% url "detail_post_page" slug=post.slug %}">{{ post.title }}</a> - <i>{{ post.created }}</i></li> |
| 98 | + {% empty %} |
| 99 | + <p style="margin: 1em;">No related posts!</p> |
| 100 | + {% endfor %} |
| 101 | + </ul> |
93 | 102 | </div> |
94 | | - </div> |
95 | | -</div> |
96 | 103 |
|
97 | | -<div class="panel panel-default related" id="non-printable"> |
98 | | - <div class="panel-heading"> |
99 | | - <h3 class="panel-title">Related Posts</h3> |
100 | | - </div> |
101 | | - <ul class="list-group"> |
102 | | - {% for post in related_posts %} |
103 | | - <li class="list-group-item"><a href="{% url "detail_post_page" slug=post.slug %}">{{ post.title }}</a> - <i>{{ post.created }}</i></li> |
104 | | - {% empty %} |
105 | | - <p style="margin: 1em;">No related posts!</p> |
106 | | - {% endfor %} |
| 104 | + <ul class="pager" id="non-printable"> |
| 105 | + <li class="previous"> |
| 106 | + {% if object.get_previous_by_created %} |
| 107 | + <a href="{% url 'detail_post_page' slug=object.get_previous_by_created.slug %}">← Previous</a> |
| 108 | + {% endif %} |
| 109 | + </li> |
| 110 | + <li class="next"> |
| 111 | + {% if object.get_next_by_created %} |
| 112 | + <a href="{% url 'detail_post_page' slug=object.get_next_by_created.slug %}">Next →</a> |
| 113 | + {% endif %} |
| 114 | + </li> |
107 | 115 | </ul> |
108 | | -</div> |
109 | | - |
110 | | -<ul class="pager" id="non-printable"> |
111 | | - <li class="previous"> |
112 | | - {% if object.get_previous_by_created %} |
113 | | - <a href="{% url 'detail_post_page' slug=object.get_previous_by_created.slug %}">← Previous</a> |
114 | | - {% endif %} |
115 | | - </li> |
116 | | - <li class="next"> |
117 | | - {% if object.get_next_by_created %} |
118 | | - <a href="{% url 'detail_post_page' slug=object.get_next_by_created.slug %}">Next →</a> |
119 | | - {% endif %} |
120 | | - </li> |
121 | | -</ul> |
122 | 116 |
|
123 | | - {% load disqus_tags %} |
124 | | - {% set_disqus_identifier "blogpost_" object.title %} |
125 | | - {% set_disqus_title object.title %} |
126 | | - {% disqus_show_comments %} |
127 | | - <!-- disqus_dev --> |
| 117 | + {% load disqus_tags %} |
| 118 | + {% set_disqus_identifier "blogpost_" object.title %} |
| 119 | + {% set_disqus_title object.title %} |
| 120 | + {% disqus_show_comments %} |
| 121 | + <!-- disqus_dev --> |
128 | 122 | </div> |
129 | 123 | {% endblock %} |
0 commit comments