Add files

This commit is contained in:
Marijn Jansen
2019-03-08 16:04:26 +01:00
parent 3af07b3e40
commit 83f3ee2cb4
106 changed files with 8328 additions and 0 deletions

3
templates/footer.html Normal file
View File

@@ -0,0 +1,3 @@
<footer class="small text-center text-muted">
&copy; 2019 Marijn Jansen
</footer>

27
templates/index.html Normal file
View File

@@ -0,0 +1,27 @@
{% extends "layout.html" %}
{% block title %}Marlous van Leeuwen{% endblock %}
{% block main %}
<main class="container">
<div class="row">
{% for i in range(count) %}
<div class="col-lg-3 col-md-4 col-6">
<a data-toggle="modal" data-target="#detailModal" data-name="{{ i }}">
<div class="card border-light">
<img class="card-img" src="https://placeimg.com/400/400/any" alt="random image">
<div class="card-img-overlay d-flex align-items-center justify-content-center">
<div class="card-title-bg bg-dark w-100 d-flex align-items-center justify-content-center">
<h5 class="card-text text-light">{{ i }}</h5>
</div>
</div>
</div>
</a>
</div>
{% endfor %}
</div>
</main>
{% endblock %}

35
templates/layout.html Normal file
View File

@@ -0,0 +1,35 @@
<!doctype html>
<html lang="nl">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap first, then custom style -->
<link rel="stylesheet" href="/static/bootstrap.css">
<link rel="stylesheet" href="/static/style.css">
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js"
integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js"
integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k"
crossorigin="anonymous"></script>
<title>{% block title %}{% endblock %}</title>
</head>
<body>
{% include "nav.html" %}
{% block main %}{% endblock %}
{% include "modal.html" %}
{% include "footer.html" %}
</body>
</html>

32
templates/modal.html Normal file
View File

@@ -0,0 +1,32 @@
<div class="modal fade" id="detailModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Hier staat een mooi verhaaltje over het project wat je net hebt aangeklikt.</p>
</div>
{# <div class="modal-footer">#}
{# <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>#}
{# <button type="button" class="btn btn-primary">Save changes</button>#}
{# </div>#}
</div>
</div>
</div>
<script>
$('#detailModal').on('show.bs.modal', function (event) {
let card = $(event.relatedTarget); // Button that triggered the modal
let name = card.data('name'); // Extract info from data-* attributes
// If necessary, you could initiate an AJAX request here (and then do the updating in a callback).
// Update the modal's content. We'll use jQuery here, but you could use a data binding library or other methods instead.
let modal = $(this);
modal.find('.modal-title').text(name);
{#modal.find('.modal-body input').val(recipient)#}
})
</script>

16
templates/nav.html Normal file
View File

@@ -0,0 +1,16 @@
<nav class="navbar navbar-expand-md navbar-light bg-light fixed-top">
<a class="navbar-brand" href="{{ url_for("index") }}">Marlous</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item active">
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
</li>
</ul>
</div>
</nav>