Fix issues with latest doc addition. Add Google Analytics, sitemap, anchors
This commit is contained in:
parent
f693b1c8f8
commit
824f9e1371
@ -1,44 +1,40 @@
|
|||||||
# Add Logo to the Viewer
|
# Add a Logo to the Viewer
|
||||||
|
|
||||||
|
The OHIF Framework provides [**ohif-header**](https://github.com/OHIF/Viewers/tree/master/Packages/ohif-header) package to add a header into application layout. **ohif-header** package is designed as a [custom block helper](http://blazejs.org/api/spacebars.html#Custom-Block-Helpers) named **header** to define your own header context.
|
||||||
The OHIF Framework provides **[ohif-header](https://github.com/OHIF/Viewers/tree/master/Packages/ohif-header)** package to add a header into application layout. **ohif-header** package is designed as a [custom block helper](http://blazejs.org/api/spacebars.html#Custom-Block-Helpers) named **header** to define your own header context.
|
|
||||||
|
|
||||||
If you would like to add SVG logo to header please follow these steps.
|
If you would like to add SVG logo to header please follow these steps.
|
||||||
|
|
||||||
1. Add your SVG logo into public folder.
|
1. Add your SVG logo into public folder.
|
||||||
|
|
||||||
2. Add **header** content block which will be located on the top of the application layout into your application's main template. You can also pass some parameters to **header** content block to customize the header.
|
2. Add **header** content block which will be located on the top of the application layout into your application's main template. You can also pass some parameters to **header** content block to customize the header.
|
||||||
|
|
||||||
* headerClasses: the list of classes which will be applied to header element
|
* headerClasses: the list of classes which will be applied to header element
|
||||||
* brandHref: the url of the logo to link
|
* brandHref: the url of the logo to link
|
||||||
|
|
||||||
```
|
|
||||||
{{#header headerClasses="header-big bg-blue" brandHref="your logo link"}}
|
|
||||||
|
|
||||||
....
|
|
||||||
|
|
||||||
{{/header}}
|
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
|
``` html
|
||||||
|
{{#header headerClasses="header-big bg-blue" brandHref="your logo link"}}
|
||||||
|
...
|
||||||
|
{{/header}}
|
||||||
```
|
```
|
||||||
|
{% endraw %}
|
||||||
|
|
||||||
3. Create a section called as **brand** in **header** content block and add your logo content which is displayed on the left side of the header as default into section **brand**.
|
3. Create a section called as **brand** in **header** content block and add your logo content which is displayed on the left side of the header as default into section **brand**.
|
||||||
```
|
|
||||||
|
{% raw %}
|
||||||
|
``` html
|
||||||
{{#header}}
|
{{#header}}
|
||||||
{{#section 'brand'}}
|
{{#section "brand"}}
|
||||||
....
|
|
||||||
|
|
||||||
<!-- Add logo image -->
|
<!-- Add logo image -->
|
||||||
<svg>
|
<svg>
|
||||||
<use xlink:href="/yourLogo.svg"}}></use>
|
<use xlink:href="/yourLogo.svg"}}></use>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
||||||
<!-- Add logo text -->
|
<!-- Add logo text -->
|
||||||
<div>Logo Text</div>
|
<div>Logo Text</div>
|
||||||
|
|
||||||
....
|
|
||||||
{{/section}}
|
{{/section}}
|
||||||
{{/header}}
|
{{/header}}
|
||||||
```
|
```
|
||||||
|
{% endraw %}
|
||||||
For example, see how it works in [OHIF Viewer](https://github.com/OHIF/Viewers/blob/master/OHIFViewer/client/components/ohifViewer/ohifViewer.html#L2)
|
|
||||||
|
For example, see how it works in [OHIF Viewer](https://github.com/OHIF/Viewers/blob/master/OHIFViewer/client/components/ohifViewer/ohifViewer.html#L2)
|
||||||
@ -27,7 +27,7 @@
|
|||||||
- [Security](deployment/security.md)
|
- [Security](deployment/security.md)
|
||||||
- I Want To...
|
- I Want To...
|
||||||
- [Add a Tool to the Viewer](I-want-to/add-a-tool-to-the-viewer.md)
|
- [Add a Tool to the Viewer](I-want-to/add-a-tool-to-the-viewer.md)
|
||||||
- [Add Logo to the Viewer](I-want-to/add-logo-to-the-viewer.md)
|
- [Add a Logo to the Viewer](I-want-to/add-a-logo-to-the-viewer.md)
|
||||||
----
|
----
|
||||||
|
|
||||||
- Example Applications
|
- Example Applications
|
||||||
|
|||||||
@ -1,11 +1,15 @@
|
|||||||
{
|
{
|
||||||
"title": "OHIF",
|
"title": "OHIF",
|
||||||
|
"description": "Documentation for the OHIF framework",
|
||||||
"gitbook": ">3.0.0",
|
"gitbook": ">3.0.0",
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"edit-link",
|
"edit-link",
|
||||||
"theme-cornerstone",
|
"theme-cornerstone",
|
||||||
"-fontsettings",
|
"-fontsettings",
|
||||||
"github"
|
"github",
|
||||||
|
"ga",
|
||||||
|
"sitemap",
|
||||||
|
"anchors"
|
||||||
],
|
],
|
||||||
"pluginsConfig": {
|
"pluginsConfig": {
|
||||||
"edit-link": {
|
"edit-link": {
|
||||||
@ -14,6 +18,12 @@
|
|||||||
},
|
},
|
||||||
"github": {
|
"github": {
|
||||||
"url": "https://github.com/OHIF/Viewers"
|
"url": "https://github.com/OHIF/Viewers"
|
||||||
|
},
|
||||||
|
"ga": {
|
||||||
|
"token": "UA-110573590-2"
|
||||||
|
},
|
||||||
|
"sitemap": {
|
||||||
|
"hostname": "https://docs.ohif.org"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"links": {
|
"links": {
|
||||||
|
|||||||
@ -33,6 +33,8 @@
|
|||||||
"homepage": "https://github.com/OHIF/Viewers#readme",
|
"homepage": "https://github.com/OHIF/Viewers#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"gitbook-plugin-edit-link": "^2.0.2",
|
"gitbook-plugin-edit-link": "^2.0.2",
|
||||||
"gitbook-plugin-github": "^3.0.0"
|
"gitbook-plugin-github": "^3.0.0",
|
||||||
|
"gitbook-plugin-ga": "^2.0.0",
|
||||||
|
"gitbook-plugin-sitemap": "^1.2.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user