From dd8742a2e802fadaed1956cf0d2dfd9931b45e4e Mon Sep 17 00:00:00 2001 From: Ian Richardson Date: Wed, 16 Jan 2019 00:44:20 -0600 Subject: [PATCH 1/5] formatting --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 7ffcac8..2fd751c 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ This custom card can be tracked with the help of [custom-updater](https://github In your configuration.yaml -``` +```yaml custom_updater: card_urls: - https://raw.githubusercontent.com/ljmerza/calendar-card/master/custom_updater.json @@ -44,13 +44,13 @@ You should have setup Google calendar integration or Caldav integration in HomeA

Configuration

Go to your config directory and create a www folder. Inside the www run -``` +```bash git clone https://github.com/ljmerza/calendar-card.git ``` In your ui-lovelace.yaml -``` +```yaml resources: - url: https://unpkg.com/moment@2.23.0/moment.js type: js @@ -60,18 +60,18 @@ resources: Add the custom card to views: -``` +```yaml views: - type: custom:calendar-card - title: "My Calendar" - numberOfDays: 14 - entities: - - calendar.ljmerzagmailcom + title: "My Calendar" + numberOfDays: 14 + entities: + - calendar.ljmerzagmailcom ```

You want more than 5 Google events?

-``` +```bash mkdir /config/custom_components/calendar cd /config/custom_components/calendar wget https://raw.githubusercontent.com/home-assistant/home-assistant/dev/homeassistant/components/calendar/google.py From 342117b2625e2b4dd2d0dbccc49e2ba122ede320 Mon Sep 17 00:00:00 2001 From: Ian Richardson Date: Wed, 16 Jan 2019 00:49:52 -0600 Subject: [PATCH 2/5] make it more obvious that event is clickable --- calendar-card.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/calendar-card.js b/calendar-card.js index 8d02409..c5ccb6b 100644 --- a/calendar-card.js +++ b/calendar-card.js @@ -63,6 +63,7 @@ class CalendarCard extends HTMLElement { .day-wrapper .event-wrapper { margin-left: 10px; padding-top: 10px; + cursor: pointer; } .day-wrapper .event-wrapper:last-child { @@ -448,4 +449,4 @@ class CalendarEvent { /** * add card definition to hass */ -customElements.define('calendar-card', CalendarCard); \ No newline at end of file +customElements.define('calendar-card', CalendarCard); From d5a55ef3f8c1338a20acbda6988335c848400d30 Mon Sep 17 00:00:00 2001 From: Leonardo Merza Date: Sun, 20 Jan 2019 20:48:16 -0500 Subject: [PATCH 3/5] updated the next minor version --- README.md | 2 +- custom_updater.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2fd751c..84fb1c4 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ In your ui-lovelace.yaml resources: - url: https://unpkg.com/moment@2.23.0/moment.js type: js - - url: /local/calendar-card/calendar-card.js?v=1.2.2 + - url: /local/calendar-card/calendar-card.js?v=1.3.0 type: module ``` diff --git a/custom_updater.json b/custom_updater.json index 6f76a61..783c9bb 100644 --- a/custom_updater.json +++ b/custom_updater.json @@ -1,7 +1,7 @@ { "calendar-card": { - "updated_at": "2018-12-26", - "version": "1.2.2", + "updated_at": "2019-01-20", + "version": "1.3.0", "remote_location": "https://raw.githubusercontent.com/ljmerza/calendar-card/master/calendar-card.js", "visit_repo": "https://github.com/ljmerza/calendar-card", "changelog": "https://github.com/ljmerza/calendar-card/releases/latest" From 13e9c4ce99b2ef5315255394f7b38fd4c034f1c3 Mon Sep 17 00:00:00 2001 From: Squixx Date: Mon, 21 Jan 2019 22:21:20 +0100 Subject: [PATCH 4/5] fix some css leaking out in combination with animated weather card --- calendar-card.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/calendar-card.js b/calendar-card.js index c5ccb6b..a64d1f4 100644 --- a/calendar-card.js +++ b/calendar-card.js @@ -17,7 +17,7 @@ class CalendarCard extends HTMLElement { const card = document.createElement('ha-card'); card.header = this.config.title; this.content = document.createElement('div'); - this.content.style.padding = '0 16px 10px'; + this.content.className = 'calendar-card'; card.appendChild(this.content); this.appendChild(card); moment.locale(hass.language); @@ -29,6 +29,11 @@ class CalendarCard extends HTMLElement { // save css rules this.cssRules = `