Initial Commit
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<html data-bs-theme="light">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{% block title %}Book Forge{% endblock %}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="/assets/css/bootstrap.css">
|
||||
<link rel="stylesheet" href="/assets/css/main.css">
|
||||
|
||||
<link rel="stylesheet" href="/assets/css/fork-awesome.min.css">
|
||||
<link rel="icon" type="image/x-icon" href="/assets/images/favicon.ico">
|
||||
{% block extra_head %}{% endblock extra_head %}
|
||||
</head>
|
||||
|
||||
<body class="d-flex flex-column min-vh-100">
|
||||
{% include "layout/header.html" %}
|
||||
|
||||
<main class="container" style="padding-top: 100px;">
|
||||
{% block main %}{% endblock %}
|
||||
</main>
|
||||
|
||||
<footer class="text-center mt-auto pt-4">
|
||||
{% block footer_extra %}
|
||||
{% include "layout/footer.html" %}
|
||||
{% endblock %}
|
||||
</footer>
|
||||
|
||||
<script src="/assets/js/bootstrap.min.js"></script>
|
||||
<script src="/assets/js/script.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,49 @@
|
||||
{% extends "base.html" %}
|
||||
{% import "components/typography.html" as typography %}
|
||||
|
||||
{% block main %}
|
||||
{{ typography::heading("Editer La petite derniere") }}
|
||||
|
||||
<form>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Name</label>
|
||||
<input type="text" class="form-control" value="La petite derniere">
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Author(s)</label>
|
||||
<input type="text" class="form-control" value="Fatima Daas">
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Owner</label>
|
||||
<select class="form-control">
|
||||
<option selected>Jean</option>
|
||||
<option>Simon</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Current Holder</label>
|
||||
<select class="form-control">
|
||||
<option></option>
|
||||
<option>Jean</option>
|
||||
<option selected>Simon</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Description</label>
|
||||
<textarea class="form-control">dsjfskdljf</textarea>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Comment</label>
|
||||
<textarea class="form-control">sdsfjsdkfjsdklfj</textarea>
|
||||
</div>
|
||||
|
||||
<div class="mt-4 text-center">
|
||||
<input type="submit" value="Create book" class="btn btn-success">
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,49 @@
|
||||
{% extends "base.html" %}
|
||||
{% import "components/typography.html" as typography %}
|
||||
|
||||
{% block main %}
|
||||
{{ typography::heading("New book") }}
|
||||
|
||||
<form>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Name</label>
|
||||
<input type="text" class="form-control">
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Author(s)</label>
|
||||
<input type="text" class="form-control">
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Owner</label>
|
||||
<select class="form-control">
|
||||
<option>Jean</option>
|
||||
<option>Simon</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Current Holder</label>
|
||||
<select class="form-control">
|
||||
<option></option>
|
||||
<option>Jean</option>
|
||||
<option>Simon</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Description</label>
|
||||
<textarea class="form-control"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Comment</label>
|
||||
<textarea class="form-control"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="mt-4 text-center">
|
||||
<input type="submit" value="Create book" class="btn btn-success">
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,31 @@
|
||||
{% extends "base.html" %}
|
||||
{% import "components/typography.html" as typography %}
|
||||
{% import "components/dropdown.html" as dropdown %}
|
||||
{% import "components/fields.html" as fields %}
|
||||
|
||||
{% block main %}
|
||||
{% call typography::heading("La petite derniere") %}
|
||||
{{ dropdown::dropdown_button("Actions", [("Edit", "/books/1/edit"), ("Delete", "/books/1")]) }}
|
||||
{% endcall %}
|
||||
|
||||
<div class="mt-4">
|
||||
<h5 class="mt-4 fw-bold">Book details</h5>
|
||||
{{ fields::field("Name", "La petite derniere") }}
|
||||
{{ fields::field("Authors", "Fatima Daas") }}
|
||||
{{ fields::field("Authors", "Je m’appelle Fatima Daas. Je suis la mazoziya, la petite dernière. Celle à laquelle on ne
|
||||
s’est pas préparé. Française d’origine algérienne. Musulmane pratiquante. Clichoise qui passe plus de trois heures par
|
||||
jour dans les transports. Une touriste. Une banlieusarde qui observe les comportements parisiens. Je suis une
|
||||
menteuse, une pécheresse. Adolescente, je suis une élève instable. Adulte, je suis hyper-inadaptée. J’écris des
|
||||
histoires pour éviter de vivre la mienne. J’ai fait quatre ans de thérapie. C’est ma plus longue relation. L’amour,
|
||||
c’était tabou à la maison, les marques de tendresse, la sexualité aussi. Je me croyais polyamoureuse. Lorsque Nina a
|
||||
débarqué dans ma vie, je ne savais plus du tout ce dont j’avais besoin et ce qu’il me manquait. Je m’appelle Fatima
|
||||
Daas. Je ne sais pas si je porte bien mon prénom.") }}
|
||||
|
||||
<h5 class="mt-50px fw-bold">User Details</h5>
|
||||
{{ fields::field("Owner", "Jean") }}
|
||||
{{ fields::field("Current Holder", "Pierre") }}
|
||||
|
||||
<h5 class="mt-50px fw-bold">More Informations</h5>
|
||||
{{ fields::field("Comment", "J'adore ce livre ca parle de plein de choses !") }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,12 @@
|
||||
{% macro dropdown_button(label, items = []) %}
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
{{ label }}
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{% for item in items %}
|
||||
<li><a class="dropdown-item" href="{{ item.1 }}">{{ item.0 }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
@@ -0,0 +1,14 @@
|
||||
{% macro field(name, value) %}
|
||||
<div class="row mt-4">
|
||||
<div class="col-md-3">
|
||||
<p class="mb-0 fw-regular">
|
||||
{{ name }}:
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<p class="mb-0">
|
||||
{{ value }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
@@ -0,0 +1,13 @@
|
||||
{% macro heading(title) %}
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<h1 class="mb-4">
|
||||
{{ title }}
|
||||
</h1>
|
||||
|
||||
{% if caller is defined %}
|
||||
<div>
|
||||
{{ caller() }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
@@ -0,0 +1 @@
|
||||
Error
|
||||
@@ -0,0 +1,41 @@
|
||||
{% extends "base.html" %}
|
||||
{% import "components/typography.html" as typography %}
|
||||
{% import "components/dropdown.html" as dropdown %}
|
||||
|
||||
{% block main %}
|
||||
{{ typography::heading("All books") }}
|
||||
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">#</th>
|
||||
<th scope="col">Name</th>
|
||||
<th scope="col">Author(s)</th>
|
||||
<th scope="col">Owner</th>
|
||||
<th scope="col">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">1</th>
|
||||
<td>La petite derniere</td>
|
||||
<td>Fatima Daas</td>
|
||||
<td>Jean</td>
|
||||
<td>
|
||||
{{ dropdown::dropdown_button("Actions", [("Voir", "/books/1"), ("Edit", "/books/1/edit"), ("Delete",
|
||||
"/books/1")]) }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">2</th>
|
||||
<td>La petite derniere</td>
|
||||
<td>Fatima Daas</td>
|
||||
<td>Jean</td>
|
||||
<td>
|
||||
{{ dropdown::dropdown_button("Actions", [("Voir", "/books/1"), ("Edit", "/books/1/edit"), ("Delete",
|
||||
"/books/1")]) }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,5 @@
|
||||
<div class="container text-center mt-4">
|
||||
<div class="d-flex flex-column flex-sm-row gap-0 gap-sm-3 justify-content-center">
|
||||
<p>Made with Love & Fuck a Fascist !</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,34 @@
|
||||
<nav class="navbar navbar-expand-lg bg-body-tertiary fixed-top shadow">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="/">
|
||||
BookForge
|
||||
</a>
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
|
||||
aria-controls="navbarNav" 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 me-auto">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/">Books</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/users">Users</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="d-flex align-items-center gap-2 py-3">
|
||||
<select id="changeTheme" class="form-select">
|
||||
<option value="light">light</option>
|
||||
<option value="dark">dark</option>
|
||||
</select>
|
||||
|
||||
<a class="btn btn-success text-white" href="/books/new">
|
||||
<i class="fa fa-download me-2"></i>
|
||||
Add book
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -0,0 +1,39 @@
|
||||
{% extends "base.html" %}
|
||||
{% import "components/typography.html" as typography %}
|
||||
|
||||
{% block main %}
|
||||
{{ typography::heading("All users") }}
|
||||
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">#</th>
|
||||
<th scope="col">Name</th>
|
||||
<th scope="col">Nombre de livres</th>
|
||||
<th scope="col">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">1</th>
|
||||
<td>Jean</td>
|
||||
<td>34</td>
|
||||
<td>
|
||||
<a href='#' class="btn btn-danger btn-sm">
|
||||
Delete
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">2</th>
|
||||
<td>Pierre</td>
|
||||
<td>34</td>
|
||||
<td>
|
||||
<a href='#' class="btn btn-danger btn-sm">
|
||||
Delete
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user