Skip to content

Commit

Permalink
docs(README): update readme regarding custom layouts section
Browse files Browse the repository at this point in the history
  • Loading branch information
tinesoft committed May 1, 2019
1 parent dc847e8 commit b771bd2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,10 @@ So if your are not happy with the default appearance of the cookie bar, you can
Here is a example of a **custom layout**, that is inspired from the default 'basic' layout , but simply changes the message and links that are displayed in the bar.
<p align="center">
<img style="text-align: center;" src="https://cdn.rawgit.com/tinesoft/ngx-cookieconsent/master/demo/src/assets/custom-cookie-bar.png">
</p>
```ts
import {NgcCookieConsentModule, NgcCookieConsentConfig} from 'ngx-cookieconsent';

Expand All @@ -298,10 +302,10 @@ const cookieConfig:NgcCookieConsentConfig = {
type: 'opt-out',
layout: 'my-custom-layout',
layouts: {
"my-custom-layout": '{{messageLink}}{{compliance}}'
"my-custom-layout": '{{messagelink}}{{compliance}}'
},
elements:{
messageLink: `
messagelink: `
<span id="cookieconsent:desc" class="cc-message">{{message}}
<a aria-label="learn more about cookies" tabindex="0" class="cc-link" href="{{cookiePolicyHref}}" target="_blank">{{cookiePolicyLink}}</a>,
<a aria-label="learn more about our privacy policy" tabindex="1" class="cc-link" href="{{privacyPolicyHref}}" target="_blank">{{privacyPolicyLink}}</a> and our
Expand Down
Binary file added demo/src/assets/custom-cookie-bar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b771bd2

Please sign in to comment.