Вынос футера в отдельный компонент

This commit is contained in:
ErickSkrauch 2016-10-01 01:00:52 +03:00
parent 73734c10c1
commit e61eaf8bd9
7 changed files with 62 additions and 43 deletions

View File

@ -0,0 +1,32 @@
import { Table } from 'components/table';
import { FormattedMessage as Message } from 'react-intl';
import { BitmapText } from 'components/text';
import styles from './styles';
import messages from './messages.intl.json';
export default function Footer() {
return (
<Table style={styles.footer}>
<tr>
<td style={styles.footerText}>
<Message {...messages.footer} values={{
serviceLink:
<a href="https://account.ely.by" style={styles.footerLink}>
<Message {...messages.service_name} />
</a>
}} />
</td>
<td style={styles.footerLogo}>
<a href="http://ely.by">
<BitmapText message={messages.footer_logo_alt} style={{
verticalAlign: 'middle'
}} />
</a>
</td>
</tr>
</Table>
);
}

View File

@ -0,0 +1 @@
export Footer from './Footer';

View File

@ -0,0 +1,5 @@
{
"footer": "You have received this message, because this Email was set during registration at the {serviceLink} service. If it wasn't you just delete the message please.",
"service_name": "Accounts Ely.by",
"footer_logo_alt": "Ely.by - Alternative Minecraft services"
}

View File

@ -0,0 +1,21 @@
export default {
footer: {
background: '#DDD8CE',
height: '135px'
},
footerText: {
verticalAlign: 'middle',
paddingLeft: '30px',
fontSize: '13px',
color: '#7A7A7A'
},
footerLink: {
color: '#7A7A7A',
textDecoration: 'none',
borderBottom: '1px dashed #7A7A7A'
},
footerLogo: {
verticalAlign: 'middle',
padding: '0 30px'
}
};

View File

@ -5,6 +5,7 @@ import { FormattedMessage as Message } from 'react-intl';
import { Userbar } from 'components/userbar'; import { Userbar } from 'components/userbar';
import { Table } from 'components/table'; import { Table } from 'components/table';
import { Header } from 'components/header'; import { Header } from 'components/header';
import { Footer } from 'components/footer';
import { Button } from 'components/button'; import { Button } from 'components/button';
import { Input } from 'components/input'; import { Input } from 'components/input';
import { BitmapText } from 'components/text'; import { BitmapText } from 'components/text';
@ -162,25 +163,7 @@ export default function Register({username, link, code}) {
</Table> </Table>
</div> </div>
<Table style={styles.footer}> <Footer />
<tr>
<td style={styles.footerText}>
<Message {...messages.footer} values={{
serviceLink:
<a href="https://account.ely.by" style={styles.footerLink}>
<Message {...messages.service_name} />
</a>
}} />
</td>
<td style={styles.footerLogo}>
<a href="http://ely.by">
<BitmapText message={messages.footer_logo_alt} style={{
verticalAlign: 'middle'
}} />
</a>
</td>
</tr>
</Table>
</div> </div>
); );
} }

View File

@ -10,8 +10,5 @@
"install_our_patch_image": "Install our patch in the game", "install_our_patch_image": "Install our patch in the game",
"install_our_patch_text": "You should install our patch to make the Ely.by's skin system working. You can find it at 'Load' section.", "install_our_patch_text": "You should install our patch to make the Ely.by's skin system working. You can find it at 'Load' section.",
"use_tlauncher_image": "Use TLauncher", "use_tlauncher_image": "Use TLauncher",
"use_tlauncher_text": "It is much easier, when you use right tool for right purpose. TLauncher is one of the best alternative launchers for the Minecraft, that also has installed Ely.by's support system.", "use_tlauncher_text": "It is much easier, when you use right tool for right purpose. TLauncher is one of the best alternative launchers for the Minecraft, that also has installed Ely.by's support system."
"footer": "You have received this message, because this Email was set during registration at the {serviceLink} service. If it wasn't you just delete the message please.",
"service_name": "Accounts Ely.by",
"footer_logo_alt": "Ely.by - Alternative Minecraft services"
} }

View File

@ -50,25 +50,5 @@ export default {
}, },
todoItemText: { todoItemText: {
paddingTop: '3px' paddingTop: '3px'
},
footer: {
background: '#DDD8CE',
height: '135px'
},
footerText: {
verticalAlign: 'middle',
paddingLeft: '30px',
fontSize: '13px',
color: '#7A7A7A'
},
footerLink: {
color: '#7A7A7A',
textDecoration: 'none',
borderBottom: '1px dashed #7A7A7A'
},
footerLogo: {
verticalAlign: 'middle',
padding: '0 30px'
} }
}; };