Skip to content

Commit

Permalink
Merge pull request #19 from marksie1988/dev
Browse files Browse the repository at this point in the history
v0.11.1
  • Loading branch information
marksie1988 authored Mar 12, 2020
2 parents fcf3694 + cb32ed0 commit 6dbe19f
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 14 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# atomic calendar card v0.10.1
# atomic calendar card v0.11.1
This version works with HA v106

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

### Translations and language related settings
Week / month names are translated automatically
Expand Down
10 changes: 6 additions & 4 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class AtomicCalendar extends LitElement {
render() {
if(this.firstrun){
console.info(
"%c atomic_calendar_revive %c v0.10.1 ",
"%c atomic_calendar_revive %c v0.11.0 ",
"color: white; background: coral; font-weight: 700;",
"color: coral; background: white; font-weight: 700;"
);
Expand Down Expand Up @@ -410,6 +410,8 @@ class AtomicCalendar extends LitElement {
sortByStartTime: false, // sort first by calendar, then by time
disableEventLink: false, // disables links to event calendar
disableLocationLink: false, // disables links to event calendar
linkTarget: '_blank', // Target for links, can use any HTML target type

// color and font settings
dateColor: 'var(--primary-text-color)', // Date text color (left side)
dateSize: 90, //Date text size (percent of standard text)
Expand Down Expand Up @@ -516,7 +518,7 @@ class AtomicCalendar extends LitElement {
<div class="event-title" style="font-size: ${this.config.titleSize}%;color: ${titleColor}">${titletext}</div>
`
else return html `
<a href="${event.Link}" style="text-decoration: none;" target="_blank">
<a href="${event.link}" style="text-decoration: none;" target="${this.config.linkTarget}">
<div class="event-title" style="font-size: ${this.config.titleSize}%;color: ${titleColor}">${titletext}</div></a>
`
}
Expand Down Expand Up @@ -564,7 +566,7 @@ class AtomicCalendar extends LitElement {
<div><ha-icon class="event-location-icon" style="${this.config.locationIconColor}" icon="mdi:map-marker"></ha-icon>&nbsp;${event.address}</div>
`
else return html `
<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>
<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>
`
}

Expand Down Expand Up @@ -890,7 +892,7 @@ class AtomicCalendar extends LitElement {
<div class="calTitle">
<paper-icon-button icon="mdi:chevron-left" @click='${e => this.handleMonthChange(-1)}' title="left"></paper-icon-button>
<div style="display: inline-block; min-width: 9em; text-align: center;">
<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">
<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}">
${moment(this.selectedMonth).locale(this.language).format('MMMM')} ${moment(this.selectedMonth).format('YYYY')}
</a>
</div>
Expand Down
10 changes: 5 additions & 5 deletions atomic_calendar.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "atomic-calendar",
"version": "0.10.1",
"version": "0.11.1",
"description": "Calendar Card for Home Assistant",
"main": "atomic_calendar.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion tracker.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"atomic-calendar": {
"updated_at": "2020-03-12",
"version": "0.10.1",
"version": "0.11.1",
"remote_location": "https://github.com/marksie1988/atomic_calendar/releases/latest/atomic-calendar.js",
"visit_repo": "https://github.com/marksie1988/atomic_calendar",
"changelog": "https://github.com/marksie1988/atomic_calendar/releases/latest"
Expand Down

0 comments on commit 6dbe19f

Please sign in to comment.