accounts-frontend/src/pages/rules/RulesPage.jsx

93 lines
3.3 KiB
React
Raw Normal View History

2016-05-22 21:26:52 +05:30
import React from 'react';
import { Link } from 'react-router';
import { FormattedMessage as Message } from 'react-intl';
import { FooterMenu } from 'components/footerMenu';
2016-05-22 21:26:52 +05:30
import styles from './rules.scss';
import messages from './RulesPage.intl.json';
import appInfo from 'components/auth/appInfo/AppInfo.intl.json';
const projectName = <Message {...appInfo.appName} />;
2016-05-22 21:26:52 +05:30
const rules = [
{
title: <Message {...messages.mainProvisions} />,
2016-05-22 21:26:52 +05:30
items: [
(<Message {...messages.mainProvision1} values={{
name: (<b>{projectName}</b>)
}} />),
(<Message {...messages.mainProvision2} />),
(<Message {...messages.mainProvision3} />),
(<Message {...messages.mainProvision4} values={{
link: (<Link to={'/register'}>https://account.ely.by/register</Link>)
}} />)
2016-05-22 21:26:52 +05:30
]
},
{
title: <Message {...messages.emailAndNickname} />,
2016-05-22 21:26:52 +05:30
items: [
(<Message {...messages.emailAndNickname1} />),
(<Message {...messages.emailAndNickname2} />),
(<Message {...messages.emailAndNickname3} />),
(<Message {...messages.emailAndNickname4} />),
(<Message {...messages.emailAndNickname5} />),
(<Message {...messages.emailAndNickname6} />),
(<Message {...messages.emailAndNickname7} />)
2016-05-22 21:26:52 +05:30
]
},
{
title: <Message {...messages.elyAccountsAsService} values={{
name: projectName
}} />,
description: (<div>
<p><Message {...messages.elyAccountsAsServiceDesc1} values={{
name: (<b>{projectName}</b>)
}} /></p>
<p><Message {...messages.elyAccountsAsServiceDesc2} /></p>
</div>),
2016-05-22 21:26:52 +05:30
items: [
(<Message {...messages.elyAccountsAsService1} />),
(<Message {...messages.elyAccountsAsService2} />)
2016-05-22 21:26:52 +05:30
]
}
];
export default function RulesPage() {
return (
<div>
<div className={styles.rules}>
2016-05-31 10:20:22 +05:30
{rules.map((block, sectionIndex) => (
<div className={styles.rulesSection} key={sectionIndex}>
<span id={`rule-${sectionIndex + 1}`} />
<h2 className={styles.rulesSectionTitle}>{block.title}</h2>
2016-05-22 21:26:52 +05:30
<div className={styles.rulesBody}>
{block.description ? (
<div className={styles.blockDescription}>
{block.description}
</div>
) : ''}
<ol className={styles.rulesList}>
2016-05-31 10:20:22 +05:30
{block.items.map((item, ruleIndex) => (
<li className={styles.rulesItem} key={ruleIndex}>
<span id={`rule-${sectionIndex + 1}-${ruleIndex + 1}`} />
{item}
</li>
))}
</ol>
</div>
2016-05-22 21:26:52 +05:30
</div>
))}
</div>
<div className={styles.footer}>
<FooterMenu />
</div>
2016-05-22 21:26:52 +05:30
</div>
);
}
RulesPage.displayName = 'RulesPage';