-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Is your feature request related to a problem? Please describe.
The current "thumbnails" for the notes cards is pretty messy (line-height, font-size and other aspects are messed up). Furthermore, when the page contains a lot of notes, loading and rendering the HTML content can lead to performance problems (although this should be fixed by #4)
Describe the solution you'd like
Using wkhtmltopng or another utility, render the HTML server-side to a png file, and include, in place of the content property, a thumbnail property containing a URL to the thumbnail file:
[
{
"name": "Lorem ispum"
// ( other properties... )
"thumbnail": "https://api.schoolsyst.com/notes/123fed-76488-abcd23-cce268/thumbnail"
},
// ( ... )
]A new GET-only endpoint, /notes/:uuid/thumbnail, should be created and return with a MIME type of image/png the thumbnail of the corresponding note.
For the detail endpoint (/notes/:uuid), keep the content property.