add short text for description page

This commit is contained in:
Hope87 2021-07-14 14:13:09 +03:00
parent ed25b7c00e
commit 580355afe0
2 changed files with 10 additions and 10 deletions

View File

@ -11,9 +11,9 @@ const Description = ({ onLoadMore }) => {
const candidatesListArr = useSelector(selectProfiles);
const filteredListArr = useSelector(selectFilteredCandidates);
function createMarkup(text) {
return { __html: text.split('</p>').slice(0, 3).join('') };
}
// function createMarkup(text) {
// return { __html: text.split('</p>').slice(0, 3).join('') };
// }
return (
<section className={style.description}>
@ -30,8 +30,8 @@ const Description = ({ onLoadMore }) => {
{SKILLS[el.position_id]}, {LEVELS[el.level]}
</h3>
{el.vc_text ? (
<div className={style.description__text} dangerouslySetInnerHTML={createMarkup(el.vc_text)}></div>
{el.vc_text_short ? (
<div className={style.description__text}>{el.vc_text_short}</div>
) : (
<p className={style.description__textSecondary}>Описание отсутствует...</p>
)}
@ -65,8 +65,8 @@ const Description = ({ onLoadMore }) => {
{SKILLS[el.position_id]}, {LEVELS[el.level]}
</h3>
{el.vc_text ? (
<div className={style.description__text} dangerouslySetInnerHTML={createMarkup(el.vc_text)}></div>
{el.vc_text_short ? (
<div className={style.description__text}>{el.vc_text_short}</div>
) : (
<p className={style.description__textSecondary}>Описание отсутствует...</p>
)}

View File

@ -73,7 +73,7 @@
}
}
.description__text > p {
.description__text {
font-family: 'GT Eesti Pro Display';
font-size: 1.6em;
font-weight: 100;
@ -85,9 +85,9 @@
word-wrap: break-word;
}
.description__text > p:first-child {
/* .description__text > p:first-child {
font-size: 1.8em;
}
} */
.description__textSecondary {
font-family: 'GT Eesti Pro Display';