|
|
|
|
|
> This is just a help to make your component documentation in order to save time and to be exhautif. Take the freedom you want!
|
|
|
|
|
|
# SIB [short name of the functionality]
|
|
|
> The description of your functionality should be clear and should be the same as the description of your project
|
|
|
|
|
|
`<sib-[name]>` is [description].
|
|
|
|
|
|
|
|
|
## Try the demo
|
|
|
> It's a good practice to set a demo in each functionality.
|
|
|
|
|
|
To launch the demo, please run at the root of the component :
|
|
|
|
|
|
```bash
|
|
|
python3 -m http.server 8001
|
|
|
```
|
|
|
|
|
|
## Installation
|
|
|
> Explain how to connect your component to the right back.
|
|
|
|
|
|
In your django project, add the `djangoldp_[name]` package:
|
|
|
|
|
|
```python
|
|
|
# settings.py
|
|
|
DJANGOLDP_PACKAGES = [
|
|
|
'djangoldp_[name]',
|
|
|
]
|
|
|
```
|
|
|
|
|
|
## How to use
|
|
|
> Show how to implement it.
|
|
|
|
|
|
Once the package is installed, you can use the `sib-[name]` component:
|
|
|
```html
|
|
|
<html>
|
|
|
<head>
|
|
|
<!-- import the module in the head of the page -->
|
|
|
<script type="module" src="link/to/your/component"></script>
|
|
|
</head>
|
|
|
|
|
|
<body>
|
|
|
<!-- use the component -->
|
|
|
<sib-[name]
|
|
|
data-src="[url]"
|
|
|
attribute1='1'
|
|
|
attribute2='xyz'>
|
|
|
</sib-[name]>
|
|
|
</body>
|
|
|
</html>
|
|
|
```
|
|
|
Notes :
|
|
|
> Anything to add about how it works?
|
|
|
|
|
|
### Parameters
|
|
|
|
|
|
| Name | Default | Description |
|
|
|
| --------------- | ---------------------- | :----------------------------------------------------------- |
|
|
|
| `data-src` | `undefined` | URL of .. |
|
|
|
| `extra-context` | `{}` | Custom extra context |
|
|
|
| `attribute1` | `10` | Explanation about the attribute named 'attribute1'
|
|
|
|
|
|
|
|
|
|
|
|
## A personnal message
|
|
|
|
|
|
Feel free to give a personal message to your reader. Don't forget to give here your mail adress!
|
|
|
|
|
|
Hopping it was useful!
|
|
|
|