lint and prettify before sending to server
_todo: dockerizing dev and prod modes _
!! image not centered. another assets is requested
Features: devServer, modules,fonts, ReactRouter
** NOTE! important!!! only ubuntu style works for old and new browser. EOF, TTF, WOF2 missing for MULI!!!**
import './App.css'
or module
import styles from './App.module.scss"
( WOFF - Web Open Font Format - REC - not supports IE6-8 Opera Mini all) For fonts support check branch with withFonts.
git checkout withFonts as example added Muli Fonts
`
- src/
--- assets/
----- fonts/
------- Muli-Regular.woff
------- Muli-Regular.woff2
including with @font-face definition
```language
`
@font-face {
font-family: 'Muli Regular';
font-style: normal;
font-weight: normal;
src:
url('./assets/fonts/Muli-Regular.woff2') format('woff2'),
url('./assets/fonts/Muli-Regular.woff') format('woff');
}
$ git checkout <existing_branch>
create and switch to it:
$ git checkout -b <new_branch>
to a existiing one
$git branch <branch_name>
or use switch
$ git switch <existing_branch>
$ git switch -c <non_existing_branch>
push: $`git push origin <branch_name>
in .eslintrc :
disable Proptypes error:
"react/prop-types": 0,
disable no-used-var error:
"no-unused-vars":0
or commentat file beginning: /_ eslint react/prop-types: 0 / or this: / eslint react/forbid-prop-types: 0 _/
Note: about user roles. when create a new user role/ because it can have different routes/contributions, it will have different layout. steps to add, for a admin role:
- Add it own route in a separate routing file(see ./src/publicRoutes.js).
- Do his AdminLayout (Navbar will be rendered for all routes, a HOC). example of Layout:
<>
<NavBar/>
{props.children}
<Footer/>
<>
- Import Layout in App.js and put it on else block if (user==="admin) { layoutToDisplay = user === 'public' && ( ); }
- Test it!