/static/text/brand.js
module.exports = {
starter: {
name: 'Luxi Starter',
desc: 'Luxi Starter - React Starter Template',
prefix: 'luxi',
footerText: 'Luxi Theme All Rights Reserved 2019',
logoText: 'Luxi Theme',
projectName: 'Starter Project',
url: 'luxi.ux-maestro.com',
img: '/static/images/logo.png',
notifMsg: 'Donec sit amet nulla sed arcu pulvinar ultricies commodo id ligula.'
}
};
/pages/_app.jsstate.theme value. Here's the available api:
| Key | Type | Available Value | Example |
|---|---|---|---|
Color: |
String |
'oceanBlue',
'greenLeaf', 'greyscale',
'cloud', 'violet',
etc
|
...appTheme('oceanBlue', themeType), |
Theme mode: |
String |
'light',
'dark',
|
...appTheme('oceanBlue', 'dark'), |
direction: |
String |
ltr,
rtl,
|
direction: 'rtl' |
// file: app/redux/modules/uiReducer.js
state = {
loading: true,
theme: {
...appTheme('greenLeaf', 'dark'),
direction: 'rtl'
}
}
This template us React Youtube a simple react component acting as a thin layer over the YouTube IFrame Player API. To use this feature we recommend to use https in production. If not there will be some warnings in browser console related cookies and security.
You can disable this feature by open /youtube.js then set set use: false.
/i18n.jsdefaultLanguage: 'en' to other initial locale i.e. id for Bahasa Indonesia/static/locales/[localCode]/
└── static
└── locales
├── en
| └── common.json
└── de
└── common.json
/i18n.js_document.js
MyDocument.getInitialProps = async ctx => {
return {
namespacesRequired: ['common', 'landing-theme'],
}
})
/pages/index.js
Landing.getInitialProps = async () => ({
namespacesRequired: ['common', 'landing-theme'],
})
import { withTranslation } from '~/i18n';
t function to props
t: PropTypes.func.isRequired
<Typography component="p">
{t('landing-theme:footer_counter')}
<Typography>
withTranslation, then open your translated page.
export default withTranslation(['landing-theme'])(Counter);