Update cms-widget-fields footer image reference.

This commit is contained in:
Bryan Mauger 2024-04-15 17:08:43 -04:00
parent 3951dfcf86
commit 8455534ef0
3 changed files with 21 additions and 15 deletions

View file

@ -37,8 +37,8 @@ const widgetFields = Object.freeze({
NAME: 'Name', NAME: 'Name',
BACK_BUTTON_TEXT: 'BackButtonText', BACK_BUTTON_TEXT: 'BackButtonText',
FORWARD_BUTTON_TEXT: 'ForwardButtonText', FORWARD_BUTTON_TEXT: 'ForwardButtonText',
FOOTER_IMAGE: 'FooterImage', ALT_TEXT: 'AltText',
ALT_TEXT: 'AltText' FOOTER_IMAGE_URL: 'FooterImageURL'
} }
}); });

View file

@ -4,26 +4,32 @@
</div> </div>
</template> </template>
<script> <script>
import widgetFields from '@/constants/cms-widget-fields.js';
export default { export default {
name: 'footer-image', name: 'footer-image',
props: { data() {
cmsWidgetName: String return {
widget: {
footer: 'SiteFooterWidget'
}
};
}, },
computed: { computed: {
footerImageURL() { footerImageURL() {
return this.getCmsContent(this.cmsWidgetName, 'FooterImageURL'); return this.getCmsContent(this.widget.footer, widgetFields.FOOTER_WIDGET.FOOTER_IMAGE_URL);
} }
} }
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.footerImage { .footerImage {
display: flex; display: flex;
justify-content: center; justify-content: center;
margin-top: auto; margin-top: auto;
img { img {
max-width: 375px; max-width: 23.4375rem;
}
} }
</style> }
</style>

View file

@ -141,7 +141,7 @@ class="row">
</div> </div>
<!-- Footer image component must have parent (usually container-fluid) <!-- Footer image component must have parent (usually container-fluid)
set to display: flex and height 100dvh or height 100% --> set to display: flex and height 100dvh or height 100% -->
<footerImage cmsWidgetName="SiteFooterWidget" /> <footerImage />
</div> </div>
</Form> </Form>
</template> </template>