Skip to content

Commit

Permalink
Merge pull request #8 from tamas-czirjak-epam/patch-1
Browse files Browse the repository at this point in the history
Convert title into URL if exists
  • Loading branch information
PiotrMachowski authored Oct 21, 2020
2 parents c8bf55f + 701c76b commit d979a43
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions dist/google-keep-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ class GoogleKeepCard extends LitElement {
font-size: 120%;
color: ${this.getTextColor()};
}
p.noteTitle > a, p.noteTitle > a:visited, p.noteTitle > a:link {
color: ${this.getTextColor()};
}
p.noteBody {
margin: -3px;
}
Expand Down Expand Up @@ -150,7 +153,7 @@ class GoogleKeepCard extends LitElement {
renderTextNote(note) {
return html`
<div class="noteBackground" style="background:${this.getColor(note['color'])};">
<p class="noteTitle">${note['title']}</p>
<p class="noteTitle">${(typeof note['url']!= "undefined") ? html`<a target="_blank" href="${note['url']}">${note['title']}</a>` : html`${note['title']}` }</p>
<p class="noteBody">${note['lines'].map(line => this.renderLine(line))}</p>
</div>`
}
Expand All @@ -161,7 +164,7 @@ class GoogleKeepCard extends LitElement {
const showChecked = note['checked'].length && show.includes('checked');
return html`
<div class="noteBackground" style="background:${this.getColor(note['color'])};">
<p class="noteTitle">${note['title']}</p>
<p class="noteTitle">${(typeof note['url']!= "undefined") ? html`<a target="_blank" href="${note['url']}">${note['title']}</a>` : html`${note['title']}` }</p>
${showUnchecked ? this.renderUncheckedList(note) : html``}
${showUnchecked && showChecked ? html`<hr>` : html``}
${showChecked ? this.renderCheckedList(note) : html``}
Expand Down

0 comments on commit d979a43

Please sign in to comment.