Flexible plugin for Logseq that annotates deadline/schedule times with a countdown or time difference

Overview

Interval Hints

Synopsis

Configurable Logseq plugin to annotate deadline and scheduled times with a countdown or interval.

Features

  • Block renderer to add countdowns/elapsed time anywhere.
  • Configure adding hints for future and past events.
  • Hide hints below a minimum interval.
  • Can emphasize hints when the interval is short.
  • Can update hints when the schedule or deadline is changed.
  • Can update hints periodically.
  • Hints can be styled with CSS.

Installation

  1. (Recommended) Install from the plugin marketplace. Search for interval hints.
  2. Turn on developer mode in settings and load this repo as an "unpacked plugin" from the Logseq plugins page (t p).

Screenshots

Note: May not reflect all features/changes in the current version.

In use

Usage example screenshot

Settings

Settings example screenshot

Styles

To be used in custom.css which is editable from the Logseq settings (t s default bind).

When using complex styles it may be useful to use the no-default-styles option in the plugin settings and just use a modified version of the default style in custom.css.

Note: All classes listed start with lsp-interval-hints.

CSS Class Description
Container element for hints.
-future Applied to container when time is in the future.
-past Applied to container when time is in the past.
-short Applied to container when duration is considered short.
-renderer Applied to container for renderer hints.
-label Applied to child element for label (, , etc)
-d Applied to child element containing number of days.
-h As above, but for hours.
-m As above, but for minutes.
-s As above, but for seconds.

In addition to the above, the class hidden (without the lsp-interval-hints) prefix is used for hints that are hidden. Hints may be hidden if they are below the minimum duration or based on the show-future/show-past settings.

Default

.lsp-interval-hints { margin-left: 0.25em; padding-left: 0px; font-family: monospace; }

.lsp-interval-hints-future > .lsp-interval-hints-label::before { content: '⏳'; }
.lsp-interval-hints-future.lsp-interval-hints-short > .lsp-interval-hints-label::before { content: '⏰'; }
.lsp-interval-hints-past > .lsp-interval-hints-label::before { content: '⌛'; }

.lsp-interval-hints > * { color: var(--ls-secondary-text-color); }
.lsp-interval-hints > ::after ,
.lsp-interval-hints > ::before { color: var(--ls-page-inline-code-color); font-size: 0.8em; }
.lsp-interval-hints > :not(:last-child)::after ,
.lsp-interval-hints > :not(:last-child)::before { padding-right: .2em; }
.lsp-interval-hints-d::after { content: 'D'; }
.lsp-interval-hints-h::after { content: 'H'; }
.lsp-interval-hints-m::after { content: 'M'; }
.lsp-interval-hints-s::after { content: 'S'; }

Interval type position

Moves the interval type (hour, minutes, etc) before the number. This example also changes it to lowercase.

.lsp-interval-hints-d::after , .lsp-interval-hints-h::after ,
.lsp-interval-hints-m::after , .lsp-interval-hints-s::after { all: revert !important; }
.lsp-interval-hints-d::before { content: 'd' !important; }
.lsp-interval-hints-h::before { content: 'h' !important; }
.lsp-interval-hints-m::before { content: 'm' !important; }
.lsp-interval-hints-s::before { content: 's' !important; }

Bracket hint

Surrounds the hint with fancy brackets.

.lsp-interval-hints::before { content: '«'; padding-left: .5em; }
.lsp-interval-hints::after { content: '»'; }

Hide for done/cancelled

Hides hints for done or cancelled items. This only works for TODOs and not all scheduled/deadline items.

Note: May have a performance impact due to the complex CSS rules.

.ls-block[data-refs-self*='"done"'] .lsp-interval-hints ,
.ls-block[data-refs-self*='"cancelled"'] .lsp-interval-hints { display: none !important; }

Known issues/limitations

  1. May have date/time parsing issues if time elements generated by Logseq aren't in the expected format (2022-06-01 Wed 13:00:00). I don't know if the format can vary based on locale.
  2. Uses complex CSS rules for styling hints which may have a noticeable performance impact.

Credit

Initial inspiration was the logseq-deadline-countdown by xxchan.

For anyone that doesn't need the renderer, automatic updating or styling options this plugin provides and is looking for something lighter I would recommend considering logseq-deadline-countdown.

You might also like...

Strapi V4 Plugin to schedule publish and depublish actions

Strapi plugin scheduler This plugin allows you to publish and depublish collection types in the future. There are a couple of steps necessary to get t

Nov 24, 2022

A plugin for Strapi that provides the ability to easily schedule publishing and unpublishing of any content type

