Skip to content

Commit

Permalink
added styling
Browse files Browse the repository at this point in the history
  • Loading branch information
jackahl committed Dec 5, 2023
1 parent 6fc8e8f commit e1d3177
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/Logo/View.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const View = (props) => {
<img
src={flattenToAppURL(`${logo["@id"]}/@@images/image/teaser`)}
alt="placeholder"
className="logo-image"
/>
)}
<h3 className="logo-heading headline">{data.heading}</h3>
Expand Down
5 changes: 5 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { LogoBlockSchema } from "./components/Logo/schema";

import freedomSVG from "@plone/volto/icons/freedom.svg";

import "./theme/main.less";

const applyConfig = (config) => {
config.blocks.blocksConfig.logo = {
id: "logo",
Expand All @@ -28,6 +30,9 @@ const applyConfig = (config) => {
allowedBlocks: ["logo"],
sidebarTab: 1,
};
config.blocks.blocksConfig.logos.blocksConfig = {
...config.blocks.blocksConfig,
};
console.log(config);
return config;
};
Expand Down
82 changes: 82 additions & 0 deletions src/theme/main.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
@blueArctic: #e2f1fd;
@greySnow: #f3f5f7;
@greySmoke: #e4e8ec;

.block.logos {
.grid-items [data-rbd-droppable-id] {
display: flex;
}

// general spacing in the Row block wrapper
& [class^="block-editor-"],
[class^="block-editor-"].contained {
padding-right: 1rem;
padding-left: 1rem;
margin-top: 1rem;
margin-bottom: 1rem;
}

.one.grid-items [class^="block-editor-"] {
width: 100%;
}

.two.grid-items [class^="block-editor-"] {
width: 50%;
}

.three.grid-items [class^="block-editor-"] {
width: 33.33333333%;
}

.four.grid-items [class^="block-editor-"] {
width: 25%;
}

.ui.basic.button.remove-block-button {
position: absolute;
z-index: 3;
top: 6px;
right: 2px;
display: none;

.icon {
height: 18px !important;
}

.circled {
padding: 8px;
border: 1px solid @greySmoke;
background: @greySnow;

&:hover {
background-color: @greySmoke;
}
}

&:hover {
background-color: transparent !important;
}
}

[class^="block-editor-"].selected .ui.basic.button.remove-block-button,
[class^="block-editor-"]:hover .ui.basic.button.remove-block-button {
display: block;
}

.cell-wrapper {
position: relative;
flex-grow: 1;
width: 100%;
}

.logo-image {
width: 100%;
}
}

.block.logo {
.logo-image {
width: 100%;
object-position: top left;
}
}

0 comments on commit e1d3177

Please sign in to comment.