Skip to content

Commit

Permalink
Merge pull request #77 from marksie1988/dev
Browse files Browse the repository at this point in the history
v1.3.0
  • Loading branch information
marksie1988 committed May 5, 2020
2 parents ae4cd15 + 89e6da8 commit aeddfd3
Show file tree
Hide file tree
Showing 33 changed files with 794 additions and 465 deletions.
15 changes: 15 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM node:latest

RUN apt update

RUN apt upgrade -y

RUN apt install zsh -y

RUN wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O - | zsh || true

COPY package*.json ./

RUN npm install

CMD ["zsh"]
21 changes: 21 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "Atomic Calendar Revive",
"dockerFile": "Dockerfile",
"context": "..",
"workspaceFolder": "/workspace",
"workspaceMount": "type=bind,source=/home/${env:USERNAME}/repos/atomic-calendar-revive,target=/workspace",
"extensions": [
"github.vscode-pull-request-github",
"esbenp.prettier-vscode",
"yzhang.markdown-all-in-one"
],
"settings": {
"files.eol": "\n",
"editor.tabSize": 2,
"terminal.integrated.shell.linux": "/bin/zsh",
"editor.formatOnPaste": false,
"editor.formatOnSave": true,
"editor.formatOnType": true,
"files.trimTrailingWhitespace": true
}
}
304 changes: 29 additions & 275 deletions README.md

Large diffs are not rendered by default.

50 changes: 19 additions & 31 deletions dist/atomic-calendar-revive.js

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions docs/404.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
layout: default
title: Page not found
permalink: /404.html
nav_exclude: true
search_exclude: true
---

<h1 id="404-page-not-found">404</h1>

<p><strong>Page not found</strong></p>
16 changes: 16 additions & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
remote_theme: pmarsceill/just-the-docs

title: Atomic Calendar Revive
description: A Home Assistant Plugin to add a nice calendar view

# Specific to this theme
search_enabled: true
search_tokenizer_separator: /[\s/]+/
ga_tracking: UA-149869416-2
heading_anchors: true
color_scheme: "dark"
footer_content: "Copyright &copy; 2017-2020 Steven Marks. Distributed by an <a href=\"https://github.com/marksie1988/atomic-calendar-revive/tree/master/LICENSE.md\">MIT license.</a>"
# Aux links for the upper right navigation
aux_links:
"Atomic Calendar Revive on GitHub":
- "//github.com/marksie1988/atomic-calendar-revive"
46 changes: 46 additions & 0 deletions docs/about.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
layout: default
title: About
nav_order: 4
---

Atomic Calendar Revive is an updated version of the card originally created by atomic7777.

This calendar card includes advanced settings that allow much more flexibility than other cards.

It loads calendar events from Home Assistant - Google calendar component.

It contains two types of views: `Events mode` and `Calendar mode`. You can switch or select the default one.

New features that are only in Revive:
- Added more appealing UI Look
- Added the ability to display calendar names
- Added keyword whitelists
- Added linkTarget option to allow selecting specific action when clicking link
- Added ability to disable Event and Location Links
- Added first version of Lovelace UI Editor (not all options are in yet)
- Merged PR that: Hides finished events, sorts events by start time, shows currently running events. allows limiting total number of events
- Resolved issue with 106 showing error: `Cannot assign to read only property '0' of object '[object Array]'`
- Multiple Bug Fixes

The most important features:
- No need to load external libraries (everything is included)
- Custom colors and settings for different calendars, custom font sizes, colors of every text and line
- All translations included, few of the words can be configured in settings
- Compatible with all day and multiple day events
- Fast switch between both modes, or make one of them default

* Event mode:
- Shows nearest events, one by one, day by day, time of events in a different way (dates, hours)
- Moves today's completed events up and dim them
- Highlights the next event, or show a progress bar
- Shows event location link
- Clicking on the event title will open a new window with Google Calendar (can be disabled)
- Clicking on Location will open a window with this location on Google Maps (can be disabled)

* Calendar mode:
- Show a traditional calendar (a table with 42 days) with configurable events icons like holiday, birthday
- Quick overview of the following months
- You can set keywords to show only important things, like birthday