A plugin for Strapi that provides the ability to easily schedule publishing and unpublishing of any content type

strapi-plugin-publisher A plugin for Strapi that provides the ability to easily schedule publishing and unpublishing of any content type. Requirements

Dec 7, 2022

A small jQuery plugin for displaying Muslim Prayer Times

A small jQuery plugin for displaying Muslim Prayer Times

jquery-prayer-times A small jQuery plugin for displaying Muslim Prayer Times. Features! English/Arabic language support. Auto detect visitor location.

Oct 30, 2022

A Tempermonky / Greasemonkey plugin which can help you export your class schedule to the calendar on your phone / pad / PC / Mac.

A Tempermonky / Greasemonkey plugin which can help you export your class schedule to the calendar on your phone / pad / PC / Mac.

WHU Class Schedule Export as iCS Languages: English | 簡體中文 | 繁體中文 Changelog v0.90.1 - Sep 18, 2022 Fix bugs: Fix an error when a class have multiple s

Sep 7, 2022

2x times faster than chalk and use 5x less space in node_modules

2x times faster than chalk and use 5x less space in node_modules

Nano Colors A tiny and fast Node.js library for formatting terminal text with ANSI colors. It is 2 times faster than chalk. Both loading and calls. No

Dec 30, 2022

Ping.js is a small and simple Javascript library for the browser to "ping" response times to web servers in Javascript

Ping.js Ping.js is a small and simple Javascript library for the browser to "ping" response times to web servers in Javascript! This is useful for whe

Dec 27, 2022

Aergo Timer Service schedule smart contract function calls

Aergo Timer Service ⏰ Create timers to call functions on your smart contracts Schedule calls based on time interval or on specific date-times For a sm

Mar 10, 2022

A Bed and Breakfast dApp run on Ethereum. Includes a token + schedule system (Solidity) and full front-end (React + ethers.js) built with Hardhat.

A Bed and Breakfast dApp run on Ethereum. Includes a token + schedule system (Solidity) and full front-end (React + ethers.js) built with Hardhat.

Hotel ETH - Watch Demo Video Hotel ETH A (fictional) Bed-and-Breakfast run on Ethereum Come Book a Room on Kovan or Rinkeby Networks View the Demo » C

Aug 20, 2022

Personal project to a student schedule classes according his course level. Using GraphQL, Clean Code e Clean Architecture.

Personal project to a student schedule classes according his course level. Using GraphQL, Clean Code e Clean Architecture.

classes-scheduler-graphql This is a personal project for student scheduling, with classes according his course level. I intend to make just the backen

Jul 9, 2022
Comments
Releases(v0.0.4)
Owner
Kerfuffle
I like strawberry nicecream.
Kerfuffle
Projeto individual, um site para cobertura de partidas de vôlei, times onde você pode saber onde, quando acontecerá as partidas, e dados sobre os times.

?? Volleyball Esports Coverage Um portal de vôlei para as pessoas se conectarem ou divulgarem suas partidas, conhecimentos e uma maneira de conhecerem

PedroJsn 4 Jun 6, 2022
Logseq-craft-theme - Craft Theme for Logseq

Craft for Logseq Almost all creativity requires purposeful play. A Craft insprir

Alexander Rink 33 Oct 26, 2022
A simple extension that shows how many days a user has left until the date of the deadline

A simple extension that shows how many days a user has left until the date of the deadline

Mohamed Haddi 10 Nov 18, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
jQuery plugin of countdown on html-page

jQuery SyoTimer Plugin jQuery plugin of countdown on html page Demo Examples of usage jQuery SyoTimer Plugin Features Periodic counting with the speci

John 18 Nov 25, 2022
A jQuery plugin that creates a countdown timer in years, months, days, hours and seconds in the form a bunch of rotating 3d cubes

CountdownCube is a jQuery plugin that is in the form of a bunch of rotating 3D cubes. It uses CSS transitions to create the 3D rotating cube effects.

null 16 Mar 6, 2022
This project is a countdown system made with HTML, CSS and JavaScript, enjoy it! :)

This project is a countdown system that starts at 10 minutes made with HTML, CSS and JavaScript, enjoy it! ?? You can check the project working on thi

Daniel Burgoa 1 Dec 25, 2021
Apenas uma página que exibe um countdown com a data em que Bolsonaro sai da presidência e tem seu sigilo de 100 anos quebrado

Chá de revelação - Sigilo de 100 anos Descrição Apenas uma página que exibe um countdown com a data em que Bolsonaro sai da presidência e tem seu sigi

Mauricio Taffarel 9 Nov 6, 2022