From 0361342b5f6b0907838118335044aa5a6f27b61d Mon Sep 17 00:00:00 2001 From: Spencer Dixon Date: Fri, 1 Nov 2024 13:27:51 +0000 Subject: [PATCH] Update content guidance for quote_with_image component in markdown files --- docs/content.md | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/docs/content.md b/docs/content.md index ffd0c43f55..951a44c1ce 100644 --- a/docs/content.md +++ b/docs/content.md @@ -537,7 +537,7 @@ Update the title, description and image as required. Add this code to a html file: -```yaml +```html
<%= render Content::QuoteWithImageComponent.new( @@ -551,9 +551,38 @@ Add this code to a html file:
``` -You can edit the colours used such as "yellow", "pink", "green", "blue" and "purple". You can also specify whether you want the quote marks to appear by suning true or false in the quotes area. For shorter quotes its better to use an image with a height cropped to around 300 pixels. +You can edit the colours used such as "yellow", "pink", "green", "blue" and "purple". You can also specify whether you want the quote marks to appear by using true or false in the quotes parameter. For shorter quotes its better to use an image with a height cropped to around 300 pixels. + +You can use the component in a markdown file by setting it up in the front matter as shown below. Note that `quote_1` is an example name and this can be anything. + + +```yaml +--- +quote_with_image: + quote_1: + title: "Example title to go here", + text: "

Heading if neededd

Example information or quote

Link text/a>", + background_color: "blue", + heading_color: "pink", + image_path: "static/images/content/hero-images/0034.jpg" +--- +``` + +You can then use this quote where you want it to appear in the markdown like so... -When using in a markdown file, copy the above code into a new html file and link to the file in the markdown code, in the same way you would when creating a subject page. +```md +$quote_1$ +``` + +You may have to wrap this in a row with some height to create the desired spacing around the component... + +```html +
+
+ $quote_1$ +
+
+``` ## Creating a Blog Post