diff --git a/assets/js/files.js b/assets/js/files.js index 4923a82..aaaf5e4 100644 --- a/assets/js/files.js +++ b/assets/js/files.js @@ -1,5 +1,9 @@ import Vue from 'vue'; import Files from "./pages/files"; +import Progressbar from "./pages/progressbar"; +import Progresseditor from "./pages/progresseditor"; Vue.component('Files', Files); +Vue.component('Progressbar', Progressbar); +Vue.component('Progresseditor', Progresseditor); new Vue().$mount('#app'); \ No newline at end of file diff --git a/assets/js/pages/progressbar.vue b/assets/js/pages/progressbar.vue new file mode 100644 index 0000000..3484dc5 --- /dev/null +++ b/assets/js/pages/progressbar.vue @@ -0,0 +1,43 @@ + + + \ No newline at end of file diff --git a/assets/js/pages/progresseditor.vue b/assets/js/pages/progresseditor.vue new file mode 100644 index 0000000..f874adf --- /dev/null +++ b/assets/js/pages/progresseditor.vue @@ -0,0 +1,55 @@ + + + \ No newline at end of file diff --git a/templates/book/show.html.twig b/templates/book/show.html.twig index bf69fd4..38391a4 100644 --- a/templates/book/show.html.twig +++ b/templates/book/show.html.twig @@ -4,68 +4,65 @@ {% block body %} -
-
-
-
-
-
- {% if file_exists(asset('book_covers/cover_' ~ book.id ~ '.jpg')) %} - {% endif %} -
-
-

{{ book.title }}

-

{{ book.subtitle }}

-

{{ book.author }}

-

{% for i in range(1, book.rating) %}⭐{% endfor %}

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Category{{ book.category }}
Description{{ book.description | nl2br }}
Publisher{{ book.publisher }}Publish date{{ book.publishDate ? book.publishDate|date('Y-m-d') : '' }}
Isbn{{ book.isbn }}
Tags{{ book.tags }}
Series{{ book.series }} {{ book.volume }}
Language{{ book.language }}
Progress{{ book.getProgress().first().pages }}Pages{{ book.pages }}
-
+ {% set progress_pages = book.getProgress() | length ? (book.getProgress().first().pages) : 0 %} + {% set progress = (progress_pages / book.pages*100) | round %} + + +
+
+ {% if file_exists(asset('book_covers/cover_' ~ book.id ~ '.jpg')) %} + {% endif %} +
+
+

{{ book.title }}

+

{{ book.subtitle }}

+

{{ book.author }}

+

{% for i in range(1, book.rating) %}⭐{% endfor %}

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + {% if(book.series) %} + + + + + {% endif %} + + + + + + + + +
Category{{ book.category }}Tags{{ book.tags }}
Description{{ book.description | nl2br }}
Publisher{{ book.publisher }}Publish date{{ book.publishDate ? book.publishDate|date('Y-m-d') : '' }}
ISBN{{ book.isbn }}Language{{ book.language }}
Series{{ book.series }} {{ book.volume }}
ProgressPages{{ book.pages }}