@@ -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 > ${ 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 > ${ 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 > ${ 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 >
0 commit comments