Browse Source

Restructuration arcticle

Sangfroid 5 months ago
parent
commit
7e4388f819
3 changed files with 14 additions and 13 deletions
  1. 5 5
      assets/styles/app.css
  2. 1 1
      templates/_menu.html.twig
  3. 8 7
      templates/view/index.html.twig

+ 5 - 5
assets/styles/app.css

@@ -24,14 +24,14 @@ body {
   background-position-y: 0;
 }
 
-header * {
+body > header * {
   margin: 0;
   padding: 0;
   list-style: none;
   text-decoration: none;
 }
 
-header {
+#header {
   height: 200px;
   width: 100vw;
   transition: all 0.1s ease;
@@ -169,13 +169,13 @@ main h2 a:hover {
 
 
 @media screen and (max-width: 1400px) {
-  header {
+  #header {
     height: 250px;
   }
 }
 
 @media screen and (max-width: 900px) {
-  header.big {
+  #header.big {
     height: 100vh;
   }
 
@@ -228,7 +228,7 @@ main h2 a:hover {
     font-size: 2em;
   }
 
-  header {
+  #header {
     height: 30vh;
   }
   

+ 1 - 1
templates/_menu.html.twig

@@ -1,4 +1,4 @@
-<header>
+<header id="header">
     <nav class="navbar" data-controller="menuburger">
         <a href="{{ path('app_index') }}" class="logo">Opinions sur le réel</a>
         <div class="nav-links" data-menuburger-target="navlinks">

+ 8 - 7
templates/view/index.html.twig

@@ -5,14 +5,15 @@
 {% block body %}
 
 <div>
-    <section>
-        <article class="article">
+    <article class="article">
+        <header>
             <h2>{{ article.title}}<span class="article-by">{{ article.publicationDate | date('d-m-Y')}} {{ article.author }}</span></h2>
-            <div class="contenu">
-                {{ article.content | raw }}
-            </div>
-        </article>
-    </section>
+        </header>
+        <section class="contenu">
+            {{ article.content | raw }}
+        </section>
+        <footer></footer>
+    </article>
 </div>
 
 <a href="{{ path('app_index')}}">Retour au blog</a>