/public/text/brand.js
module.exports = {
starter: {
name: 'Oiron Starter',
desc: 'Oiron Starter - React Starter Template',
prefix: 'Oiron',
footerText: 'Oiron Theme All Rights Reserved 2021',
logoText: 'Oiron Theme',
projectName: 'Starter Project',
url: 'oiron.ux-maestro.com',
img: '/public/images/logo.png',
notifMsg: 'Donec sit amet nulla sed arcu pulvinar ultricies commodo id ligula.'
}
};
This template come with some variant main components that easy to use.
To change Header, Footer, and Corner component, please open in theme config theme/config.js
, and just change value then all components will be updated.
Here's the available values:
Key | Type | Available Value | Example |
---|---|---|---|
Header |
String |
mixed ,
basic ,
droplist ,
mega ,
hamburger ,
navscroll ,
search
|
header: 'mixed' |
Header |
String |
basic ,
sitemap ,
blog ,
contact
|
footer: 'blog' |
Footer |
String |
chat ,
nav
|
corner: 'chat' |
Header component used for navigation and some site settings. It's more flexible with 7 type of headers:
basic
search
droplist
(it has routing navigation)mega
(it has routing navigation)hamburger
(it has scroll navigation)navscroll
(it has scroll navigation)mixed
(Scroll Navigation + Mega Menu)
In theme/config.js
you can edit header
value to change the header type.
The changes will affected to all pages containing header except Blog and Auth (login & register).
// theme/config.js
export const state = () => ({
header: 'mixed', /* available: mixed, basic, droplist, mega, hamburger, navscroll, search */
})
Mega menu and Dropdown menu have submenu that can be accessed by clicking the parent menu. But It can be accessed using hover instead of clicking by change the data.
MultiLevel
component from TopNav/MultiLevelHover.js
// components/Header/Droplist.js
Import MultiLevelHover./span>
import MultiLevel from './TopNav/MultiLevelHover'
Footer component used for many purpose, such as navigation, contact, additional link, or just copyright mark. This template provide 4 Footer variants
basic
sitemap
blog
contact
In theme/config.js
you can edit footer
value to change the footer type.
The changes will affected to all pages except Maintenance and Coming Soon which doesn't uses footer.
// theme/config.js
export const state = () => ({
header: 'mixed', /* available: mixed, basic, droplist, mega, hamburger, navscroll, search */
})
The additional components for homepage placed on the bottom right corner.
There are 2 variant, Chat Panel and Single Page Navigation.
The Corner component itself imported from '~/components/Home/Corner'
import Corner from '~/components/Home/Corner'
return (
<div>
<Corner />
</div>
)
chat
nav
To use it, in theme/config.js
you can edit corner
value to change the corner type.
The changes only affected in homepage.
By default it's only implemented in homepage, but you can use Corner
component for another page
// theme/config.js
export const usState = {
corner: 'chat' /* chat, nav */
};
Banner and Slider ussualy placed on first section of hompage. And all of this template uses the Banner Slider.
The banner slider components code is in components/Home/BannerSlider
The slider containing 3 type of banners, Text-Image, Image-Text, and Text-Image-Vertical. By default it uses all type banner as horizontal slider. If you need only a single banner without slider, You have to make some modification in the code like bellow:
Text-Image
Image-Text
Text-Image-Vertical
// components/Home/BannerSlider
<div className={classes.carousel}>
<Carousel>
<div className={classes.slide} id="slide1">Banner 1</div>
<div className={classes.slide} id="slide2">Banner 2</div>
<div className={classes.slide} id="slide3">Banner 3</div>
</Carousel>
</div>
Unwrap slick
component and use only one .slide
element
// components/Home/BannerSlider
<div className={classes.carousel}>
<div className={classes.slide} id="slide1">Banner 1</div>
</div>
/pages/_app.js
state.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: pages/_app.js
const [theme, setTheme] = useState({
...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.js
defaultLanguage: 'eng'
to other initial locale i.e. ind
for Bahasa Indonesia/public/locales/[localCode]/
└── public └── locales ├── eng | └── common.json | └── theme-landing.json └── deu └── common.json └── theme-landing.json
/i18n.js
. Example for Deutsch.
otherLanguages: ['deu'],
localeSubpaths: {
deu: 'de',
eng: 'en'
},
_document.js
MyDocument.getInitialProps = async ctx => {
// ...rest code
return {
namespacesRequired: ['common', 'landing-theme'],
}
})
/pages/index.js
Landing.getInitialProps = async () => ({
namespacesRequired: ['common', 'theme-landing'],
})
import { withTranslation } from '~/i18n';
t
function to props
t: PropTypes.func.isRequired
<Typography component="p">
{t('landing-theme:footer_counter')}
<Typography>
Or if you put all translations in common.json
<Typography component="p">
{t('common:landing-theme.footer_counter')}
<Typography>
withTranslation
, then open your translated page.
export default withTranslation(['landing-theme'])(YourCompnent);