If you have any suggestions about design or functionality, please let me know by opening an issue
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions docs/assets/search-data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
---
{
{% assign comma = false %}
{% for page in site.html_pages %}{% if page.search_exclude != true %}{% if comma == true%},{% endif %}"{{ forloop.index0 }}": {
"title": "{{ page.title | replace: '&amp;', '&' }}",
"content": "{{ page.content | markdownify | replace: '</h', ' . </h' | replace: '<hr', ' . <hr' | replace: '</p', ' . </p' | replace: '</ul', ' . </ul' | replace: '</tr', ' . </tr' | replace: '</li', ' | </li' | replace: '</td', ' | </td' | strip_html | escape_once | remove: 'Table of contents' | remove: '```' | remove: '---' | replace: '\', ' ' | replace: ' . . . ', ' . ' | replace: ' . . ', ' . ' | normalize_whitespace }}",
"url": "{{ page.url | absolute_url }}",
"relUrl": "{{ page.url }}"
}{% assign comma = true %}
{% endif %}{% endfor %}
}
39 changes: 39 additions & 0 deletions docs/config/advanced_config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
layout: default
title: Advanced Config
parent: Config Examples
nav_order: 3
---
# Advanced Config

## Advanced config with all options, colors changed and progress bar enabled:

```yaml
- type: "custom:atomic-calendar-revive"
name: "Calendar"
entities:
- entity: calendar.YOUR_CALENDARS_HERE
fullDayEventText: 'All day'
untilText: 'Until'
showColors: true
maxDaysToShow: 7
showLocation: true
showMonth: false
showCurrentEventLine: false
dateColor: black
dateSize: 90
timeColor: blue
timeSize: 90
titleColor: black
titleSize: 100
locationIconColor: 'rgb(230, 124, 115)'
locationLinkColor: black
locationTextSize: 90
dimFinishedEvents: true
finishedEventOpacity: 0.6
finishedEventFilter: 'grayscale(100%)'
dayWrapperLineColor: black
eventBarColor: blue
showProgressBar: true
progressBarColor: blue
```
65 changes: 65 additions & 0 deletions docs/config/basic_config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
layout: default
title: Basic Config
parent: Config Examples
nav_order: 1
---

# Basic Configuration

This example is the most basic implementation, it will just show you a list of events
```yaml
- type: "custom:atomic-calendar-revive"
entities:
- entity: calendar.YOUR_CALENDAR_HERE
```

![screenshot](../assets/img/screenshots/basic_config_example.png)


## With Name

```yaml
- type: "custom:atomic-calendar-revive"
name: "My Calendar"
entities:
- entity: calendar.YOUR_CALENDAR_HERE
```

![screenshot](../assets/img/screenshots/basic_config_name_example.png)

## With Calendar Mode Enabled

```yaml
- type: "custom:atomic-calendar-revive"
name: "My Calendar"
entities:
- entity: calendar.YOUR_CALENDAR_HERE
type: icon1
- entity: calendar.YOUR_CALENDAR1_HERE
type: icon2
- entity: calendar.YOUR_CALENDAR2_HERE
type: holiday
enableModeChange: true

```

![screenshot](../assets/img/screenshots/basic_config_calendar_example.png)


### With both Events mode and Calendar mode, calendar is default:
```yaml
- type: "custom:atomic-calendar-revive"
name: "Calendar"
enableModeChange: true
defaultMode: 2
CalEventIcon1Filter: birthday
CalEventIcon2Filter: waste,bills
entities:
- entity: calendar.YOUR_CALENDAR_HERE
type: icon2
- entity: calendar.YOUR_CALENDAR1_HERE
type: icon1,icon2
- entity: calendar.YOUR_CALENDAR2_HERE
type: holiday
```
47 changes: 47 additions & 0 deletions docs/config/calendar_mode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
layout: default
title: Calendar Mode
parent: Config Examples
nav_order: 2
---

# Calendar Mode

