Skip to content

Commit

Permalink
docs: add about content cutomization doc file
Browse files Browse the repository at this point in the history
  • Loading branch information
nborde-CSM committed Jan 25, 2022
1 parent 6878ab0 commit d5d7245
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
1 change: 1 addition & 0 deletions doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
- [Scenario Parameters configuration](scenarioParametersConfiguration.md)
- [Scenario Parameters advanced customization](scenarioParametersCustomization.md)
- [Theme Customization](themeCustomization.md)
- [About Content Customization](aboutContentCustomization.md)
64 changes: 64 additions & 0 deletions doc/aboutContentCustomization.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# About customization

## Customization of About content component

By default, About content customization is set in the React component:
[src/components/AboutContent/AboutContent.js](../src/components/AboutContent/AboutContent.js)

## About content configuration

- In the same [AboutContent.js](../src/components/AboutContent/AboutContent.js) file,
**title** and **text** contents are set through these translation keys:

```jsx
<Grid className={classes.title} item>
{t('genericcomponent.dialog.about.title')}
</Grid>
...
<Grid item className={classes.content}>
{t('genericcomponent.dialog.about.content')}
</Grid>
```

and translation files:

[public/locales/en/translation.json](../public/locales/en/translation.json)

[public/locales/fr/translation.json](../public/locales/fr/translation.json)

- Webapp **version number** is automaticaly fetched from [package.json](package.json) at deployment.
So, don't forget to keep up-to-date the variable `version`:

```json
{
"name": "azure-sample-webapp",
"version": "2.1.0",
"private": true,
"dependencies": {
```

## Enable or disable About entry in help menu

In file [src/services/config/Menu.js](../src/services/config/Menu.js):

- To **enable** About entry in help menu.
`About` constant must be set with **About content component**.

By default, the constant is set like that:

```js
import { AboutContent } from '../../components/AboutContent';

export const About = AboutContent;
```

If you want to use another component, don't forget to set correctly the `import` line.

- To **disable** About entry in help menu.
`About` constant must be set as **_null_** :

```js
// import { AboutContent } from '../../components/AboutContent';

export const About = null;
```

0 comments on commit d5d7245

Please sign in to comment.