Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: view Listing blocks inside Grid block #626

Merged
merged 1 commit into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@

### Fix

- Sistemata la visualizzazione dei blocchi elenco all'interno del blocco griglia
- L'etichetta della Card con Nastro (Blocco Elenco) non si sovrappone più all'immagine del nastro.
- Aggiustato il layout della card per il CT persone quando è impostata un'immagine.

Expand Down
7 changes: 7 additions & 0 deletions src/config/italiaConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ export default function applyConfig(voltoConfig) {

const customBlocks = {
...getItaliaBlocks(config),

listing: {
...config.blocks.blocksConfig.listing,
showLinkMore: true,
Expand Down Expand Up @@ -453,6 +454,12 @@ export default function applyConfig(voltoConfig) {
showEditBlocksInBabelView: true,
};

//per avere la conf dei blocchi anche nel blocco grid, altrimenti nel blocco grid prende la conf base di volto.
config.blocks.blocksConfig.gridBlock = {
...config.blocks.blocksConfig.gridBlock,
blocksConfig: config.blocks.blocksConfig,
};

removeListingVariation(config, 'default'); // removes default volto template, because it will be overrided
removeListingVariation(config, 'summary'); // removes summary volto template, because is unused
removeListingVariation(config, 'imageGallery'); // removes imageGallery volto template, because we have our photoGallery template
Expand Down
70 changes: 70 additions & 0 deletions src/theme/ItaliaTheme/Blocks/_gridBlock.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,56 @@
height: unset !important;
}

.block {
.full-width,
&.full-width {
right: unset;
left: unset;
width: auto !important;
margin-right: unset !important;
margin-left: unset !important;
}

.container {
width: auto !important;
}

&.listing {
&.simpleCard,
&.attachmentCardTemplate {
.card-teaser-block-3 {
> .card-teaser {
flex: 0 0 49%; //invece di 3 elementi per riga, ne mostro due perchè c'è poco spazio
}
}
}

&.cardWithImageTemplate,
&.ribbonCardTemplate,
&.completeBlockLinksTemplate {
.col-lg-4,
.col-xl-4,
.col-lg-3 {
width: 50%; //invece di 3 elementi per riga, ne mostro due perchè c'è poco spazio
}
}

&.cardSlideUpTextTemplate,
&.quaresImageTemplate {
.grid {
grid-template-columns: 1fr 1fr;
}
}

&.bandiInEvidenceTemplate {
.bandi-in-evidence-cards-wrapper {
grid-template-columns: 1fr 1fr;
}
}
}
}

//in edit (cms-ui)
.gridBlock-container {
position: relative;
max-width: 1320px;
Expand All @@ -15,6 +65,11 @@
left: 16px !important;
}

.block-editor-listing {
padding-right: 0;
padding-left: 0;
}

.block {
.image {
.ui.message {
Expand All @@ -30,3 +85,18 @@
}
}
}

body.cms-ui.has-toolbar.has-sidebar {
.block.gridBlock {
.public-ui {
.container {
width: auto !important;
}

.full-width > .px-4.container {
padding-right: 24px !important;
padding-left: 24px !important;
}
}
}
}
Loading