Skip to content

Commit

Permalink
Merge pull request #5 from kitconcept/VLT-compat
Browse files Browse the repository at this point in the history
VLT compat
  • Loading branch information
jackahl authored Dec 29, 2023
2 parents 23d0f6a + b0bb9cc commit a59dff8
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 13 deletions.
1 change: 1 addition & 0 deletions news/6.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Compatiblity with kitconcept volto-light-theme container widths @jackahl
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@
"**/*.overrides"
],
"customSyntax": "postcss-less"
},
{
"files": [
"**/*.scss"
],
"customSyntax": "postcss-scss"
}
],
"rules": {
Expand Down
5 changes: 3 additions & 2 deletions src/components/Logo/View.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ const View = (props) => {
/>
</UniversalLink>
))}

<h3 className="logo-heading headline">{data.heading}</h3>
{data.heading && (
<h3 className="logo-heading headline">{data.heading}</h3>
)}
{config.blocks.blocksConfig.logo.showDescriptionField &&
data.description && <p>{data.description}</p>}
</div>
Expand Down
9 changes: 3 additions & 6 deletions src/components/Logo/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,9 @@ export const LogoBlockSchema = (props) => {
{
id: 'default',
title: 'Default',
fields: [
'logo',
'heading',
config.blocks.blocksConfig.logo.showDescriptionField && 'description',
'link',
],
fields: config.blocks.blocksConfig.logo.showDescriptionField
? ['logo', 'heading', 'description', 'link']
: ['logo', 'heading', 'link'],
},
],
properties: {
Expand Down
9 changes: 9 additions & 0 deletions src/theme/_main.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//Specific styles for volto-light-theme
.block.logos .ui.stackable,
.block.logos .grid-items,
.block.logos h2.headline {
@include default-container-width();
// Adding 2 * 10px (one for each side) we force the container to extend the value of
// the gutter to match the other blocks margin.
max-width: calc(var(--default-container-width) + 2 * 10px);
}
20 changes: 15 additions & 5 deletions src/theme/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,26 @@
.three.column.grid {
.logo-image {
max-width: 200px;
height: 200px;
}

h3 {
width: 300px;
max-width: 300px;
}
}

.two.column.grid {
.logo-block {
display: flex;
flex-direction: column;
align-items: center;

.logo-image {
height: 300px;
width: 100%;
max-height: 100px;
object-position: top center;
}

h3 {
max-width: 400px;
}
}
}
Expand All @@ -114,10 +123,11 @@

.logo-image {
width: 100%;
max-height: 100px;
object-position: top center;
}

h3 {
width: 400px;
max-width: 400px;
}
}

0 comments on commit a59dff8

Please sign in to comment.