Skip to content

Commit

Permalink
Merge pull request #10 from mrmuhammadazeemrao/master
Browse files Browse the repository at this point in the history
Refactor the post detail template
  • Loading branch information
maraodev authored Oct 31, 2023
2 parents 6f8fce3 + 35cf40e commit 45a1b29
Showing 1 changed file with 34 additions and 32 deletions.
66 changes: 34 additions & 32 deletions templates/blog/post_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,52 +4,54 @@

{% cache 86400 post_detail post.pk %}

{% block head_title %} {{ post.title }} {% endblock %}
{% block head_title %} {{ post.title }} {% endblock %}

{% block meta_tags %}
<meta name="description" content="{{ post.get_meta_description }}">
<meta name="keywords" content="{{ post.get_meta_keywords }}">
<meta property="og:title" content="{{ post.get_meta_title }}">
<meta property="og:description" content="{{ post.get_meta_description }}">
<meta name="twitter:title" content="{{ post.get_meta_title }}">
<meta name="twitter:description" content="{{ post.get_meta_description }}">
{% endblock %}
{% block meta_tags %}
<meta name="description" content="{{ post.get_meta_description }}">
<meta name="keywords" content="{{ post.get_meta_keywords }}">
<meta property="og:title" content="{{ post.get_meta_title }}">
<meta property="og:description" content="{{ post.get_meta_description }}">
<meta name="twitter:title" content="{{ post.get_meta_title }}">
<meta name="twitter:description" content="{{ post.get_meta_description }}">
{% endblock %}


{% block content %}
{% block content %}

<div class="container my-5">
<h1 class="text-success text-center mt-5">{{ post.title }} </h1>
<p class="text-muted text-center mb-5"> <i class="bi bi-book"></i> {{ post.reading_time }} minutes</p>
<div class="container my-5">
<h1 class="text-success text-center mt-5">{{ post.title }} </h1>
<p class="text-muted text-center mb-5"> <i class="bi bi-book"></i> {{ post.reading_time }} minutes</p>


<div class="row">
<div class="col">
<small class="text-muted">{{ post.created }}</small>
</div>
<div class="col">
{% if post.pdf_created %}
<a class="btn btn-outline-danger float-end" target="_blank" href="{{ post.pdf.url }}">Download as PDF <i class="bi bi-download"></i></a>

{% endif %}
</div>
</div>

<div class="row">
<div class="col">
<small class="text-muted">{{ post.created }}</small>
</div>
<div class="col">
{% if post.pdf_created %}
<a class="btn btn-outline-danger float-end" target="_blank" href="{{ post.pdf.url }}">Download as PDF <i
class="bi bi-download"></i></a>

<div class="container my-5 text-dark">
<div class="row justify-content-md-center">
{{ post.content | markdown | safe }}
</div>
{% endif %}
</div>
</div>

</div>

<div class="container my-5 text-dark">
<div class="row justify-content-md-center">
{{ post.content | markdown | safe }}
</div>
</div>


<a class="btn btn-outline-success border-0 my-5" href="{% url 'blog_allposts' %}"><i class="bi bi-arrow-left"></i> More posts </a>
<a class="btn btn-outline-success border-0 my-5" href="{% url 'blog_allposts' %}"><i class="bi bi-arrow-left"></i> More
posts </a>

{% include "partials/footer.html" %}
{% include "partials/footer.html" %}


{% endblock %}
{% endblock %}



Expand Down

0 comments on commit 45a1b29

Please sign in to comment.