Skip to content

Commit

Permalink
Adicionada opção para auto news no subjects
Browse files Browse the repository at this point in the history
  • Loading branch information
bombassaro committed Sep 16, 2020
1 parent c73c52d commit ad2ba13
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
12 changes: 9 additions & 3 deletions components/Templates/Subjects.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,31 @@ const Subjects = props => {
const {content, domain, lazy, ReadMore, status} = props;
const {title} = content;
const propsTemplate = {custom: 'templates-subjects', lg:{align: 'row between'}};
let pqueue_left = content['items-left-pqueue'];
let pqueue_center = content['items-center-pqueue'];
let pqueue_right = content['items-right-pqueue'];
let items_left = pqueue_left && pqueue_left.length > 0 ? pqueue_left : content['items-left'];
let items_center = pqueue_center && pqueue_center.length > 0 ? pqueue_center : content['items-center'];
let items_right = pqueue_right && pqueue_right.length > 0 ? pqueue_right : content['items-right'];
return (
<>
{title && title !== ''&& <SectionTitle name={title} />}
<Block {...propsTemplate} >
<Block custom={`col left ${content['style-left']}`}>
<SectionTitle name={content['title-left']} />
{map(content['items-left'], (item, key) =>
{map(items_left, (item, key) =>
<Teaser content={item} domain={domain} lazy={lazy} key={key} status={status} />)}
{ReadMore && <ReadMore />}
</Block>
<Block custom={`col center ${content['style-center']}`}>
<SectionTitle name={content['title-center']} />
{map(content['items-center'], (item, key) =>
{map(items_center, (item, key) =>
<Teaser content={item} domain={domain} lazy={lazy} key={key} status={status} />)}
{ReadMore && <ReadMore />}
</Block>
<Block custom={`col right ${content['style-right']}`}>
<SectionTitle name={content['title-right']} />
{map(content['items-right'], (item, key) =>
{map(items_right, (item, key) =>
<Teaser content={item} domain={domain} lazy={lazy} key={key} status={status} />)}
{ReadMore && <ReadMore />}
</Block>
Expand Down
12 changes: 9 additions & 3 deletions templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -4003,13 +4003,19 @@ var Subjects = function Subjects(props) {
align: 'row between'
}
};
var pqueue_left = content['items-left-pqueue'];
var pqueue_center = content['items-center-pqueue'];
var pqueue_right = content['items-right-pqueue'];
var items_left = pqueue_left && pqueue_left.length > 0 ? pqueue_left : content['items-left'];
var items_center = pqueue_center && pqueue_center.length > 0 ? pqueue_center : content['items-center'];
var items_right = pqueue_right && pqueue_right.length > 0 ? pqueue_right : content['items-right'];
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, title && title !== '' && /*#__PURE__*/React__default['default'].createElement(SectionTitle, {
name: title
}), /*#__PURE__*/React__default['default'].createElement(Block, propsTemplate, /*#__PURE__*/React__default['default'].createElement(Block, {
custom: "col left ".concat(content['style-left'])
}, /*#__PURE__*/React__default['default'].createElement(SectionTitle, {
name: content['title-left']
}), lodash.map(content['items-left'], function (item, key) {
}), lodash.map(items_left, function (item, key) {
return /*#__PURE__*/React__default['default'].createElement(Teaser, {
content: item,
domain: domain,
Expand All @@ -4021,7 +4027,7 @@ var Subjects = function Subjects(props) {
custom: "col center ".concat(content['style-center'])
}, /*#__PURE__*/React__default['default'].createElement(SectionTitle, {
name: content['title-center']
}), lodash.map(content['items-center'], function (item, key) {
}), lodash.map(items_center, function (item, key) {
return /*#__PURE__*/React__default['default'].createElement(Teaser, {
content: item,
domain: domain,
Expand All @@ -4033,7 +4039,7 @@ var Subjects = function Subjects(props) {
custom: "col right ".concat(content['style-right'])
}, /*#__PURE__*/React__default['default'].createElement(SectionTitle, {
name: content['title-right']
}), lodash.map(content['items-right'], function (item, key) {
}), lodash.map(items_right, function (item, key) {
return /*#__PURE__*/React__default['default'].createElement(Teaser, {
content: item,
domain: domain,
Expand Down

0 comments on commit ad2ba13

Please sign in to comment.