The second mode of view - calendar mode - Shows the full month calendar with simple events icons or colors, for the most important, infrequent events, like holiday or birthday.
You can change the mode by clicking the card name, or even make it the default view.
To make it work correctly you need to get more events than default 5 - you need to follow instruction [here](https://marksie1988.github.io/atomic-calendar-revive/quickstart.html#more-than-5) for this, and setup it for 20-30 events at least.

There are four configurable possibilities for showing events occurring any day:
- day number color - for example "14" will be red for Valentine's Day
- Icon1 - will show any mdi icon under date, like birthday (default: gift icon)
- Icon2 - like above, just any other type of event (default: home icon)
- Icon3 - like above (default: star icon)

If you want to use any calendar's events, you have to add one or more of types:

```yaml
CalEventIcon1Filter: bills,waste # only events with those words will be shown
CalEventIcon2Filter: cleaning # only events with those words will be shown
entities:
- entity: calendar.YOUR_CALENDAR_HERE # no type, it won't be shown in calendar mode
- type: holiday # events from this calendar will be red
entity: calendar.YOUR_CALENDAR1_HERE
- type: icon1,icon2 # will show icon1 and icon2, but with filters configured above
entity: calendar.home_events
- type: icon3 # icon1 has no filters, show all events from this calendar
entity: calendar.birthday
```
```yaml
entities:
- entity: calendar.YOUR_CALENDAR_HERE
type: holiday # events from this calendar will be red
- entity: calendar.YOUR_CALENDAR1_HERE
type: icon2,icon3 # will show icon2 and icon3, but with filters configured below
- entity: calendar.birthday
type: icon1 # Icon1 has no filters, show all events from this calendar
- entity: calendar.YOUR_CALENDAR2_HERE # no type, it won't be shown in calendar mode
CalEventIcon1Filter: bills,waste # only events with those words will be shown
CalEventIcon2Filter: cleaning # only events with those words will be shown
```

If you set filters (keywords) for any type, it will show an icon only when event summary contains one of keywords. If you don't set any filter, it will show icons for all days with any events.
6 changes: 6 additions & 0 deletions docs/config/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
layout: default
title: Config Examples
nav_order: 2
has_children: true
---
38 changes: 38 additions & 0 deletions docs/development/devcontainer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
layout: default
title: Dev Container
parent: Development
nav_order: 4
---

# Devcontainer

The easiest way to contribute is to spin up a devcontainer with Visual Studio Code (VS Code). It has all the tools that you require included and doesn't interfere with your system.

## Requirements

- Docker
- VS Code
- Remove - Containers (VS Code extension)

# Fork the Repo

* Fork the Atomic Calendar Repo
* Clone the repository to your computer
* Open the repository in VS Code

When you open this repository with VS code you are asked to "Reopen in Container". This will start the build of the container.

---

NOTE:
If you don't see the notification, open the command pallet and select `Remote-Containers: Open Folder in Container`

---

---

NOTE:
This devcontainer is configured to work with a remote docker server, if you need a local dockerserver you will need to modify the file `.devcontainer\devcontainer.json`

---
13 changes: 13 additions & 0 deletions docs/development/getting-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
layout: default
title: Getting Started
parent: Development
nav_order: 4
---

# Getting Started

Any contribution towards the development of this plugin is greatly appreviated.

Currently there is only myself on this project as a main contributor,
so development can take a while sometimes.
6 changes: 6 additions & 0 deletions docs/development/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
layout: default
title: Development
nav_order: 2
has_children: true
---
21 changes: 21 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
layout: default
title: Index
nav_exclude: true
---

# Atomic Calendar Revive

An advanced calendar card for Home Assistant with Lovelace.

## What Can You Find Around Here

- Check out the [Quick Start Guide](https://marksie1988.github.io/atomic-calendar-revive/quickstart.html) to get up and running.
- All of the possible configurable options for the plugin
- Any known issues are listed with the [bug label](https://github.com/marksie1988/PyArr/issues?q=is%3Aissue+is%3Aopen+label%3Abug).

## Contributions & Support

Contributions & Support is welcomed.

[![coffee](https://www.buymeacoffee.com/assets/img/custom_images/black_img.png)](https://www.buymeacoffee.com/marksie1988)
23 changes: 23 additions & 0 deletions docs/options/calendar-mode-options.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
layout: default
title: Calendar Mode Options
parent: Configuration Options
nav_order: 4
---

| Name | Type | Since | Description |
|------|:----:|:-----:|-------------|
| enableModeChange | boolean | v0.7.0 | `false` Set true to enable mode change (Calendar/Events) must have "name" set to toggle
| defaultMode | integer | v0.7.0 | `1` Set `1` to make Events default mode, set `2` to make Calendar mode default
| firstDayOfWeek | integer | v0.7.0 | `1` First day of week, default 1 for Monday
| CalEventHolidayColor | string | v0.7.0 | `red` Color of day for `type: holiday` calendar
| CalEventIcon1 | string | v0.7.0 | `mdi:gift` Icon for `type: icon1` calendar
| CalEventIcon1Color | string | v0.7.0 | `default` Color of icon for `type: icon1` calendar
| CalEventIcon1Filter | string | v0.7.0 | `null` List of comma separated keywords
| CalEventIcon2 | string | v0.7.0 | `mdi:home` Icon for `type: icon2` calendar
| CalEventIcon2Color | string | v0.7.0 | `default` Color of icon for `type: icon2` calendar
| CalEventIcon2Filter | string | v0.7.0 | `null` List of comma separated keywords
| CalEventIcon3 | string | v0.7.0 | `mdi:star` Icon for `type: icon3` calendar
| CalEventIcon3Color | string | v0.7.0 | `default` Color of icon for `type: icon3` calendar
| CalEventIcon3Filter | string | v0.7.0 | `null` List of comma separated keywords
| showLastCalendarWeek | boolean | v0.7.5 | `false` If true it will always show 6 lines. If false, the 6th line won't be displayed if not needed.

0 comments on commit aeddfd3

Please sign in to comment.