Modal Base: Comparison Table

See "img upload" in sidebar snet/molecules for variants, or go to info panel and look for it in "references" (@snet-img-upload)

Refer to modal frame found in view tab for complete structure without content.

A modal's default size is 640px

Modifier classes for modals

  • modal-sm: 480px
  • modal-md: 720px (mainly used for modals containing images)
  • modal-lg: 896px
  • modal-xl: 1120px

Content loading

A modal with a content loading component behaves as follows:

  • It has a second body element with the -isLoading class that is hidden by default, and shown only when ...
  • ... the -contentLoading modifier is applied to the modal element ...
  • ... which in turn hides the regular modal body element which into which the content is injected
<div class="sds-modal modal fade" id="comparisonTableModal" aria-hidden="true" tabindex="-1">
    <div class="sds-modal__dialog modal-dialog modal-dialog-centered">
        <div class="sds-modal__content modal-content">

            <div class="sds-modal__header modal-header">

                <div class="sds-modal__title modal-title">Comparer produits</div>

                <button type="button" class="sds-btn -iconBtn -btnSecondary -ghost sds-modal__close" data-dismiss="modal" aria-label="Close">

                    <span class="sds-icon sds-icon-close"></span>

                </button>

            </div>

            <div class="sds-modal__body modal-body">

                <div class="row row-sm">

                    <div class="col-6">
                        <button type="button" class="sds-navigationTile sds-box -justifyInlineStart" aria-pressed="false">

                            <div class="sds-media -mediaSm -mediaHasBg -mediaRounded">

                                <img src="../../media/spuerkeess-site/components/product/cards/sdsillu-product-card-premier.png" alt="">

                            </div>

                            <div class="sds-label sds-textHelperSmall">
                                Visa Débit

                            </div>
                        </button>
                    </div>

                    <div class="col-6">
                        <button type="button" class="sds-navigationTile sds-box -justifyInlineStart" aria-pressed="true">

                            <div class="sds-media -mediaSm -mediaHasBg -mediaRounded">

                                <img src="../../media/spuerkeess-site/components/product/cards/sdsillu-product-card-classic.png" alt="">

                            </div>

                            <div class="sds-label sds-textHelperSmall">
                                Visa Classic

                            </div>
                        </button>
                    </div>

                    <div class="col-6">
                        <button type="button" class="sds-navigationTile sds-box -justifyInlineStart" aria-pressed="false">

                            <div class="sds-media -mediaSm -mediaHasBg -mediaRounded">

                                <img src="../../media/spuerkeess-site/components/product/cards/sdsillu-product-card-premier.png" alt="">

                            </div>

                            <div class="sds-label sds-textHelperSmall">
                                Visa Premier

                            </div>
                        </button>
                    </div>

                    <div class="col-6">
                        <button type="button" class="sds-navigationTile sds-box -justifyInlineStart" aria-pressed="false">

                            <div class="sds-media -mediaSm -mediaHasBg -mediaRounded">

                                <img src="../../media/spuerkeess-site/components/product/cards/sdsillu-product-card-miles&amp;more.png" alt="">

                            </div>

                            <div class="sds-label sds-textHelperSmall">
                                Miles & More

                            </div>
                        </button>
                    </div>

                    <div class="col-6">
                        <button type="button" class="sds-navigationTile sds-box -justifyInlineStart" aria-pressed="true">

                            <div class="sds-media -mediaSm -mediaHasBg -mediaRounded">

                                <img src="../../media/spuerkeess-site/components/product/cards/sdsillu-product-card-infinite.png" alt="">

                            </div>

                            <div class="sds-label sds-textHelperSmall">
                                Visa Infinite

                            </div>
                        </button>
                    </div>

                </div>

            </div>

            <div class="sds-modal__footer modal-footer">

                <button type="button" class="sds-btn -btnPrimary -block" data-dismiss="modal">

                    <span class="sds-btn__text">Comparer</span>

                </button>

            </div>

        </div>
    </div>
</div>
{% extends "@snet-modal-base-frame" %}
{% block header %}
	<div class="{{ namespace }}modal__title modal-title">Comparer produits</div>
{% endblock %}
{% block body %}
	<div class="row row-sm">
		{% for key, item in comparisonProductsCol1 %}
		<div class="col-6">
			{% render "@spk-navigation-tile--media", {
				eltType: "button",
				attrs: {
					"aria-pressed":  item.active or "false"
				},
				disabled: item.disabled,
				img: item.img,
				text: item.text
			},true %}
		</div>
		{% endfor %}
	</div>
{% endblock %}
{% block footer %}
	{% if footer %}
	{% render "@btn-primary--full-width", {
		text: "Comparer",
		attrs: {
			"data-dismiss": "modal"
		}
	} ,true %}
	{% endif %}
{% endblock %}