This commit is contained in:
1776123 2020-07-24 15:09:31 -04:00
parent 5be28f8519
commit 915d512c03
2 changed files with 37 additions and 1 deletions

View File

@ -0,0 +1,36 @@
{% extends "blog/base.html" %}
{% block content %}
{% for post in posts %}
<article class="media content-section">
<img class="rounded-circle article-img" src="{{ post.author.profile.profile_pic.url}}" alt="Profile Picture">
<div class="media-body">
<div class="article-metadata">
<a class="mr-2" href="{% url 'user-posts' post.author.username %}">{{ post.author.get_full_name }}</a>
<small class="text-muted">@{{ post.author }} · {{ post.date_posted }}</small>
</div>
<p class="article-content font-weight-light"><a class="nounderline" href="{% url 'post-detail' post.id %}">{{ post.content }}</a></p>
</div>
</article>
{% endfor %}
{% if is_paginated %}
{% if page_obj.has_previous %}
<a class="btn btn-outline-info mb-4" href="?page=1">First</a>
<a class="btn btn-outline-info mb-4" href="?page={{ page_obj.previous_page_number }}">Previous</a>
{% endif %}
{% for num in page_obj.paginator.page_range %}
{% if page_obj.number == num %}
<a class="btn btn-info mb-4" href="?page={{ num }}">{{ num }}</a>
{% elif num > page_obj.number|add:'-3' and num < page_obj.number|add:'3' %}
<a class="btn btn-outline-info mb-4" href="?page={{ num }}">{{ num }}</a>
{% endif %}
{% endfor %}
{% if page_obj.has_next %}
<a class="btn btn-outline-info mb-4" href="?page={{ page_obj.next_page_number }}">Next</a>
<a class="btn btn-outline-info mb-4" href="?page={{ page_obj.paginator.num_pages }}">Last</a>
{% endif %}
{% endif %}
{% endblock content %}

View File

@ -12,7 +12,7 @@
<img src="{% static 'homepage/css/res/influencers_heading2_highres.png' %}" width="53%" height="auto"/>
</div>
<a class="btn btn-primary btn-xl text-uppercase js-scroll-trigger" href="login.html">Find New Oppurtnities</a>
<a href="#portfolio"><i><center>Don't Know Where to Start?</center></i></a>
<a href="feed.html"><i><center>Don't Know Where to Start?</center></i></a>
</div>
</header>