Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion blog/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class BlogListView(ListView):
model = Blog
template_name = "blog/blog_list.html"
context_object_name = "blog"
paginate_by = 2
paginate_by = 5

def get_queryset(self):
context_object_name = Blog.objects.all().order_by("-id")
Expand Down
2 changes: 1 addition & 1 deletion equestlms/templates/_partials/_navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<a href="{% url 'blog:blog_list' %}">Blog</a>
</li>
<li class="active">
<a href="{% url 'home:index' %}">Videos</a>
<a href="{% url 'videos:video_list' %}">Videos</a>
</li>
</li>
<li class="login-link">
Expand Down
118 changes: 61 additions & 57 deletions equestlms/templates/base.html
Original file line number Diff line number Diff line change
@@ -1,84 +1,88 @@
{% load static i18n %}<!DOCTYPE html>
{% load static i18n %}
<!DOCTYPE html>
{% get_current_language as LANGUAGE_CODE %}
<!DOCTYPE html>
<html lang="{{LANGUAGE_CODE}}">
<head>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0">
<title>Equest Tech</title>

<!-- Favicon -->
<link rel="shortcut icon" type="image/x-icon" href="{% static 'img/equest_logo.png' %}">
{% block css %}
{% include './_partials/_stylesheets.html' %}
{% endblock css %}
<!-- Le javascript

<head>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0">
<title>Equest Tech</title>

