mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-23 20:18:00 +01:00
render descriptions
This commit is contained in:
parent
c08ceb5134
commit
cdd932c35f
3 changed files with 8 additions and 4 deletions
|
@ -43,9 +43,9 @@ function fetchAndPersistTags(tagIds) {
|
|||
for (let i = 0; i < tagIds.length; i += chunk) {
|
||||
const ids = tagIds.slice(i, i + chunk);
|
||||
|
||||
fetch(`${window.booru.apiEndpoint}tags/fetch_many.json?ids[]=${ids.join('&ids[]=')}`)
|
||||
/*fetch(`${window.booru.apiEndpoint}tags/fetch_many.json?ids[]=${ids.join('&ids[]=')}`)
|
||||
.then(response => response.json())
|
||||
.then(data => data.tags.forEach(tag => persistTag(tag)));
|
||||
.then(data => data.tags.forEach(tag => persistTag(tag)));*/
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -39,6 +39,10 @@ defmodule PhilomenaWeb.ImageController do
|
|||
comments =
|
||||
Enum.zip(comments, rendered)
|
||||
|
||||
render(conn, "show.html", image: conn.assigns.image, comments: comments)
|
||||
description =
|
||||
%{body: conn.assigns.image.description}
|
||||
|> Renderer.render_one()
|
||||
|
||||
render(conn, "show.html", image: conn.assigns.image, comments: comments, description: description)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
p
|
||||
| Description:
|
||||
.image-description__text
|
||||
= @image.description
|
||||
== @description
|
||||
.js-tagsauce id="image_tags_and_source_#{@image.id}"
|
||||
.tagsauce
|
||||
.block
|
||||
|
|
Loading…
Reference in a new issue