Ver código fonte

ajout de bootstrap

François 6 anos atrás
pai
commit
01e0c17812

+ 11 - 4
app/Resources/views/layout.html.twig

@@ -2,6 +2,10 @@
 <html lang="fr">
 <head>
     <meta charset="UTF-8">
+    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
+<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
+<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.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
     {% block style %}{% endblock %}
 
     <title>Title</title>
@@ -9,15 +13,18 @@
 <body>
 <header>
     <h1>{% block title %}{% endblock %}</h1>
-
 </header>
 <main>
-    {%  block body %}Toto
-    {%  endblock %}
-    </main>
+	<div class="container">
+    		{%  block body %}
+			Texte inclu dans le block body parent()
+    		{% endblock %}
+	</div>
+</main>
 
 <footer>
     <p>Ceci est un footer</p>
 </footer>
+{% block scripts %}{% endblock %}
 </body>
 </html>

+ 13 - 3
src/DocumentBundle/Resources/views/Document/livre.html.twig

@@ -7,14 +7,24 @@
 
 {%  block body %}
     {{  parent() }}
-    <table style="width:100%;">
-
+    <table class="table table-dark">
+	<thead>
+		<tr>
+			<th>Titre</th>
+			<th>Accès</th>
+	</thead>
+	<tbody>
         <tr>
-            <td><p class="titre-livre">{{ livre.getTitre }}</p></td>
+            <td class="titre-livre">{{ livre.getTitre }}</td>
             <td>{% include "@Document/Document/acces.html.twig" with {'titreWidget': 'Bibliothèque variable'}%}</td>
         </tr>
+	</tbody>
 
     </table>
 
     {{ render(controller("DocumentBundle:Livre:derniersLivres")) }}
 {%  endblock %}
+
+{% block scripts %}
+<script src="{{ asset('bundles/document/js/scripts.js') }}"></script>
+{% endblock %}