<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Joy + OliverGingerbread Layer Cake - Joy + Oliver</title>
	<atom:link href="https://joyoliver.com/gingerbread-layer-cake/feed/" rel="self" type="application/rss+xml" />
	<link>https://joyoliver.com/gingerbread-layer-cake/</link>
	<description>Dessert &#38; Entertaining Blog</description>
	<lastBuildDate>Wed, 22 Apr 2026 16:09:24 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	
	<item>
		<title>Gingerbread Layer Cake</title>
		<link>https://joyoliver.com/gingerbread-layer-cake/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=gingerbread-layer-cake</link>
		<enclosure url="https://joyoliver.com/wp-content/uploads/2019/12/IMG_0155-683x1024.jpg" type="image/jpeg" /> 
		<comments>https://joyoliver.com/gingerbread-layer-cake/#respond</comments>
		<pubDate>Sun, 22 Dec 2019 11:00:34 +0000</pubDate>
		<dc:creator><![CDATA[Kristen Massad]]></dc:creator>
				<category><![CDATA[Cakes + Cupcakes Recipes]]></category>
		<category><![CDATA[Dessert]]></category>
		<category><![CDATA[Recipes]]></category>
		<category><![CDATA[christmas gingerbread cake]]></category>
		<category><![CDATA[gingerbread cake]]></category>
		<category><![CDATA[gingerbread cake with spiced cream cheese icing]]></category>
		<category><![CDATA[gingerbread layer cake]]></category>
		<category><![CDATA[gingerbread naked cake]]></category>
		<category><![CDATA[spiced cream cheese icing]]></category>

		<guid isPermaLink="false">https://joyoliver.com/?p=6175</guid>
		<description><![CDATA[As Christmas music is playing around the house, the tree is lit and the kitchen is buzzing, creating this Gingerbread Layer Cake is going to be a special treat for our christmas table.  ]]></description>
				<content:encoded><![CDATA[<div class="tasty-recipes-quick-links">
<a class="tasty-recipes-jump-link tasty-recipes-scrollto" href="#tasty-recipes-6993-jump-target">Jump to Recipe</a><span>&middot;</span><a class="tasty-recipes-print-link" href="https://joyoliver.com/gingerbread-layer-cake/print/6993/">Print Recipe</a>
</div>

<div id="dpsp-content-top" class="dpsp-content-wrapper dpsp-shape-circle dpsp-size-medium dpsp-has-spacing dpsp-show-on-mobile dpsp-button-style-5" style="min-height:40px;position:relative">
	<ul class="dpsp-networks-btns-wrapper dpsp-networks-btns-share dpsp-networks-btns-content dpsp-column-auto dpsp-has-button-icon-animation" style="padding:0;margin:0;list-style-type:none">
<li class="dpsp-network-list-item dpsp-network-list-item-facebook" style="float:left">
	<a rel="nofollow noopener" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fjoyoliver.com%2Fgingerbread-layer-cake%2F&#038;t=Gingerbread%20Layer%20Cake" class="dpsp-network-btn dpsp-facebook dpsp-first dpsp-has-label" target="_blank" aria-label="Share on Facebook" title="Share on Facebook" style="font-size:14px;padding:0rem;max-height:40px" >	<span class="dpsp-network-icon "><span class="dpsp-network-icon-inner" ><svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 18 32"><path d="M17.12 0.224v4.704h-2.784q-1.536 0-2.080 0.64t-0.544 1.92v3.392h5.248l-0.704 5.28h-4.544v13.568h-5.472v-13.568h-4.544v-5.28h4.544v-3.904q0-3.328 1.856-5.152t4.96-1.824q2.624 0 4.064 0.224z"></path></svg></span></span>
	<span class="dpsp-network-label">Facebook</span></a></li>

<li class="dpsp-network-list-item dpsp-network-list-item-pinterest" style="float:left">
	<button rel="nofollow noopener" data-href="https://pinterest.com/pin/create/button/?url=https%3A%2F%2Fjoyoliver.com%2Fgingerbread-layer-cake%2F&#038;media=&#038;description=Gingerbread%20Layer%20Cake" class="dpsp-network-btn dpsp-pinterest dpsp-has-label" target="_blank" aria-label="Save to Pinterest" title="Save to Pinterest" style="font-size:14px;padding:0rem;max-height:40px" >	<span class="dpsp-network-icon "><span class="dpsp-network-icon-inner" ><svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 23 32"><path d="M0 10.656q0-1.92 0.672-3.616t1.856-2.976 2.72-2.208 3.296-1.408 3.616-0.448q2.816 0 5.248 1.184t3.936 3.456 1.504 5.12q0 1.728-0.32 3.36t-1.088 3.168-1.792 2.656-2.56 1.856-3.392 0.672q-1.216 0-2.4-0.576t-1.728-1.568q-0.16 0.704-0.48 2.016t-0.448 1.696-0.352 1.28-0.48 1.248-0.544 1.12-0.832 1.408-1.12 1.536l-0.224 0.096-0.16-0.192q-0.288-2.816-0.288-3.36 0-1.632 0.384-3.68t1.184-5.152 0.928-3.616q-0.576-1.152-0.576-3.008 0-1.504 0.928-2.784t2.368-1.312q1.088 0 1.696 0.736t0.608 1.824q0 1.184-0.768 3.392t-0.8 3.36q0 1.12 0.8 1.856t1.952 0.736q0.992 0 1.824-0.448t1.408-1.216 0.992-1.696 0.672-1.952 0.352-1.984 0.128-1.792q0-3.072-1.952-4.8t-5.12-1.728q-3.552 0-5.952 2.304t-2.4 5.856q0 0.8 0.224 1.536t0.48 1.152 0.48 0.832 0.224 0.544q0 0.48-0.256 1.28t-0.672 0.8q-0.032 0-0.288-0.032-0.928-0.288-1.632-0.992t-1.088-1.696-0.576-1.92-0.192-1.92z"></path></svg></span></span>
	<span class="dpsp-network-label">Pinterest</span></button></li>

<li class="dpsp-network-list-item dpsp-network-list-item-email" style="float:left">
	<a rel="nofollow noopener" href="mailto:?subject=Gingerbread%20Layer%20Cake&#038;body=https%3A%2F%2Fjoyoliver.com%2Fgingerbread-layer-cake%2F" class="dpsp-network-btn dpsp-email dpsp-last dpsp-has-label" target="_blank" aria-label="Send over email" title="Send over email" style="font-size:14px;padding:0rem;max-height:40px" >	<span class="dpsp-network-icon "><span class="dpsp-network-icon-inner" ><svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 28 32"><path d="M18.56 17.408l8.256 8.544h-25.248l8.288-8.448 4.32 4.064zM2.016 6.048h24.32l-12.16 11.584zM20.128 15.936l8.224-7.744v16.256zM0 24.448v-16.256l8.288 7.776z"></path></svg></span></span>
	<span class="dpsp-network-label">Email</span></a></li>
</ul></div>
<p style="text-align: center;"><em>As Christmas music is playing around the house, the tree is lit and the kitchen is buzzing, creating this <strong>Gingerbread Layer Cake</strong> is going to be a special treat for our christmas table.  </em></p>
<p><img fetchpriority="high" decoding="async" data-pin-title="Gingerbread Layer Cake" class="aligncenter wp-image-6147 size-full" src="https://joyoliver.com/wp-content/uploads/2019/12/IMG_0155.jpg" alt="Layers of gingerbread cake and spiced cream cheese icing" width="1024" height="1536" srcset="https://joyoliver.com/wp-content/uploads/2019/12/IMG_0155.jpg 1024w, https://joyoliver.com/wp-content/uploads/2019/12/IMG_0155-410x615.jpg 410w, https://joyoliver.com/wp-content/uploads/2019/12/IMG_0155-683x1024.jpg 683w, https://joyoliver.com/wp-content/uploads/2019/12/IMG_0155-768x1152.jpg 768w, https://joyoliver.com/wp-content/uploads/2019/12/IMG_0155-720x1080.jpg 720w, https://joyoliver.com/wp-content/uploads/2019/12/IMG_0155-360x540.jpg 360w, https://joyoliver.com/wp-content/uploads/2019/12/IMG_0155-180x270.jpg 180w, https://joyoliver.com/wp-content/uploads/2019/12/IMG_0155-150x225.jpg 150w" sizes="(max-width: 1024px) 100vw, 1024px" /></p>
<p><span style="font-weight: 400;">The flavor of gingerbread is all around us throughout December and is one of the coziest flavors of all.  Whether you are baking gingerbread cookies, decorating gingerbread houses or drinking ginger chai tea, this is one of my favorite flavors that really spices up the season.  Layers of moist gingerbread cake, fluffy spiced cream cheese icing and topped with sparkly sugared cranberries and rosemary. There is nothing more magical than that!  </span><img decoding="async" data-pin-title="Gingerbread Layer Cake" class="aligncenter wp-image-6144 size-full" src="https://joyoliver.com/wp-content/uploads/2019/12/IMG_0127.jpg" alt="a close up of the layers of gingerbread cake and spiced icing" width="1024" height="1536" srcset="https://joyoliver.com/wp-content/uploads/2019/12/IMG_0127.jpg 1024w, https://joyoliver.com/wp-content/uploads/2019/12/IMG_0127-410x615.jpg 410w, https://joyoliver.com/wp-content/uploads/2019/12/IMG_0127-683x1024.jpg 683w, https://joyoliver.com/wp-content/uploads/2019/12/IMG_0127-768x1152.jpg 768w, https://joyoliver.com/wp-content/uploads/2019/12/IMG_0127-720x1080.jpg 720w, https://joyoliver.com/wp-content/uploads/2019/12/IMG_0127-360x540.jpg 360w, https://joyoliver.com/wp-content/uploads/2019/12/IMG_0127-180x270.jpg 180w, https://joyoliver.com/wp-content/uploads/2019/12/IMG_0127-150x225.jpg 150w" sizes="(max-width: 1024px) 100vw, 1024px" /></p>
<p><strong>How To Make The Gingerbread Layer Cake<br />
</strong><span style="font-weight: 400;">F</span><span style="font-weight: 400;">our layers of gingerbread cake is made with buttermilk and sour cream to ensure a super moist texture.  Molasses and brown sugar are key ingredients in this cake that creates a deep rich and nutty flavor and although ginger is the focus, cinnamon and cloves add warmth and a perfect amount of spice!</span></p>
<ul>
<li>All Purpose Flour</li>
<li>Baking Soda</li>
<li>Baking Powder</li>
<li>Ginger</li>
<li>Cinnamon</li>
<li>Cloves</li>
<li> Salt</li>
<li>Eggs</li>
<li>Light Brown Sugar</li>
<li>Molasse</li>
<li>Vegetable Oil</li>
<li>Buttermilk</li>
<li>Sour Cream</li>
</ul>
<p>&nbsp;</p>
<p><img decoding="async" data-pin-title="Gingerbread Layer Cake" class="aligncenter wp-image-6143 size-full" src="https://joyoliver.com/wp-content/uploads/2019/12/IMG_0126.jpg" alt="close up of the sugared cranberries" width="1024" height="1536" srcset="https://joyoliver.com/wp-content/uploads/2019/12/IMG_0126.jpg 1024w, https://joyoliver.com/wp-content/uploads/2019/12/IMG_0126-410x615.jpg 410w, https://joyoliver.com/wp-content/uploads/2019/12/IMG_0126-683x1024.jpg 683w, https://joyoliver.com/wp-content/uploads/2019/12/IMG_0126-768x1152.jpg 768w, https://joyoliver.com/wp-content/uploads/2019/12/IMG_0126-720x1080.jpg 720w, https://joyoliver.com/wp-content/uploads/2019/12/IMG_0126-360x540.jpg 360w, https://joyoliver.com/wp-content/uploads/2019/12/IMG_0126-180x270.jpg 180w, https://joyoliver.com/wp-content/uploads/2019/12/IMG_0126-150x225.jpg 150w" sizes="(max-width: 1024px) 100vw, 1024px" /></p>
<p><strong>How To Make The Spiced Cream Cheese Frosting<br />
</strong><span style="font-weight: 400;">Gingerbread layered with equal portions of spiced cream cheese is the perfect compliment to this cake.  Cream together cream cheese, butter, vanilla extract, cinnamon and powdered sugar for a fluffy and creamy icing that can be spread evenly between layers.  I love the simplicity of the Gingerbread Layer Cake, allowing the flavors to shine through and leaving the cake layers “naked” !<br />
</span></p>
<ul>
<li style="font-weight: 400;"><span style="font-weight: 400;">Unsalted Butter</span></li>
<li style="font-weight: 400;"><span style="font-weight: 400;">Cream Cheese</span></li>
<li style="font-weight: 400;"><span style="font-weight: 400;">Vanilla Extract</span></li>
<li style="font-weight: 400;"><span style="font-weight: 400;">Ground Cinnamon</span></li>
<li style="font-weight: 400;"><span style="font-weight: 400;">Powdered Sugar</span></li>
</ul>
<p><img decoding="async" data-pin-title="Gingerbread Layer Cake" class="aligncenter wp-image-6149 size-full" src="https://joyoliver.com/wp-content/uploads/2019/12/IMG_0158.jpg" alt="" width="1024" height="1536" srcset="https://joyoliver.com/wp-content/uploads/2019/12/IMG_0158.jpg 1024w, https://joyoliver.com/wp-content/uploads/2019/12/IMG_0158-410x615.jpg 410w, https://joyoliver.com/wp-content/uploads/2019/12/IMG_0158-683x1024.jpg 683w, https://joyoliver.com/wp-content/uploads/2019/12/IMG_0158-768x1152.jpg 768w" sizes="(max-width: 1024px) 100vw, 1024px" /></p>
<p><strong>Celebrate The Holidays With All The Gingerbread </strong><br />
<a href="https://joyoliver.com/gingerbread-cookies/" target="_blank" rel="nofollow noopener noreferrer">Gingerbread Cookies </a><br />
<a href="https://joyoliver.com/gingerbread-snowball-cookies/" target="_blank" rel="nofollow noopener noreferrer">Gingerbread Snowball Cookies </a></p>
<p><img decoding="async" data-pin-title="Gingerbread Layer Cake" class="alignnone wp-image-9110 size-full" src="https://joyoliver.com/wp-content/uploads/2019/12/gingerbread-layer-cake-4-scaled.jpg" alt="" width="1707" height="2560" srcset="https://joyoliver.com/wp-content/uploads/2019/12/gingerbread-layer-cake-4-scaled.jpg 1707w, https://joyoliver.com/wp-content/uploads/2019/12/gingerbread-layer-cake-4-410x615.jpg 410w, https://joyoliver.com/wp-content/uploads/2019/12/gingerbread-layer-cake-4-683x1024.jpg 683w, https://joyoliver.com/wp-content/uploads/2019/12/gingerbread-layer-cake-4-768x1152.jpg 768w, https://joyoliver.com/wp-content/uploads/2019/12/gingerbread-layer-cake-4-1024x1536.jpg 1024w, https://joyoliver.com/wp-content/uploads/2019/12/gingerbread-layer-cake-4-1365x2048.jpg 1365w" sizes="(max-width: 1707px) 100vw, 1707px" /></p>
<a class="button tasty-recipes-print-button tasty-recipes-no-print tasty-recipes-print-above-card" href="https://joyoliver.com/gingerbread-layer-cake/print/6993/">Print</a><span class="tasty-recipes-jump-target" id="tasty-recipes-6993-jump-target" style="display:block;padding-top:2px;margin-top:-2px;"></span><div id="tasty-recipes-6993" data-tr-id="6993" class="tasty-recipes tasty-recipes-6993 tasty-recipes-display tasty-recipes-has-image" data-tasty-recipes-customization="primary-color.background-color primary-color.outline-color">


<h2 class="tasty-recipes-title" data-tasty-recipes-customization="h2-color.color h2-transform.text-transform">Gingerbread Layer Cake</h2>
<div class="tasty-recipes-image-button-container">
			<div class="tasty-recipes-image">
			<img decoding="async" width="150" height="150" src="https://joyoliver.com/wp-content/uploads/2019/12/IMG_0155-150x150.jpg" class="attachment-thumbnail size-thumbnail" alt="Layers of gingerbread cake and spiced cream cheese icing" data-pin-nopin="true" />		</div>
		<div class="tasty-recipes-buttons">
				<div class="tasty-recipes-button-wrap">
			
<a class="button tasty-recipes-print-button tasty-recipes-no-print" href="https://joyoliver.com/gingerbread-layer-cake/print/6993/" target="_blank" data-tasty-recipes-customization="">
			<img decoding="async" class="svg-print" data-pin-nopin="true" src="https://joyoliver.com/wp-content/plugins/tasty-recipes/templates/buttons/images/icon-print.png">
		Print Recipe</a>
		</div>
					</div>
</div>
	<div class="tasty-recipes-rating" data-tasty-recipes-customization="body-color.color">
					<p><span class="tasty-recipes-ratings-buttons tasty-recipes-no-ratings-buttons"	data-tr-default-rating="0"	>		<span class="tasty-recipes-rating" >		<i class="checked" data-rating="5">			<span class="tasty-recipes-rating-solid" data-tr-clip="0">				<svg xmlns="http://www.w3.org/2000/svg" viewbox="9 9 46 42" width="18" height="17">	<defs>		<linearGradient id="tasty-recipes-clip-10">			<stop offset="10%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-20">			<stop offset="20%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-30">			<stop offset="30%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-40">			<stop offset="40%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-50">			<stop offset="50%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-60">			<stop offset="60%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-70">			<stop offset="70%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-80">			<stop offset="80%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-90">			<stop offset="90%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>	</defs>	<path d="m46.3 52-14.4-9.5-14.4 9.4L22 35.3 8.7 24.5l17.1-.9 6.2-16 6 16 17.2 1-13.4 10.7z"/></svg>			</span>			<span class="tasty-recipes-screen-reader">				5 Stars			</span>		</i>	</span>		<span class="tasty-recipes-rating" >		<i class="checked" data-rating="4">			<span class="tasty-recipes-rating-solid" data-tr-clip="0">				<svg xmlns="http://www.w3.org/2000/svg" viewbox="9 9 46 42" width="18" height="17">	<defs>		<linearGradient id="tasty-recipes-clip-10">			<stop offset="10%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-20">			<stop offset="20%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-30">			<stop offset="30%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-40">			<stop offset="40%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-50">			<stop offset="50%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-60">			<stop offset="60%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-70">			<stop offset="70%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-80">			<stop offset="80%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-90">			<stop offset="90%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>	</defs>	<path d="m46.3 52-14.4-9.5-14.4 9.4L22 35.3 8.7 24.5l17.1-.9 6.2-16 6 16 17.2 1-13.4 10.7z"/></svg>			</span>			<span class="tasty-recipes-screen-reader">				4 Stars			</span>		</i>	</span>		<span class="tasty-recipes-rating" >		<i class="checked" data-rating="3">			<span class="tasty-recipes-rating-solid" data-tr-clip="0">				<svg xmlns="http://www.w3.org/2000/svg" viewbox="9 9 46 42" width="18" height="17">	<defs>		<linearGradient id="tasty-recipes-clip-10">			<stop offset="10%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-20">			<stop offset="20%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-30">			<stop offset="30%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-40">			<stop offset="40%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-50">			<stop offset="50%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-60">			<stop offset="60%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-70">			<stop offset="70%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-80">			<stop offset="80%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-90">			<stop offset="90%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>	</defs>	<path d="m46.3 52-14.4-9.5-14.4 9.4L22 35.3 8.7 24.5l17.1-.9 6.2-16 6 16 17.2 1-13.4 10.7z"/></svg>			</span>			<span class="tasty-recipes-screen-reader">				3 Stars			</span>		</i>	</span>		<span class="tasty-recipes-rating" >		<i class="checked" data-rating="2">			<span class="tasty-recipes-rating-solid" data-tr-clip="0">				<svg xmlns="http://www.w3.org/2000/svg" viewbox="9 9 46 42" width="18" height="17">	<defs>		<linearGradient id="tasty-recipes-clip-10">			<stop offset="10%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-20">			<stop offset="20%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-30">			<stop offset="30%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-40">			<stop offset="40%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-50">			<stop offset="50%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-60">			<stop offset="60%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-70">			<stop offset="70%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-80">			<stop offset="80%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-90">			<stop offset="90%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>	</defs>	<path d="m46.3 52-14.4-9.5-14.4 9.4L22 35.3 8.7 24.5l17.1-.9 6.2-16 6 16 17.2 1-13.4 10.7z"/></svg>			</span>			<span class="tasty-recipes-screen-reader">				2 Stars			</span>		</i>	</span>		<span class="tasty-recipes-rating" >		<i class="checked" data-rating="1">			<span class="tasty-recipes-rating-solid" data-tr-clip="0">				<svg xmlns="http://www.w3.org/2000/svg" viewbox="9 9 46 42" width="18" height="17">	<defs>		<linearGradient id="tasty-recipes-clip-10">			<stop offset="10%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-20">			<stop offset="20%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-30">			<stop offset="30%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-40">			<stop offset="40%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-50">			<stop offset="50%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-60">			<stop offset="60%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-70">			<stop offset="70%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-80">			<stop offset="80%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-90">			<stop offset="90%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>	</defs>	<path d="m46.3 52-14.4-9.5-14.4 9.4L22 35.3 8.7 24.5l17.1-.9 6.2-16 6 16 17.2 1-13.4 10.7z"/></svg>			</span>			<span class="tasty-recipes-screen-reader">				1 Star			</span>		</i>	</span></span></p>
							<p><span data-tasty-recipes-customization="detail-label-color.color" class="rating-label">No reviews</span></p>
			</div>



	<div class="tasty-recipes-details" data-tasty-recipes-customization="body-color.color">
		<ul>
							<li class="author"><strong data-tasty-recipes-customization="detail-label-color.color" class="tasty-recipes-label">Author:</strong> <a data-tasty-recipes-customization="detail-value-color.color" class="tasty-recipes-author-name" href="https://joyoliver.com/about/">Kristen Massad</a></li>
							<li class="prep-time"><strong data-tasty-recipes-customization="detail-label-color.color" class="tasty-recipes-label">Prep Time:</strong> <span data-tasty-recipes-customization="detail-value-color.color" class="tasty-recipes-prep-time">20 minutes</span></li>
							<li class="cook-time"><strong data-tasty-recipes-customization="detail-label-color.color" class="tasty-recipes-label">Cook Time:</strong> <span data-tasty-recipes-customization="detail-value-color.color" class="tasty-recipes-cook-time">15-20 minutes</span></li>
							<li class="total-time"><strong data-tasty-recipes-customization="detail-label-color.color" class="tasty-recipes-label">Total Time:</strong> <span data-tasty-recipes-customization="detail-value-color.color" class="tasty-recipes-total-time">0 hours</span></li>
							<li class="yield"><strong data-tasty-recipes-customization="detail-label-color.color" class="tasty-recipes-label">Yield:</strong> <span data-tasty-recipes-customization="detail-value-color.color" class="tasty-recipes-yield">12 people</span></li>
					</ul>
	</div>

	<div class="tasty-recipes-ingredients">
		<div class="tasty-recipes-ingredients-header">
			<div class="tasty-recipes-ingredients-clipboard-container">
				<h3 data-tasty-recipes-customization="h3-color.color h3-transform.text-transform">Ingredients</h3>
							</div>
			<div class="tasty-recipes-units-scale-container">
											</div>
		</div>
		<div class="tasty-recipes-ingredients-body" data-tasty-recipes-customization="body-color.color">
			<ul>
<li><span data-amount="2.5" data-unit="cup">2 ½ Cups</span> All Purpose Flour</li>
<li><span data-amount="1" data-unit="tsp">1 tsp</span> Baking Soda</li>
<li><span data-amount="1" data-unit="tsp">1 tsp</span> Baking Powder</li>
<li><span data-amount="1" data-unit="tbsp">1 Tbsp</span> Ginger</li>
<li><span data-amount="1" data-unit="tsp">1 tsp</span> Cinnamon</li>
<li><span data-amount="0.5" data-unit="tsp">½ tsp</span> Cloves</li>
<li><span data-amount="0.5" data-unit="tsp">½ tsp</span> Salt</li>
<li><span data-amount="3">3</span> Eggs</li>
<li><span data-amount="1" data-unit="cup">1 Cup</span> Light Brown Sugar</li>
<li><span data-amount="0.75" data-unit="cup">¾ Cup</span> Molasses</li>
<li><span data-amount="0.5" data-unit="cup">½ Cup</span> Vegetable Oil</li>
<li><span data-amount="0.5" data-unit="cup">½ Cup</span> Buttermilk</li>
<li><span data-amount="0.5" data-unit="cup">½ Cup</span> Sour Cream</li>
</ul>
<!--INSIDE_INGREDIENTS-->		</div>
		<div class="tasty-recipes-cook-mode">
	<div class="tasty-recipes-cook-mode__container">
		<label class="tasty-recipes-cook-mode__switch">
			<input type="checkbox" id="tasty_recipes_6a02676b6bcf1_cookmode">
			<span class="tasty-recipes-cook-mode__switch-slider tasty-recipes-cook-mode__switch-round"
				data-tasty-recipes-customization="button-color.background button-text-color.color"></span>
		</label>
		<label for="tasty_recipes_6a02676b6bcf1_cookmode">
			<span class="tasty-recipes-cook-mode__label">Cook Mode</span>
			<span class="tasty-recipes-cook-mode__helper">
				Prevent your screen from going dark			</span>
		</label>
	</div>
</div>
	</div>

	<div class="tasty-recipe-instructions">
		<div class="tasty-recipes-instructions-header">
			<h3 data-tasty-recipes-customization="h3-color.color h3-transform.text-transform">Instructions</h3>
					</div>
		<div class="tasty-recipes-instructions-body" data-tasty-recipes-customization="body-color.color">
			<ol>
<li id="instruction-step-1">Preheat oven to 350 degrees F and prepare (4) 6 inch cake pans with non stick spray and parchment paper lining the bottom of the pan</li>
<li id="instruction-step-2">In large bowl, combine the flour, baking soda, baking powder, ginger, cinnamon, cloves and salt; set aside</li>
<li id="instruction-step-3">In a mixing bowl with paddle attachment, cream together the oil, sugar and molasses</li>
<li id="instruction-step-4">Add eggs and sour cream and mix until combined</li>
<li id="instruction-step-5">Alternating with the buttermilk, add in the flour mixture; scraping the sides in between each addition</li>
<li id="instruction-step-6">Divide the cake batter between the four 6 inch cake pans</li>
<li id="instruction-step-7">Bake at 350 degrees F for 15-20 minutes or until toothpick inserted in center of the cake comes out clean</li>
<li id="instruction-step-8">Remove the cakes from the pan and allow them to cool at room temperature</li>
<li id="instruction-step-9">Once the cake is cooled, layer cakes with spiced cream cheese icing, finishing with spiced cream cheese on top</li>
<li id="instruction-step-10">Garnish the cake with sugared cranberries and sugared rosemary</li>
<li id="instruction-step-11">Serve or refrigerate until ready to serve</li>
</ol>
		</div>
	</div>








<footer class="tasty-recipes-entry-footer">
	<h3 data-tasty-recipes-customization="footer-heading-color.color h3-transform.text-transform footer-heading.innerText">Did you make this recipe?</h3>
	<div data-tasty-recipes-customization="footer-description-color.color footer-description.innerHTML"><p>Tag <a href="https://www.instagram.com/joyandoliver" target="_blank" rel="noreferrer noopener">@joyandoliver</a> on Instagram</p>
</div>
</footer>



<script>
window.trCommon={"minRating":6,"ajaxurl":"https:\/\/joyoliver.com\/wp-admin\/admin-ajax.php","ratingNonce":"","postId":6175};
window.TastyRecipes = window.TastyRecipes || {};

window.TastyRecipes.smoothScroll = {
init() {
document.addEventListener( 'click', ( e ) => {
let anchor = e.target;
if ( anchor.tagName !== 'A' ) {
anchor = anchor.closest( 'a.tasty-recipes-scrollto' );
}

if ( ! anchor || ! anchor.classList.contains( 'tasty-recipes-scrollto' ) ) {
return;
}

const elementHref = anchor.getAttribute( 'href' );
if ( ! elementHref ) {
return;
}

e.preventDefault();
this.goToSelector( elementHref );
});
},
goToSelector( selector ) {
const element = document.querySelector( selector );
if ( ! element ) {
return;
}
element.scrollIntoView( { behavior: 'smooth' } );
}
};

document.addEventListener(
'DOMContentLoaded',
() => window.TastyRecipes.smoothScroll.init()
);

window.TastyRecipes = window.TastyRecipes || {};
window.TastyRecipes.cookMode = {
wakeLockApi: false,
wakeLock: false,
cookModeSelector: '.tasty-recipes-cook-mode',
init() {
if ("wakeLock" in navigator && "request" in navigator.wakeLock) {
this.wakeLockApi = navigator.wakeLock;
}

const cookModes = document.querySelectorAll(this.cookModeSelector);

if (cookModes.length > 0) {
for (const cookMode of cookModes) {
if (this.wakeLockApi) {
cookMode.querySelector('input[type="checkbox"]').addEventListener("change", event => {
this.checkboxChange(event.target);
}, false);
} else {
cookMode.style.display = "none";
}
}
}
},
checkboxChange(checkbox) {
if (checkbox.checked) {
this.lock();
} else {
this.unlock();
}
},
setCheckboxesState(state) {
const checkboxes = document.querySelectorAll(this.cookModeSelector + ' input[type="checkbox"]');
for (const checkbox of checkboxes) {
checkbox.checked = state;
}
},
async lock() {
try {
this.wakeLock = await this.wakeLockApi.request("screen");
this.wakeLock.addEventListener("release", () => {
this.wakeLock = false;
this.setCheckboxesState(false);
});
this.setCheckboxesState(true);
} catch (error) {
this.setCheckboxesState(false);
}
},
unlock() {
if (this.wakeLock) {
this.wakeLock.release();
this.wakeLock = false;
}
this.setCheckboxesState(false);
}
};

(function(callback) {
if (document.readyState !== "loading") {
callback();
} else {
document.addEventListener("DOMContentLoaded", callback);
}
})(() => {
window.TastyRecipes.cookMode.init();
});



window.TastyRecipes = window.TastyRecipes || {};

window.TastyRecipes.staticTooltip = {
element: null,
tooltipElement: null,
deleting: false,
init( element ) {
if ( this.deleting ) {
return;
}
this.element = element;
this.buildElements();
},
destroy() {
if ( ! this.tooltipElement || this.deleting ) {
return;
}

this.deleting = true;
this.tooltipElement.classList.remove( 'opened' );

setTimeout( () => {
this.tooltipElement.remove();
this.deleting = false;
}, 500 );
},
buildElements() {
const tooltipElement = document.createElement( 'div' );
tooltipElement.classList.add( 'tasty-recipes-static-tooltip');
tooltipElement.setAttribute( 'id', 'tasty-recipes-tooltip' );

const currentTooltipElement = document.getElementById( 'tasty-recipes-tooltip' );
if ( currentTooltipElement ) {
document.body.replaceChild( tooltipElement, currentTooltipElement );
} else {
document.body.appendChild( tooltipElement );
}

this.tooltipElement = document.getElementById( 'tasty-recipes-tooltip' );
},
show() {
if ( ! this.tooltipElement ) {
return;
}

const tooltipTop = this.element.getBoundingClientRect().top
+ window.scrollY
- 10 // 10px offset.
- this.tooltipElement.getBoundingClientRect().height;
const tooltipLeft = this.element.getBoundingClientRect().left
- ( this.tooltipElement.getBoundingClientRect().width / 2 )
+ ( this.element.getBoundingClientRect().width / 2 ) - 1;
const posLeft = Math.max( 10, tooltipLeft );
this.maybeRemoveTail( posLeft !== tooltipLeft );

this.tooltipElement.setAttribute( 'style', 'top:' + tooltipTop + 'px;left:' + posLeft + 'px;' );
this.tooltipElement.classList.add( 'opened' );

},
maybeRemoveTail( removeTail ) {
if ( removeTail ) {
this.tooltipElement.classList.add( 'tr-hide-tail' );
} else {
this.tooltipElement.classList.remove( 'tr-hide-tail' );
}
},
changeMessage( message ) {
if ( ! this.tooltipElement ) {
return;
}
this.tooltipElement.innerHTML = message;
}
};

window.TastyRecipes.ajax = {
sendPostRequest( url, data, success, failure ) {
const xhr = new XMLHttpRequest();
xhr.open( 'POST', url, true );
xhr.send( this.preparePostData( data ) );

xhr.onreadystatechange = () => {
if ( 4 !== xhr.readyState ) {
return;
}
if ( xhr.status === 200 ) {
success( JSON.parse( xhr.responseText ) );
return;
}

failure( xhr );
};

xhr.onerror = () => {
failure( xhr );
};
},
preparePostData( data ) {
const formData = new FormData();

for ( const key in data ) {
formData.append( key, data[key] );
}
return formData;
},
};

window.TastyRecipes.ratings = {
defaultRating: 0,
currentRatingPercentage: 100,
savingRating: false,
init( minRating ) {
this.minRating = minRating;

this.formWatchRating();
this.closeTooltipWhenClickOutside();
this.addBodyClassBasedOnSelectedRating();
this.backwardCompFormRatingPosition();
},
formWatchRating() {
const ratings = document.querySelectorAll('.tasty-recipes-no-ratings-buttons [data-rating]');
if ( ratings.length <= 0 ) {
return;
}
for ( const rating of ratings ) {
rating.addEventListener( 'click', event => {
event.preventDefault();
this.defaultRating = event.target.closest( '.checked' ).dataset.rating;
this.setCheckedStar( event.target );
this.maybeSendRating( this.defaultRating, event.target );
this.setRatingInForm( this.defaultRating );
} );
}
},
closeTooltipWhenClickOutside() {
window.addEventListener( 'click', e => {
// Bailout (don't remove the tooltip) when the clicked element is a rating star, or it's the tooltip itself.
if ( e.target.closest( '.tasty-recipes-rating' ) || e.target.classList.contains( 'tasty-recipes-static-tooltip' ) ) {
return;
}

window.TastyRecipes.staticTooltip.destroy();
} );
},
 setRatingInForm( rating ) {
const ratingInput = document.querySelector( '#respond .tasty-recipes-rating[value="' + rating + '"]' );
if ( ! ratingInput ) {
return;
}
ratingInput.click();
},
addBodyClassBasedOnSelectedRating() {
const ratingInputs = document.querySelectorAll( 'input.tasty-recipes-rating' );
if ( ! ratingInputs ) {
return;
}
for ( const ratingInput of ratingInputs ) {
ratingInput.addEventListener( 'click', currentEvent => {
const selectedRating = currentEvent.target.getAttribute( 'value' );
this.handleBodyClassByRating( selectedRating );
this.toggleCommentTextareaRequired( selectedRating );
} );
}
},
handleBodyClassByRating( rating ) {
if ( rating < this.minRating ) {
document.body.classList.remove( 'tasty-recipes-selected-minimum-rating' );
return;
}
document.body.classList.add( 'tasty-recipes-selected-minimum-rating' );
},
toggleCommentTextareaRequired( rating ) {
const commentTextarea = document.getElementById( 'comment' );
if ( ! commentTextarea ) {
return;
}

if ( rating < this.minRating ) {
commentTextarea.setAttribute( 'required', '' );
return;
}

commentTextarea.removeAttribute( 'required' );
},
maybeSendRating( rating, element ) {
if ( this.savingRating === rating ) {
return;
}

this.savingRating = rating;
window.TastyRecipes.staticTooltip.init( element );

const recipeCardElement = element.closest( '.tasty-recipes' );
if ( ! recipeCardElement ) {
window.TastyRecipes.staticTooltip.destroy();
return;
}

window.TastyRecipes.ajax.sendPostRequest(
window.trCommon.ajaxurl,
{
action: 'tasty_recipes_save_rating',
rating,
nonce: window.trCommon.ratingNonce,
post_id: window.trCommon.postId,
recipe_id: recipeCardElement.dataset.trId,
},
( response ) => {
window.TastyRecipes.staticTooltip.changeMessage( response.data.message );
window.TastyRecipes.staticTooltip.show();
this.updateAverageText( response.data, recipeCardElement );
this.maybeFillCommentForm( response.data );

// Hide the tooltip after 5 seconds.
setTimeout( () => {
this.maybeResetTooltip( recipeCardElement, response.data, rating );
}, 5000 );
},
() => {
this.resetTooltip( recipeCardElement );
}
);
},
updateAverageText( data, recipeCardElement ) {
if ( ! data.average ) {
return;
}
this.setRatingPercent( data );

if ( ! data.count ) {
return;
}

const quickLink = document.querySelector( '.tasty-recipes-rating-link' );
if ( quickLink ) {
this.setTextInContainer( quickLink, data );
this.setPartialStar( quickLink );
}

const cardStars = recipeCardElement.querySelector( '.tasty-recipes-ratings-buttons' );
cardStars.dataset.trDefaultRating = data.average;
this.setTextInContainer( recipeCardElement.querySelector( '.tasty-recipes-rating' ), data );
},
setTextInContainer( container, data ) {
if ( ! container ) {
return;
}

if ( data.label ) {
const ratingLabelElement = container.querySelector( '.rating-label' );
if ( ratingLabelElement ) {
ratingLabelElement.innerHTML = data.label;
}
return;
}

const averageElement = container.querySelector( '.average' );
if ( averageElement ) {
averageElement.textContent = data.average;
}

const countElement = container.querySelector( '.count' );
if ( countElement ) {
countElement.textContent = data.count;
}
},
setPartialStar( container ) {
const highestStar = container.querySelector( '[data-rating="' + Math.ceil( this.defaultRating ) + '"]' );
if ( highestStar ) {
highestStar.dataset.trClip = this.currentRatingPercentage;
}
},
setRatingPercent( data ) {
this.defaultRating = data.average.toFixed( 1 );
const parts = data.average.toFixed( 2 ).toString().split( '.' );
this.currentRatingPercentage = parts[1] ? parts[1] : 100;
if ( this.currentRatingPercentage === '00' ) {
this.currentRatingPercentage = 100;
}
},
setCheckedStar( target ) {
const cardRatingContainer = target.closest( '.tasty-recipes-ratings-buttons' );
const selectedRatingElement = cardRatingContainer.querySelector( '[data-tr-checked]' );
if ( selectedRatingElement ) {
delete selectedRatingElement.dataset.trChecked;
}

const thisStar = target.closest( '.tasty-recipes-rating' );
thisStar.dataset.trChecked = 1;
thisStar.querySelector( '[data-tr-clip]' ).dataset.trClip = 100;
},
maybeFillCommentForm( data ) {
if ( ! data.comment || ! data.comment.content ) {
return;
}

const commentForm = document.querySelector( '#commentform' );
if ( ! commentForm ) {
return;
}

const commentBox = commentForm.querySelector( '[name=comment]' );
if ( ! commentBox || commentBox.value ) {
return;
}

// Add comment details for editing.
commentBox.innerHTML = data.comment.content;
if ( data.comment.name ) {
commentForm.querySelector( '[name=author]' ).value = data.comment.name;
commentForm.querySelector( '[name=email]' ).value = data.comment.email;
}
},
maybeResetTooltip( recipeCardElement, data, rating ) {
if ( this.savingRating === rating ) {
this.resetTooltip( recipeCardElement, data );
}
},
resetTooltip( recipeCardElement, data ) {
window.TastyRecipes.staticTooltip.destroy();
this.savingRating = false;

// Reset the default rating.
const cardRatingContainer = recipeCardElement.querySelector( '.tasty-recipes-ratings-buttons' );
if ( cardRatingContainer ) {
this.defaultRating = ( data && data.average ) ? data.average.toFixed(1) : cardRatingContainer.dataset.trDefaultRating;
cardRatingContainer.dataset.trDefaultRating = this.defaultRating;

this.resetSelectedStar( cardRatingContainer, data );
}
},
resetSelectedStar( cardRatingContainer ) {
const selectedRatingElement = cardRatingContainer.querySelector( '[data-rating="' + Math.ceil( this.defaultRating ) + '"]' );
if ( selectedRatingElement ) {
selectedRatingElement.querySelector( '[data-tr-clip]' ).dataset.trClip = this.currentRatingPercentage;
selectedRatingElement.parentNode.dataset.trChecked = 1;
}

const previousSelectedElement= cardRatingContainer.querySelector( '[data-tr-checked]' );
if ( previousSelectedElement ) {
const currentSelectedRating = previousSelectedElement.querySelector('[data-rating]');
if ( currentSelectedRating !== selectedRatingElement ) {
delete previousSelectedElement.dataset.trChecked;
}
}
},
backwardCompFormRatingPosition() {
const ratingsButtons = document.querySelector( '#respond .tasty-recipes-ratings-buttons, #tasty-recipes-comment-rating .tasty-recipes-ratings-buttons' );
if ( ! ratingsButtons ) {
return;
}
const ratingsButtonsStyles = window.getComputedStyle(ratingsButtons);
if ( ! ratingsButtonsStyles.display.includes( 'flex' ) ) {
ratingsButtons.style.direction = 'rtl';
}

if ( typeof tastyRecipesRating !== 'undefined' ) {
// Select the rating that was previously selected in admin.
ratingsButtons.querySelector( '.tasty-recipes-rating[value="' + tastyRecipesRating + '"]' ).checked = true;
}

const ratingSpans = ratingsButtons.querySelectorAll( '.tasty-recipes-rating' );
for (const ratingSpan of ratingSpans) {
ratingSpan.addEventListener( 'click', event => {
if ( ratingSpan === event.target ) {
return;
}
ratingSpan.previousElementSibling.click();
} );
}
}
};

(function(callback) {
if (document.readyState !== "loading") {
callback();
} else {
window.addEventListener( 'load', callback );
}
})(() => {
window.TastyRecipes.ratings.init( window.trCommon ? window.trCommon.minRating : 4 );
});
</script></div>
<a class="button tasty-recipes-print-button tasty-recipes-no-print tasty-recipes-print-above-card" href="https://joyoliver.com/gingerbread-layer-cake/print/6995/">Print</a><span class="tasty-recipes-jump-target" id="tasty-recipes-6995-jump-target" style="display:block;padding-top:2px;margin-top:-2px;"></span><div id="tasty-recipes-6995" data-tr-id="6995" class="tasty-recipes tasty-recipes-6995 tasty-recipes-display tasty-recipes-has-image" data-tasty-recipes-customization="primary-color.background-color primary-color.outline-color">


<h2 class="tasty-recipes-title" data-tasty-recipes-customization="h2-color.color h2-transform.text-transform">Spiced Cream Cheese Icing</h2>
<div class="tasty-recipes-image-button-container">
			<div class="tasty-recipes-image">
			<img decoding="async" width="150" height="150" src="https://joyoliver.com/wp-content/uploads/2019/12/IMG_0127-150x150.jpg" class="attachment-thumbnail size-thumbnail" alt="a close up of the layers of gingerbread cake and spiced icing" data-pin-nopin="true" />		</div>
		<div class="tasty-recipes-buttons">
				<div class="tasty-recipes-button-wrap">
			
<a class="button tasty-recipes-print-button tasty-recipes-no-print" href="https://joyoliver.com/gingerbread-layer-cake/print/6995/" target="_blank" data-tasty-recipes-customization="">
			<img decoding="async" class="svg-print" data-pin-nopin="true" src="https://joyoliver.com/wp-content/plugins/tasty-recipes/templates/buttons/images/icon-print.png">
		Print Recipe</a>
		</div>
					</div>
</div>
	<div class="tasty-recipes-rating" data-tasty-recipes-customization="body-color.color">
					<p><span class="tasty-recipes-ratings-buttons tasty-recipes-no-ratings-buttons"	data-tr-default-rating="0"	>		<span class="tasty-recipes-rating" >		<i class="checked" data-rating="5">			<span class="tasty-recipes-rating-solid" data-tr-clip="0">				<svg xmlns="http://www.w3.org/2000/svg" viewbox="9 9 46 42" width="18" height="17">	<defs>		<linearGradient id="tasty-recipes-clip-10">			<stop offset="10%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-20">			<stop offset="20%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-30">			<stop offset="30%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-40">			<stop offset="40%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-50">			<stop offset="50%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-60">			<stop offset="60%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-70">			<stop offset="70%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-80">			<stop offset="80%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-90">			<stop offset="90%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>	</defs>	<path d="m46.3 52-14.4-9.5-14.4 9.4L22 35.3 8.7 24.5l17.1-.9 6.2-16 6 16 17.2 1-13.4 10.7z"/></svg>			</span>			<span class="tasty-recipes-screen-reader">				5 Stars			</span>		</i>	</span>		<span class="tasty-recipes-rating" >		<i class="checked" data-rating="4">			<span class="tasty-recipes-rating-solid" data-tr-clip="0">				<svg xmlns="http://www.w3.org/2000/svg" viewbox="9 9 46 42" width="18" height="17">	<defs>		<linearGradient id="tasty-recipes-clip-10">			<stop offset="10%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-20">			<stop offset="20%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-30">			<stop offset="30%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-40">			<stop offset="40%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-50">			<stop offset="50%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-60">			<stop offset="60%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-70">			<stop offset="70%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-80">			<stop offset="80%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-90">			<stop offset="90%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>	</defs>	<path d="m46.3 52-14.4-9.5-14.4 9.4L22 35.3 8.7 24.5l17.1-.9 6.2-16 6 16 17.2 1-13.4 10.7z"/></svg>			</span>			<span class="tasty-recipes-screen-reader">				4 Stars			</span>		</i>	</span>		<span class="tasty-recipes-rating" >		<i class="checked" data-rating="3">			<span class="tasty-recipes-rating-solid" data-tr-clip="0">				<svg xmlns="http://www.w3.org/2000/svg" viewbox="9 9 46 42" width="18" height="17">	<defs>		<linearGradient id="tasty-recipes-clip-10">			<stop offset="10%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-20">			<stop offset="20%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-30">			<stop offset="30%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-40">			<stop offset="40%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-50">			<stop offset="50%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-60">			<stop offset="60%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-70">			<stop offset="70%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-80">			<stop offset="80%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-90">			<stop offset="90%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>	</defs>	<path d="m46.3 52-14.4-9.5-14.4 9.4L22 35.3 8.7 24.5l17.1-.9 6.2-16 6 16 17.2 1-13.4 10.7z"/></svg>			</span>			<span class="tasty-recipes-screen-reader">				3 Stars			</span>		</i>	</span>		<span class="tasty-recipes-rating" >		<i class="checked" data-rating="2">			<span class="tasty-recipes-rating-solid" data-tr-clip="0">				<svg xmlns="http://www.w3.org/2000/svg" viewbox="9 9 46 42" width="18" height="17">	<defs>		<linearGradient id="tasty-recipes-clip-10">			<stop offset="10%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-20">			<stop offset="20%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-30">			<stop offset="30%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-40">			<stop offset="40%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-50">			<stop offset="50%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-60">			<stop offset="60%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-70">			<stop offset="70%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-80">			<stop offset="80%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-90">			<stop offset="90%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>	</defs>	<path d="m46.3 52-14.4-9.5-14.4 9.4L22 35.3 8.7 24.5l17.1-.9 6.2-16 6 16 17.2 1-13.4 10.7z"/></svg>			</span>			<span class="tasty-recipes-screen-reader">				2 Stars			</span>		</i>	</span>		<span class="tasty-recipes-rating" >		<i class="checked" data-rating="1">			<span class="tasty-recipes-rating-solid" data-tr-clip="0">				<svg xmlns="http://www.w3.org/2000/svg" viewbox="9 9 46 42" width="18" height="17">	<defs>		<linearGradient id="tasty-recipes-clip-10">			<stop offset="10%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-20">			<stop offset="20%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-30">			<stop offset="30%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-40">			<stop offset="40%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-50">			<stop offset="50%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-60">			<stop offset="60%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-70">			<stop offset="70%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-80">			<stop offset="80%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-90">			<stop offset="90%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>	</defs>	<path d="m46.3 52-14.4-9.5-14.4 9.4L22 35.3 8.7 24.5l17.1-.9 6.2-16 6 16 17.2 1-13.4 10.7z"/></svg>			</span>			<span class="tasty-recipes-screen-reader">				1 Star			</span>		</i>	</span></span></p>
							<p><span data-tasty-recipes-customization="detail-label-color.color" class="rating-label">No reviews</span></p>
			</div>



	<div class="tasty-recipes-details" data-tasty-recipes-customization="body-color.color">
		<ul>
							<li class="author"><strong data-tasty-recipes-customization="detail-label-color.color" class="tasty-recipes-label">Author:</strong> <a data-tasty-recipes-customization="detail-value-color.color" class="tasty-recipes-author-name" href="https://joyoliver.com/about/">Kristen Massad</a></li>
							<li class="prep-time"><strong data-tasty-recipes-customization="detail-label-color.color" class="tasty-recipes-label">Prep Time:</strong> <span data-tasty-recipes-customization="detail-value-color.color" class="tasty-recipes-prep-time">10 minutes</span></li>
							<li class="total-time"><strong data-tasty-recipes-customization="detail-label-color.color" class="tasty-recipes-label">Total Time:</strong> <span data-tasty-recipes-customization="detail-value-color.color" class="tasty-recipes-total-time">10 minutes</span></li>
					</ul>
	</div>

	<div class="tasty-recipes-ingredients">
		<div class="tasty-recipes-ingredients-header">
			<div class="tasty-recipes-ingredients-clipboard-container">
				<h3 data-tasty-recipes-customization="h3-color.color h3-transform.text-transform">Ingredients</h3>
							</div>
			<div class="tasty-recipes-units-scale-container">
											</div>
		</div>
		<div class="tasty-recipes-ingredients-body" data-tasty-recipes-customization="body-color.color">
			<ul>
<li><span data-amount="0.5" data-unit="cup">½ Cup</span> Unsalted Butter</li>
<li><span data-amount="8" data-unit="ounce">8 ounces</span> Cream Cheese</li>
<li><span data-amount="2" data-unit="tsp">2 tsp</span> Vanilla Extract</li>
<li><span data-amount="1" data-unit="tsp">1 tsp</span> Ground Cinnamon</li>
<li><span data-amount="4" data-unit="cup">4 Cups</span> Powdered Sugar</li>
</ul>
<!--INSIDE_INGREDIENTS-->		</div>
		<div class="tasty-recipes-cook-mode">
	<div class="tasty-recipes-cook-mode__container">
		<label class="tasty-recipes-cook-mode__switch">
			<input type="checkbox" id="tasty_recipes_6a02676b6dcee_cookmode">
			<span class="tasty-recipes-cook-mode__switch-slider tasty-recipes-cook-mode__switch-round"
				data-tasty-recipes-customization="button-color.background button-text-color.color"></span>
		</label>
		<label for="tasty_recipes_6a02676b6dcee_cookmode">
			<span class="tasty-recipes-cook-mode__label">Cook Mode</span>
			<span class="tasty-recipes-cook-mode__helper">
				Prevent your screen from going dark			</span>
		</label>
	</div>
</div>
	</div>

	<div class="tasty-recipe-instructions">
		<div class="tasty-recipes-instructions-header">
			<h3 data-tasty-recipes-customization="h3-color.color h3-transform.text-transform">Instructions</h3>
					</div>
		<div class="tasty-recipes-instructions-body" data-tasty-recipes-customization="body-color.color">
			<ol>
<li id="instruction-step-1">In the bowl of a stand mixer fitted with paddle attachment, combine the butter, cream cheese and vanilla extract and beat until smooth</li>
<li id="instruction-step-2">Slowly add in the powdered sugar and cinnamon</li>
<li id="instruction-step-3">Mix on high speed until the cream cheese icing is smooth and fluffy</li>
</ol>
		</div>
	</div>








<footer class="tasty-recipes-entry-footer">
	<h3 data-tasty-recipes-customization="footer-heading-color.color h3-transform.text-transform footer-heading.innerText">Did you make this recipe?</h3>
	<div data-tasty-recipes-customization="footer-description-color.color footer-description.innerHTML"><p>Tag <a href="https://www.instagram.com/joyandoliver" target="_blank" rel="noreferrer noopener">@joyandoliver</a> on Instagram</p>
</div>
</footer>



<script>
window.trCommon={"minRating":6,"ajaxurl":"https:\/\/joyoliver.com\/wp-admin\/admin-ajax.php","ratingNonce":"","postId":6175};
window.TastyRecipes = window.TastyRecipes || {};

window.TastyRecipes.smoothScroll = {
init() {
document.addEventListener( 'click', ( e ) => {
let anchor = e.target;
if ( anchor.tagName !== 'A' ) {
anchor = anchor.closest( 'a.tasty-recipes-scrollto' );
}

if ( ! anchor || ! anchor.classList.contains( 'tasty-recipes-scrollto' ) ) {
return;
}

const elementHref = anchor.getAttribute( 'href' );
if ( ! elementHref ) {
return;
}

e.preventDefault();
this.goToSelector( elementHref );
});
},
goToSelector( selector ) {
const element = document.querySelector( selector );
if ( ! element ) {
return;
}
element.scrollIntoView( { behavior: 'smooth' } );
}
};

document.addEventListener(
'DOMContentLoaded',
() => window.TastyRecipes.smoothScroll.init()
);

window.TastyRecipes = window.TastyRecipes || {};
window.TastyRecipes.cookMode = {
wakeLockApi: false,
wakeLock: false,
cookModeSelector: '.tasty-recipes-cook-mode',
init() {
if ("wakeLock" in navigator && "request" in navigator.wakeLock) {
this.wakeLockApi = navigator.wakeLock;
}

const cookModes = document.querySelectorAll(this.cookModeSelector);

if (cookModes.length > 0) {
for (const cookMode of cookModes) {
if (this.wakeLockApi) {
cookMode.querySelector('input[type="checkbox"]').addEventListener("change", event => {
this.checkboxChange(event.target);
}, false);
} else {
cookMode.style.display = "none";
}
}
}
},
checkboxChange(checkbox) {
if (checkbox.checked) {
this.lock();
} else {
this.unlock();
}
},
setCheckboxesState(state) {
const checkboxes = document.querySelectorAll(this.cookModeSelector + ' input[type="checkbox"]');
for (const checkbox of checkboxes) {
checkbox.checked = state;
}
},
async lock() {
try {
this.wakeLock = await this.wakeLockApi.request("screen");
this.wakeLock.addEventListener("release", () => {
this.wakeLock = false;
this.setCheckboxesState(false);
});
this.setCheckboxesState(true);
} catch (error) {
this.setCheckboxesState(false);
}
},
unlock() {
if (this.wakeLock) {
this.wakeLock.release();
this.wakeLock = false;
}
this.setCheckboxesState(false);
}
};

(function(callback) {
if (document.readyState !== "loading") {
callback();
} else {
document.addEventListener("DOMContentLoaded", callback);
}
})(() => {
window.TastyRecipes.cookMode.init();
});



window.TastyRecipes = window.TastyRecipes || {};

window.TastyRecipes.staticTooltip = {
element: null,
tooltipElement: null,
deleting: false,
init( element ) {
if ( this.deleting ) {
return;
}
this.element = element;
this.buildElements();
},
destroy() {
if ( ! this.tooltipElement || this.deleting ) {
return;
}

this.deleting = true;
this.tooltipElement.classList.remove( 'opened' );

setTimeout( () => {
this.tooltipElement.remove();
this.deleting = false;
}, 500 );
},
buildElements() {
const tooltipElement = document.createElement( 'div' );
tooltipElement.classList.add( 'tasty-recipes-static-tooltip');
tooltipElement.setAttribute( 'id', 'tasty-recipes-tooltip' );

const currentTooltipElement = document.getElementById( 'tasty-recipes-tooltip' );
if ( currentTooltipElement ) {
document.body.replaceChild( tooltipElement, currentTooltipElement );
} else {
document.body.appendChild( tooltipElement );
}

this.tooltipElement = document.getElementById( 'tasty-recipes-tooltip' );
},
show() {
if ( ! this.tooltipElement ) {
return;
}

const tooltipTop = this.element.getBoundingClientRect().top
+ window.scrollY
- 10 // 10px offset.
- this.tooltipElement.getBoundingClientRect().height;
const tooltipLeft = this.element.getBoundingClientRect().left
- ( this.tooltipElement.getBoundingClientRect().width / 2 )
+ ( this.element.getBoundingClientRect().width / 2 ) - 1;
const posLeft = Math.max( 10, tooltipLeft );
this.maybeRemoveTail( posLeft !== tooltipLeft );

this.tooltipElement.setAttribute( 'style', 'top:' + tooltipTop + 'px;left:' + posLeft + 'px;' );
this.tooltipElement.classList.add( 'opened' );

},
maybeRemoveTail( removeTail ) {
if ( removeTail ) {
this.tooltipElement.classList.add( 'tr-hide-tail' );
} else {
this.tooltipElement.classList.remove( 'tr-hide-tail' );
}
},
changeMessage( message ) {
if ( ! this.tooltipElement ) {
return;
}
this.tooltipElement.innerHTML = message;
}
};

window.TastyRecipes.ajax = {
sendPostRequest( url, data, success, failure ) {
const xhr = new XMLHttpRequest();
xhr.open( 'POST', url, true );
xhr.send( this.preparePostData( data ) );

xhr.onreadystatechange = () => {
if ( 4 !== xhr.readyState ) {
return;
}
if ( xhr.status === 200 ) {
success( JSON.parse( xhr.responseText ) );
return;
}

failure( xhr );
};

xhr.onerror = () => {
failure( xhr );
};
},
preparePostData( data ) {
const formData = new FormData();

for ( const key in data ) {
formData.append( key, data[key] );
}
return formData;
},
};

window.TastyRecipes.ratings = {
defaultRating: 0,
currentRatingPercentage: 100,
savingRating: false,
init( minRating ) {
this.minRating = minRating;

this.formWatchRating();
this.closeTooltipWhenClickOutside();
this.addBodyClassBasedOnSelectedRating();
this.backwardCompFormRatingPosition();
},
formWatchRating() {
const ratings = document.querySelectorAll('.tasty-recipes-no-ratings-buttons [data-rating]');
if ( ratings.length <= 0 ) {
return;
}
for ( const rating of ratings ) {
rating.addEventListener( 'click', event => {
event.preventDefault();
this.defaultRating = event.target.closest( '.checked' ).dataset.rating;
this.setCheckedStar( event.target );
this.maybeSendRating( this.defaultRating, event.target );
this.setRatingInForm( this.defaultRating );
} );
}
},
closeTooltipWhenClickOutside() {
window.addEventListener( 'click', e => {
// Bailout (don't remove the tooltip) when the clicked element is a rating star, or it's the tooltip itself.
if ( e.target.closest( '.tasty-recipes-rating' ) || e.target.classList.contains( 'tasty-recipes-static-tooltip' ) ) {
return;
}

window.TastyRecipes.staticTooltip.destroy();
} );
},
 setRatingInForm( rating ) {
const ratingInput = document.querySelector( '#respond .tasty-recipes-rating[value="' + rating + '"]' );
if ( ! ratingInput ) {
return;
}
ratingInput.click();
},
addBodyClassBasedOnSelectedRating() {
const ratingInputs = document.querySelectorAll( 'input.tasty-recipes-rating' );
if ( ! ratingInputs ) {
return;
}
for ( const ratingInput of ratingInputs ) {
ratingInput.addEventListener( 'click', currentEvent => {
const selectedRating = currentEvent.target.getAttribute( 'value' );
this.handleBodyClassByRating( selectedRating );
this.toggleCommentTextareaRequired( selectedRating );
} );
}
},
handleBodyClassByRating( rating ) {
if ( rating < this.minRating ) {
document.body.classList.remove( 'tasty-recipes-selected-minimum-rating' );
return;
}
document.body.classList.add( 'tasty-recipes-selected-minimum-rating' );
},
toggleCommentTextareaRequired( rating ) {
const commentTextarea = document.getElementById( 'comment' );
if ( ! commentTextarea ) {
return;
}

if ( rating < this.minRating ) {
commentTextarea.setAttribute( 'required', '' );
return;
}

commentTextarea.removeAttribute( 'required' );
},
maybeSendRating( rating, element ) {
if ( this.savingRating === rating ) {
return;
}

this.savingRating = rating;
window.TastyRecipes.staticTooltip.init( element );

const recipeCardElement = element.closest( '.tasty-recipes' );
if ( ! recipeCardElement ) {
window.TastyRecipes.staticTooltip.destroy();
return;
}

window.TastyRecipes.ajax.sendPostRequest(
window.trCommon.ajaxurl,
{
action: 'tasty_recipes_save_rating',
rating,
nonce: window.trCommon.ratingNonce,
post_id: window.trCommon.postId,
recipe_id: recipeCardElement.dataset.trId,
},
( response ) => {
window.TastyRecipes.staticTooltip.changeMessage( response.data.message );
window.TastyRecipes.staticTooltip.show();
this.updateAverageText( response.data, recipeCardElement );
this.maybeFillCommentForm( response.data );

// Hide the tooltip after 5 seconds.
setTimeout( () => {
this.maybeResetTooltip( recipeCardElement, response.data, rating );
}, 5000 );
},
() => {
this.resetTooltip( recipeCardElement );
}
);
},
updateAverageText( data, recipeCardElement ) {
if ( ! data.average ) {
return;
}
this.setRatingPercent( data );

if ( ! data.count ) {
return;
}

const quickLink = document.querySelector( '.tasty-recipes-rating-link' );
if ( quickLink ) {
this.setTextInContainer( quickLink, data );
this.setPartialStar( quickLink );
}

const cardStars = recipeCardElement.querySelector( '.tasty-recipes-ratings-buttons' );
cardStars.dataset.trDefaultRating = data.average;
this.setTextInContainer( recipeCardElement.querySelector( '.tasty-recipes-rating' ), data );
},
setTextInContainer( container, data ) {
if ( ! container ) {
return;
}

if ( data.label ) {
const ratingLabelElement = container.querySelector( '.rating-label' );
if ( ratingLabelElement ) {
ratingLabelElement.innerHTML = data.label;
}
return;
}

const averageElement = container.querySelector( '.average' );
if ( averageElement ) {
averageElement.textContent = data.average;
}

const countElement = container.querySelector( '.count' );
if ( countElement ) {
countElement.textContent = data.count;
}
},
setPartialStar( container ) {
const highestStar = container.querySelector( '[data-rating="' + Math.ceil( this.defaultRating ) + '"]' );
if ( highestStar ) {
highestStar.dataset.trClip = this.currentRatingPercentage;
}
},
setRatingPercent( data ) {
this.defaultRating = data.average.toFixed( 1 );
const parts = data.average.toFixed( 2 ).toString().split( '.' );
this.currentRatingPercentage = parts[1] ? parts[1] : 100;
if ( this.currentRatingPercentage === '00' ) {
this.currentRatingPercentage = 100;
}
},
setCheckedStar( target ) {
const cardRatingContainer = target.closest( '.tasty-recipes-ratings-buttons' );
const selectedRatingElement = cardRatingContainer.querySelector( '[data-tr-checked]' );
if ( selectedRatingElement ) {
delete selectedRatingElement.dataset.trChecked;
}

const thisStar = target.closest( '.tasty-recipes-rating' );
thisStar.dataset.trChecked = 1;
thisStar.querySelector( '[data-tr-clip]' ).dataset.trClip = 100;
},
maybeFillCommentForm( data ) {
if ( ! data.comment || ! data.comment.content ) {
return;
}

const commentForm = document.querySelector( '#commentform' );
if ( ! commentForm ) {
return;
}

const commentBox = commentForm.querySelector( '[name=comment]' );
if ( ! commentBox || commentBox.value ) {
return;
}

// Add comment details for editing.
commentBox.innerHTML = data.comment.content;
if ( data.comment.name ) {
commentForm.querySelector( '[name=author]' ).value = data.comment.name;
commentForm.querySelector( '[name=email]' ).value = data.comment.email;
}
},
maybeResetTooltip( recipeCardElement, data, rating ) {
if ( this.savingRating === rating ) {
this.resetTooltip( recipeCardElement, data );
}
},
resetTooltip( recipeCardElement, data ) {
window.TastyRecipes.staticTooltip.destroy();
this.savingRating = false;

// Reset the default rating.
const cardRatingContainer = recipeCardElement.querySelector( '.tasty-recipes-ratings-buttons' );
if ( cardRatingContainer ) {
this.defaultRating = ( data && data.average ) ? data.average.toFixed(1) : cardRatingContainer.dataset.trDefaultRating;
cardRatingContainer.dataset.trDefaultRating = this.defaultRating;

this.resetSelectedStar( cardRatingContainer, data );
}
},
resetSelectedStar( cardRatingContainer ) {
const selectedRatingElement = cardRatingContainer.querySelector( '[data-rating="' + Math.ceil( this.defaultRating ) + '"]' );
if ( selectedRatingElement ) {
selectedRatingElement.querySelector( '[data-tr-clip]' ).dataset.trClip = this.currentRatingPercentage;
selectedRatingElement.parentNode.dataset.trChecked = 1;
}

const previousSelectedElement= cardRatingContainer.querySelector( '[data-tr-checked]' );
if ( previousSelectedElement ) {
const currentSelectedRating = previousSelectedElement.querySelector('[data-rating]');
if ( currentSelectedRating !== selectedRatingElement ) {
delete previousSelectedElement.dataset.trChecked;
}
}
},
backwardCompFormRatingPosition() {
const ratingsButtons = document.querySelector( '#respond .tasty-recipes-ratings-buttons, #tasty-recipes-comment-rating .tasty-recipes-ratings-buttons' );
if ( ! ratingsButtons ) {
return;
}
const ratingsButtonsStyles = window.getComputedStyle(ratingsButtons);
if ( ! ratingsButtonsStyles.display.includes( 'flex' ) ) {
ratingsButtons.style.direction = 'rtl';
}

if ( typeof tastyRecipesRating !== 'undefined' ) {
// Select the rating that was previously selected in admin.
ratingsButtons.querySelector( '.tasty-recipes-rating[value="' + tastyRecipesRating + '"]' ).checked = true;
}

const ratingSpans = ratingsButtons.querySelectorAll( '.tasty-recipes-rating' );
for (const ratingSpan of ratingSpans) {
ratingSpan.addEventListener( 'click', event => {
if ( ratingSpan === event.target ) {
return;
}
ratingSpan.previousElementSibling.click();
} );
}
}
};

(function(callback) {
if (document.readyState !== "loading") {
callback();
} else {
window.addEventListener( 'load', callback );
}
})(() => {
window.TastyRecipes.ratings.init( window.trCommon ? window.trCommon.minRating : 4 );
});
</script></div>
<a class="button tasty-recipes-print-button tasty-recipes-no-print tasty-recipes-print-above-card" href="https://joyoliver.com/gingerbread-layer-cake/print/6998/">Print</a><span class="tasty-recipes-jump-target" id="tasty-recipes-6998-jump-target" style="display:block;padding-top:2px;margin-top:-2px;"></span><div id="tasty-recipes-6998" data-tr-id="6998" class="tasty-recipes tasty-recipes-6998 tasty-recipes-display tasty-recipes-has-image" data-tasty-recipes-customization="primary-color.background-color primary-color.outline-color">


<h2 class="tasty-recipes-title" data-tasty-recipes-customization="h2-color.color h2-transform.text-transform">Sugared Rosemary and Cranberries</h2>
<div class="tasty-recipes-image-button-container">
			<div class="tasty-recipes-image">
			<img decoding="async" width="150" height="150" src="https://joyoliver.com/wp-content/uploads/2019/12/IMG_0126-150x150.jpg" class="attachment-thumbnail size-thumbnail" alt="close up of the sugared cranberries" data-pin-nopin="true" />		</div>
		<div class="tasty-recipes-buttons">
				<div class="tasty-recipes-button-wrap">
			
<a class="button tasty-recipes-print-button tasty-recipes-no-print" href="https://joyoliver.com/gingerbread-layer-cake/print/6998/" target="_blank" data-tasty-recipes-customization="">
			<img decoding="async" class="svg-print" data-pin-nopin="true" src="https://joyoliver.com/wp-content/plugins/tasty-recipes/templates/buttons/images/icon-print.png">
		Print Recipe</a>
		</div>
					</div>
</div>
	<div class="tasty-recipes-rating" data-tasty-recipes-customization="body-color.color">
					<p><span class="tasty-recipes-ratings-buttons tasty-recipes-no-ratings-buttons"	data-tr-default-rating="0"	>		<span class="tasty-recipes-rating" >		<i class="checked" data-rating="5">			<span class="tasty-recipes-rating-solid" data-tr-clip="0">				<svg xmlns="http://www.w3.org/2000/svg" viewbox="9 9 46 42" width="18" height="17">	<defs>		<linearGradient id="tasty-recipes-clip-10">			<stop offset="10%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-20">			<stop offset="20%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-30">			<stop offset="30%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-40">			<stop offset="40%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-50">			<stop offset="50%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-60">			<stop offset="60%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-70">			<stop offset="70%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-80">			<stop offset="80%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-90">			<stop offset="90%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>	</defs>	<path d="m46.3 52-14.4-9.5-14.4 9.4L22 35.3 8.7 24.5l17.1-.9 6.2-16 6 16 17.2 1-13.4 10.7z"/></svg>			</span>			<span class="tasty-recipes-screen-reader">				5 Stars			</span>		</i>	</span>		<span class="tasty-recipes-rating" >		<i class="checked" data-rating="4">			<span class="tasty-recipes-rating-solid" data-tr-clip="0">				<svg xmlns="http://www.w3.org/2000/svg" viewbox="9 9 46 42" width="18" height="17">	<defs>		<linearGradient id="tasty-recipes-clip-10">			<stop offset="10%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-20">			<stop offset="20%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-30">			<stop offset="30%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-40">			<stop offset="40%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-50">			<stop offset="50%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-60">			<stop offset="60%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-70">			<stop offset="70%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-80">			<stop offset="80%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-90">			<stop offset="90%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>	</defs>	<path d="m46.3 52-14.4-9.5-14.4 9.4L22 35.3 8.7 24.5l17.1-.9 6.2-16 6 16 17.2 1-13.4 10.7z"/></svg>			</span>			<span class="tasty-recipes-screen-reader">				4 Stars			</span>		</i>	</span>		<span class="tasty-recipes-rating" >		<i class="checked" data-rating="3">			<span class="tasty-recipes-rating-solid" data-tr-clip="0">				<svg xmlns="http://www.w3.org/2000/svg" viewbox="9 9 46 42" width="18" height="17">	<defs>		<linearGradient id="tasty-recipes-clip-10">			<stop offset="10%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-20">			<stop offset="20%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-30">			<stop offset="30%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-40">			<stop offset="40%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-50">			<stop offset="50%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-60">			<stop offset="60%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-70">			<stop offset="70%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-80">			<stop offset="80%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-90">			<stop offset="90%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>	</defs>	<path d="m46.3 52-14.4-9.5-14.4 9.4L22 35.3 8.7 24.5l17.1-.9 6.2-16 6 16 17.2 1-13.4 10.7z"/></svg>			</span>			<span class="tasty-recipes-screen-reader">				3 Stars			</span>		</i>	</span>		<span class="tasty-recipes-rating" >		<i class="checked" data-rating="2">			<span class="tasty-recipes-rating-solid" data-tr-clip="0">				<svg xmlns="http://www.w3.org/2000/svg" viewbox="9 9 46 42" width="18" height="17">	<defs>		<linearGradient id="tasty-recipes-clip-10">			<stop offset="10%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-20">			<stop offset="20%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-30">			<stop offset="30%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-40">			<stop offset="40%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-50">			<stop offset="50%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-60">			<stop offset="60%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-70">			<stop offset="70%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-80">			<stop offset="80%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-90">			<stop offset="90%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>	</defs>	<path d="m46.3 52-14.4-9.5-14.4 9.4L22 35.3 8.7 24.5l17.1-.9 6.2-16 6 16 17.2 1-13.4 10.7z"/></svg>			</span>			<span class="tasty-recipes-screen-reader">				2 Stars			</span>		</i>	</span>		<span class="tasty-recipes-rating" >		<i class="checked" data-rating="1">			<span class="tasty-recipes-rating-solid" data-tr-clip="0">				<svg xmlns="http://www.w3.org/2000/svg" viewbox="9 9 46 42" width="18" height="17">	<defs>		<linearGradient id="tasty-recipes-clip-10">			<stop offset="10%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-20">			<stop offset="20%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-30">			<stop offset="30%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-40">			<stop offset="40%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-50">			<stop offset="50%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-60">			<stop offset="60%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-70">			<stop offset="70%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-80">			<stop offset="80%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>		<linearGradient id="tasty-recipes-clip-90">			<stop offset="90%" stop-color="currentColor"/>			<stop stop-opacity="var(--tr-star-opacity)" offset="0%" stop-color="currentColor"/>		</linearGradient>	</defs>	<path d="m46.3 52-14.4-9.5-14.4 9.4L22 35.3 8.7 24.5l17.1-.9 6.2-16 6 16 17.2 1-13.4 10.7z"/></svg>			</span>			<span class="tasty-recipes-screen-reader">				1 Star			</span>		</i>	</span></span></p>
							<p><span data-tasty-recipes-customization="detail-label-color.color" class="rating-label">No reviews</span></p>
			</div>



	<div class="tasty-recipes-details" data-tasty-recipes-customization="body-color.color">
		<ul>
							<li class="author"><strong data-tasty-recipes-customization="detail-label-color.color" class="tasty-recipes-label">Author:</strong> <a data-tasty-recipes-customization="detail-value-color.color" class="tasty-recipes-author-name" href="https://joyoliver.com/about/">Kristen Massad</a></li>
							<li class="prep-time"><strong data-tasty-recipes-customization="detail-label-color.color" class="tasty-recipes-label">Prep Time:</strong> <span data-tasty-recipes-customization="detail-value-color.color" class="tasty-recipes-prep-time">20 minutes</span></li>
							<li class="total-time"><strong data-tasty-recipes-customization="detail-label-color.color" class="tasty-recipes-label">Total Time:</strong> <span data-tasty-recipes-customization="detail-value-color.color" class="tasty-recipes-total-time">20 minutes</span></li>
					</ul>
	</div>

	<div class="tasty-recipes-ingredients">
		<div class="tasty-recipes-ingredients-header">
			<div class="tasty-recipes-ingredients-clipboard-container">
				<h3 data-tasty-recipes-customization="h3-color.color h3-transform.text-transform">Ingredients</h3>
							</div>
			<div class="tasty-recipes-units-scale-container">
											</div>
		</div>
		<div class="tasty-recipes-ingredients-body" data-tasty-recipes-customization="body-color.color">
			<ul>
<li><span data-amount="0.5" data-unit="cup">½ Cup</span> Granulated Sugar</li>
<li><span data-amount="0.5" data-unit="cup">½ Cup</span> Water</li>
<li><span data-amount="6">6</span> Rosemary Sprigs</li>
</ul>
<!--INSIDE_INGREDIENTS-->		</div>
		<div class="tasty-recipes-cook-mode">
	<div class="tasty-recipes-cook-mode__container">
		<label class="tasty-recipes-cook-mode__switch">
			<input type="checkbox" id="tasty_recipes_6a02676b6f891_cookmode">
			<span class="tasty-recipes-cook-mode__switch-slider tasty-recipes-cook-mode__switch-round"
				data-tasty-recipes-customization="button-color.background button-text-color.color"></span>
		</label>
		<label for="tasty_recipes_6a02676b6f891_cookmode">
			<span class="tasty-recipes-cook-mode__label">Cook Mode</span>
			<span class="tasty-recipes-cook-mode__helper">
				Prevent your screen from going dark			</span>
		</label>
	</div>
</div>
	</div>

	<div class="tasty-recipe-instructions">
		<div class="tasty-recipes-instructions-header">
			<h3 data-tasty-recipes-customization="h3-color.color h3-transform.text-transform">Instructions</h3>
					</div>
		<div class="tasty-recipes-instructions-body" data-tasty-recipes-customization="body-color.color">
			<ol>
<li id="instruction-step-1">In a small saucepan, combine water and sugar and bring to a boil</li>
<li id="instruction-step-2">Once the sugar is dissolved shut the heat off and remove from the stove.</li>
<li id="instruction-step-3">Pour fresh cranberries and the rosemary sprigs into the simple syrup and gently stir.</li>
<li id="instruction-step-4">Allow the cranberries and rosemary sprigs to sit in the simple syrup for 10 minutes</li>
<li id="instruction-step-5">Remove the cranberries and rosemary sprigs from the simple syrup and lay them on parchment paper keeping them all separated.</li>
<li id="instruction-step-6">Once the cranberries and rosemary sprigs have cooled off, dredge them in granulated sugar</li>
<li id="instruction-step-7">Garnish the cake</li>
</ol>
		</div>
	</div>








<footer class="tasty-recipes-entry-footer">
	<h3 data-tasty-recipes-customization="footer-heading-color.color h3-transform.text-transform footer-heading.innerText">Did you make this recipe?</h3>
	<div data-tasty-recipes-customization="footer-description-color.color footer-description.innerHTML"><p>Tag <a href="https://www.instagram.com/joyandoliver" target="_blank" rel="noreferrer noopener">@joyandoliver</a> on Instagram</p>
</div>
</footer>



<script>
window.trCommon={"minRating":6,"ajaxurl":"https:\/\/joyoliver.com\/wp-admin\/admin-ajax.php","ratingNonce":"","postId":6175};
window.TastyRecipes = window.TastyRecipes || {};

window.TastyRecipes.smoothScroll = {
init() {
document.addEventListener( 'click', ( e ) => {
let anchor = e.target;
if ( anchor.tagName !== 'A' ) {
anchor = anchor.closest( 'a.tasty-recipes-scrollto' );
}

if ( ! anchor || ! anchor.classList.contains( 'tasty-recipes-scrollto' ) ) {
return;
}

const elementHref = anchor.getAttribute( 'href' );
if ( ! elementHref ) {
return;
}

e.preventDefault();
this.goToSelector( elementHref );
});
},
goToSelector( selector ) {
const element = document.querySelector( selector );
if ( ! element ) {
return;
}
element.scrollIntoView( { behavior: 'smooth' } );
}
};

document.addEventListener(
'DOMContentLoaded',
() => window.TastyRecipes.smoothScroll.init()
);

window.TastyRecipes = window.TastyRecipes || {};
window.TastyRecipes.cookMode = {
wakeLockApi: false,
wakeLock: false,
cookModeSelector: '.tasty-recipes-cook-mode',
init() {
if ("wakeLock" in navigator && "request" in navigator.wakeLock) {
this.wakeLockApi = navigator.wakeLock;
}

const cookModes = document.querySelectorAll(this.cookModeSelector);

if (cookModes.length > 0) {
for (const cookMode of cookModes) {
if (this.wakeLockApi) {
cookMode.querySelector('input[type="checkbox"]').addEventListener("change", event => {
this.checkboxChange(event.target);
}, false);
} else {
cookMode.style.display = "none";
}
}
}
},
checkboxChange(checkbox) {
if (checkbox.checked) {
this.lock();
} else {
this.unlock();
}
},
setCheckboxesState(state) {
const checkboxes = document.querySelectorAll(this.cookModeSelector + ' input[type="checkbox"]');
for (const checkbox of checkboxes) {
checkbox.checked = state;
}
},
async lock() {
try {
this.wakeLock = await this.wakeLockApi.request("screen");
this.wakeLock.addEventListener("release", () => {
this.wakeLock = false;
this.setCheckboxesState(false);
});
this.setCheckboxesState(true);
} catch (error) {
this.setCheckboxesState(false);
}
},
unlock() {
if (this.wakeLock) {
this.wakeLock.release();
this.wakeLock = false;
}
this.setCheckboxesState(false);
}
};

(function(callback) {
if (document.readyState !== "loading") {
callback();
} else {
document.addEventListener("DOMContentLoaded", callback);
}
})(() => {
window.TastyRecipes.cookMode.init();
});



window.TastyRecipes = window.TastyRecipes || {};

window.TastyRecipes.staticTooltip = {
element: null,
tooltipElement: null,
deleting: false,
init( element ) {
if ( this.deleting ) {
return;
}
this.element = element;
this.buildElements();
},
destroy() {
if ( ! this.tooltipElement || this.deleting ) {
return;
}

this.deleting = true;
this.tooltipElement.classList.remove( 'opened' );

setTimeout( () => {
this.tooltipElement.remove();
this.deleting = false;
}, 500 );
},
buildElements() {
const tooltipElement = document.createElement( 'div' );
tooltipElement.classList.add( 'tasty-recipes-static-tooltip');
tooltipElement.setAttribute( 'id', 'tasty-recipes-tooltip' );

const currentTooltipElement = document.getElementById( 'tasty-recipes-tooltip' );
if ( currentTooltipElement ) {
document.body.replaceChild( tooltipElement, currentTooltipElement );
} else {
document.body.appendChild( tooltipElement );
}

this.tooltipElement = document.getElementById( 'tasty-recipes-tooltip' );
},
show() {
if ( ! this.tooltipElement ) {
return;
}

const tooltipTop = this.element.getBoundingClientRect().top
+ window.scrollY
- 10 // 10px offset.
- this.tooltipElement.getBoundingClientRect().height;
const tooltipLeft = this.element.getBoundingClientRect().left
- ( this.tooltipElement.getBoundingClientRect().width / 2 )
+ ( this.element.getBoundingClientRect().width / 2 ) - 1;
const posLeft = Math.max( 10, tooltipLeft );
this.maybeRemoveTail( posLeft !== tooltipLeft );

this.tooltipElement.setAttribute( 'style', 'top:' + tooltipTop + 'px;left:' + posLeft + 'px;' );
this.tooltipElement.classList.add( 'opened' );

},
maybeRemoveTail( removeTail ) {
if ( removeTail ) {
this.tooltipElement.classList.add( 'tr-hide-tail' );
} else {
this.tooltipElement.classList.remove( 'tr-hide-tail' );
}
},
changeMessage( message ) {
if ( ! this.tooltipElement ) {
return;
}
this.tooltipElement.innerHTML = message;
}
};

window.TastyRecipes.ajax = {
sendPostRequest( url, data, success, failure ) {
const xhr = new XMLHttpRequest();
xhr.open( 'POST', url, true );
xhr.send( this.preparePostData( data ) );

xhr.onreadystatechange = () => {
if ( 4 !== xhr.readyState ) {
return;
}
if ( xhr.status === 200 ) {
success( JSON.parse( xhr.responseText ) );
return;
}

failure( xhr );
};

xhr.onerror = () => {
failure( xhr );
};
},
preparePostData( data ) {
const formData = new FormData();

for ( const key in data ) {
formData.append( key, data[key] );
}
return formData;
},
};

window.TastyRecipes.ratings = {
defaultRating: 0,
currentRatingPercentage: 100,
savingRating: false,
init( minRating ) {
this.minRating = minRating;

this.formWatchRating();
this.closeTooltipWhenClickOutside();
this.addBodyClassBasedOnSelectedRating();
this.backwardCompFormRatingPosition();
},
formWatchRating() {
const ratings = document.querySelectorAll('.tasty-recipes-no-ratings-buttons [data-rating]');
if ( ratings.length <= 0 ) {
return;
}
for ( const rating of ratings ) {
rating.addEventListener( 'click', event => {
event.preventDefault();
this.defaultRating = event.target.closest( '.checked' ).dataset.rating;
this.setCheckedStar( event.target );
this.maybeSendRating( this.defaultRating, event.target );
this.setRatingInForm( this.defaultRating );
} );
}
},
closeTooltipWhenClickOutside() {
window.addEventListener( 'click', e => {
// Bailout (don't remove the tooltip) when the clicked element is a rating star, or it's the tooltip itself.
if ( e.target.closest( '.tasty-recipes-rating' ) || e.target.classList.contains( 'tasty-recipes-static-tooltip' ) ) {
return;
}

window.TastyRecipes.staticTooltip.destroy();
} );
},
 setRatingInForm( rating ) {
const ratingInput = document.querySelector( '#respond .tasty-recipes-rating[value="' + rating + '"]' );
if ( ! ratingInput ) {
return;
}
ratingInput.click();
},
addBodyClassBasedOnSelectedRating() {
const ratingInputs = document.querySelectorAll( 'input.tasty-recipes-rating' );
if ( ! ratingInputs ) {
return;
}
for ( const ratingInput of ratingInputs ) {
ratingInput.addEventListener( 'click', currentEvent => {
const selectedRating = currentEvent.target.getAttribute( 'value' );
this.handleBodyClassByRating( selectedRating );
this.toggleCommentTextareaRequired( selectedRating );
} );
}
},
handleBodyClassByRating( rating ) {
if ( rating < this.minRating ) {
document.body.classList.remove( 'tasty-recipes-selected-minimum-rating' );
return;
}
document.body.classList.add( 'tasty-recipes-selected-minimum-rating' );
},
toggleCommentTextareaRequired( rating ) {
const commentTextarea = document.getElementById( 'comment' );
if ( ! commentTextarea ) {
return;
}

if ( rating < this.minRating ) {
commentTextarea.setAttribute( 'required', '' );
return;
}

commentTextarea.removeAttribute( 'required' );
},
maybeSendRating( rating, element ) {
if ( this.savingRating === rating ) {
return;
}

this.savingRating = rating;
window.TastyRecipes.staticTooltip.init( element );

const recipeCardElement = element.closest( '.tasty-recipes' );
if ( ! recipeCardElement ) {
window.TastyRecipes.staticTooltip.destroy();
return;
}

window.TastyRecipes.ajax.sendPostRequest(
window.trCommon.ajaxurl,
{
action: 'tasty_recipes_save_rating',
rating,
nonce: window.trCommon.ratingNonce,
post_id: window.trCommon.postId,
recipe_id: recipeCardElement.dataset.trId,
},
( response ) => {
window.TastyRecipes.staticTooltip.changeMessage( response.data.message );
window.TastyRecipes.staticTooltip.show();
this.updateAverageText( response.data, recipeCardElement );
this.maybeFillCommentForm( response.data );

// Hide the tooltip after 5 seconds.
setTimeout( () => {
this.maybeResetTooltip( recipeCardElement, response.data, rating );
}, 5000 );
},
() => {
this.resetTooltip( recipeCardElement );
}
);
},
updateAverageText( data, recipeCardElement ) {
if ( ! data.average ) {
return;
}
this.setRatingPercent( data );

if ( ! data.count ) {
return;
}

const quickLink = document.querySelector( '.tasty-recipes-rating-link' );
if ( quickLink ) {
this.setTextInContainer( quickLink, data );
this.setPartialStar( quickLink );
}

const cardStars = recipeCardElement.querySelector( '.tasty-recipes-ratings-buttons' );
cardStars.dataset.trDefaultRating = data.average;
this.setTextInContainer( recipeCardElement.querySelector( '.tasty-recipes-rating' ), data );
},
setTextInContainer( container, data ) {
if ( ! container ) {
return;
}

if ( data.label ) {
const ratingLabelElement = container.querySelector( '.rating-label' );
if ( ratingLabelElement ) {
ratingLabelElement.innerHTML = data.label;
}
return;
}

const averageElement = container.querySelector( '.average' );
if ( averageElement ) {
averageElement.textContent = data.average;
}

const countElement = container.querySelector( '.count' );
if ( countElement ) {
countElement.textContent = data.count;
}
},
setPartialStar( container ) {
const highestStar = container.querySelector( '[data-rating="' + Math.ceil( this.defaultRating ) + '"]' );
if ( highestStar ) {
highestStar.dataset.trClip = this.currentRatingPercentage;
}
},
setRatingPercent( data ) {
this.defaultRating = data.average.toFixed( 1 );
const parts = data.average.toFixed( 2 ).toString().split( '.' );
this.currentRatingPercentage = parts[1] ? parts[1] : 100;
if ( this.currentRatingPercentage === '00' ) {
this.currentRatingPercentage = 100;
}
},
setCheckedStar( target ) {
const cardRatingContainer = target.closest( '.tasty-recipes-ratings-buttons' );
const selectedRatingElement = cardRatingContainer.querySelector( '[data-tr-checked]' );
if ( selectedRatingElement ) {
delete selectedRatingElement.dataset.trChecked;
}

const thisStar = target.closest( '.tasty-recipes-rating' );
thisStar.dataset.trChecked = 1;
thisStar.querySelector( '[data-tr-clip]' ).dataset.trClip = 100;
},
maybeFillCommentForm( data ) {
if ( ! data.comment || ! data.comment.content ) {
return;
}

const commentForm = document.querySelector( '#commentform' );
if ( ! commentForm ) {
return;
}

const commentBox = commentForm.querySelector( '[name=comment]' );
if ( ! commentBox || commentBox.value ) {
return;
}

// Add comment details for editing.
commentBox.innerHTML = data.comment.content;
if ( data.comment.name ) {
commentForm.querySelector( '[name=author]' ).value = data.comment.name;
commentForm.querySelector( '[name=email]' ).value = data.comment.email;
}
},
maybeResetTooltip( recipeCardElement, data, rating ) {
if ( this.savingRating === rating ) {
this.resetTooltip( recipeCardElement, data );
}
},
resetTooltip( recipeCardElement, data ) {
window.TastyRecipes.staticTooltip.destroy();
this.savingRating = false;

// Reset the default rating.
const cardRatingContainer = recipeCardElement.querySelector( '.tasty-recipes-ratings-buttons' );
if ( cardRatingContainer ) {
this.defaultRating = ( data && data.average ) ? data.average.toFixed(1) : cardRatingContainer.dataset.trDefaultRating;
cardRatingContainer.dataset.trDefaultRating = this.defaultRating;

this.resetSelectedStar( cardRatingContainer, data );
}
},
resetSelectedStar( cardRatingContainer ) {
const selectedRatingElement = cardRatingContainer.querySelector( '[data-rating="' + Math.ceil( this.defaultRating ) + '"]' );
if ( selectedRatingElement ) {
selectedRatingElement.querySelector( '[data-tr-clip]' ).dataset.trClip = this.currentRatingPercentage;
selectedRatingElement.parentNode.dataset.trChecked = 1;
}

const previousSelectedElement= cardRatingContainer.querySelector( '[data-tr-checked]' );
if ( previousSelectedElement ) {
const currentSelectedRating = previousSelectedElement.querySelector('[data-rating]');
if ( currentSelectedRating !== selectedRatingElement ) {
delete previousSelectedElement.dataset.trChecked;
}
}
},
backwardCompFormRatingPosition() {
const ratingsButtons = document.querySelector( '#respond .tasty-recipes-ratings-buttons, #tasty-recipes-comment-rating .tasty-recipes-ratings-buttons' );
if ( ! ratingsButtons ) {
return;
}
const ratingsButtonsStyles = window.getComputedStyle(ratingsButtons);
if ( ! ratingsButtonsStyles.display.includes( 'flex' ) ) {
ratingsButtons.style.direction = 'rtl';
}

if ( typeof tastyRecipesRating !== 'undefined' ) {
// Select the rating that was previously selected in admin.
ratingsButtons.querySelector( '.tasty-recipes-rating[value="' + tastyRecipesRating + '"]' ).checked = true;
}

const ratingSpans = ratingsButtons.querySelectorAll( '.tasty-recipes-rating' );
for (const ratingSpan of ratingSpans) {
ratingSpan.addEventListener( 'click', event => {
if ( ratingSpan === event.target ) {
return;
}
ratingSpan.previousElementSibling.click();
} );
}
}
};

(function(callback) {
if (document.readyState !== "loading") {
callback();
} else {
window.addEventListener( 'load', callback );
}
})(() => {
window.TastyRecipes.ratings.init( window.trCommon ? window.trCommon.minRating : 4 );
});
</script></div>
<p><img decoding="async" data-pin-title="Gingerbread Layer Cake" class="alignnone wp-image-4929" src="https://joyoliver.com/wp-content/uploads/2019/05/Joy-Oliver-Signature.png" alt="" width="317" height="134" srcset="https://joyoliver.com/wp-content/uploads/2019/05/Joy-Oliver-Signature.png 726w, https://joyoliver.com/wp-content/uploads/2019/05/Joy-Oliver-Signature-410x173.png 410w" sizes="(max-width: 317px) 100vw, 317px" /></p>
<p>&nbsp;</p>
<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fjoyoliver.com%2Fgingerbread-layer-cake%2F&amp;linkname=Gingerbread%20Layer%20Cake" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fjoyoliver.com%2Fgingerbread-layer-cake%2F&amp;linkname=Gingerbread%20Layer%20Cake" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fjoyoliver.com%2Fgingerbread-layer-cake%2F&amp;linkname=Gingerbread%20Layer%20Cake" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_tumblr" href="https://www.addtoany.com/add_to/tumblr?linkurl=https%3A%2F%2Fjoyoliver.com%2Fgingerbread-layer-cake%2F&amp;linkname=Gingerbread%20Layer%20Cake" title="Tumblr" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_yummly" href="https://www.addtoany.com/add_to/yummly?linkurl=https%3A%2F%2Fjoyoliver.com%2Fgingerbread-layer-cake%2F&amp;linkname=Gingerbread%20Layer%20Cake" title="Yummly" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fjoyoliver.com%2Fgingerbread-layer-cake%2F&#038;title=Gingerbread%20Layer%20Cake" data-a2a-url="https://joyoliver.com/gingerbread-layer-cake/" data-a2a-title="Gingerbread Layer Cake"></a></p>]]></content:encoded>
			<wfw:commentRss>https://joyoliver.com/gingerbread-layer-cake/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