<!-- Favicon -->
<link rel="shortcut icon" type="image/x-icon" href="{% static 'img/equest_logo.png' %}">
{% block css %}
{% include './_partials/_stylesheets.html' %}
{% endblock css %}
<!-- Le javascript
================================================== -->
{# Placed at the top of the document so pages load faster with defer #}
{% block top_js %}
{% include './_partials/_javascripts.html' %}
{% endblock top_js %}
{# Placed at the top of the document so pages load faster with defer #}
{% block top_js %}
{% include './_partials/_javascripts.html' %}
{% endblock top_js %}

</head>

</head>
<body>
<body>

<!-- Main Wrapper -->
<div class="main-wrapper">
<!-- Main Wrapper -->
<div class="main-wrapper">


{% block navbar %}
{% if not request.path == "/accounts/signup/" and not request.path == "/accounts/login/" and not request.path == "/accounts/confirm-email/" %}
{% include './_partials/_navbar.html' %}
{% endif %}
{% endblock navbar %}
<div>
{% block navbar %}
{% if not request.path == "/accounts/signup/" and not request.path == "/accounts/login/" and not request.path == "/accounts/confirm-email/" %}
{% include './_partials/_navbar.html' %}
{% endif %}
{% endblock navbar %}
<div>
{% include '_partials/_messages.html' %}
</div>
{% block body %}
</div>
{% block body %}

{% endblock body %}

{% endblock body %}

{% block footer %}
{% if not request.path == "/accounts/signup/" and not request.path == "/accounts/login/" and not request.path == "/accounts/confirm-email/" %}
{% include './_partials/_footer.html' %}
{% endif %}
{% endblock footer %}

{% block footer %}
{% if not request.path == "/accounts/signup/" and not request.path == "/accounts/login/" and not request.path == "/accounts/confirm-email/" %}
{% include './_partials/_footer.html' %}
{% endif %}
{% endblock footer %}



</div>
<!-- /Main Wrapper -->

</div>
<!-- /Main Wrapper -->
{% block bottom_js %}
<!-- jQuery -->
<script src="{% static 'js/jquery-3.6.0.min.js' %}"></script>

{% block bottom_js %}
<!-- jQuery -->
<script src="{% static 'js/jquery-3.6.0.min.js' %}"></script>
<!-- Bootstrap Core JS -->
<script src="{% static 'js/bootstrap.bundle.min.js' %}"></script>

<!-- Bootstrap Core JS -->
<script src="{% static 'js/bootstrap.bundle.min.js' %}"></script>
<!-- counterup JS -->
<script src="{% static 'js/jquery.waypoints.js' %}"></script>
<script src="{% static 'js/jquery.counterup.min.js' %}"></script>

<!-- counterup JS -->
<script src="{% static 'js/jquery.waypoints.js' %}"></script>
<script src="{% static 'js/jquery.counterup.min.js' %}"></script>
<!-- Select2 JS -->
<script src="{% static 'plugins/select2/js/select2.min.js' %}"></script>

<!-- Select2 JS -->
<script src="{% static 'plugins/select2/js/select2.min.js' %}"></script>
<!-- Owl Carousel -->
<script src="{% static 'js/owl.carousel.min.js' %}"></script>

<!-- Owl Carousel -->
<script src="{% static 'js/owl.carousel.min.js' %}"></script>
<!-- Slick Slider -->
<script src="{% static 'plugins/slick/slick.js' %}"></script>

<!-- Slick Slider -->
<script src="{% static 'plugins/slick/slick.js' %}"></script>
<!-- Aos -->
<script src="{% static 'plugins/aos/aos.js' %}"></script>

<!-- Aos -->
<script src="{% static 'plugins/aos/aos.js' %}"></script>
<!-- Custom JS -->
<script src="{% static 'js/script.js' %}"></script>
{% endblock bottom_js %}

<!-- Custom JS -->
<script src="{% static 'js/script.js' %}"></script>
{% endblock bottom_js %}

</body>

</body>
</html>
207 changes: 207 additions & 0 deletions equestlms/templates/videos/video_category.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,207 @@
{% extends "base.html" %}
{% load static %}
{% block body %}
{% include '_partials/_breadcrumbs.html' %}
<!-- Course -->
<section class="course-content">
<div class="container">
<div class="row">
<div class="col-lg-9 col-md-12">

<!-- Video (blog styling used for videos) -->
{% for video in search_video %}
<div class="blog">
<div class="blog-image">
<iframe width="100%" height="490" src="https://www.youtube.com/embed/{{ video.url }}"
title="{{video.title}}" frameborder="0" allow="accelerometer;
autoplay;
clipboard-write;
encrypted-media;
gyroscope; picture-in-picture" allowfullscreen></iframe>

<br>
<hr>
</div>
<h3 class="blog-title"><a href='{{video.url}}'>{{ video.title }}</a> </h3>
<div class="blog-info clearfix">
<div class="post-left">
<ul>
<!-- <li>
<div class="post-author">
<a href="instructor-profile.html"><img
src="{% static 'img/user/user.jpg' %}"
alt="Post Author"> <span>Ruby Perrin</span></a>
</div>
</li> -->
<li><img class="img-fluid" src="{% static 'img/icon/icon-22.svg' %}" alt="">{{video.created_at}}</li>
{% for tag in video.tags.all %}
<li><img class="img-fluid" src="{% static 'img/icon/icon-23.svg' %}" alt="">{{ tag.name }}</li>
{% endfor %}

</ul>
</div>
</div>

</div>
{% endfor %}
<!-- /Video -->

<!-- Video pagination -->

<div class="row">
<div class="col-md-12">
<ul class="pagination lms-page lms-pagination">
{% if page_obj.has_previous %}
<li class="page-item prev">
<a class="page-link" href="?page={{ page_obj.previous_page_number }}" tabindex="-1"><i
class="fas fa-angle-left"></i></a>
</li>
{% endif %}
{% for i in paginator.page_range %}

{% if page_obj.number == i %}
<li class="page-item first-page active">
{% else %}
<li class="page-item first-page">
{% endif %}
<a class="page-link" href="?page={{ i }}">{{ i }}</a>
</li>
{% endfor %}
{% if page_obj.has_previous %}
<li class="page-item next">
<a class="page-link" href="?page={{ page_obj.next_page_number }}"><i class="fas fa-angle-right"></i></a>
</li>
{% endif %}
</ul>
</div>
</div>
<!-- New Pagination -->

<!-- /Blog pagination -->
</div>
<!-- Blog Sidebar -->
<div class="col-lg-3 col-md-12 sidebar-right theiaStickySidebar">

<!-- Search -->
<div class="card search-widget blog-search blog-widget">
<div class="card-body">
<form action="{% url 'videos:video_search' %}" class="search-form">
<div class="input-group">
<input type="text" placeholder="Search..." class="form-control" name="q">
<button type="submit" class="btn btn-primary"><i class="fa fa-search"></i></button>
</div>
</form>
</div>
</div>
<!-- /Search -->

<!-- Latest Posts -->
<div class="card post-widget blog-widget">
<div class="card-header">
<h4 class="card-title">Recent Videos</h4>
</div>
<div class="card-body">
<ul class="latest-posts">
{% for video in latest_videos %}
<li>
<div class="post-thumb">
<a href="blog-details.html">
<img class="img-fluid" src="{{video.alt_image.url}}" alt="">
</a>
</div>
<div class="post-info">
<h4>
<a href="{{video.url}}">{{ video.title }}</a>
</h4>
<p><img class="img-fluid" src="{% static 'img/icon/icon-22.svg' %}" alt="">{{ video.created_at }}</p>
</div>
</li>
{% endfor %}

</ul>
</div>
</div>
<!-- /Latest Posts -->

<!-- Categories -->
<div class="card category-widget blog-widget">
<div class="card-header">
<h4 class="card-title">Categories</h4>
</div>
<div class="card-body">
<ul class="categories">
{% for category in categories%}
<li><a href="{% url 'videos:video_category' category.slug %}"><i class="fas fa-angle-right"></i> {{ category.name }} </a></li>
{% endfor %}

</ul>
</div>
</div>
<!-- /Categories -->

<!-- Archives Categories -->
{% comment %} <div class="card category-widget blog-widget">
<div class="card-header">
<h4 class="card-title">Archives</h4>
</div>
<div class="card-body">
<ul class="categories">
<li><a href="javascript:void(0);"><i class="fas fa-angle-right"></i> January 2022 </a></li>
<li><a href="javascript:void(0);"><i class="fas fa-angle-right"></i> February 2022 </a></li>
<li><a href="javascript:void(0);"><i class="fas fa-angle-right"></i> April 2022 </a></li>
</ul>
</div>
</div> {% endcomment %}
<!-- /Archives Categories -->

<!-- Tags -->
<div class="card tags-widget blog-widget tags-card">
<div class="card-header">
<h4 class="card-title">Latest Tags</h4>
</div>
<div class="card-body">
<ul class="tags">
{% for video in video_list %}
{% for tag in video.tags.all %}
<li><a href="javascript:void(0);" class="tag">{{ tag.name }}</a></li>
{% endfor %}
{% endfor %}


</ul>
</div>
</div>
<!-- /Tags -->

</div>
<!-- /Blog Sidebar -->
</div>
</div>
</section>
<!-- /Course -->
{% endblock body %}

{% block bottom_js %}
<!-- jQuery -->
<script src="assets/js/jquery-3.6.0.min.js"></script>

<!-- Bootstrap Core JS -->
<script src="assets/js/bootstrap.bundle.min.js"></script>

<!-- counterup JS -->
<script src="assets/js/jquery.waypoints.js"></script>
<script src="assets/js/jquery.counterup.min.js"></script>

<!-- Owl Carousel -->
<script src="assets/js/owl.carousel.min.js"></script>

<!-- Slick Slider -->
<script src="assets/plugins/slick/slick.js"></script>

<!-- Sticky Sidebar JS -->
<script src="assets/plugins/theia-sticky-sidebar/ResizeSensor.js"></script>
<script src="assets/plugins/theia-sticky-sidebar/theia-sticky-sidebar.js"></script>

<!-- Custom JS -->
<script src="assets/js/script.js"></script>
{% endblock bottom_js %}
Loading