瀏覽代碼

CiCitation au centre

Tibo 4 年之前
父節點
當前提交
47c04539a1
共有 2 個文件被更改,包括 19 次插入9 次删除
  1. 11 9
      src/css/styles_de_paragraphes.scss
  2. 8 0
      src/pages/Index.vue

+ 11 - 9
src/css/styles_de_paragraphes.scss

@@ -243,22 +243,24 @@ p img{
 	line-height: 9pt;
 }
 
-blockquote{
-
-//	align-items: center;
+.pagequote{
 	position: absolute;
 	background-image: url("/motifs/croix.png");
 	background-size: 0.4cm;
 	width: calc(100% + (#{$marge} + #{$fond-perdu})*2);
-  height: calc(100% + (#{$marge} + #{$fond-perdu})*2);
-  margin-left: calc(-#{$marge} - #{$fond-perdu} );
-  margin-top: calc(-#{$marge} - #{$fond-perdu}) !important;
-  left:0;
-  top:0;
+	height: calc(100% + (#{$marge} + #{$fond-perdu})*2);
+	margin-left: calc(-#{$marge} - #{$fond-perdu} );
+	margin-top: calc(-#{$marge} - #{$fond-perdu}) !important;
+	left:0;
+	top:0;
 	padding: 2cm;
 	break-before: always;
 	break-after: always;
-	// display: flex;
+	display: flex;
+	justify-content: center;
+}
+
+blockquote{
 	& p{
 
 		position: relative;

+ 8 - 0
src/pages/Index.vue

@@ -152,6 +152,14 @@ export default {
             layouts.forEach(l=>{
               l.classList.add("full-layout");
             });
+            // Centrer les citations
+            let citations = Array.from(document.querySelectorAll("blockquote"));
+            citations.forEach((citation, i) => {
+              let l = citation.closest(".layout");
+              l.classList.add("pagequote");
+              console.log(l);
+            });
+
           });
         });
       });