Skip to content

Commit

Permalink
fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
iRohitSingh committed Nov 7, 2023
1 parent 8731ffb commit 8a2ca0b
Show file tree
Hide file tree
Showing 14 changed files with 65 additions and 130 deletions.
7 changes: 3 additions & 4 deletions src/components/Blocks/Listing/ListingBody.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ const Headline = ({ headlineTag, id, data = {}, listingItems, isEditMode }) => {
let attr = { id };
const slug = Slugger.slug(data.headline);
attr.id = slug || id;
const LinkedHeadline = useMemo(
() => renderLinkElement(headlineTag),
[headlineTag],
);
const LinkedHeadline = useMemo(() => renderLinkElement(headlineTag), [
headlineTag,
]);
return (
<LinkedHeadline
mode={!isEditMode && 'view'}
Expand Down
28 changes: 13 additions & 15 deletions src/components/Blocks/Slate/ExtraAlignWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,19 @@ import cx from 'classnames';
// on some of the blocks, the ones that are more pure, eg. the ones the view is
// super simple, and a single element (p or an h)... So it's required on slate
// blocks and heading
const ExtraAlignWrapper =
(Component) =>
({ ...props }) => {
const { data } = props;
const ExtraAlignWrapper = (Component) => ({ ...props }) => {
const { data } = props;

return (
<div
className={cx(`${data['@type']}`, {
[data.align]: data.align,
[data.styles?.align]: data.styles?.align,
})}
>
<Component {...props} />
</div>
);
};
return (
<div
className={cx(`${data['@type']}`, {
[data.align]: data.align,
[data.styles?.align]: data.styles?.align,
})}
>
<Component {...props} />
</div>
);
};

export default ExtraAlignWrapper;
13 changes: 7 additions & 6 deletions src/components/Blocks/disableBgColorSchema.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
export const disableBgColorSchema = ({ schema }) => {
const { backgroundColor, ...filteredSchemaProperties } =
schema.properties.styles.schema.properties;
const {
backgroundColor,
...filteredSchemaProperties
} = schema.properties.styles.schema.properties;
schema.properties.styles.schema.properties = filteredSchemaProperties;

schema.properties.styles.schema.fieldsets[0].fields =
schema.properties.styles.schema.fieldsets[0].fields.filter(
(item) => item !== 'backgroundColor',
);
schema.properties.styles.schema.fieldsets[0].fields = schema.properties.styles.schema.fieldsets[0].fields.filter(
(item) => item !== 'backgroundColor',
);

return schema;
};
13 changes: 4 additions & 9 deletions src/theme/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,9 @@
width: 75px;
height: 75px;
border: none;
border-radius: 50%;
background-color: transparent;
transition:
background-color 200ms ease-in-out,
color 300ms ease-in-out;
border-radius: 50%;
transition: background-color 200ms ease-in-out, color 300ms ease-in-out;

svg {
transition: transform 300ms ease-in-out;
Expand Down Expand Up @@ -127,9 +125,7 @@
height: 90px;
padding-top: 2rem;
background-color: $lightgrey;
transition:
top 500ms ease-in-out,
height 600ms ease-in-out;
transition: top 500ms ease-in-out, height 600ms ease-in-out;
transition-property: top height;

&.active {
Expand Down Expand Up @@ -193,8 +189,8 @@
margin-right: 7px;

&:hover {
border-radius: 50%;
background-color: $darkGrey;
border-radius: 50%;
svg {
fill: $white !important;
}
Expand Down Expand Up @@ -259,7 +255,6 @@
}
}


/* Fat menu implementation */
.navigation {
height: 64px;
Expand Down
6 changes: 2 additions & 4 deletions src/theme/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,7 @@ footer {
height: 11px;
margin-top: -25px;
margin-left: 3px;
content: '\a0'
url("data:image/svg+xml,%3Csvg aria-hidden='true' focusable='false' data-prefix='fas' data-icon='external-link-alt' class='svg-inline--fa fa-external-link-alt fa-w-16' role='img' xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 512 512'%3E%3Cpath fill='%23007EB1' d='M432,320H400a16,16,0,0,0-16,16V448H64V128H208a16,16,0,0,0,16-16V80a16,16,0,0,0-16-16H48A48,48,0,0,0,0,112V464a48,48,0,0,0,48,48H400a48,48,0,0,0,48-48V336A16,16,0,0,0,432,320ZM488,0h-128c-21.37,0-32.05,25.91-17,41l35.73,35.73L135,320.37a24,24,0,0,0,0,34L157.67,377a24,24,0,0,0,34,0L435.28,133.32,471,169c15,15,41,4.5,41-17V24A24,24,0,0,0,488,0Z'%3E%3C/path%3E%3C/svg%3E");
content: '\a0'url("data:image/svg+xml,%3Csvg aria-hidden='true' focusable='false' data-prefix='fas' data-icon='external-link-alt' class='svg-inline--fa fa-external-link-alt fa-w-16' role='img' xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 512 512'%3E%3Cpath fill='%23007EB1' d='M432,320H400a16,16,0,0,0-16,16V448H64V128H208a16,16,0,0,0,16-16V80a16,16,0,0,0-16-16H48A48,48,0,0,0,0,112V464a48,48,0,0,0,48,48H400a48,48,0,0,0,48-48V336A16,16,0,0,0,432,320ZM488,0h-128c-21.37,0-32.05,25.91-17,41l35.73,35.73L135,320.37a24,24,0,0,0,0,34L157.67,377a24,24,0,0,0,34,0L435.28,133.32,471,169c15,15,41,4.5,41-17V24A24,24,0,0,0,488,0Z'%3E%3C/path%3E%3C/svg%3E");
white-space: nowrap;
}
}
Expand All @@ -144,8 +143,7 @@ footer {
height: 11px;
margin-top: -25px;
margin-left: 3px;
content: '\a0'
url("data:image/svg+xml,%3Csvg aria-hidden='true' focusable='false' data-prefix='fas' data-icon='external-link-alt' class='svg-inline--fa fa-external-link-alt fa-w-16' role='img' xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 512 512'%3E%3Cpath fill='%23007EB1' d='M432,320H400a16,16,0,0,0-16,16V448H64V128H208a16,16,0,0,0,16-16V80a16,16,0,0,0-16-16H48A48,48,0,0,0,0,112V464a48,48,0,0,0,48,48H400a48,48,0,0,0,48-48V336A16,16,0,0,0,432,320ZM488,0h-128c-21.37,0-32.05,25.91-17,41l35.73,35.73L135,320.37a24,24,0,0,0,0,34L157.67,377a24,24,0,0,0,34,0L435.28,133.32,471,169c15,15,41,4.5,41-17V24A24,24,0,0,0,488,0Z'%3E%3C/path%3E%3C/svg%3E");
content: '\a0'url("data:image/svg+xml,%3Csvg aria-hidden='true' focusable='false' data-prefix='fas' data-icon='external-link-alt' class='svg-inline--fa fa-external-link-alt fa-w-16' role='img' xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 512 512'%3E%3Cpath fill='%23007EB1' d='M432,320H400a16,16,0,0,0-16,16V448H64V128H208a16,16,0,0,0,16-16V80a16,16,0,0,0-16-16H48A48,48,0,0,0,0,112V464a48,48,0,0,0,48,48H400a48,48,0,0,0,48-48V336A16,16,0,0,0,432,320ZM488,0h-128c-21.37,0-32.05,25.91-17,41l35.73,35.73L135,320.37a24,24,0,0,0,0,34L157.67,377a24,24,0,0,0,34,0L435.28,133.32,471,169c15,15,41,4.5,41-17V24A24,24,0,0,0,488,0Z'%3E%3C/path%3E%3C/svg%3E");
white-space: nowrap;
}
}
Expand Down
32 changes: 8 additions & 24 deletions src/theme/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@
font-style: italic;
font-weight: normal;
src: url('./fonts/metropolis/Metropolis-RegularItalic.eot');
src:
local('Metropolis Regular Italic'),
local('Metropolis-RegularItalic'),
src: local('Metropolis Regular Italic'), local('Metropolis-RegularItalic'),
url('./fonts/metropolis/Metropolis-RegularItalic.eot?#iefix')
format('embedded-opentype'),
url('./fonts/metropolis/Metropolis-RegularItalic.woff2') format('woff2'),
Expand Down Expand Up @@ -131,9 +129,7 @@
font-style: italic;
font-weight: 500;
src: url('./fonts/metropolis/Metropolis-MediumItalic.eot');
src:
local('Metropolis Medium Italic'),
local('Metropolis-MediumItalic'),
src: local('Metropolis Medium Italic'), local('Metropolis-MediumItalic'),
url('./fonts/metropolis/Metropolis-MediumItalic.eot?#iefix')
format('embedded-opentype'),
url('./fonts/metropolis/Metropolis-MediumItalic.woff2') format('woff2'),
Expand All @@ -146,9 +142,7 @@
font-style: normal;
font-weight: 500;
src: url('./fonts/metropolis/Metropolis-Medium.eot');
src:
local('Metropolis Medium'),
local('Metropolis-Medium'),
src: local('Metropolis Medium'), local('Metropolis-Medium'),
url('./fonts/metropolis/Metropolis-Medium.eot?#iefix')
format('embedded-opentype'),
url('./fonts/metropolis/Metropolis-Medium.woff2') format('woff2'),
Expand All @@ -161,9 +155,7 @@
font-style: italic;
font-weight: 300;
src: url('./fonts/metropolis/Metropolis-LightItalic.eot');
src:
local('Metropolis Light Italic'),
local('Metropolis-LightItalic'),
src: local('Metropolis Light Italic'), local('Metropolis-LightItalic'),
url('./fonts/metropolis/Metropolis-LightItalic.eot?#iefix')
format('embedded-opentype'),
url('./fonts/metropolis/Metropolis-LightItalic.woff2') format('woff2'),
Expand All @@ -176,9 +168,7 @@
font-style: normal;
font-weight: 300;
src: url('./fonts/metropolis/Metropolis-Light.eot');
src:
local('Metropolis Light'),
local('Metropolis-Light'),
src: local('Metropolis Light'), local('Metropolis-Light'),
url('./fonts/metropolis/Metropolis-Light.eot?#iefix')
format('embedded-opentype'),
url('./fonts/metropolis/Metropolis-Light.woff2') format('woff2'),
Expand Down Expand Up @@ -239,9 +229,7 @@
font-style: normal;
font-weight: bold;
src: url('./fonts/metropolis/Metropolis-Bold.eot');
src:
local('Metropolis Bold'),
local('Metropolis-Bold'),
src: local('Metropolis Bold'), local('Metropolis-Bold'),
url('./fonts/metropolis/Metropolis-Bold.eot?#iefix')
format('embedded-opentype'),
url('./fonts/metropolis/Metropolis-Bold.woff2') format('woff2'),
Expand All @@ -254,9 +242,7 @@
font-style: normal;
font-weight: normal;
src: url('./fonts/metropolis/Metropolis-Regular.eot');
src:
local('Metropolis Regular'),
local('Metropolis-Regular'),
src: local('Metropolis Regular'), local('Metropolis-Regular'),
url('./fonts/metropolis/Metropolis-Regular.eot?#iefix')
format('embedded-opentype'),
url('./fonts/metropolis/Metropolis-Regular.woff2') format('woff2'),
Expand All @@ -269,9 +255,7 @@
font-style: italic;
font-weight: bold;
src: url('./fonts/metropolis/Metropolis-BoldItalic.eot');
src:
local('Metropolis Bold Italic'),
local('Metropolis-BoldItalic'),
src: local('Metropolis Bold Italic'), local('Metropolis-BoldItalic'),
url('./fonts/metropolis/Metropolis-BoldItalic.eot?#iefix')
format('embedded-opentype'),
url('./fonts/metropolis/Metropolis-BoldItalic.woff2') format('woff2'),
Expand Down
2 changes: 1 addition & 1 deletion src/theme/blocks/_button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
.block.__button .ui.button {
padding: 8px 20px;
border: 1px solid $black;
border-radius: unset;
background: none;
border-radius: unset;
color: $black;

@include body-text-bold();
Expand Down
4 changes: 1 addition & 3 deletions src/theme/blocks/_grid.scss
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,7 @@
h2 {
margin-bottom: 40px !important;
}
&.previous--is--same--block-type.previous--has--same--backgroundColor:not(
.has--headline
) {
&.previous--is--same--block-type.previous--has--same--backgroundColor:not(.has--headline) {
margin-top: unset;
}
&:not(.grid) {
Expand Down
8 changes: 3 additions & 5 deletions src/theme/blocks/_image.scss
Original file line number Diff line number Diff line change
Expand Up @@ -281,11 +281,9 @@ figcaption {
width: min(100%, 450px);
height: 40px;
padding: 4px;
border-radius: 2px;
background-color: rgba(255, 255, 255, 0.975);
box-shadow:
0 0 8px rgba(0, 0, 0, 0.1),
0 2px 4px rgba(0, 0, 0, 0.05);
border-radius: 2px;
box-shadow: 0 0 8px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.05);

.ui.form & .ui.input input[type='text'] {
height: initial;
Expand All @@ -311,8 +309,8 @@ figcaption {

.ui.icon.button {
padding: 4px;
border-radius: 1px;
margin-left: -3px;
border-radius: 1px;
color: $brown !important;

&:hover {
Expand Down
5 changes: 2 additions & 3 deletions src/theme/blocks/_listing.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
a.external {
.listing-body h2:after {
display: inline;
content: '\a0'
url("data:image/svg+xml,%3Csvg aria-hidden='true' focusable='false' data-prefix='fas' data-icon='external-link-alt' class='svg-inline--fa fa-external-link-alt fa-w-16' role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' width='11' height='11' %3E%3Cpath fill='%23007EB1' d='M432,320H400a16,16,0,0,0-16,16V448H64V128H208a16,16,0,0,0,16-16V80a16,16,0,0,0-16-16H48A48,48,0,0,0,0,112V464a48,48,0,0,0,48,48H400a48,48,0,0,0,48-48V336A16,16,0,0,0,432,320ZM488,0h-128c-21.37,0-32.05,25.91-17,41l35.73,35.73L135,320.37a24,24,0,0,0,0,34L157.67,377a24,24,0,0,0,34,0L435.28,133.32,471,169c15,15,41,4.5,41-17V24A24,24,0,0,0,488,0Z'%3E%3C/path%3E%3C/svg%3E");
content: '\a0'url("data:image/svg+xml,%3Csvg aria-hidden='true' focusable='false' data-prefix='fas' data-icon='external-link-alt' class='svg-inline--fa fa-external-link-alt fa-w-16' role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' width='11' height='11' %3E%3Cpath fill='%23007EB1' d='M432,320H400a16,16,0,0,0-16,16V448H64V128H208a16,16,0,0,0,16-16V80a16,16,0,0,0-16-16H48A48,48,0,0,0,0,112V464a48,48,0,0,0,48,48H400a48,48,0,0,0,48-48V336A16,16,0,0,0,432,320ZM488,0h-128c-21.37,0-32.05,25.91-17,41l35.73,35.73L135,320.37a24,24,0,0,0,0,34L157.67,377a24,24,0,0,0,34,0L435.28,133.32,471,169c15,15,41,4.5,41-17V24A24,24,0,0,0,488,0Z'%3E%3C/path%3E%3C/svg%3E");
white-space: nowrap;
}
}
Expand Down Expand Up @@ -230,8 +229,8 @@
min-width: 32px;
padding: 6.5px 10px;
border: solid 1px $black;
border-radius: 0;
border-collapse: collapse;
border-radius: 0;
color: $black;

&:first-child,
Expand Down
2 changes: 1 addition & 1 deletion src/theme/blocks/_search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@
border-width: 1px 1px 1px 0;
border-style: solid;
border-color: $black;
border-radius: 0;
margin: 0;
border-radius: 0;
}

.search-sort-wrapper > .search-sort-on {
Expand Down
2 changes: 1 addition & 1 deletion src/theme/blocks/_slider.scss
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ $sliderImagesAspectRatio: var(--slider-images-aspect-ratio, 16/9);
display: initial;
padding: 8px 20px;
border: 1px solid currentColor;
border-radius: 0;
background-color: transparent;
border-radius: 0;
color: inherit;
font-size: 16px;
font-weight: 900;
Expand Down
3 changes: 1 addition & 2 deletions src/theme/blocks/_teaser.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
a.external {
.content h2:after {
display: inline;
content: '\a0'
url("data:image/svg+xml,%3Csvg aria-hidden='true' focusable='false' data-prefix='fas' data-icon='external-link-alt' class='svg-inline--fa fa-external-link-alt fa-w-16' role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' width='11' height='11' %3E%3Cpath fill='%23007EB1' d='M432,320H400a16,16,0,0,0-16,16V448H64V128H208a16,16,0,0,0,16-16V80a16,16,0,0,0-16-16H48A48,48,0,0,0,0,112V464a48,48,0,0,0,48,48H400a48,48,0,0,0,48-48V336A16,16,0,0,0,432,320ZM488,0h-128c-21.37,0-32.05,25.91-17,41l35.73,35.73L135,320.37a24,24,0,0,0,0,34L157.67,377a24,24,0,0,0,34,0L435.28,133.32,471,169c15,15,41,4.5,41-17V24A24,24,0,0,0,488,0Z'%3E%3C/path%3E%3C/svg%3E");
content: '\a0'url("data:image/svg+xml,%3Csvg aria-hidden='true' focusable='false' data-prefix='fas' data-icon='external-link-alt' class='svg-inline--fa fa-external-link-alt fa-w-16' role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' width='11' height='11' %3E%3Cpath fill='%23007EB1' d='M432,320H400a16,16,0,0,0-16,16V448H64V128H208a16,16,0,0,0,16-16V80a16,16,0,0,0-16-16H48A48,48,0,0,0,0,112V464a48,48,0,0,0,48,48H400a48,48,0,0,0,48-48V336A16,16,0,0,0,432,320ZM488,0h-128c-21.37,0-32.05,25.91-17,41l35.73,35.73L135,320.37a24,24,0,0,0,0,34L157.67,377a24,24,0,0,0,34,0L435.28,133.32,471,169c15,15,41,4.5,41-17V24A24,24,0,0,0,488,0Z'%3E%3C/path%3E%3C/svg%3E");
white-space: nowrap;
}
}
Expand Down
Loading

0 comments on commit 8a2ca0b

Please sign in to comment.