Commit f528e7b8 authored by Lena Heizmann's avatar Lena Heizmann
Browse files

Proofread Readme.md

parent 25ab80c8
# Histhub-net widget # Histhub-net widget
The histhub-net widget can display sameas resources from histhub linking services. You can integrate it into your site and display links to other providers. The histHub-net widget can display sameas resources from [histhub](histhub.ch) linking services. histHub-net connects identical entities from different sources. This widget makes those links (concordances) visible. You can integrate it into your site and display links to other providers.
__The widget and the api's are in beta status. They may change in the future.__ __The widget and the api's are in beta status. They may change in the future.__
## Webcomponent ## Webcomponent
...@@ -29,9 +29,9 @@ The endpoint defines the restapi, where the widget makes the call to get the lin ...@@ -29,9 +29,9 @@ The endpoint defines the restapi, where the widget makes the call to get the lin
* Geolinker https://api.geolinker.histhub.ch/v1-1/similarto/ (newer apis) * Geolinker https://api.geolinker.histhub.ch/v1-1/similarto/ (newer apis)
* Orgalinker https://api.orgalinker.histhub.ch/v1/sameas/ * Orgalinker https://api.orgalinker.histhub.ch/v1/sameas/
Choose one of the endpoint to get links for your resource Choose one of these endpoint to get links for your resource
### Resolver ### Resolver
The endpoint uses different technologies to generate the links. Those technologies calls resolver. You need to define a resolver to get the links for your preferences. The endpoint uses different technologies to generate the links. Those technologies call a resolver. You need to define a resolver to get the links for your preferences.
__Tagcloud and Orgalinker__ __Tagcloud and Orgalinker__
...@@ -39,35 +39,35 @@ For those two services we provide the `resolvermanual` . The links provided by t ...@@ -39,35 +39,35 @@ For those two services we provide the `resolvermanual` . The links provided by t
__Geolinker__ __Geolinker__
The geolinker provides for the `sameas` endpoint the `resolverneo4j` resolver. The links provided by this resolver are done semi-automatically. See example 3 The geolinker provides the `resolverneo4j` resolver for the `sameas` endpoint. The links provided by this resolver are done semi-automatically. See example 3
For the `similarto` endpoint the geolinker provides a `elasticsearchresolver`. The data are guessed based on a matching algorithm. See example 4 For the `similarto` endpoint the geolinker provides an `elasticsearchresolver`. The data are guessed based on a matching algorithm. See example 4
### Location ### Location
The location is an optional parameter. By default the widget uses the current window.location.href to make the request. You can specify the url to look for over the url parameter The location is an optional parameter. By default the widget uses the current window.location.href to make the request. You can specify the url to look for over the url parameter
### Template ### Template
The `tempate` is an optional parameter. You can provide your own template to modify the structure and styles of the widget. The `template` is an optional parameter. You can provide your own template to modify the structure and styles of the widget.
### language (beta) ### language (beta)
The `language` parameter is optional (default=de) and let you define the language of the provider. We resolve the name of the provider over the url pattern. Possible languages are `de`, `fr`, `it` and `en`. The `language` parameter is optional (default=de) and lets you define the language of the provider. We resolve the name of the provider over the url pattern. Possible languages are `de`, `fr`, `it` and `en`.
### Timeout ### Timeout
The architecture of the `geolinker` waits for a certain timeout (default=2000) for the microservices to find an answer to the query. You can define that timeout. If you often get 404 try to set a higher timeout The architecture of the `geolinker` waits for a certain timeout (default=2000) for the microservices to find an answer to the query. You can define that timeout. If you often get 404 try to set a higher timeout
### Link-target ### Link-target
By default the target of a link is `_blank`. If you wish to change this you can configure the zarget over the `link-target` attribute. By default the target of a link is `_blank`. If you wish to change this you can configure the target with the `link-target` attribute.
## Styling ## Styling
The webcomponent uses a shadow dom and encapsulate the styles. So it will not use your sites default css styles but also not change any other styles in your site. There are two option to override the component default styles The webcomponent uses a [shadow dom](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM) and encapsulates the styles. So it will not use your sites default css styles but also not change any other styles in your site. There are two options to override the components default styles:
### Slots ### Slots
Slots provides the possibility to override some part of the webcomponent. The histhub-widget provides a `title` and a `defaut` slot. Slots provide the possibility to override some parts of the webcomponent. The histhub-widget provides a `title` and a `defaut` slot.
#### Heading (slot) #### Heading (slot)
You can change the Heading of the widget with the `title` slot. This slot will override the default title. In almost all examples we use this slot to change the title. If you override a slot your site css rules applies for this element. Example #6 changes the color of the heading You can change the heading of the widget with the `title` slot. This slot will override the default title. In almost all examples we use this slot to change the title. If you override a slot, your site css rules apply for this element. Example #6 changes the color of the heading
#### Credits #### Credits
You can change the `credits` in the corresponding slot. Please make sure you mention our work. In the example You can change the `credits` in the corresponding slot. Please make sure you mention our work. In the example #10 you can see how credits are added
#### Default Slot #### Default Slot
If you want to display some additional text beneath the links you can use the default slot. Just put the content inside the histhub-widget element. Example #7 adds additional information under the links If you want to display additional text beneath the links you can use the default slot. Just put the content inside the histhub-widget element. Example #7 adds additional information under the links
### Css Variables ### Css Variables
To change basic visual aspects of the component you can define css variables and override default settings. You have the following options to change the styles of the [shadow dom](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM). To change basic visual aspects of the component you can define css variables and override default settings. You have the following options to change the styles of the shadow dom.
```css ```css
:root { :root {
--histhub-h3-maring: 0 0 0 0.5rem; --histhub-h3-margin: 0 0 0 0.5rem;
--histhub-h3-color: #000; --histhub-h3-color: #000;
--histhub-h3-size: 120%; --histhub-h3-size: 120%;
/** ul element **/ /** ul element **/
...@@ -87,6 +87,6 @@ To change basic visual aspects of the component you can define css variables and ...@@ -87,6 +87,6 @@ To change basic visual aspects of the component you can define css variables and
} }
``` ```
### Provide a template ### Provide a template
You can provide your own template with your own styles. This will give you the power to modify every visual aspect of the webcomponent. You can define your own styles for the shadowdom and add or remove html elements. The example #8 uses a custom template. You can provide your own template with your own styles. This will give you the power to modify every visual aspect of the webcomponent. You can define your own styles for the shadow dom and add or remove html elements. The example #8 uses a custom template.
Markdown is supported
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