From 9dce1d1576b30757682273def5fbca4fa75b84b1 Mon Sep 17 00:00:00 2001 From: Venu Vustipalli Date: Sat, 23 Aug 2025 14:13:27 -0500 Subject: [PATCH] styles and scripts --- blocks/quote/quote.css | 61 ++++++++++++++++++++++++++++++++++++++++++ blocks/quote/quote.js | 7 +++++ 2 files changed, 68 insertions(+) diff --git a/blocks/quote/quote.css b/blocks/quote/quote.css index e69de29..b30910b 100644 --- a/blocks/quote/quote.css +++ b/blocks/quote/quote.css @@ -0,0 +1,61 @@ +.block.quote { + background-color: #ccc; + padding: 0 0 24px; + display: flex; + flex-direction: column; + margin: 1rem 0; +} + +.block.quote blockquote { + margin: 16px; + text-indent: 0; +} + +.block.quote>div:last-child>div { + margin: 0 16px; + font-size: small; + font-style: italic; + position: relative; +} + +.block.quote>div:last-child>div::after { + content: ""; + display: block; + position: absolute; + left: 0; + bottom: -8px; + height: 5px; + width: 30px; + background-color: darkgray; +} + +.block.quote { + background-color: #ccc; + padding: 0 0 24px; + display: flex; + flex-direction: column; + margin: 1rem 0; +} + +.block.quote blockquote { + margin: 16px; + text-indent: 0; +} + +.block.quote>div:last-child>div { + margin: 0 16px; + font-size: small; + font-style: italic; + position: relative; +} + +.block.quote>div:last-child>div::after { + content: ""; + display: block; + position: absolute; + left: 0; + bottom: -8px; + height: 5px; + width: 30px; + background-color: darkgray; +} \ No newline at end of file diff --git a/blocks/quote/quote.js b/blocks/quote/quote.js index e69de29..366e746 100644 --- a/blocks/quote/quote.js +++ b/blocks/quote/quote.js @@ -0,0 +1,7 @@ +export default function decorate(block) { + const [quoteWrapper] = block.children; + + const blockquote = document.createElement('blockquote'); + blockquote.textContent = quoteWrapper.textContent.trim(); + quoteWrapper.replaceChildren(blockquote); +} \ No newline at end of file