These were priorities when this project is being developed:
- HTML structure (semantic and accessible as possible).
- Functionality.
- Style when needed. It should not interfere with the app's heart function.
- make mds tab besides each other on github.
- Go to this cdn.
- Copy one of the script tags.
- Add / paste it to your html file. An example:
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/11.2.0/marked.min.js" integrity="sha512-BLTLvBrdIq0KLzJH2C9GpxL6KmCqX5cofqkYxUZPp8J2beb7ABAXPpL7aIbtSdtqLWLIgAyFFgePj1p/sq7lRw==" crossorigin="anonymous" referrerpolicy="no-referrer" ></script> - Use the window.marked in your react.js.
Check this documentation for reference.
The dangerouslySetInnerHTML is React's replacement for using innerHTML in the browser DOM.
REMINDER: This can dangerously expose users to cross-site scripting (XSS) attacks.
Sample code below:
function MyComponent {
return <div dangerouslySetInnerHTML={{__html: 'First · Second'}} />;
}
- Installed SASS - reference here. Run this in the terminal:
# install as devDependency npm i --save-dev sass - Created a sass file.
./src/styles/app.scss - Imported the sass file to react.js. This will automatically compile to a CSS file.
import './styles/app.scss'; - Partials: Create partials with filenames beginning with underscores (_). The @import rule is used to share variables and styles among sass files. Reference.
// import to './styles.scss' a partial file named '_partial.scss' @import './partial.scss';
Reference for full read.
In the project-root-directory, run the command in the terminal:
```
git config --system core.longpaths true
```