Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type: custom:button-card
- name: |
- [[[
- const d = new Date();
- const day = d.toLocaleDateString("en-US", { weekday: "long" });
- const date = d.getDate();
- const month = d.toLocaleDateString("en-US", { month: "long" });
- function nth(n) {
- if (n > 3 && n < 21) return "th";
- switch (n % 10) {
- case 1: return "st";
- case 2: return "nd";
- case 3: return "rd";
- default: return "th";
- }
- }
- return `${day} ${date}${nth(date)} ${month}`;
- ]]]
- styles:
- grid:
- - grid-template-areas: '"n calendar" "list calendar"'
- grid-template-columns: 1fr 1fr
- grid-template-rows: auto
- align-content: start
- align-self: start
- justify-content: start
- justify-self: start
- column-gap: 20px
- card:
- - background-color: transparent
- border: solid 2px transparent
- height: 375px
- width: 628px
- padding: 15px 10px 10px 10px
- margin: 0px 0px 0px 0px
- name:
- - font-size: 18px
- font-weight: 600
- padding: 10px 15px 0px 15px
- align-self: start
- justify-self: start
- show_state: false
- show_name: true
- show_icon: false
- custom_fields:
- list:
- card:
- type: custom:button-card
- show_state: false
- show_name: true
- show_icon: false
- styles:
- grid:
- - grid-template-areas: >-
- "subheading_today""today_cal""subheading_tomorrow""tomorrow_cal""subheading_day_after""day_after_cal""subheading_day_after_day_after""day_after_day_after_cal""gap"
- card:
- - border-radius: 0px
- background-color: transparent
- padding: 0px 0px 0px 15px
- margin: 50px 0px 30px 0px
- overflow-y: auto
- height: 330px
- text-align: left
- custom_fields:
- today_cal:
- - margin: '-10px 0px 0px -15px'
- tomorrow_cal:
- - margin: '-10px 0px 0px -15px'
- day_after_cal:
- - margin: '-10px 0px 0px -15px'
- day_after_day_after_cal:
- - margin: '-10px 0px 0px -15px'
- custom_fields:
- subheading_today:
- card:
- type: custom:button-card
- show_name: true
- template: subheading_caps
- variables:
- var_name: TODAY
- today_cal:
- card:
- type: custom:today-card
- advance: 0
- time_format: h:mm a
- show_all_day_events: true
- show_past_events: true
- tap_action:
- action: none
- entities:
- - entity: calendar.family_2
- color: deep-orange
- - entity: calendar.email
- color: light-blue
- - entity: calendar.daycare
- color: amber
- - entity: calendar.geelong_cats
- color: navy
- - entity: calendar.babysitter
- color: red
- card_mod:
- style: |
- ha-card {
- background-color: transparent;
- padding: 0px;
- font-size: 15px;
- text-align: left !important;
- }
- subheading_tomorrow:
- card:
- type: custom:button-card
- show_name: true
- template: subheading_caps
- variables:
- var_name: TOMORROW
- tomorrow_cal:
- card:
- type: custom:today-card
- advance: 1
- time_format: h:mm a
- show_all_day_events: true
- show_past_events: true
- tap_action:
- action: none
- entities:
- - entity: calendar.family_2
- color: deep-orange
- - entity: calendar.email
- color: light-blue
- - entity: calendar.daycare
- color: amber
- - entity: calendar.geelong_cats
- color: navy
- - entity: calendar.babysitter
- color: red
- card_mod:
- style: |
- ha-card {
- background-color: transparent;
- padding: 0px;
- font-size: 15px;
- text-align: left !important;
- }
- subheading_day_after:
- card:
- type: custom:button-card
- show_name: true
- template: subheading_caps
- variables:
- var_name: |
- [[[
- let dayAfterTomorrow = new Date();
- dayAfterTomorrow.setDate(new Date().getDate() + 2);
- return dayAfterTomorrow.toLocaleDateString('en-US', { weekday: 'long' }).toUpperCase();
- ]]]
- day_after_cal:
- card:
- type: custom:today-card
- advance: 2
- time_format: h:mm a
- show_all_day_events: true
- show_past_events: true
- tap_action:
- action: none
- entities:
- - entity: calendar.family_2
- color: deep-orange
- - entity: calendar.email
- color: light-blue
- - entity: calendar.daycare
- color: amber
- - entity: calendar.geelong_cats
- color: navy
- - entity: calendar.babysitter
- color: red
- card_mod:
- style: |
- ha-card {
- background-color: transparent;
- padding: 0px;
- font-size: 15px;
- text-align: left !important;
- }
- day_after_day_after_cal:
- card:
- type: custom:today-card
- advance: 3
- time_format: h:mm a
- show_all_day_events: true
- show_past_events: true
- tap_action:
- action: none
- entities:
- - entity: calendar.family_2
- color: deep-orange
- - entity: calendar.email
- color: light-blue
- - entity: calendar.daycare
- color: amber
- - entity: calendar.geelong_cats
- color: navy
- - entity: calendar.babysitter
- color: red
- card_mod:
- style: |
- ha-card {
- background-color: transparent;
- padding: 0px;
- font-size: 15px;
- text-align: left !important;
- }
- subheading_day_after_day_after:
- card:
- type: custom:button-card
- show_name: true
- template: subheading_caps
- variables:
- var_name: |
- [[[
- let twoDaysAfterTomorrow = new Date();
- twoDaysAfterTomorrow.setDate(new Date().getDate() + 3);
- return twoDaysAfterTomorrow.toLocaleDateString('en-US', { weekday: 'long' }).toUpperCase();
- ]]]
- gap:
- card:
- type: custom:gap-card
- height: 20
- calendar:
- card:
- type: custom:button-card
- show_name: false
- show_icon: false
- show_state: false
- styles:
- grid:
- - grid-template-areas: '"cal"'
- align-content: start
- align-self: start
- justify-content: start
- justify-self: start
- align-items: start
- card:
- - background: >-
- linear-gradient(180deg, rgba(255,255,255, 0.0) 20%,
- rgba(255,255,255, 0.1) 100%);
- width: 315px
- height: 420px
- margin: '-30px -15px 0px 0px'
- padding: 0px 10px 0px 25px
- align-content: start
- align-self: start
- justify-content: start
- justify-self: start
- align-items: start
- overflow-y: auto
- custom_fields:
- cal:
- - align-content: start
- align-self: start
- justify-content: start
- justify-self: start
- align-items: start
- background-color: transparent
- width: 350px
- margin: 0px 0px 0px -10px
- custom_fields:
- cal:
- card:
- type: custom:atomic-calendar-revive
- enableModeChange: true
- entities:
- - entity: calendar.email
- name: Family
- - entity: calendar.babysitter
- name: Babysitter
- - entity: calendar.daycare
- name: Daycare
- - entity: calendar.family
- name: Family
- - entity: calendar.geelong_cats
- name: Geelong Cats
- defaultMode: Calendar
- showAllDayEvents: false
- showMultiDay: false
- hideDuplicates: true
- showDate: false
- card_mod:
- style: |
- ha-card {
- text-align: left;
- align-content: start;
- justify-content: start;
- align-self: start;
- background-color: transparent;
- margin: 0px 0px 0px 0px !important;
- padding-left: 0px !important;
- line-height: 1.15em;
- letter-spacing: 0.01em;
- height: 375px;
- overflow-y: auto !important;
- }
- th.cal {
- text-align: center;
- background: transparent
- }
- .daywrap {
- color: transparent;
- border-top: 5px !important;
- }
- .event-left {
- padding: 10px 5px 5px 20px;
- margin-right: 10px !important;
- }
- .event-title {
- font-weight: bold;
- font-size: 12px;
- }
- .event-right {
- padding: 10px 10px 5px 0px !important;
- }
- .calDay {
- font-size: 5px;
- height: 20px;
- margin: 0px 0px 0px 0px
- }
- .cal-card {
- background-color: transparent;
- height: 20px;
- }
- .date {
- border: none !important;
- }
- .next {
- border: none !important;
- }
- .prev {
- border: none !important;
- }
- .calTitleContainer {
- margin-left: -10px !important;
- padding-bottom: 20px !important;
- }
- td.cal {
- border: 0px transparent !important;
- background-color: transparent !important;
- height: 50% !important;
- }
- .calIcon {
- display: none !important;
- --mdc-icon-size: 0px;
- }
- .mdc-icon-button {
- display: none;
- }
- .calTableContainer {
- border: transparent;
- }
- .location-link {
- display: none;
- }
- .hours {
- --time-size: 12px !important;
- --time-color: white !important;
- }
- card_mod:
- style: |
- :host {
- display: block;
- position: relative; margin: 0px 6px 0px 0px;
- }
- :host::before {
- content: "";
- position: absolute;
- inset: 0;
- border-radius: 30px;
- -webkit-backdrop-filter: blur(50px);
- z-index: -1;
- padding: .1rem;
- background: linear-gradient(60deg,
- rgba(255,255,255,0.0) 0%,
- rgba(255,255,255,0.2) 49%,
- rgba(255,255,255,0.2) 51%,
- rgba(255,255,255,0.0) 100%);
- -webkit-mask:
- linear-gradient(#fff 0 0) content-box,
- linear-gradient(#fff 0 0);
- -webkit-mask-composite: xor;
- mask-composite: exclude;
- z-index: 0; filter: saturate(140%);
- }
- :host::after {
- content: "";
- background: linear-gradient(180deg, rgba(255,255,255, 0.1) 20%, rgba(255,255,255, 0.0) 100%);
- position: absolute;
- inset: 0;
- border-radius: 30px;
- box-shadow: inset -8px 10px 15px rgba(0, 0, 0, 0.1);
- z-index: -1;
- -webkit-backdrop-filter:blur(30px) saturate(110%) brightness(90%);
- filter: drop-shadow(3px 3px 10px rgba(0, 0, 0, 0.2)); }
Advertisement
Add Comment
Please, Sign In to add comment