mirror of https://github.com/logos-co/open-law.git
interpretations component styling (for all pages containing this component) #176
This commit is contained in:
parent
9e92acea86
commit
983e786900
|
@ -0,0 +1,117 @@
|
|||
<dl class="bg-white dark:bg-gray-900 max-w-full p-3 text-gray-900 divide-y divide-gray-200 dark:text-white dark:divide-gray-700 m-3 border-2 border-gray-200 border-solid rounded-lg dark:border-gray-700">
|
||||
<div class="flex flex-row pb-3 p-3 pt-0 w-2/3 md:w-full">
|
||||
<div class="vote-block flex flex-col m-5 mr-8 justify-center items-center">
|
||||
|
||||
{% if not hide_vote_btns %}
|
||||
<div class="vote-button cursor-pointer" data-vote-for="interpretation" data-entity-id="{{ interpretation.id }}" data-positive="true">
|
||||
<svg class="w-6 h-6 select-none
|
||||
{% if interpretation.current_user_vote %}
|
||||
stroke-green-500
|
||||
{% endif %}
|
||||
" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" > <path stroke-linecap="round" stroke-linejoin="round" d="M4.5 10.5L12 3m0 0l7.5 7.5M12 3v18" /> </svg>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<span class="vote-count text-3xl select-none {% if interpretation.vote_count < 0 %} text-red-500 {% elif interpretation.vote_count > 0 %} text-green-500 {% endif %} " >
|
||||
{{ interpretation.vote_count }}
|
||||
</span>
|
||||
|
||||
{% if not hide_vote_btns %}
|
||||
<div class="vote-button cursor-pointer" data-vote-for="interpretation" data-entity-id="{{ interpretation.id }}" data-positive="false">
|
||||
<svg class="w-6 h-6 select-none
|
||||
{% if interpretation.current_user_vote == False %}
|
||||
stroke-red-500
|
||||
{% endif %}
|
||||
" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"> <path stroke-linecap="round" stroke-linejoin="round" d="M19.5 13.5L12 21m0 0l-7.5-7.5M12 21V3" /> </svg>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if show_control_btns %}
|
||||
{% if interpretation.book.owner == current_user or access_to_approve_interpretation %}
|
||||
<div class="approve-button select-none approve-btn mt-3 cursor-pointer" data-approve="interpretation" data-entity-id="{{ interpretation.id }}">
|
||||
<!-- outline -->
|
||||
<svg class="not-approved-icon w-6 h-6 {% if interpretation.approved %} hidden {% endif %}" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
|
||||
</svg>
|
||||
|
||||
<!-- solid -->
|
||||
<svg class="approved-icon w-6 h-6 {% if not interpretation.approved %} hidden {% endif %}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
||||
<path fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm13.36-1.814a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z" clip-rule="evenodd" />
|
||||
</svg>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if interpretation.user_id == current_user.id %}
|
||||
<!--Edit & Delete interpretation-->
|
||||
<div class="relative mt-1">
|
||||
<button id="callEditInterpretationModal" data-popover-target="popover-edit" data-edit-interpretation-id="{{interpretation.id}}" data-edit-interpretation-text="{{interpretation.text}}" type="button" data-modal-target="edit_interpretation_modal" data-modal-toggle="edit_interpretation_modal" class="space-x-0.5 flex items-center">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10" /> </svg>
|
||||
</button>
|
||||
<div data-popover id="popover-edit" role="tooltip" class="absolute z-10 invisible inline-block w-64 text-sm text-gray-500 transition-opacity duration-300 bg-white border border-gray-200 rounded-lg shadow-sm opacity-0 dark:text-gray-400 dark:border-gray-600 dark:bg-gray-800">
|
||||
<div class="px-3 py-2">
|
||||
<p>Edit this interpretation</p>
|
||||
</div>
|
||||
<div data-popper-arrow></div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if interpretation.book.owner == current_user or interpretation.user_id == current_user.id or access_to_delete_interpretation %}
|
||||
<div class="relative mt-1">
|
||||
<button id="callDeleteInterpretationModal" data-popover-target="popover-delete" data-interpretation-id="{{interpretation.id}}" type="button" data-modal-target="delete_interpretation_modal" data-modal-toggle="delete_interpretation_modal" class="space-x-0.5 flex items-center">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /> </svg>
|
||||
</button>
|
||||
<div data-popover id="popover-delete" role="tooltip" class="absolute z-10 invisible inline-block w-64 text-sm text-gray-500 transition-opacity duration-300 bg-white border border-gray-200 rounded-lg shadow-sm opacity-0 dark:text-gray-400 dark:border-gray-600 dark:bg-gray-800">
|
||||
<div class="px-3 py-2">
|
||||
<p>Delete this interpretation</p>
|
||||
</div>
|
||||
<div data-popper-arrow></div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
<dt class="flex justify-center w-full mb-1 text-gray-500 md:text-lg dark:text-gray-400 flex-col">
|
||||
<div class="ql-snow mb-2">
|
||||
{% if show_breadcrumbs %}
|
||||
{% set local_breadcrumbs = interpretation.section.breadcrumbs_path %}
|
||||
{% include 'book/local_breadcrumbs_navigation.html'%}
|
||||
<a class="text-base underline" href="{{url_for('book.interpretation_view', book_id=interpretation.section.version.book.id, section_id=interpretation.section.id)}}">
|
||||
<p>{{ interpretation.section.label }}</p>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
<div class="dark:text-white h-30 ql-editor-readonly !px-0">
|
||||
<p>{{ display_inline_elements(interpretation.text)|safe }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex border-t-2 pt-3 align-center justify-between md:w-full">
|
||||
<div>
|
||||
<span class="hidden md:inline-block">Interpretation by</span>
|
||||
<a href="{{url_for('user.profile',user_id=interpretation.user.id)}}" class=" text-blue-500 {% if interpretation.user.is_deleted %}line-through{% endif %}">{{interpretation.user.username}}</a> on {{interpretation.created_at.strftime('%B %d, %Y')}}
|
||||
</div>
|
||||
<div class="flex ml-auto justify-between w-24">
|
||||
<button data-tooltip-target="tooltip-click" data-tooltip-trigger="click" id="copyLinkButton" type="button" class="hover:dark:text-white hover:text-black focus:ring-2 rounded-full font-medium text-sm p-2.5 text-center inline-flex items-center dark:hover:text-white" data-link="{{ build_qa_url(interpretation) }}">
|
||||
{% include 'icons/share_btn.html' %}
|
||||
</button>
|
||||
<div id="tooltip-click" role="tooltip" class="absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white bg-gray-900 rounded-lg shadow-sm opacity-0 tooltip dark:bg-gray-700">
|
||||
Link copied!
|
||||
<div class="tooltip-arrow" data-popper-arrow></div>
|
||||
</div>
|
||||
<div class="space-x-0.5 flex items-center">
|
||||
<a
|
||||
class="!cursor-pointer text-no-underline flex items-center"
|
||||
href="{{ build_qa_url(interpretation) }}"
|
||||
>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M7.5 8.25h9m-9 3H12m-9.75 1.51c0 1.6 1.123 2.994 2.707 3.227 1.129.166 2.27.293 3.423.379.35.026.67.21.865.501L12 21l2.755-4.133a1.14 1.14 0 01.865-.501 48.172 48.172 0 003.423-.379c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z" /> </svg>
|
||||
<p class="select-none">{{interpretation.active_comments | length}}</p>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</dt>
|
||||
</div>
|
||||
</dl>
|
|
@ -82,109 +82,7 @@
|
|||
<!-- prettier-ignore -->
|
||||
{% for interpretation in section.active_interpretations %}
|
||||
<!-- prettier-ignore -->
|
||||
<dl class="bg-white dark:bg-gray-900 max-w-full p-3 text-gray-900 divide-y divide-gray-200 dark:text-white dark:divide-gray-700 m-3 border-2 border-gray-200 border-solid rounded-lg dark:border-gray-700">
|
||||
<div class="flex flex-row pb-3 p-3 pt-0 w-2/3 md:w-full">
|
||||
<div class="vote-block flex flex-col m-5 mr-8 justify-center items-center">
|
||||
|
||||
<div class="vote-button cursor-pointer" data-vote-for="interpretation" data-entity-id="{{ interpretation.id }}" data-positive="true">
|
||||
<svg class="w-6 h-6 select-none
|
||||
{% if interpretation.current_user_vote %}
|
||||
stroke-green-500
|
||||
{% endif %}
|
||||
" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" > <path stroke-linecap="round" stroke-linejoin="round" d="M4.5 10.5L12 3m0 0l7.5 7.5M12 3v18" /> </svg>
|
||||
</div>
|
||||
<span class="vote-count text-3xl select-none {% if interpretation.vote_count < 0 %} text-red-500 {% elif interpretation.vote_count > 0 %} text-green-500 {% endif %} " >
|
||||
{{ interpretation.vote_count }}
|
||||
</span>
|
||||
<div class="vote-button cursor-pointer" data-vote-for="interpretation" data-entity-id="{{ interpretation.id }}" data-positive="false">
|
||||
<svg class="w-6 h-6 select-none
|
||||
{% if interpretation.current_user_vote == False %}
|
||||
stroke-red-500
|
||||
{% endif %}
|
||||
" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"> <path stroke-linecap="round" stroke-linejoin="round" d="M19.5 13.5L12 21m0 0l-7.5-7.5M12 21V3" /> </svg>
|
||||
</div>
|
||||
|
||||
|
||||
{% if interpretation.book.owner == current_user or access_to_approve_interpretation %}
|
||||
<div class="approve-button select-none approve-btn mt-3 cursor-pointer" data-approve="interpretation" data-entity-id="{{ interpretation.id }}">
|
||||
<!-- outline -->
|
||||
<svg class="not-approved-icon w-6 h-6 {% if interpretation.approved %} hidden {% endif %}" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
|
||||
</svg>
|
||||
|
||||
<!-- solid -->
|
||||
<svg class="approved-icon w-6 h-6 {% if not interpretation.approved %} hidden {% endif %}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
||||
<path fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm13.36-1.814a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z" clip-rule="evenodd" />
|
||||
</svg>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if interpretation.user_id == current_user.id %}
|
||||
<!--Edit & Delete interpretation-->
|
||||
<div class="relative mt-1">
|
||||
<button id="callEditInterpretationModal" data-popover-target="popover-edit" data-edit-interpretation-id="{{interpretation.id}}" data-edit-interpretation-text="{{interpretation.text}}" type="button" data-modal-target="edit_interpretation_modal" data-modal-toggle="edit_interpretation_modal" class="space-x-0.5 flex items-center">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10" /> </svg>
|
||||
</button>
|
||||
<div data-popover id="popover-edit" role="tooltip" class="absolute z-10 invisible inline-block w-64 text-sm text-gray-500 transition-opacity duration-300 bg-white border border-gray-200 rounded-lg shadow-sm opacity-0 dark:text-gray-400 dark:border-gray-600 dark:bg-gray-800">
|
||||
<div class="px-3 py-2">
|
||||
<p>Edit this interpretation</p>
|
||||
</div>
|
||||
<div data-popper-arrow></div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if interpretation.book.owner == current_user or interpretation.user_id == current_user.id or access_to_delete_interpretation %}
|
||||
<div class="relative mt-1">
|
||||
<button id="callDeleteInterpretationModal" data-popover-target="popover-delete" data-interpretation-id="{{interpretation.id}}" type="button" data-modal-target="delete_interpretation_modal" data-modal-toggle="delete_interpretation_modal" class="space-x-0.5 flex items-center">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /> </svg>
|
||||
</button>
|
||||
<div data-popover id="popover-delete" role="tooltip" class="absolute z-10 invisible inline-block w-64 text-sm text-gray-500 transition-opacity duration-300 bg-white border border-gray-200 rounded-lg shadow-sm opacity-0 dark:text-gray-400 dark:border-gray-600 dark:bg-gray-800">
|
||||
<div class="px-3 py-2">
|
||||
<p>Delete this interpretation</p>
|
||||
</div>
|
||||
<div data-popper-arrow></div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
<dt class="flex justify-center w-full mb-1 text-gray-500 md:text-lg dark:text-gray-400 flex-col">
|
||||
<div class="ql-snow mb-2">
|
||||
<div class="dark:text-white h-30 ql-editor-readonly !px-0">
|
||||
<p>{{ display_inline_elements(interpretation.text)|safe }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex border-t-2 pt-3 align-center justify-between md:w-full">
|
||||
<div>
|
||||
<span class="hidden md:inline-block">Interpretation by</span>
|
||||
<a href="{{url_for('user.profile',user_id=interpretation.user.id)}}" class=" text-blue-500 {% if interpretation.user.is_deleted %}line-through{% endif %}">{{interpretation.user.username}}</a> on {{interpretation.created_at.strftime('%B %d, %Y')}}
|
||||
</div>
|
||||
<div class="flex ml-auto justify-between w-24">
|
||||
<button data-tooltip-target="tooltip-click" data-tooltip-trigger="click" id="copyLinkButton" type="button" class="hover:dark:text-white hover:text-black focus:ring-2 rounded-full font-medium text-sm p-2.5 text-center inline-flex items-center dark:hover:text-white" data-link="{{ build_qa_url(interpretation) }}">
|
||||
{% include 'icons/share_btn.html' %}
|
||||
</button>
|
||||
<div id="tooltip-click" role="tooltip" class="absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white bg-gray-900 rounded-lg shadow-sm opacity-0 tooltip dark:bg-gray-700">
|
||||
Link copied!
|
||||
<div class="tooltip-arrow" data-popper-arrow></div>
|
||||
</div>
|
||||
<div class="space-x-0.5 flex items-center">
|
||||
<a
|
||||
class="!cursor-pointer text-no-underline flex items-center"
|
||||
href="{{ build_qa_url(interpretation) }}"
|
||||
>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M7.5 8.25h9m-9 3H12m-9.75 1.51c0 1.6 1.123 2.994 2.707 3.227 1.129.166 2.27.293 3.423.379.35.026.67.21.865.501L12 21l2.755-4.133a1.14 1.14 0 01.865-.501 48.172 48.172 0 003.423-.379c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z" /> </svg>
|
||||
<p class="select-none">{{interpretation.active_comments | length}}</p>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</dt>
|
||||
</div>
|
||||
</dl>
|
||||
{% include 'book/components/interpretation_list_item.html' %}
|
||||
{% endfor %}
|
||||
|
||||
<span class="approved-interpretation-id hidden">
|
||||
|
|
|
@ -1,40 +1,42 @@
|
|||
<!-- prettier-ignore -->
|
||||
<ol class="inline-flex items-center overflow-x-scroll md:overflow-auto p-0">
|
||||
{% for breadcrumb in local_breadcrumbs if breadcrumb.type != "MyBookList" and breadcrumb.type != "AuthorBookList" %}
|
||||
{% if breadcrumb.type != 'Splitter' %}
|
||||
<li class="inline-flex items-center align-middle justify-center">
|
||||
{% if not loop.index==local_breadcrumbs|length-1 %}
|
||||
<a href="{{ breadcrumb.url }}" class="inline-flex text-xs font-medium text-gray-700 hover:text-blue-600 dark:text-gray-400 dark:hover:text-white" data-tooltip-target="breadcrumb-{{loop.index}}-tooltip" data-tooltip-placement="bottom">
|
||||
{% else %}
|
||||
<span class="inline-flex items-center text-sm font-medium text-gray-700 hover:text-blue-600 dark:text-gray-400 dark:hover:text-white" data-tooltip-target="breadcrumb-{{loop.index}}-tooltip" data-tooltip-placement="bottom">
|
||||
{% endif %}
|
||||
{% for breadcrumb in local_breadcrumbs if breadcrumb.type != "MyBookList" and breadcrumb.type != "AuthorBookList" %}
|
||||
{% if breadcrumb.type != 'Splitter' %}
|
||||
<li class="inline-flex items-center align-middle justify-center">
|
||||
{% if not loop.index==local_breadcrumbs|length-1 %}
|
||||
<a href="{{ breadcrumb.url }}" class="inline-flex text-xs font-medium text-gray-700 hover:text-blue-600 dark:text-gray-400 dark:hover:text-white" data-tooltip-target="breadcrumb-{{loop.index}}-tooltip" data-tooltip-placement="bottom">
|
||||
{% else %}
|
||||
<span class="inline-flex items-center text-xs font-bold text-gray-700 hover:text-blue-600 dark:text-gray-400 dark:hover:text-white" data-tooltip-target="breadcrumb-{{loop.index}}-tooltip" data-tooltip-placement="bottom">
|
||||
{% endif %}
|
||||
|
||||
{% if breadcrumb.type != "Splitter" %}
|
||||
<div id="breadcrumb-{{loop.index}}-tooltip" role="tooltip" class="delay-100 absolute z-[100] invisible inline-block px-3 py-2 text-sm font-medium text-white transition-opacity duration-700 bg-gray-900 rounded-lg shadow-sm opacity-0 tooltip dark:bg-gray-700">
|
||||
{{ breadcrumb.label }}
|
||||
<div class="tooltip-arrow" data-popper-arrow></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{#
|
||||
{% if breadcrumb.type != "Splitter" %}
|
||||
<div id="breadcrumb-{{loop.index}}-tooltip" role="tooltip" class="delay-100 absolute z-[100] invisible inline-block px-3 py-2 text-sm font-medium text-white transition-opacity duration-700 bg-gray-900 rounded-lg shadow-sm opacity-0 tooltip dark:bg-gray-700">
|
||||
{{ breadcrumb.label }}
|
||||
<div class="tooltip-arrow" data-popper-arrow></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
#}
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
<span class="select-none">{{ breadcrumb.label }}</span>
|
||||
<!-- prettier-ignore -->
|
||||
<span class="select-none">{{ breadcrumb.label }}</span>
|
||||
|
||||
{% if not loop.index==local_breadcrumbs|length %}
|
||||
</a>
|
||||
{% else %}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if not loop.index==local_breadcrumbs|length %}
|
||||
</a>
|
||||
{% else %}
|
||||
</span>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if not loop.index==local_breadcrumbs|length-1 %}
|
||||
{% if not loop.index==local_breadcrumbs|length-1 %}
|
||||
<svg aria-hidden="true" class="w-4 h-4 text-gray-400" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd"></path> </svg>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="inline-flex items-center mx-1">
|
||||
<span class="text-sm truncate font-medium text-gray-700 hover:text-blue-600 dark:text-gray-400 dark:hover:text-white select-none ">{{ breadcrumb.label }}</span>
|
||||
<svg aria-hidden="true" class="w-4 h-4 text-gray-400" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd"></path> </svg>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="inline-flex items-center mx-1">
|
||||
<span class="text-sm truncate font-medium text-gray-700 hover:text-blue-600 dark:text-gray-400 dark:hover:text-white select-none ">{{ breadcrumb.label }}</span>
|
||||
<svg aria-hidden="true" class="w-4 h-4 text-gray-400" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd"></path> </svg>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ol>
|
|
@ -29,76 +29,13 @@
|
|||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% for interpretation in interpretations %}
|
||||
<!-- prettier-ignore -->
|
||||
<dl class="bg-white dark:bg-gray-900 max-w-full p-3 text-gray-900 divide-y divide-gray-200 dark:text-white dark:divide-gray-700 m-3 border-2 border-gray-200 border-solid rounded-lg dark:border-gray-700">
|
||||
<div class="flex flex-row pb-3 p-3">
|
||||
<div class="vote-block flex flex-col m-5 justify-center items-center">
|
||||
<div class="vote-button cursor-pointer" data-vote-for="interpretation" data-entity-id="{{ interpretation.id }}" data-positive="true">
|
||||
<svg class="w-6 h-6 select-none
|
||||
{% if interpretation.current_user_vote %}
|
||||
stroke-green-500
|
||||
{% endif %}
|
||||
" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" > <path stroke-linecap="round" stroke-linejoin="round" d="M4.5 10.5L12 3m0 0l7.5 7.5M12 3v18" /> </svg>
|
||||
</div>
|
||||
<span
|
||||
class="vote-count text-3xl select-none
|
||||
{% if interpretation.vote_count < 0 %}
|
||||
text-red-500
|
||||
{% elif interpretation.vote_count > 0 %}
|
||||
text-green-500
|
||||
{% endif %}
|
||||
"
|
||||
>
|
||||
{{ interpretation.vote_count }}
|
||||
</span>
|
||||
<div class="vote-button cursor-pointer" data-vote-for="interpretation" data-entity-id="{{ interpretation.id }}" data-positive="false">
|
||||
<svg class="w-6 h-6 select-none
|
||||
{% if interpretation.current_user_vote == False %}
|
||||
stroke-red-500
|
||||
{% endif %}
|
||||
" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"> <path stroke-linecap="round" stroke-linejoin="round" d="M19.5 13.5L12 21m0 0l-7.5-7.5M12 21V3" /> </svg>
|
||||
</div>
|
||||
</div>
|
||||
<!-- prettier-ignore -->
|
||||
<dt class="flex w-full mb-1 text-gray-500 md:text-lg dark:text-gray-400 flex-col">
|
||||
<div class="ql-snow">
|
||||
{% set local_breadcrumbs = interpretation.section.breadcrumbs_path %}
|
||||
{% include 'book/local_breadcrumbs_navigation.html'%}
|
||||
<a href="{{url_for('book.interpretation_view', book_id=interpretation.book.id, section_id=interpretation.section.id)}}">
|
||||
<p>{{ interpretation.section.label }}</p>
|
||||
</a>
|
||||
<div class="dark:text-white h-30 ql-editor-readonly">
|
||||
<p>{{ display_inline_elements(interpretation.text)|safe }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="border-t-2 pt-3 flex mt-auto align-center justify-between md:w-full">
|
||||
<div>
|
||||
<span class="hidden md:inline-block">
|
||||
Interpretation by
|
||||
</span>
|
||||
<a href="{{url_for('user.profile',user_id=interpretation.user.id)}}" class=" text-blue-500 {% if interpretation.user.is_deleted %}line-through{% endif %}">{{interpretation.user.username}}</a> on {{interpretation.created_at.strftime('%B %d, %Y')}}
|
||||
</div>
|
||||
<div class="flex ml-auto justify-between w-24">
|
||||
<button data-tooltip-target="tooltip-click" data-tooltip-trigger="click" id="copyLinkButton" type="button" class="hover:dark:text-white hover:text-black focus:ring-2 rounded-full font-medium text-sm p-2.5 text-center inline-flex items-center dark:hover:text-white" data-link="{{ build_qa_url(interpretation) }}">
|
||||
{% include 'icons/share_btn.html' %}
|
||||
</button>
|
||||
<div id="tooltip-click" role="tooltip" class="absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white bg-gray-900 rounded-lg shadow-sm opacity-0 tooltip dark:bg-gray-700">
|
||||
Link copied!
|
||||
<div class="tooltip-arrow" data-popper-arrow></div>
|
||||
</div>
|
||||
<div class="space-x-0.5 flex items-center">
|
||||
<a class="!cursor-pointer text-no-underline flex items-center" href="{{ build_qa_url(interpretation) }}" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M7.5 8.25h9m-9 3H12m-9.75 1.51c0 1.6 1.123 2.994 2.707 3.227 1.129.166 2.27.293 3.423.379.35.026.67.21.865.501L12 21l2.755-4.133a1.14 1.14 0 01.865-.501 48.172 48.172 0 003.423-.379c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z" /> </svg>
|
||||
<p>{{interpretation.active_comments | length}}</p>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</dt>
|
||||
</div>
|
||||
</dl>
|
||||
{% include 'book/components/interpretation_list_item.html' %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
{% if current_user.is_authenticated and page.pages > 1 %}
|
||||
<div class="container content-center mt-3 flex bg-white dark:bg-gray-800">
|
||||
<nav aria-label="Page navigation example" class="mx-auto">
|
||||
|
|
|
@ -41,73 +41,15 @@
|
|||
Interpretations not found!
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% for interpretation in interpretations %}
|
||||
<!-- prettier-ignore -->
|
||||
<dl class="bg-white dark:bg-gray-900 max-w-full p-3 text-gray-900 divide-y divide-gray-200 dark:text-white dark:divide-gray-700 m-3 border-2 border-gray-200 border-solid rounded-lg dark:border-gray-700">
|
||||
<div class="flex flex-row pb-3 p-3">
|
||||
<div class="vote-block flex flex-col m-5 justify-center items-center">
|
||||
<div class="vote-button cursor-pointer" data-vote-for="interpretation" data-entity-id="{{ interpretation.id }}" data-positive="true">
|
||||
<svg class="w-6 h-6 select-none
|
||||
{% if interpretation.current_user_vote %}
|
||||
stroke-green-500
|
||||
{% endif %}
|
||||
" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" > <path stroke-linecap="round" stroke-linejoin="round" d="M4.5 10.5L12 3m0 0l7.5 7.5M12 3v18" /> </svg>
|
||||
</div>
|
||||
|
||||
<span
|
||||
class="vote-count text-3xl select-none
|
||||
{% if interpretation.vote_count < 0 %}
|
||||
text-red-500
|
||||
{% elif interpretation.vote_count > 0 %}
|
||||
text-green-500
|
||||
{% endif %}
|
||||
"
|
||||
>
|
||||
{{ interpretation.vote_count }}
|
||||
</span>
|
||||
|
||||
<div class="vote-button cursor-pointer" data-vote-for="interpretation" data-entity-id="{{ interpretation.id }}" data-positive="false">
|
||||
<svg class="w-6 h-6 select-none
|
||||
{% if interpretation.current_user_vote == False %}
|
||||
stroke-red-500
|
||||
{% endif %}
|
||||
" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"> <path stroke-linecap="round" stroke-linejoin="round" d="M19.5 13.5L12 21m0 0l-7.5-7.5M12 21V3" /> </svg>
|
||||
</div>
|
||||
</div>
|
||||
<!-- prettier-ignore -->
|
||||
<dt class="flex w-full mb-1 text-gray-500 md:text-lg dark:text-gray-400 flex-col">
|
||||
<div class="ql-snow">
|
||||
{% set local_breadcrumbs = interpretation.section.breadcrumbs_path %}
|
||||
{% include 'book/local_breadcrumbs_navigation.html'%}
|
||||
<a href="{{url_for('book.interpretation_view', book_id=interpretation.section.version.book.id, section_id=interpretation.section.id)}}">
|
||||
<p>{{ interpretation.section.label }}</p>
|
||||
</a>
|
||||
<div class="dark:text-white h-30 ql-editor-readonly">
|
||||
<p>{{ display_inline_elements(interpretation.text)|safe }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex mt-auto align-center justify-between md:w-full border-t border-gray-200 dark:border-gray-700">
|
||||
<div>
|
||||
<span class="hidden md:inline-block">Interpretation by</span>
|
||||
<a href="{{url_for('user.profile',user_id=interpretation.user.id)}}" class=" text-blue-500 {% if interpretation.user.is_deleted %}line-through{% endif %}">{{interpretation.user.username}}</a> on {{interpretation.created_at.strftime('%B %d, %Y')}}
|
||||
</div>
|
||||
<div class="flex ml-auto justify-between w-24">
|
||||
<button data-tooltip-target="tooltip-click" data-tooltip-trigger="click" id="copyLinkButton" type="button" class="hover:dark:text-white hover:text-black focus:ring-2 rounded-full font-medium text-sm p-2.5 text-center inline-flex items-center dark:hover:text-white" data-link="{{ build_qa_url(interpretation) }}">
|
||||
{% include 'icons/share_btn.html' %}
|
||||
</button>
|
||||
<div id="tooltip-click" role="tooltip" class="absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white bg-gray-900 rounded-lg shadow-sm opacity-0 tooltip dark:bg-gray-700"> Link copied! <div class="tooltip-arrow" data-popper-arrow></div> </div>
|
||||
<div class="space-x-0.5 flex items-center">
|
||||
<a class="!cursor-pointer text-no-underline flex items-center" href="{{ build_qa_url(interpretation) }}" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M7.5 8.25h9m-9 3H12m-9.75 1.51c0 1.6 1.123 2.994 2.707 3.227 1.129.166 2.27.293 3.423.379.35.026.67.21.865.501L12 21l2.755-4.133a1.14 1.14 0 01.865-.501 48.172 48.172 0 003.423-.379c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z" /> </svg>
|
||||
<p>{{interpretation.active_comments | length}}</p>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</dt>
|
||||
</div>
|
||||
</dl>
|
||||
{% with show_breadcrumbs=True %}
|
||||
{% include 'book/components/interpretation_list_item.html' %}
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
{% if current_user.is_authenticated and page.pages > 1 %}
|
||||
<div class="container content-center mt-3 flex bg-white dark:bg-gray-800">
|
||||
<nav aria-label="Page navigation example" class="mx-auto">
|
||||
|
|
|
@ -44,79 +44,16 @@
|
|||
</div>
|
||||
<!-- prettier-ignore -->
|
||||
<div class="p-4 rounded-lg bg-gray-50 dark:bg-gray-800" id="interpretations" role="tabpanel" aria-labelledby="interpretations-tab">
|
||||
{% if count <1 %}
|
||||
<h1 class="hidden md:inline font-extrabold text-lg dark:text-white ml-4 mt-5">No {{query}} in any interpretation, try another search query.</h1>
|
||||
{% if not count %}
|
||||
<h1 class="hidden md:inline font-extrabold text-lg dark:text-white ml-4 mt-5">No {{query}} in any interpretation, try another search query.</h1>
|
||||
{% else %}
|
||||
|
||||
{% for interpretation in interpretations %}
|
||||
<!-- prettier-ignore -->
|
||||
<dl class="bg-white dark:bg-gray-900 max-w-full p-3 text-gray-900 divide-y divide-gray-200 dark:text-white dark:divide-gray-700 m-3 border-2 border-gray-200 border-solid rounded-lg dark:border-gray-700">
|
||||
<div class="flex flex-row pb-3 p-3">
|
||||
<div class="vote-block flex flex-col m-5 justify-center items-center">
|
||||
{% if interpretation.user_id != current_user.id %}
|
||||
<div class="vote-button cursor-pointer" data-vote-for="interpretation" data-entity-id="{{ interpretation.id }}" data-positive="true">
|
||||
<svg class="w-6 h-6 select-none
|
||||
{% if interpretation.current_user_vote %}
|
||||
stroke-green-500
|
||||
{% endif %}
|
||||
" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" > <path stroke-linecap="round" stroke-linejoin="round" d="M4.5 10.5L12 3m0 0l7.5 7.5M12 3v18" /> </svg>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% with show_breadcrumbs=True, hide_vote_btns=True %}
|
||||
{% include 'book/components/interpretation_list_item.html' %}
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
|
||||
<span
|
||||
class="vote-count text-3xl select-none
|
||||
{% if interpretation.vote_count < 0 %}
|
||||
text-red-500
|
||||
{% elif interpretation.vote_count > 0 %}
|
||||
text-green-500
|
||||
{% endif %}
|
||||
"
|
||||
>
|
||||
{{ interpretation.vote_count }}
|
||||
</span>
|
||||
|
||||
{% if interpretation.user_id != current_user.id %}
|
||||
<div class="vote-button cursor-pointer" data-vote-for="interpretation" data-entity-id="{{ interpretation.id }}" data-positive="false">
|
||||
<svg class="w-6 h-6 select-none
|
||||
{% if interpretation.current_user_vote == False %}
|
||||
stroke-red-500
|
||||
{% endif %}
|
||||
" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"> <path stroke-linecap="round" stroke-linejoin="round" d="M19.5 13.5L12 21m0 0l-7.5-7.5M12 21V3" /> </svg>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<!-- prettier-ignore -->
|
||||
<dt class="flex w-full mb-1 text-gray-500 md:text-lg dark:text-gray-400 flex-col">
|
||||
<div class="ql-snow">
|
||||
{% set local_breadcrumbs = interpretation.section.breadcrumbs_path %}
|
||||
{% include 'book/local_breadcrumbs_navigation.html'%}
|
||||
<p>{{ interpretation.section.label }}</p>
|
||||
</a>
|
||||
<div class="dark:text-white h-30 ql-editor-readonly">
|
||||
<p>{{ display_inline_elements(interpretation.text)|safe }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex mt-auto align-center justify-between md:w-full">
|
||||
<div>
|
||||
<span class="hidden md:inline-block">Interpretation by</span>
|
||||
<a href="{{url_for('user.profile',user_id=interpretation.user.id)}}" class=" text-blue-500 {% if interpretation.user.is_deleted %}line-through{% endif %}">{{interpretation.user.username}}</a> on {{interpretation.created_at.strftime('%B %d, %Y')}}
|
||||
</div>
|
||||
<div class="flex ml-auto justify-between w-24">
|
||||
<button data-tooltip-target="tooltip-click" data-tooltip-trigger="click" id="copyLinkButton" type="button" class="hover:text-white focus:ring-2 rounded-full font-medium text-sm p-2.5 text-center inline-flex items-center dark:hover:text-white" data-link="{{ build_qa_url(interpretation) }}">
|
||||
{% include 'icons/share_btn.html' %}
|
||||
</button>
|
||||
<div id="tooltip-click" role="tooltip" class="absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white bg-gray-900 rounded-lg shadow-sm opacity-0 tooltip dark:bg-gray-700"> Link copied! <div class="tooltip-arrow" data-popper-arrow></div> </div>
|
||||
<div class="space-x-0.5 flex items-center">
|
||||
<a class="!cursor-pointer text-no-underline flex items-center" href="{{ build_qa_url(interpretation) }}" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M7.5 8.25h9m-9 3H12m-9.75 1.51c0 1.6 1.123 2.994 2.707 3.227 1.129.166 2.27.293 3.423.379.35.026.67.21.865.501L12 21l2.755-4.133a1.14 1.14 0 01.865-.501 48.172 48.172 0 003.423-.379c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z" /> </svg>
|
||||
<p>{{interpretation.active_comments | length}}</p>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</dt>
|
||||
</div>
|
||||
</dl>
|
||||
{% endfor %}
|
||||
<!-- prettier-ignore -->
|
||||
{% if page.pages > 1 %}
|
||||
<div class="container content-center mt-3 flex bg-white dark:bg-gray-800">
|
||||
|
|
|
@ -36,75 +36,10 @@
|
|||
<h1 class="hidden md:inline font-extrabold text-lg dark:text-white ml-4 mt-5">No {{tag_name}} in any interpretation, try another search query.</h1>
|
||||
{% else %}
|
||||
{% for interpretation in interpretations %}
|
||||
<!-- prettier-ignore -->
|
||||
<dl class="bg-white dark:bg-gray-900 max-w-full p-3 text-gray-900 divide-y divide-gray-200 dark:text-white dark:divide-gray-700 m-3 border-2 border-gray-200 border-solid rounded-lg dark:border-gray-700">
|
||||
<div class="flex flex-row pb-3 p-3 w-2/3 md:w-10/12">
|
||||
<div class="vote-block flex flex-col m-5 justify-center items-center">
|
||||
{% if interpretation.user_id != current_user.id %}
|
||||
<div class="vote-button cursor-pointer" data-vote-for="interpretation" data-entity-id="{{ interpretation.id }}" data-positive="true">
|
||||
<svg class="w-6 h-6 select-none
|
||||
{% if interpretation.current_user_vote %}
|
||||
stroke-green-500
|
||||
{% endif %}
|
||||
" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" > <path stroke-linecap="round" stroke-linejoin="round" d="M4.5 10.5L12 3m0 0l7.5 7.5M12 3v18" /> </svg>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<span
|
||||
class="vote-count text-3xl select-none
|
||||
{% if interpretation.vote_count < 0 %}
|
||||
text-red-500
|
||||
{% elif interpretation.vote_count > 0 %}
|
||||
text-green-500
|
||||
{% endif %}
|
||||
"
|
||||
>
|
||||
{{ interpretation.vote_count }}
|
||||
</span>
|
||||
|
||||
{% if interpretation.user_id != current_user.id %}
|
||||
<div class="vote-button cursor-pointer" data-vote-for="interpretation" data-entity-id="{{ interpretation.id }}" data-positive="false">
|
||||
<svg class="w-6 h-6 select-none
|
||||
{% if interpretation.current_user_vote == False %}
|
||||
stroke-red-500
|
||||
{% endif %}
|
||||
" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"> <path stroke-linecap="round" stroke-linejoin="round" d="M19.5 13.5L12 21m0 0l-7.5-7.5M12 21V3" /> </svg>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<!-- prettier-ignore -->
|
||||
<dt class="flex w-full mb-1 text-gray-500 md:text-lg dark:text-gray-400 flex-col">
|
||||
<div class="ql-snow">
|
||||
{% set local_breadcrumbs = interpretation.section.breadcrumbs_path %}
|
||||
{% include 'book/local_breadcrumbs_navigation.html'%}
|
||||
<p>{{ interpretation.section.label }}</p>
|
||||
</a>
|
||||
<div class="dark:text-white h-30 ql-editor-readonly">
|
||||
<p>{{ display_inline_elements(interpretation.text)|safe }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex mt-auto align-center justify-between md:w-full">
|
||||
<div>
|
||||
<span class="hidden md:inline-block">Interpretation by</span>
|
||||
<a href="{{url_for('user.profile',user_id=interpretation.user.id)}}" class=" text-blue-500 {% if interpretation.user.is_deleted %}line-through{% endif %}">{{interpretation.user.username}}</a> on {{interpretation.created_at.strftime('%B %d, %Y')}}
|
||||
</div>
|
||||
<div class="flex ml-auto justify-between w-24">
|
||||
<button data-tooltip-target="tooltip-click" data-tooltip-trigger="click" id="copyLinkButton" type="button" class="hover:text-white focus:ring-2 rounded-full font-medium text-sm p-2.5 text-center inline-flex items-center dark:hover:text-white" data-link="{{ build_qa_url(interpretation) }}">
|
||||
{% include 'icons/share_btn.html' %}
|
||||
</button>
|
||||
<div id="tooltip-click" role="tooltip" class="absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white bg-gray-900 rounded-lg shadow-sm opacity-0 tooltip dark:bg-gray-700"> Link copied! <div class="tooltip-arrow" data-popper-arrow></div> </div>
|
||||
<div class="space-x-0.5 flex items-center">
|
||||
<a class="!cursor-pointer text-no-underline flex items-center" href="{{ build_qa_url(interpretation) }}" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M7.5 8.25h9m-9 3H12m-9.75 1.51c0 1.6 1.123 2.994 2.707 3.227 1.129.166 2.27.293 3.423.379.35.026.67.21.865.501L12 21l2.755-4.133a1.14 1.14 0 01.865-.501 48.172 48.172 0 003.423-.379c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z" /> </svg>
|
||||
<p>{{interpretation.active_comments | length}}</p>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</dt>
|
||||
</div>
|
||||
</dl>
|
||||
{% endfor %}
|
||||
{% with show_breadcrumbs=True, hide_vote_btns=True %}
|
||||
{% include 'book/components/interpretation_list_item.html' %}
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
<!-- prettier-ignore -->
|
||||
{% if page.pages > 1 %}
|
||||
<div class="container content-center mt-3 flex bg-white dark:bg-gray-800">
|
||||
|
|
|
@ -53,70 +53,9 @@
|
|||
<!-- prettier-ignore -->
|
||||
<div class="hidden p-4 rounded-lg bg-gray-50 dark:bg-gray-800" id="contributions" role="tabpanel" aria-labelledby="contributions-tab">
|
||||
{% for interpretation in interpretations %}
|
||||
<!-- prettier-ignore -->
|
||||
<dl class="bg-white dark:bg-gray-900 max-w-full p-3 text-gray-900 divide-y divide-gray-200 dark:text-white dark:divide-gray-700 m-3 border-2 border-gray-200 border-solid rounded-lg dark:border-gray-700">
|
||||
<div class="flex flex-row pb-3 p-3 w-2/3 md:w-10/12">
|
||||
<div class="vote-block flex flex-col m-5 justify-center items-center">
|
||||
<div class="vote-button cursor-pointer" data-vote-for="interpretation" data-entity-id="{{ interpretation.id }}" data-positive="true">
|
||||
<svg class="w-6 h-6 select-none
|
||||
{% if interpretation.current_user_vote %}
|
||||
stroke-green-500
|
||||
{% endif %}
|
||||
" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" > <path stroke-linecap="round" stroke-linejoin="round" d="M4.5 10.5L12 3m0 0l7.5 7.5M12 3v18" /> </svg>
|
||||
</div>
|
||||
|
||||
<span
|
||||
class="vote-count text-3xl select-none
|
||||
{% if interpretation.vote_count < 0 %}
|
||||
text-red-500
|
||||
{% elif interpretation.vote_count > 0 %}
|
||||
text-green-500
|
||||
{% endif %}
|
||||
"
|
||||
>
|
||||
{{ interpretation.vote_count }}
|
||||
</span>
|
||||
|
||||
<div class="vote-button cursor-pointer" data-vote-for="interpretation" data-entity-id="{{ interpretation.id }}" data-positive="false">
|
||||
<svg class="w-6 h-6 select-none
|
||||
{% if interpretation.current_user_vote == False %}
|
||||
stroke-red-500
|
||||
{% endif %}
|
||||
" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"> <path stroke-linecap="round" stroke-linejoin="round" d="M19.5 13.5L12 21m0 0l-7.5-7.5M12 21V3" /> </svg>
|
||||
</div>
|
||||
</div>
|
||||
<!-- prettier-ignore -->
|
||||
<dt class="flex w-full mb-1 text-gray-500 md:text-lg dark:text-gray-400 flex-col">
|
||||
<div class="ql-snow">
|
||||
{% set local_breadcrumbs = interpretation.section.breadcrumbs_path %}
|
||||
{% include 'book/local_breadcrumbs_navigation.html'%}
|
||||
<p>{{ interpretation.section.label }}</p>
|
||||
</a>
|
||||
<div class="dark:text-white h-30 ql-editor-readonly">
|
||||
<p>{{ display_inline_elements(interpretation.text)|safe }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex mt-auto align-center justify-between md:w-full">
|
||||
<div>
|
||||
<span class="hidden md:inline-block">Interpretation by</span>
|
||||
<a href="{{url_for('user.profile',user_id=interpretation.user.id)}}" class=" text-blue-500 {% if interpretation.user.is_deleted %}line-through{% endif %}">{{interpretation.user.username}}</a> on {{interpretation.created_at.strftime('%B %d, %Y')}}
|
||||
</div>
|
||||
<div class="flex ml-auto justify-between w-24">
|
||||
<button data-tooltip-target="tooltip-click" data-tooltip-trigger="click" id="copyLinkButton" type="button" class="hover:dark:text-white hover:text-black focus:ring-2 rounded-full font-medium text-sm p-2.5 text-center inline-flex items-center dark:hover:text-white" data-link="{{ build_qa_url(interpretation) }}">
|
||||
{% include 'icons/share_btn.html' %}
|
||||
</button>
|
||||
<div id="tooltip-click" role="tooltip" class="absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white bg-gray-900 rounded-lg shadow-sm opacity-0 tooltip dark:bg-gray-700"> Link copied! <div class="tooltip-arrow" data-popper-arrow></div> </div>
|
||||
<div class="space-x-0.5 flex items-center">
|
||||
<a class="!cursor-pointer text-no-underline flex items-center" href="{{ build_qa_url(interpretation) }}" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M7.5 8.25h9m-9 3H12m-9.75 1.51c0 1.6 1.123 2.994 2.707 3.227 1.129.166 2.27.293 3.423.379.35.026.67.21.865.501L12 21l2.755-4.133a1.14 1.14 0 01.865-.501 48.172 48.172 0 003.423-.379c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z" /> </svg>
|
||||
<p>{{interpretation.active_comments | length}}</p>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</dt>
|
||||
</div>
|
||||
</dl>
|
||||
{% with show_breadcrumbs=True, hide_vote_btns=True %}
|
||||
{% include 'book/components/interpretation_list_item.html' %}
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue