Skip to content

Commit

Permalink
refactor(pullquote):adjust to volto theming
Browse files Browse the repository at this point in the history
  • Loading branch information
g-stamatis committed Feb 3, 2022
1 parent 5eec87f commit fee4466
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/customizations/components/theme/Pullquote/Pullquote.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { Icon } from 'semantic-ui-react';

function Pullquote({ quote, source, quotePosition }) {
return (
<blockquote className={`pullquote eea-pullquote-${quotePosition}`}>
<blockquote className={`eea pullquote ${quotePosition}`}>
<Icon name="quote left"></Icon>
<div className="eea-pullquote-body">
<h4 className="eea-pullquote-quote">{quote}</h4>
<p className="eea-pullquote-author">{source}</p>
<div className="content">
<h4 className="quote">{quote}</h4>
<p className="author">{source}</p>
</div>
<Icon className="eea-quote-right" name="quote right"></Icon>
<Icon className="quote right" name="quote right"></Icon>
</blockquote>
);
}
Expand Down
4 changes: 4 additions & 0 deletions src/semantic.less
Original file line number Diff line number Diff line change
Expand Up @@ -203,3 +203,7 @@
& {
@import '@eeacms/volto-eea-design-system/../theme/themes/eea/extras/blockquote';
}

& {
@import '@eeacms/volto-eea-design-system/../theme/themes/eea/extras/pullquote';
}
1 change: 1 addition & 0 deletions theme/theme.config
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
@custom : 'eea';
/* EEA Design system custom components */
@blockquote : 'eea';
@pullquote : 'eea';

/*******************************
Folders
Expand Down
46 changes: 46 additions & 0 deletions theme/themes/eea/extras/pullquote.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
@type: 'extra';
@element: 'pullquote';

@import (multiple) '../../theme.config';

/*******************************
Pullquote
*******************************/

.eea.pullquote {
padding: @pullquotePadding;
margin: @pullquoteMobileMargin;
.content {
margin: @contentMargin;
.author {
text-align: @authorTextAlign;
}
}
i.icon {
font-size: @quoteIconSize;
color: @quoteIconColor;
}
.quote.right {
float: @quoteDownIconFloat;
}
}

@media only screen and (min-width: @tabletBreakpoint) {
.eea.pullquote {
.content {
margin: @pullquoteMargin;
}
}
.eea.pullquote.left {
width: @maxWidthOnFloat;
padding: @paddingLeftFloat;
float: @leftFloat;
}
.eea.pullquote.right {
width: @maxWidthOnFloat;
padding: @paddingRightFloat;
float: @rightFloat;
}
}

.loadUIOverrides();
25 changes: 25 additions & 0 deletions theme/themes/eea/extras/pullquote.variables
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*******************************
Pullquote
*******************************/

/* Body */
@pullquotePadding: @relative10px 0 @relative50px;
@pullquoteMobileMargin: 0;
@pullquoteMargin: 0 2rem;
@maxWidthOnFloat: 400px;
@leftFloat: left;
@rightFloat: right;
@paddingLeftFloat: 0 1.5rem 1rem 0;
@paddingRightFloat: 0 0 1rem 1.5rem;


/* Content */
@contentMargin: 0;

/* Author */
@authorTextAlign: right;

/* Icon */
@quoteIconSize: 2rem;
@quoteIconColor: @secondaryColor;
@quoteDownIconFloat: right;

0 comments on commit fee4466

Please sign in to comment.