Skip to content

Commit

Permalink
Atualiza varíaveis templates
Browse files Browse the repository at this point in the history
  • Loading branch information
gbombassaro committed Dec 7, 2020
1 parent 038437e commit b8fcbab
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 21 deletions.
20 changes: 9 additions & 11 deletions components/Templates/Subjects.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ import {SectionTitle} from '../Typography';
const Subjects = ({content, domain, lazy, readMoreButton, status}) => {
const {title} = content;

const leftColor = content['style-left'];
const centerColor = content['style-center'];
const rightColor = content['style-right'];

const titleLeft = content['title-left'];
const titleCenter = content['title-center'];
const titleRight = content['title-right'];
Expand Down Expand Up @@ -47,30 +43,32 @@ const Subjects = ({content, domain, lazy, readMoreButton, status}) => {
}
};

console.log('LEFT COLOR', leftColor, parseColor(leftColor));
const leftColor = parseColor(content['style-left']);
const centerColor = parseColor(content['style-center']);
const rightColor = parseColor(content['style-right']);

return (
<>
{title && title !== ''&& <SectionTitle weight='bold' gutter={3} name={title} />}
<Block {...propsTemplate}>
<Block custom='col left'>
<SectionTitle weight='bold' gutter={3} color={parseColor(leftColor)}>{titleLeft}</SectionTitle>
<SectionTitle weight='bold' gutter={3} color={leftColor}>{titleLeft}</SectionTitle>
{map(items_left, (item, key) =>
<Teaser content={item} domain={domain} lazy={lazy} key={key} status={status} subjectSize={2} subjectColor={parseColor(leftColor)} titleSize={2} titleColor='neutral-2' dateColor='neutral-4' titleWeight='bold'/>
<Teaser content={item} domain={domain} lazy={lazy} key={key} status={status} subjectSize={2} subjectColor={leftColor} titleSize={2} titleColor='neutral-2' dateColor='neutral-4' titleWeight='bold'/>
)}
{readMoreButton && readMoreButton}
</Block>
<Block custom='col center'>
<SectionTitle weight='bold' gutter={3} color={parseColor(centerColor)}>{titleCenter}</SectionTitle>
<SectionTitle weight='bold' gutter={3} color={centerColor}>{titleCenter}</SectionTitle>
{map(items_center, (item, key) =>
<Teaser content={item} domain={domain} lazy={lazy} key={key} status={status} subjectSize={2} subjectColor={parseColor(centerColor)} titleSize={2} titleColor='neutral-2' dateColor='neutral-4' titleWeight='bold'/>
<Teaser content={item} domain={domain} lazy={lazy} key={key} status={status} subjectSize={2} subjectColor={centerColor} titleSize={2} titleColor='neutral-2' dateColor='neutral-4' titleWeight='bold'/>
)}
{readMoreButton && readMoreButton}
</Block>
<Block custom='col right'>
<SectionTitle weight='bold' gutter={3} color={parseColor(rightColor)}>{titleRight}</SectionTitle>
<SectionTitle weight='bold' gutter={3} color={rightColor}>{titleRight}</SectionTitle>
{map(items_right, (item, key) =>
<Teaser content={item} domain={domain} lazy={lazy} key={key} status={status} subjectSize={2} subjectColor={parseColor(rightColor)} titleSize={2} titleColor='neutral-2' dateColor='neutral-4' titleWeight='bold'/>
<Teaser content={item} domain={domain} lazy={lazy} key={key} status={status} subjectSize={2} subjectColor={rightColor} titleSize={2} titleColor='neutral-2' dateColor='neutral-4' titleWeight='bold'/>
)}
{readMoreButton && readMoreButton}
</Block>
Expand Down
19 changes: 9 additions & 10 deletions templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -4692,9 +4692,6 @@ var Subjects = function Subjects(_ref) {
readMoreButton = _ref.readMoreButton,
status = _ref.status;
var title = content.title;
var leftColor = content['style-left'];
var centerColor = content['style-center'];
var rightColor = content['style-right'];
var titleLeft = content['title-left'];
var titleCenter = content['title-center'];
var titleRight = content['title-right'];
Expand Down Expand Up @@ -4736,7 +4733,9 @@ var Subjects = function Subjects(_ref) {
}
};

console.log("LEFT COLOR", leftColor, parseColor(leftColor));
var leftColor = parseColor(content['style-left']);
var centerColor = parseColor(content['style-center']);
var rightColor = parseColor(content['style-right']);
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, title && title !== '' && /*#__PURE__*/React__default['default'].createElement(SectionTitle, {
weight: "bold",
gutter: 3,
Expand All @@ -4746,7 +4745,7 @@ var Subjects = function Subjects(_ref) {
}, /*#__PURE__*/React__default['default'].createElement(SectionTitle, {
weight: "bold",
gutter: 3,
color: parseColor(leftColor)
color: leftColor
}, titleLeft), lodash.map(items_left, function (item, key) {
return /*#__PURE__*/React__default['default'].createElement(Teaser, {
content: item,
Expand All @@ -4755,7 +4754,7 @@ var Subjects = function Subjects(_ref) {
key: key,
status: status,
subjectSize: 2,
subjectColor: parseColor(leftColor),
subjectColor: leftColor,
titleSize: 2,
titleColor: "neutral-2",
dateColor: "neutral-4",
Expand All @@ -4766,7 +4765,7 @@ var Subjects = function Subjects(_ref) {
}, /*#__PURE__*/React__default['default'].createElement(SectionTitle, {
weight: "bold",
gutter: 3,
color: parseColor(centerColor)
color: centerColor
}, titleCenter), lodash.map(items_center, function (item, key) {
return /*#__PURE__*/React__default['default'].createElement(Teaser, {
content: item,
Expand All @@ -4775,7 +4774,7 @@ var Subjects = function Subjects(_ref) {
key: key,
status: status,
subjectSize: 2,
subjectColor: parseColor(centerColor),
subjectColor: centerColor,
titleSize: 2,
titleColor: "neutral-2",
dateColor: "neutral-4",
Expand All @@ -4786,7 +4785,7 @@ var Subjects = function Subjects(_ref) {
}, /*#__PURE__*/React__default['default'].createElement(SectionTitle, {
weight: "bold",
gutter: 3,
color: parseColor(rightColor)
color: rightColor
}, titleRight), lodash.map(items_right, function (item, key) {
return /*#__PURE__*/React__default['default'].createElement(Teaser, {
content: item,
Expand All @@ -4795,7 +4794,7 @@ var Subjects = function Subjects(_ref) {
key: key,
status: status,
subjectSize: 2,
subjectColor: parseColor(rightColor),
subjectColor: rightColor,
titleSize: 2,
titleColor: "neutral-2",
dateColor: "neutral-4",
Expand Down

0 comments on commit b8fcbab

Please sign in to comment.