Skip to content

Commit

Permalink
refactor(blockquote):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 d1ab950 commit 5eec87f
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 60 deletions.
6 changes: 3 additions & 3 deletions src/customizations/components/theme/Blockquote/Blockquote.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import React from 'react';

function Blockquote({ citation, author }) {
return (
<div className="eea-blockquote">
<blockquote className="eea-blockquote-quote">
<div className="eea blockquote">
<blockquote className="quote">
{citation}
<div className="eea-blockquote-author">{author}</div>
<div className="author">{author}</div>
</blockquote>
</div>
);
Expand Down
65 changes: 10 additions & 55 deletions theme/themes/eea/extras/blockquote.less
Original file line number Diff line number Diff line change
Expand Up @@ -7,63 +7,18 @@
Blockquote
*******************************/

.eea-blockquote {
border-left: 10px solid @secondaryColor;
}

.eea-blockquote blockquote.eea-blockquote-quote {
margin: @relative12px @relative30px;
color: @eeaQuoteColor;
font-size: @h3;
}

blockquote .eea-blockquote-author {
margin-top: @relative16px;
font-weight: bold;
}

blockquote {
i.icon {
.eea.blockquote {
border-left: @blockquoteBorderLeft;
.quote {
margin: @quoteMargin;
color: @quoteColor;
}

.pullquote-author {
text-align: right;
}
}

blockquote.pullquote {
padding: 10px 0 40px;
margin: 0;

i.icon {
font-size: 2rem;
}
}

.eea-pullquote-body {
margin: 0;
}

.eea-quote-right {
float: right;
}

@media only screen and (min-width: @tabletBreakpoint + 1) {
.eea-pullquote-body {
margin: 0 2rem;
}

blockquote.pullquote.eea-pullquote-left {
width: 400px;
padding: 0 1.5rem 1rem 0;
float: left;
}

blockquote.pullquote.eea-pullquote-right {
width: 400px;
padding: 0 0 1rem 1.5rem;
float: right;
font-size: @quoteSize;
.author {
margin-top: @authorMarginTop;
font-weight: @authorWeight;
font-size: @authorSize;
}
}
}

Expand Down
16 changes: 14 additions & 2 deletions theme/themes/eea/extras/blockquote.variables
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
/*******************************
Blockquote
*******************************/
@quoteColor: @secondaryColor;
@eeaQuoteColor: @japaneseIndigo;
/* Body */
@blockquoteBorderLeft: 10px solid @secondaryColor;
@childrenBorderLeft: none;

/* Quote */
@quoteColor: @secondaryColor;
@quoteMargin: @relative12px @relative30px;
@quoteColor: @japaneseIndigo;
@quoteSize: @h4;

/* Author */
@authorMarginTop: @relative16px;
@authorWeight: @bold;
@authorSize: @h5;

0 comments on commit 5eec87f

Please sign in to comment.