From 6479abcc8bf9bea570da2a6c90b472d4f8c5250c Mon Sep 17 00:00:00 2001 From: inhji Date: Fri, 30 Jun 2023 13:10:07 +0200 Subject: [PATCH 1/2] add markdown snippet for images --- lib/chiya_web/controllers/note_html/edit_image.html.heex | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/chiya_web/controllers/note_html/edit_image.html.heex b/lib/chiya_web/controllers/note_html/edit_image.html.heex index f185f7d..6bddd43 100644 --- a/lib/chiya_web/controllers/note_html/edit_image.html.heex +++ b/lib/chiya_web/controllers/note_html/edit_image.html.heex @@ -8,6 +8,8 @@ src={ChiyaWeb.Uploaders.NoteImage.url({@image.path, @image}, :full_dithered)} /> +
![<%= image.content %>](<%= ChiyaWeb.Uploaders.NoteImage.url({@image.path, @image}, :full_dithered) %>)
+ <.simple_form :let={f} for={@changeset} From a084153bc09f54e6bb281deff655a5369e5970d5 Mon Sep 17 00:00:00 2001 From: inhji Date: Fri, 30 Jun 2023 13:18:32 +0200 Subject: [PATCH 2/2] add permalink to note --- lib/chiya_web/controllers/page_html/note.html.heex | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/chiya_web/controllers/page_html/note.html.heex b/lib/chiya_web/controllers/page_html/note.html.heex index 95792bb..ef4ce68 100644 --- a/lib/chiya_web/controllers/page_html/note.html.heex +++ b/lib/chiya_web/controllers/page_html/note.html.heex @@ -35,6 +35,10 @@ <%= Markdown.render(@note.content) |> raw %> + +
<%= if !Enum.empty?(@note.images) do %> <.line />