Fakultas Ilmu Komputer UI

Commit facac159 authored by Ken Reinhart's avatar Ken Reinhart
Browse files

still struggling with the css

parent 50b67d1e
Pipeline #58140 passed with stages
in 29 minutes
...@@ -225,71 +225,73 @@ ...@@ -225,71 +225,73 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div>
<div class="row menu-wrapper mr-4 ml-4 p-3">
<nav class="navbar navbar-expand-sm border-top border-bottom p-0 mt-3 mb-3">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="#similar">Pengunjung yang melihat buku ini juga melihat</a>
</li>
</ul>
</nav>
</div>
<div class="row materi-data mr-4 ml-4 p-3 shadow-sm rounded">
<div class="cover">
<img src={{materi_data.cover.url}} alt="cover">
</div>
<div class="col-9 book"> <div class="row menu-wrapper mr-4 ml-4 p-3">
<div class="similar-material"> <nav class="navbar navbar-expand-sm border-top border-bottom p-0 mt-3 mb-3">
{% for item in materi_list %} <ul class="navbar-nav">
<div class="card book"> <li class="nav-item">
<img src={{item.cover.url}} class="card-img-top" alt="cover" <a class="nav-link" href="#similar">Pengunjung yang melihat buku ini juga melihat</a>
style="height:200px; widows: 200px;; overflow: hidden;"></img> </li>
<div class="card-body"> </ul>
<h5 class="card-title">{{item.title}}</h5> </nav>
<p class="card-text">{{item.author}}</p> </div>
<p class="card-text">Diunggah oleh
<a class="card-link" href="{% url 'katalog-per-kontributor' item.uploader.email %}"> <div class="row menu-wrapper mr-4 ml-4 p-3">
{{item.uploader.name}} <div class="col-3">
</a> <!--Related Material-->
</p> {% for item in materi_list %}
<div class="card book">
<img src={{item.cover.url}} class="card-img-top" alt="cover"
style="height:200px; widows: 200px;; overflow: hidden;"></img>
<div class="card-body">
<h5 class="card-title">{{item.title}}</h5>
<p class="card-text">{{item.author}}</p>
<p class="card-text">Diunggah oleh
<a class="card-link" href="{% url 'katalog-per-kontributor' item.uploader.email %}">
{{item.uploader.name}}
</a>
</p>
<a href="{% url 'view-materi' item.id %}" class="btn btn-book">Baca</a> <a href="{% url 'view-materi' item.id %}" class="btn btn-book">Baca</a>
<a href="{% url 'detail-materi' item.id %}" class="btn btn-book">Detail</a> <a href="{% url 'detail-materi' item.id %}" class="btn btn-book">Detail</a>
</div> </div>
</div> </div>
{% endfor %} {% endfor %}
<div class="center"> <!--Pagination-->
<div class="pagination"> <div class="center">
<span class="step-links"> <div class="pagination">
<span class="current"> <span class="step-links">
Page {{ materi_list.number }} of {{ materi_list.paginator.num_pages }} <span class="current">
</span> Page {{ materi_list.number }} of {{ materi_list.paginator.num_pages }}
</span>
<br> <br>
</br> </br>
{% if materi_list.has_previous %} {% if materi_list.has_previous %}
<a href="?page=1{{url}}">&laquo; first</a> <a href="?page=1{{url}}">&laquo; first</a>
<a href="?page={{ materi_list.previous_page_number }}{{url}}">previous</a> <a href="?page={{ materi_list.previous_page_number }}{{url}}">previous</a>
{% endif %} {% endif %}
{% if materi_list.has_next %} {% if materi_list.has_next %}
<a href="?page={{ materi_list.next_page_number }}{{url}}">next</a> <a href="?page={{ materi_list.next_page_number }}{{url}}">next</a>
<a href="?page={{ materi_list.paginator.num_pages }}{{url}}">last &raquo;</a> <a href="?page={{ materi_list.paginator.num_pages }}{{url}}">last &raquo;</a>
{% endif %} {% endif %}
</span> </span>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="row menu-wrapper mr-4 ml-4 p-3"> <!--Description and Comment-->
<div class="row menu-wrapper mr-4 ml-4 p-3 bg-f8f8fc">
<nav class="navbar navbar-expand-sm border-top border-bottom p-0 mt-3 mb-3"> <nav class="navbar navbar-expand-sm border-top border-bottom p-0 mt-3 mb-3">
<ul class="navbar-nav"> <ul class="navbar-nav">
<li class="nav-item"> <li class="nav-item">
...@@ -351,15 +353,18 @@ ...@@ -351,15 +353,18 @@
{% endfor %} {% endfor %}
</div> </div>
{% endif %} {% endif %}
</div> </div>
<footer class="sticky-footer bg-white p-4"> <!-- Footer-->
<div class="container my-auto"> <div>
<div class="copyright text-center my-auto"> <footer class="sticky-footer bg-white p-4">
<span>Copyright &copy; Diskominfo Kota Depok 2020</span> <div class="container my-auto">
<div class="copyright text-center my-auto">
<span>Copyright &copy; Diskominfo Kota Depok 2020</span>
</div>
</div> </div>
</div> </footer>
</footer> </div>
<!-- Modal --> <!-- Modal -->
<div class="modal fade" id="notLoggedInModal" tabindex="-1" role="dialog" aria-labelledby="notLoggedInModalLabel" <div class="modal fade" id="notLoggedInModal" tabindex="-1" role="dialog" aria-labelledby="notLoggedInModalLabel"
......
...@@ -182,7 +182,6 @@ ...@@ -182,7 +182,6 @@
</div> </div>
</div> </div>
</div> </div>
<!-- /.container --> <!-- /.container -->
</body> </body>
......
...@@ -161,7 +161,7 @@ class DetailMateri(TemplateView): ...@@ -161,7 +161,7 @@ class DetailMateri(TemplateView):
lstMateri = lstMateri.filter(categories=kategori.pk) lstMateri = lstMateri.filter(categories=kategori.pk)
context["materi_list"] = lstMateri context["materi_list"] = lstMateri
paginator = Paginator(context["materi_list"], 15) paginator = Paginator(context["materi_list"], 4)
page_number = request.GET.get('page') page_number = request.GET.get('page')
page_obj = paginator.get_page(page_number) page_obj = paginator.get_page(page_number)
context["materi_list"] = page_obj context["materi_list"] = page_obj
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment