diff options
| author | (quasar) nebula <qznebula@protonmail.com> | 2026-06-07 19:13:05 -0300 |
|---|---|---|
| committer | (quasar) nebula <qznebula@protonmail.com> | 2026-06-07 19:13:05 -0300 |
| commit | 0585ed7e2c1b631f23fa32ccc599ab7a8b350404 (patch) | |
| tree | 92cfc40e71eb6b3173c3ca2da5e0289a20f152cc /src/content/dependencies/image.js | |
| parent | 1d5fb208d75b69774c21557b5f5ec8d2d94a8ada (diff) | |
content, css: image: I SURE HOPE THIS WORKS
Diffstat (limited to 'src/content/dependencies/image.js')
| -rw-r--r-- | src/content/dependencies/image.js | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/src/content/dependencies/image.js b/src/content/dependencies/image.js index af4b7fdd..4c945a20 100644 --- a/src/content/dependencies/image.js +++ b/src/content/dependencies/image.js @@ -19,11 +19,6 @@ export default { .filter(artTag => artTag.isContentWarning) .map(artTag => artTag.name) : null), - - dimensions: - (artwork - ? artwork.dimensions - : null), }), slots: { @@ -33,7 +28,6 @@ export default { reveal: {type: 'boolean', default: true}, lazy: {type: 'boolean', default: false}, - square: {type: 'boolean', default: false}, link: { validate: v => v.anyOf(v.isBoolean, v.isString), @@ -72,15 +66,15 @@ export default { mutable: false, }, + dimensions: { + validate: v => v.isDimensions, + }, + // These will also be used from the artwork if not specified as slots. warnings: { validate: v => v.looseArrayOf(v.isString), }, - - dimensions: { - validate: v => v.isDimensions, - }, }, generate(data, relations, slots, { @@ -123,7 +117,7 @@ export default { (typeof slots.link === 'string' || slots.link); const warnings = slots.warnings ?? data.warnings; - const dimensions = slots.dimensions ?? data.dimensions; + const dimensions = slots.dimensions; const willReveal = slots.reveal && @@ -352,16 +346,10 @@ export default { wrapped = html.tag('div', {class: 'image-outer-area'}, - slots.square && - {class: 'square-content'}, - wrapped); wrapped = html.tag('div', {class: 'image-container'}, - slots.square && - {class: 'square'}, - typeof slots.link === 'string' && {class: 'no-image-preview'}, |