Skip to content

Commit 6dbe19f

Browse files
authored
Merge pull request #19 from marksie1988/dev
v0.11.1
2 parents fcf3694 + cb32ed0 commit 6dbe19f

File tree

6 files changed

+17
-14
lines changed

6 files changed

+17
-14
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# atomic calendar card v0.10.1
1+
# atomic calendar card v0.11.1
22
This version works with HA v106
33

44
Advanced calendar card for Home Assistant with Lovelace.
@@ -68,7 +68,8 @@ If you have any suggestions about design or functionality, please let me know, o
6868
| showNoEventsForToday | boolean | optional | v0.8.6 | `false` Shows `No events for today` if no events, instead of omit the entry.
6969
| sortByStartTime | boolean | optional | v0.9.0 | `false` Sort events by start time first instead of grouping them by calendar.
7070
| disableEventLink | boolean | optional | v0.10.0 | `false` disables links in event title.
71-
| disableLocationLink | boolean | optional | v0.10.0 | `false` disables links in event location
71+
| disableLocationLink | boolean | optional | v0.10.0 | `false` disables links in event location.
72+
| linkTarget | string | optional | v0.11.0 | `_blank` Allows custom target for links, default will open new tab.
7273

7374
### Translations and language related settings
7475
Week / month names are translated automatically

app.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class AtomicCalendar extends LitElement {
3636
render() {
3737
if(this.firstrun){
3838
console.info(
39-
"%c atomic_calendar_revive %c v0.10.1 ",
39+
"%c atomic_calendar_revive %c v0.11.0 ",
4040
"color: white; background: coral; font-weight: 700;",
4141
"color: coral; background: white; font-weight: 700;"
4242
);
@@ -410,6 +410,8 @@ class AtomicCalendar extends LitElement {
410410
sortByStartTime: false, // sort first by calendar, then by time
411411
disableEventLink: false, // disables links to event calendar
412412
disableLocationLink: false, // disables links to event calendar
413+
linkTarget: '_blank', // Target for links, can use any HTML target type
414+
413415
// color and font settings
414416
dateColor: 'var(--primary-text-color)', // Date text color (left side)
415417
dateSize: 90, //Date text size (percent of standard text)
@@ -516,7 +518,7 @@ class AtomicCalendar extends LitElement {
516518
<div class="event-title" style="font-size: ${this.config.titleSize}%;color: ${titleColor}">${titletext}</div>
517519
`
518520
else return html `
519-
<a href="${event.Link}" style="text-decoration: none;" target="_blank">
521+
<a href="${event.link}" style="text-decoration: none;" target="${this.config.linkTarget}">
520522
<div class="event-title" style="font-size: ${this.config.titleSize}%;color: ${titleColor}">${titletext}</div></a>
521523
`
522524
}
@@ -564,7 +566,7 @@ class AtomicCalendar extends LitElement {
564566
<div><ha-icon class="event-location-icon" style="${this.config.locationIconColor}" icon="mdi:map-marker"></ha-icon>&nbsp;${event.address}</div>
565567
`
566568
else return html `
567-
<div><a href="https://maps.google.com/?q=${event.location}" target="_blank" class="location-link" style="color: ${this.config.locationLinkColor};font-size: ${this.config.locationTextSize}%;"><ha-icon class="event-location-icon" style="${this.config.locationIconColor}" icon="mdi:map-marker"></ha-icon>&nbsp;${event.address}</a></div>
569+
<div><a href="https://maps.google.com/?q=${event.location}" target="${this.config.linkTarget}" class="location-link" style="color: ${this.config.locationLinkColor};font-size: ${this.config.locationTextSize}%;"><ha-icon class="event-location-icon" style="${this.config.locationIconColor}" icon="mdi:map-marker"></ha-icon>&nbsp;${event.address}</a></div>
568570
`
569571
}
570572

@@ -890,7 +892,7 @@ class AtomicCalendar extends LitElement {
890892
<div class="calTitle">
891893
<paper-icon-button icon="mdi:chevron-left" @click='${e => this.handleMonthChange(-1)}' title="left"></paper-icon-button>
892894
<div style="display: inline-block; min-width: 9em; text-align: center;">
893-
<a href="https://calendar.google.com/calendar/r/month/${moment(this.selectedMonth).format('YYYY')}/${moment(this.selectedMonth).format('MM')}/1" style="text-decoration: none; color: ${this.config.titleColor}" target="_blank">
895+
<a href="https://calendar.google.com/calendar/r/month/${moment(this.selectedMonth).format('YYYY')}/${moment(this.selectedMonth).format('MM')}/1" style="text-decoration: none; color: ${this.config.titleColor}" target="${this.config.linkTarget}">
894896
${moment(this.selectedMonth).locale(this.language).format('MMMM')} ${moment(this.selectedMonth).format('YYYY')}
895897
</a>
896898
</div>

atomic_calendar.js

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "atomic-calendar",
3-
"version": "0.10.1",
3+
"version": "0.11.1",
44
"description": "Calendar Card for Home Assistant",
55
"main": "atomic_calendar.js",
66
"scripts": {

tracker.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"atomic-calendar": {
33
"updated_at": "2020-03-12",
4-
"version": "0.10.1",
4+
"version": "0.11.1",
55
"remote_location": "https://github.com/marksie1988/atomic_calendar/releases/latest/atomic-calendar.js",
66
"visit_repo": "https://github.com/marksie1988/atomic_calendar",
77
"changelog": "https://github.com/marksie1988/atomic_calendar/releases/latest"

0 commit comments

Comments
 (0)