Skip to content

Instantly share code, notes, and snippets.

@uroybd
Created June 15, 2026 19:59
Show Gist options
  • Select an option

  • Save uroybd/751d459a3462bbe31dedadeee9753b1e to your computer and use it in GitHub Desktop.

Select an option

Save uroybd/751d459a3462bbe31dedadeee9753b1e to your computer and use it in GitHub Desktop.
NeoReader Rich Annotations
.callout[data-callout="stylish"] {
--callout-color: var(--color-purple-rgb);
--callout-icon: lucide-brush;
}
.callout[data-callout="sceptic"] {
--callout-color: 107, 142, 35;
--callout-icon: lucide-message-circle-question;
}
.callout[data-callout="quote-with-source"] {
display: flex;
flex-direction: column;
--callout-color: var(--bg1);
--callout-icon: lucide-minus;
}
.callout[data-callout="quote-with-source"] .callout-title {
order: 2;
display: flex;
flex-direction: row;
justify-content: flex-end;
}
title {{ book.title }}
aliases
Notes from {{ book.title }}
author {{ book.authors }}
totalPages
{"book.totalPages" => nil}
totalAnnotations
{"annotations | length" => nil}
bookFormat {{ book.format }}
exportedAt {{ book.exportedAt | date('dd MMM yyyy hh:mm:ss a') }}

{{ book.title }}

{{ book.authors }}

{%- set prevChapter = "" %} {%- for annotation in annotations %} {%- if annotation.chapter != prevChapter %}

{{ annotation.chapter }}

{%- set prevChapter = annotation.chapter %} {%- endif %}

Page: {{ annotation.pageNumber }}{% if book.totalPages %} ({{ (annotation.pageNumber / book.totalPages * 100) | round(2) }}%){% endif %} @ {{ annotation.createdAt | date("dd MMM yyyy hh:mm:ss a") }}

{{ annotation.quote }}

{%- set calloutType = "quote" %} {%- set calloutTitle = "Quotable/Concept/General Idea" %} {%- if annotation.color == "#f0ff00" %} {%- set calloutType = "quote" %} {%- set calloutTitle = "Quotable/Concept/General Idea" %} {%- elseif annotation.color == "#00aaff" %} {%- set calloutType = "important" %} {%- set calloutTitle = "Striking/Intense" %} {%- elseif annotation.color == "#ffc1c3" %} {%- set calloutType = "danger" %} {%- set calloutTitle = "In Discord" %} {%- elseif annotation.color == "#00b036" %} {%- set calloutType = "question" %} {%- set calloutTitle = "Thought Provoking" %} {%- elseif annotation.color == "#008000" %} {%- set calloutType = "sceptic" %} {%- set calloutTitle = "Sceptic" %} {%- elseif annotation.color == "#ffaa00" %} {%- set calloutType = "warning" %} {%- set calloutTitle = "Unsound" %} {%- elseif annotation.color == "#ee00ff" %} {%- set calloutType = "stylish" %} {%- set calloutTitle = "Stylish" %} {%- endif %}

[!{{ calloutType }}] {{ calloutTitle }}{% if annotation.note %}{% set noteLen = annotation.note | length %}{% if noteLen <= 50 %}: {{ annotation.note }}{% else %} {{ annotation.note }}{% endif %}{% endif %}

{% endfor %}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment