https://github.com/scbd/idb-views
Vue component to produce different views for the https://www.cbd.int/biodiversity-day
https://github.com/scbd/idb-views
Last synced: 4 months ago
JSON representation
Vue component to produce different views for the https://www.cbd.int/biodiversity-day
- Host: GitHub
- URL: https://github.com/scbd/idb-views
- Owner: scbd
- License: mit
- Created: 2023-03-09T20:38:35.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-03-26T16:03:34.000Z (over 2 years ago)
- Last Synced: 2025-01-18T20:41:08.883Z (over 1 year ago)
- Language: Vue
- Size: 152 KB
- Stars: 0
- Watchers: 7
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# idb-views
Vue component to produce different views for the https://www.cbd.int/biodiversity-day
# dev
Runs the code base locally in development. To run on of the different views change the view param in src/main.js. index.html in the root is the entry file for the server.
[ 'IdbMessages', 'IdbMessagesAdmin','IdbActions', 'IdbActionsAdmin', 'IdbMessagesCommunity', 'IdbActionsCountries' ]
# preview
Runs the code base after being built but not as a self embedded component. Preview uses public/preview/index.html as the entry point template. However, points directly to dist/dev/es/preview/index.html and uses dist/dev/es/ as the server root.
Change the view param on the fly in dist/dev/es/preview/index.html
# preview-widget
Runs the code base after being built and using the one line self embedding component. Preview-widget uses public/preview/widget/index.html as the entry point template. However, points directly to dist/dev/es/preview/widget/index.html and uses dist/dev/es/ as the server root.
Change the view param on the fly in dist/dev/es/preview/widget/index.html
# release-dev-s3
1. build
2. Replace reference to self in dist/import-map.json to s3 location. '@scbd/idb-views': 'https://scbd-components.s3.amazonaws.com/%40scbd/idb-views%40${version}/dist/widget/index.js'
3. In src/widget.js pass cdnUrl to WidgetBuilder
Test the widget released on dev
```
```
# release
Release directly to npm for prod. This need to be removed for ci release on pr.
# clean-reinstall
deletes all node_modules and reinstalls all dependencies fresh.
# view options
```
{
// required by all
view : '', // oneOf: [ 'IdbMessages', 'IdbMessagesAdmin','IdbActions', 'IdbActionsAdmin', 'IdbMessagesCommunity', 'IdbActionsCountries' ]
baseApiUrl : 'https://api.cbd.int/api',
accountsUrl : 'https://accounts.cbd.int',
editUrl : '', // url that homes edit form component for message or action
year : '', // year of the IDB
// required by all
// required by views: ['IdbMessages','IdbMessagesCommunity']
order : [], // defines which types in what order are displayed on IdbMessages and what types not displayed on IdbMessagesCommunity
// required by views: ['IdbMessages','IdbMessagesCommunity']
// required by views: ['IdbActionsCountries']
countryBaseUrl:'https://rjh.bioland.cbddev.xyz/biodiversity-day/celebrations', the base url that will end with a country code https://rjh.bioland.cbddev.xyz/biodiversity-day/celebrations/ca
// required by views: ['IdbActionsCountries']
// required by views: ['IdbActions']
country : '', // specifies current country to display
// required by views: ['IdbActions']
debug : false
}
```