Commit af10e61c authored by JIŘÍ's avatar JIŘÍ
Browse files

README.md added

parent faa318a1
# gov-katalogy-vizualni-komponenty
A set of visual components that are used to present public data from RPP catalogs on OVM portals. Components load data online via the RPP GraphQL API. Technically, these are JS components that you just need to place in the page.
List of components:
- navigation "public administration services"
- navigation "about life in the Czech Republic"
- detail of PA service description
- detail of assistance service
- detail information
- detail of the signpost
- detail of the general possibility of appeal
- SDG index
## Usage
```html
<!-- optional -->
<link rel="stylesheet" href="https://portal.gov.cz/katalogy/artefakty/dist/ds/latest/build/styles.min.css">
<link rel="stylesheet" href="https://portal.gov.cz/katalogy/artefakty/dist/ds/latest/build/print.min.css">
<script src="https://portal.gov.cz/katalogy/artefakty/dist/widgets/latest/loader.js"></script>
<script>
window.onload = function () {
const govWidget = new GovWidget({
manifestPath: '/gov-manifest.json',
locale: "cs"
});
const govPaServiceNav = new GovPaServiceNav({
el: '#gov-component-holder',
});
govWidget.use(govPaServiceNav);
govWidget.mount();
}
</script>
<div id="gov-component-holder"></div>
```
Manifest:
* `meta.title` - Page title format.
* `widgets` - Configuration of individual widgets.
* `widgets.(ASL|DPS|DPS_NAV|INF|OMO|OZC_NAV|RZC).basePath.(cs|en)` - Base path of widget page.
* `widgets.(ASL|DPS|DPS_NAV|INF|OMO|OZC_NAV|RZC).url.(cs|en)` - URI of widget page for navigation between widgets.
* `widgets.(ASL|DPS|DPS_NAV|INF|OMO|OZC_NAV|RZC).mode` - Navigation mode. Value `history` or `hash`.
```json
{
"meta":{
"title":"%s - gov.cz"
},
"widgets":{
"ASL":{
"basePath":{
"cs":"/asistencni-sluzby",
"en":"/en/asistencni-sluzby"
},
"mode":"history",
"url":{
"cs":"/asistencni-sluzby",
"en":"/en/asistencni-sluzby"
}
},
"DPS":{
"basePath":{
"cs":"/sluzby-vs",
"en":"/en/sluzby-vs"
},
"mode":"history",
"url":{
"cs":"/sluzby-vs",
"en":"/en/sluzby-vs"
}
},
"DPS_NAV":{
"basePath":{
"cs":"/sluzby-verejne-spravy",
"en":"/en/sluzby-verejne-spravy"
},
"mode":"history",
"url":{
"cs":"/sluzby-vs",
"en":"/en/sluzby-vs"
}
},
"INF":{
"basePath":{
"cs":"/informace",
"en":"/en/informace"
},
"mode":"history",
"url":{
"cs":"/informace",
"en":"/en/informace"
}
},
"OMO":{
"basePath":{
"cs":"/obecne-moznosti-odvolani",
"en":"/en/obecne-moznosti-odvolani"
},
"mode":"history",
"url":{
"cs":"/obecne-moznosti-odvolani",
"en":"/en/obecne-moznosti-odvolani"
}
},
"OZC_NAV":{
"basePath":{
"cs":"/o-zivote-v-cr",
"en":"/en/o-zivote-v-cr"
},
"mode":"history",
"url":{
"cs":"/rozcestniky",
"en":"/en/rozcestniky"
}
},
"RZC":{
"basePath":{
"cs":"/rozcestniky",
"en":"/en/rozcestniky"
},
"mode":"history",
"url":{
"cs":"/rozcestniky",
"en":"/en/rozcestniky"
}
}
}
}
```
## Requirements
Node.js ^14.0, npm ^6
## Set up config file
Copy `/src/core/config/config.js.dist` to a new file `/src/core/config/config.js` and edit it.
## Commands
`npm run serve` for developing
`npm run build` for build a production modules
`npm run build:build` for build a production version with single file loader
## Git
Run this command
`git config branch.autosetuprebase always`
It will setup your local repository to use rebase instead of merge on git pull. Rebase is better because merge creates ugly and confusing patterns. Merge should be used only between different branches, not within a single branch.
## Git flow
In our projects we use enhanced git system name git flow. Every project should be a git flow repo (you can turn classic repo into git-flow enabled one via command `git flow init`) For more informations about git flow, installation process and usage visit `https://danielkummer.github.io/git-flow-cheatsheet/` Our branches names are separated by `-` (example: `feature-new-feature` or `realease-v1.3.0`). There is no "version prefix" (one of `git init` questions), but we add it manually.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment