Skip to content

Instantly share code, notes, and snippets.

@andresgallo
Created August 15, 2023 21:47
Show Gist options
  • Save andresgallo/e84da06b94763c62976eca5f95ce429e to your computer and use it in GitHub Desktop.
Save andresgallo/e84da06b94763c62976eca5f95ce429e to your computer and use it in GitHub Desktop.
{
"imageSizes": {
"imgEn-small-nocrop": {
"maximumWidth": 599,
"previewWidth": 599,
"previewHeight": 599,
"srcsetDescriptors": [
"1x", "2x"
],
"alternateFormats": [
"webp"
]
},
"imgEn-small-nocrop_md": {
"maximumWidth": 350,
"previewWidth": 350,
"previewHeight": 350,
"srcsetDescriptors": [
"1x", "2x"
],
"alternateFormats": [
"webp"
]
},
"imgEn-medium-nocrop": {
"maximumWidth": 599,
"previewWidth": 599,
"previewHeight": 599,
"srcsetDescriptors": [
"1x", "2x"
],
"alternateFormats": [
"webp"
]
},
"imgEn-medium-nocrop_sm": {
"maximumWidth": 767,
"previewWidth": 767,
"previewHeight": 767,
"srcsetDescriptors": [
"1x", "2x"
],
"alternateFormats": [
"webp"
]
},
"imgEn-medium-nocrop_md": {
"maximumWidth": 800,
"previewWidth": 800,
"previewHeight": 800,
"srcsetDescriptors": [
"1x", "2x"
],
"alternateFormats": [
"webp"
]
},
"imgEn-large-nocrop": {
"maximumWidth": 599,
"previewWidth": 599,
"previewHeight": 599,
"srcsetDescriptors": [
"1x", "2x"
],
"alternateFormats": [
"webp"
]
},
"imgEn-large-nocrop_sm": {
"maximumWidth": 767,
"previewWidth": 767,
"previewHeight": 767,
"srcsetDescriptors": [
"1x", "2x"
],
"alternateFormats": [
"webp"
]
},
"imgEn-large-nocrop_md": {
"maximumWidth": 945,
"previewWidth": 945,
"previewHeight": 945,
"srcsetDescriptors": [
"1x", "2x"
],
"alternateFormats": [
"webp"
]
},
"imgEn-large-nocrop_lg": {
"maximumWidth": 1360,
"previewWidth": 1360,
"previewHeight": 1360,
"srcsetDescriptors": [
"1x", "2x"
],
"alternateFormats": [
"webp"
]
},
"large-nocrop": {
"previewWidth": 599,
"previewHeight": 599,
"srcsetDescriptors": [
"1x", "2x"
],
"alternateFormats": [
"webp"
]
},
"large-nocrop_sm": {
"previewWidth": 767,
"previewHeight": 767,
"srcsetDescriptors": [
"1x", "2x"
],
"alternateFormats": [
"webp"
]
},
"large-nocrop_md": {
"previewWidth": 1023,
"previewHeight": 1023,
"srcsetDescriptors": [
"1x"
],
"alternateFormats": [
"webp"
]
},
"large-nocrop_lg": {
"previewWidth": 1440,
"previewHeight": 1440,
"srcsetDescriptors": [
"1x"
],
"alternateFormats": [
"webp"
]
},
"medium-nocrop": {
"previewWidth": 599,
"previewHeight": 599,
"maximumWidth": 599,
"maximumHeight": 599,
"srcsetDescriptors": [
"1x", "2x"
],
"alternateFormats": [
"webp"
]
},
"medium-nocrop_sm": {
"previewWidth": 767,
"previewHeight": 767,
"maximumWidth": 767,
"maximumHeight": 767,
"srcsetDescriptors": [
"1x", "2x"
],
"alternateFormats": [
"webp"
]
},
"medium-nocrop_md": {
"previewWidth": 800,
"previewHeight": 800,
"maximumWidth": 767,
"maximumHeight": 767,
"srcsetDescriptors": [
"1x", "2x"
],
"alternateFormats": [
"webp"
]
},
"medium-nocrop_lg": {
"previewWidth": 1440,
"previewHeight": 1440,
"maximumWidth": 1440,
"maximumHeight": 1440,
"srcsetDescriptors": [
"1x"
],
"alternateFormats": [
"webp"
]
}
}
}
{{~#set
imageSizePrefix=(
not (eq enhancementAlignmentImageNoLeft "align-fullWidth") otherwise="large" then=(
not (eq enhancementAlignmentImageNoLeft "align-right") otherwise="small" then="medium"
)
)
imageSizeSuffix=(
not (eq imageOrientationDefLandscape "portrait") otherwise="4x6" then="nocrop"
)
~}}
{{~#set
imageSize=(concat "imgEn-" (get "imageSizePrefix") "-" (get "imageSizeSuffix"))
~}}
{{~#with item~}}
<div class="Enhancement" {{#if ../enhancementAlignmentImageNoLeft}} data-{{../enhancementAlignmentImageNoLeft}}{{else}}data-align-center{{/if}}>
<div class="Enhancement-item">
<div class="ImageEnhancement">
{{this}}
</div>
</div>
</div>
{{~/with~}}
{{~/set~}}
{{~/set~}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment