book-view styling #172

This commit is contained in:
SvyatoslavArtymovych 2023-06-20 09:18:33 +03:00
parent fd86e22e33
commit 15fc3cc43a
2 changed files with 19 additions and 16 deletions

View File

@ -153,30 +153,30 @@
</div>
{% endif %}
<div class="flex justify-between item-center">
<h1 class="hidden md:inline font-extrabold text-lg dark:text-white">
<div class="flex justify-between item-center mb-5">
<h1 class="text-20 hidden md:inline font-extrabold dark:text-white">
{{book.label}}
</h1>
<div class="ml-auto flex">
<div class="space-x-0.5 mr-3">
<div class="flex items-center space-x-0.5 mr-3">
<!-- prettier-ignore -->
<a href="{{ url_for('book.statistic_view', book_id=book.id ) }}" class="flex items-center"> <svg class="w-4 h-4 inline-flex mr-1 {% if book.current_user_has_star %}fill-yellow-300{% endif %}" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 22 22" stroke-width="1" stroke="currentColor"> <path stroke-linecap="round" stroke-linejoin="round" d="M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z" /> </svg>
{{ book.stars|length }}</a
>
</div>
<div class="space-x-0.5 mr-3">
<div class="flex items-center space-x-0.5 mr-3">
<!-- prettier-ignore -->
<a href="{{ url_for('book.statistic_view', book_id=book.id,active_tab='contributors' ) }}" class="flex items-center"> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 22 22" stroke-width="1" stroke="currentColor" class="w-4 h-4 mr-1"> <path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z" /> </svg>
{{ book.contributors|length }}</a
>
</div>
<div class="space-x-0.5 mr-3">
<div class="flex items-center space-x-0.5 mr-3">
<!-- prettier-ignore -->
<a href="{{ url_for('book.statistic_view', book_id=book.id,active_tab='version' ) }}" class="flex items-center"> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 22 22" stroke-width="1" stroke="currentColor" class="w-4 h-4 mr-1"> <path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75m-3-7.036A11.959 11.959 0 013.598 6 11.99 11.99 0 003 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285z" /> </svg>
{{ book.actual_versions|length }}</a
>
</div>
<div class="space-x-0.5 mr-3">
<div class="flex items-center space-x-0.5 mr-3">
<!-- prettier-ignore -->
<a href="{{ url_for('book.statistic_view', book_id=book.id,active_tab='forks' ) }}" class="flex items-center"> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 22 22" stroke-width="1" stroke="currentColor" class="w-4 h-4 mr-1"> <path stroke-linecap="round" stroke-linejoin="round" d="M7.217 10.907a2.25 2.25 0 100 2.186m0-2.186c.18.324.283.696.283 1.093s-.103.77-.283 1.093m0-2.186l9.566-5.314m-9.566 7.5l9.566 5.314m0 0a2.25 2.25 0 103.935 2.186 2.25 2.25 0 00-3.935-2.186zm0-12.814a2.25 2.25 0 103.933-2.185 2.25 2.25 0 00-3.933 2.185z" /> </svg>
{{ book.active_forks|length }}</a
@ -185,15 +185,17 @@
</div>
</div>
<div class="gap-1 flex flex-wrap">
<div class="gap-1 flex flex-wrap mb-5">
{% for tag in book.tags %}
<a
href="{{url_for('search.tag_search_interpretations',tag_name=tag.name)}}"
><div
class="cursor-pointer multiple-input-word bg-sky-300 hover:bg-sky-400 dark:bg-blue-600 dark:hover:bg-blue-700 dark:text-white rounded text-center py-1/2 px-2">
{{tag.name}}
</div></a
>
<div
class="text-xs cursor-pointer multiple-input-word bg-sky-300 hover:bg-sky-400 dark:bg-blue-600 dark:hover:bg-blue-700 dark:text-white rounded text-center py-1/2 px-2"
>
{{tag.name}}
</div>
</a >
{% endfor %}
</div>
@ -206,7 +208,7 @@
{% else %}
{% set children_collections = book.active_version.children_collections %}
{% endif %} {% for collection in children_collections if not collection.is_root and not collection.is_deleted %}
<p class="my-3 underline break-words " id="collection-{{collection.label}}">
<p class="my-3 break-words border-b-2 pb-1 font-bold text-2xl text-justify" id="collection-{{collection.label}}">
#{{collection.label}}
</p>
{% if not collection.active_sections and not collection.active_children %}

View File

@ -2,12 +2,13 @@
<!-- if collection has sub_collection make for loop for it -->
<!-- prettier-ignore -->
{% for sub_collection in collection.active_children if not sub_collection.is_deleted%}
<p class="my-3" id="collection-{{sub_collection.label}}">
<p class="my-3 font-bold text-justify" id="collection-{{sub_collection.label}}">
##{{sub_collection.label}}
</p>
<!-- prettier-ignore -->
{% if not sub_collection.active_sections and not sub_collection.active_children%}
<p class="ml-3 my-3 italic text-sm">This sub collection is empty</p>
<p class="ml-3 my-3 italic text-sm">This sub collection is empty</p>
{% endif %}
<!-- prettier-ignore -->
{% if sub_collection.active_children %}
@ -20,12 +21,12 @@
<div class="flex w-full mb-1 dark:text-gray-100 flex-col">
<!-- prettier-ignore -->
<a href="{{url_for('book.interpretation_view', book_id=book.id, section_id=section.copy_of or section.id)}}">
<p id="section-{{section.label}}" class="my-3">
<p id="section-{{section.label}}" class="my-3 underline break-words text-justify">
{{ section.label }}
</p>
</a>
{% if not section.active_interpretations %}
<p class="ml-3 my-3 italic text-sm">This section is empty</p>
<p class="ml-3 my-3 italic text-sm">This section is empty</p>
{% else %}
<div class="ql-snow">
<div class="dark:text-white h-30 ql-editor-readonly !px-0">