var positionImage = function positionImage(imageEl) { var imageDimensions = imageEl.dataset.imageDimensions.split('x'); var originalWidth = imageDimensions[0]; var originalHeight = imageDimensions[1]; var focalPoint = imageEl.dataset.imageFocalPoint.split(','); var focalPointX = focalPoint[0]; var focalPointY = focalPoint[1]; var parentNode = imageEl.parentNode;
var scale = function () { var imageRatio = originalWidth / originalHeight; var parentClientSize = { height: parentNode.clientHeight, width: parentNode.clientWidth }; var parentRatio = parentClientSize.width / parentClientSize.height;
if (imageRatio > parentRatio) { return parentClientSize.height / originalHeight; }
return parentClientSize.width / originalWidth; }();
var getRelativeOffset = function getRelativeOffset() { var targetWidth = Math.ceil(originalWidth * scale); var targetHeight = Math.ceil(originalHeight * scale); var parentDimensionWidth = parentNode.offsetWidth; var parentDimensionHeight = parentNode.offsetHeight; var overflowWidth = targetWidth - parentDimensionWidth; var overflowHeight = targetHeight - parentDimensionHeight; var valueX;
if (overflowWidth === 0) { valueX = focalPointX; } else { valueX = Math.max(Math.min(targetWidth * focalPointX - parentDimensionWidth * 0.5, overflowWidth), 0) / overflowWidth; }
var valueY;
if (overflowHeight === 0) { valueY = focalPointY; } else { valueY = Math.max(Math.min(targetHeight * focalPointY - parentDimensionHeight * 0.5, overflowHeight), 0) / overflowHeight; }
return { valueX: valueX, valueY: valueY }; };
var relativeOffset = getRelativeOffset(); var valueX = relativeOffset.valueX; var valueY = relativeOffset.valueY; imageEl.style.objectPosition = "".concat(valueX * 100, "% ").concat(valueY * 100, "%"); };
Welcome to the Pizza Series! Here you will find an assortment of guides and recipes to make great pizza in your own home.
For Beginners: A Guide to Making Great Homemade Thin-Crust Pizza
An extensive, all-encompassing guide that walks you through all of the insights and challenges of homemade pizza making. You’ll learn everything from choosing the best ingredients, to kneading, to stretching, to topping, and baking. Additionally, there are FAQ throughout the process so you can feel confident making pizza in your own home.
For Intermediate Pizza Makers: Cold Fermented Pizza Dough
This pizza dough recipe is my go-to for my outdoor pizza oven (Ooni or Gozney), but also works for home ovens. With this recipe, the slow, colder fermentation from letting the dough sit in the fridge for at least 24 hours allows for a better flavor to develop over time. That additional time also enables more bubbly goodness when baked. This recipe is flexible — it works with different flours, different times in the fridge. Use it to your advantage to play around and experiment and see what you like best. The end result is a cross between a Neopolitan and a NY style pizza — slightly crispy on the outside and chewy on the inside.
For Store-Bought Dough: Transform Store-Bought Dough Into a Magical Cheesy Bread!
Don’t want to make your own dough? This twist on cheesy bread is both creamy from a garlicky, pumpkin cream sauce and cheesy. As a bonus, it uses store-bought dough saving you the trouble of making your own dough.