mirror of https://github.com/logos-co/open-law.git
Merge pull request #191 from Simple2B/svyat/feat/mobile_adaptation
Svyat/feat/mobile adaptation
This commit is contained in:
commit
06d5322c81
|
@ -1,5 +1,6 @@
|
|||
import os
|
||||
import warnings
|
||||
from uuid import uuid4
|
||||
|
||||
from flask import Flask, render_template
|
||||
from flask_sqlalchemy import SQLAlchemy
|
||||
|
@ -81,6 +82,8 @@ def create_app(environment="development"):
|
|||
|
||||
app.jinja_env.globals["type"] = type
|
||||
app.jinja_env.globals["m"] = m
|
||||
app.jinja_env.globals["str"] = str
|
||||
app.jinja_env.globals["uuid"] = uuid4
|
||||
|
||||
app.jinja_env.globals["Access"] = m.Permission.Access
|
||||
app.jinja_env.globals["EntityType"] = m.Permission.Entity
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -128,28 +128,39 @@
|
|||
{% include 'book/components/tab_content_slider.html' %}
|
||||
</div>
|
||||
<!-- Here start book-preview on right side-->
|
||||
<div class="w-full p-3 px-6 md:w-4/6 dark:text-white">
|
||||
<div class="md:hidden w-full p-3 px-4 md:w-4/6 dark:text-white dark:bg-gray-500 bg-gray-400 {% if book.active_version.active_children %} hidden {% endif %}">
|
||||
<div class="text-center text-xs ">
|
||||
Editing a book is not available on mobile (yet). Please browse from your desktop to access all the features.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="w-full p-3 px-6 md:w-4/6 dark:text-white {% if not book.active_version.active_children %} hidden {% endif %} md:inline">
|
||||
<p class="text-xs mb-3">
|
||||
{% if book.original_book %} Forked by
|
||||
{% if book.original_book %}
|
||||
Forked by
|
||||
<a
|
||||
href="{{url_for('user.profile',user_id=book.owner.id)}}"
|
||||
class="text-blue-500 {% if book.owner.is_deleted %}line-through{% endif %}">
|
||||
{{book.owner.username}}
|
||||
</a>
|
||||
from
|
||||
<a
|
||||
href="{{ url_for('book.collection_view', book_id=book.original_book.id ) }}"
|
||||
target="_blank"
|
||||
class="text-blue-500 {% if book.owner.is_deleted %}line-through{% endif %}">
|
||||
{{book.original_book.owner.username}}/{{book.original_book.label}}
|
||||
</a>
|
||||
{% else %}
|
||||
Created by
|
||||
<a
|
||||
href="{{url_for('user.profile',user_id=book.owner.id)}}"
|
||||
class="text-blue-500 {% if book.owner.is_deleted %}line-through{% endif %}">
|
||||
{{book.owner.username}}
|
||||
</a>
|
||||
from
|
||||
<a
|
||||
href="{{ url_for('book.collection_view', book_id=book.original_book.id ) }}"
|
||||
target="_blank"
|
||||
class="text-blue-500 {% if book.owner.is_deleted %}line-through{% endif %}">
|
||||
{{book.original_book.owner.username}}/{{book.original_book.label}}
|
||||
</a>
|
||||
{% else %} Created by
|
||||
<a
|
||||
href="{{url_for('user.profile',user_id=book.owner.id)}}"
|
||||
class="text-blue-500 {% if book.owner.is_deleted %}line-through{% endif %}">
|
||||
{{book.owner.username}}
|
||||
</a>
|
||||
{% endif %} on {{book.created_at.strftime('%B %d, %Y')}}. Last updated on
|
||||
{% endif %}
|
||||
on
|
||||
{{book.created_at.strftime('%B %d, %Y')}}
|
||||
. Last updated on
|
||||
{{book.created_at.strftime('%B %d, %Y')}}
|
||||
</p>
|
||||
|
||||
|
@ -170,8 +181,8 @@
|
|||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="flex justify-between item-center mb-5">
|
||||
<h1 class="text-20 hidden md:inline font-extrabold dark:text-white">
|
||||
<div class="flex flex-row justify-between item-center mb-5">
|
||||
<h1 class="text-[2rem] hidden md:inline font-extrabold dark:text-white">
|
||||
{{book.label}}
|
||||
</h1>
|
||||
<div class="ml-auto flex">
|
||||
|
@ -202,6 +213,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="gap-1 flex flex-wrap mb-5">
|
||||
{% for tag in book.tags %}
|
||||
<a
|
||||
|
@ -234,10 +246,12 @@
|
|||
{{recursive_render("book/components/sub_collection_preview_content.html",collection,book,version,2)|safe}}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
{% endblock %}
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
{% block scripts %}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
|
|
@ -2,64 +2,12 @@
|
|||
<ul class="flex font-medium">
|
||||
<li>
|
||||
{% if not selected_tab=='my_contributions' %}
|
||||
<!-- prettier-ignore -->
|
||||
<button type="button" data-modal-target="add-book-modal" data-modal-toggle="add-book-modal" class="text-white ml-2 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2.5 text-center inline-flex items-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-4 h-4"> <path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15" /> </svg>
|
||||
New book
|
||||
</button>
|
||||
<!-- prettier-ignore -->
|
||||
{% include 'book/components/new_book_btn.html' %}
|
||||
{% endif %}
|
||||
</li>
|
||||
<li>
|
||||
<!-- prettier-ignore -->
|
||||
<button id="dropdownDelayButton" data-dropdown-toggle="dropdownDelay" data-dropdown-delay="500" data-dropdown-trigger="hover" class="text-white ml-4 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2.5 text-center inline-flex items-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800" type="button">
|
||||
Sort by
|
||||
{{request.args.get('sort',"")}}
|
||||
<!-- prettier-ignore -->
|
||||
<svg class="w-4 h-4 ml-auto" aria-hidden="true" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path> </svg>
|
||||
</button>
|
||||
|
||||
<!-- Dropdown menu -->
|
||||
<!-- prettier-ignore -->
|
||||
<div id="dropdownDelay" class="z-10 hidden bg-white divide-y divide-gray-100 rounded-lg shadow w-44 dark:bg-gray-700">
|
||||
<ul class="py-2 text-sm text-gray-700 dark:text-gray-200" aria-labelledby="dropdownDelayButton">
|
||||
<!-- prettier-ignore -->
|
||||
{% if selected_tab=='latest_interpretations' or selected_tab=='my_contributions' %}
|
||||
<li>
|
||||
<a href="?sort=upvoted" class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white" >
|
||||
Most upvoted
|
||||
</a >
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if selected_tab=='my_library' or selected_tab=='favorite_books' or selected_tab=='explore_books'%}
|
||||
<li>
|
||||
<a href="?sort=favorited" class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white" >
|
||||
Most favorited
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
<li>
|
||||
<a href="?sort=recent" class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white" >
|
||||
Most recent
|
||||
</a >
|
||||
</li>
|
||||
{% if selected_tab=='latest_interpretations' or selected_tab=='my_contributions' %}
|
||||
<li>
|
||||
<a href="?sort=commented" class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white" >
|
||||
Most comments
|
||||
</a >
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if selected_tab=='my_library' or selected_tab=='favorite_books' or selected_tab=='explore_books'%}
|
||||
<li>
|
||||
<a href="?sort=interpretations" class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white" >
|
||||
Most interpretations
|
||||
</a >
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
{% include 'book/components/sort_by_btn.html' %}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
<button type="button" data-modal-target="add-book-modal" data-modal-toggle="add-book-modal" class="text-white md:ml-2 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2.5 text-center inline-flex items-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-4 h-4"> <path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15" /> </svg>
|
||||
New book
|
||||
</button>
|
|
@ -0,0 +1,53 @@
|
|||
{% set unique_id = str(uuid()) %}
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
<button id="dropdownDelayButton" data-dropdown-toggle="dropdownDelay-{{unique_id}}" data-dropdown-delay="500" data-dropdown-trigger="hover" class="text-white ml-4 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2.5 text-center inline-flex items-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800" type="button">
|
||||
Sort by
|
||||
{{request.args.get('sort',"")}}
|
||||
<!-- prettier-ignore -->
|
||||
<svg class="w-4 h-4 ml-auto" aria-hidden="true" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path> </svg>
|
||||
</button>
|
||||
|
||||
<!-- Dropdown menu -->
|
||||
<!-- prettier-ignore -->
|
||||
<div id="dropdownDelay-{{unique_id}}" class="z-10 hidden bg-white divide-y divide-gray-100 rounded-lg shadow w-44 dark:bg-gray-700">
|
||||
<ul class="py-2 text-sm text-gray-700 dark:text-gray-200" aria-labelledby="dropdownDelayButton">
|
||||
<!-- prettier-ignore -->
|
||||
{% if selected_tab=='latest_interpretations' or selected_tab=='my_contributions' %}
|
||||
<li>
|
||||
<a href="?sort=upvoted" class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white" >
|
||||
Most upvoted
|
||||
</a >
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if selected_tab=='my_library' or selected_tab=='favorite_books' or selected_tab=='explore_books'%}
|
||||
<li>
|
||||
<a href="?sort=favorited" class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white" >
|
||||
Most favorited
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
<li>
|
||||
<a href="?sort=recent" class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white" >
|
||||
Most recent
|
||||
</a >
|
||||
</li>
|
||||
{% if selected_tab=='latest_interpretations' or selected_tab=='my_contributions' %}
|
||||
<li>
|
||||
<a href="?sort=commented" class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white" >
|
||||
Most comments
|
||||
</a >
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if selected_tab=='my_library' or selected_tab=='favorite_books' or selected_tab=='explore_books'%}
|
||||
<li>
|
||||
<a href="?sort=interpretations" class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white" >
|
||||
Most interpretations
|
||||
</a >
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
|
@ -1,14 +1,20 @@
|
|||
<!-- prettier-ignore -->
|
||||
<div id="tab-content-slide" aria-label="Slider" class="w-full border-gray-200 dark:border-gray-700 h-screen md:hidden fixed top-16 left-0 z-40 transition-transform -translate-x-full bg-white border-r md:translate-x-0 dark:bg-gray-800 bg-opacity-0">
|
||||
<div id="accordion-collapse-mobile" data-accordion="open" class="p-3 w-full border-r fixed inset-0 mt-16 overflow-y-scroll">
|
||||
<!-- prettier-ignore -->
|
||||
<div class="md:hidden w-screen flex dark:text-white justify-between">
|
||||
<div id="accordion-collapse-mobile" data-accordion="open" class="p-3 w-full border-r fixed inset-0 mt-16 overflow-y-scroll">
|
||||
<!-- prettier-ignore -->
|
||||
<div class="md:hidden w-screen flex dark:text-white justify-between">
|
||||
<!-- prettier-ignore -->
|
||||
<svg data-drawer-target="tab-content-slide" data-drawer-toggle="tab-content-slide" aria-controls="Slider" class="w-6 h-6 rotate-90 shrink-0" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path> </svg>
|
||||
<p class="truncate">{{book.label}}</p>
|
||||
<!-- prettier-ignore -->
|
||||
<a href="{{ url_for('book.settings', book_id=book.id) }}" type="button" class="ml-2"> <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="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.24-.438.613-.431.992a6.759 6.759 0 010 .255c-.007.378.138.75.43.99l1.005.828c.424.35.534.954.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.57 6.57 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.28c-.09.543-.56.941-1.11.941h-2.594c-.55 0-1.02-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.992a6.932 6.932 0 010-.255c.007-.378-.138-.75-.43-.99l-1.004-.828a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.087.22-.128.332-.183.582-.495.644-.869l.214-1.281z" /> <path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" /> </svg> </a>
|
||||
</div>
|
||||
|
||||
<div class="md:hidden w-full mt-3 p-3 px-4 md:w-4/6 dark:text-white dark:bg-gray-500 bg-gray-400 {% if book.active_version.active_children %} hidden {% endif %}">
|
||||
<div class="text-center text-xs ">
|
||||
Editing a book is not available on mobile (yet). Please browse from your desktop to access all the features.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if version %}
|
||||
{% set children_collections = version.children_collections %}
|
||||
|
|
|
@ -22,14 +22,19 @@
|
|||
<!-- prettier-ignore -->
|
||||
<div class="flex flex-col w-full">
|
||||
{% if current_user.is_authenticated and books.total>0 %}
|
||||
<div class="flex justify-between mt-1">
|
||||
<h1 class=" text-lg font-extrabold dark:text-white ml-4">Fav books</h1>
|
||||
<div class="flex justify-between items-center mt-1">
|
||||
<h1 class=" text-[2rem] font-extrabold dark:text-white ml-4">Fav books</h1>
|
||||
{% if current_user.is_authenticated %}
|
||||
{% include 'book/components/header_buttons.html' %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="md:hidden flex justify-between border-b py-3 px-4 border-gray-200 dark:border-gray-700">
|
||||
{% include 'book/components/new_book_btn.html' %}
|
||||
{% include 'book/components/sort_by_btn.html' %}
|
||||
</div>
|
||||
|
||||
{% for book in books %}
|
||||
{% include 'book/components/book_list_item.html' %}
|
||||
{% endfor %}
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
|
||||
{% block content %}
|
||||
<div
|
||||
class="pt-1 relative sm:rounded-lg mt-1 h-box flex">
|
||||
class="pt-1 relative sm:rounded-lg mt-1 h-box flex"
|
||||
>
|
||||
{% if not current_user.is_authenticated %}
|
||||
<!-- prettier-ignore -->
|
||||
<div class="mx-auto my-auto h-full w-full p-2">
|
||||
|
@ -22,19 +23,21 @@
|
|||
<!-- prettier-ignore -->
|
||||
<div class="flex flex-col w-full">
|
||||
{% if current_user.is_authenticated and interpretations.total %}
|
||||
<div class="flex justify-between mt-1">
|
||||
<h1 class=" text-lg font-extrabold dark:text-white ml-4">My contributions</h1>
|
||||
{% if current_user.is_authenticated %}
|
||||
{% include 'book/components/header_buttons.html' %}
|
||||
{% endif %}
|
||||
<div class="flex justify-between items-center mt-1">
|
||||
<h1 class="text-[2rem] font-extrabold dark:text-white ml-4">My contributions</h1>
|
||||
{% if current_user.is_authenticated %}
|
||||
{% include 'book/components/header_buttons.html' %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="md:hidden flex justify-end border-b py-3 px-4 border-gray-200 dark:border-gray-700">
|
||||
{% include 'book/components/sort_by_btn.html' %}
|
||||
</div>
|
||||
|
||||
|
||||
{% for interpretation in interpretations %}
|
||||
{% with show_control_btns=True %}
|
||||
{% include 'book/components/interpretation_list_item.html' %}
|
||||
{% endwith %}
|
||||
{% include 'book/components/interpretation_list_item.html' %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
|
|
|
@ -22,41 +22,31 @@
|
|||
</div>
|
||||
{% endif %} {% if current_user.is_authenticated and not books.total %}
|
||||
<div class="mx-auto my-auto h-full w-full p-2">
|
||||
<button
|
||||
type="button"
|
||||
data-modal-target="add-book-modal"
|
||||
data-modal-toggle="add-book-modal"
|
||||
class="w-full h-full text-black dark:text-white focus:ring-4 focus:outline-none focus:ring-blue-100 font-medium rounded-lg text-sm px-4 py-2.5 justify-center text-center inline-flex items-center border border-gray-200 dark:border-gray-700">
|
||||
<div class="my-auto flex items-center space-x-2">
|
||||
<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="M12 4.5v15m7.5-7.5h-15" />
|
||||
</svg>
|
||||
<span>New book</span>
|
||||
</div>
|
||||
</button>
|
||||
{% include 'book/components/new_book_btn.html' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
{% if current_user.is_authenticated and books.total %}
|
||||
<div class="flex flex-col w-full">
|
||||
<div class="flex justify-between mt-1">
|
||||
<h1 class="text-lg font-extrabold dark:text-white ml-4">My library</h1>
|
||||
{% if current_user.is_authenticated %} {% include
|
||||
'book/components/header_buttons.html' %} {% endif %}
|
||||
<div class="flex justify-between items-center mt-1">
|
||||
<h1 class="text-[2rem] font-extrabold dark:text-white ml-4">My library</h1>
|
||||
{% if current_user.is_authenticated %}
|
||||
{% include 'book/components/header_buttons.html' %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %} {% for book in books if not book.is_deleted %} {% include
|
||||
'book/components/book_list_item.html' %} {% endfor %}
|
||||
{% endif %}
|
||||
|
||||
<div class="md:hidden flex justify-between border-b py-3 px-4 border-gray-200 dark:border-gray-700">
|
||||
{% include 'book/components/new_book_btn.html' %}
|
||||
{% include 'book/components/sort_by_btn.html' %}
|
||||
</div>
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
{% for book in books if not book.is_deleted %}
|
||||
{% include 'book/components/book_list_item.html' %}
|
||||
{% endfor %}
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
{% if current_user.is_authenticated and page.pages > 1 %}
|
||||
|
|
|
@ -14,25 +14,25 @@
|
|||
<p class="hidden md:block text-sm ml-4 w-1/2 text-gray-500 text-center md:text-left dark:text-gray-400"> {{book.about}} </p>
|
||||
<!-- prettier-ignore -->
|
||||
<ul class="flex md:flex-wrap justify-between md:justify-start -mb-px text-xs md:text-sm font-medium text-center" id="myTab" data-tabs-toggle="#myTabContent" role="tablist">
|
||||
<li class="mr-2 w-full md:w-auto" role="presentation">
|
||||
<li class="md:mr-2 w-full md:w-auto flex items-center justify-center" role="presentation">
|
||||
<!-- prettier-ignore -->
|
||||
<button class="inline-flex p-4 rounded-t-lg" id="favorited-tab" data-tabs-target="#favorited" type="button" role="tab" aria-controls="favorited" aria-selected="false"><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 mr-3"> <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>
|
||||
<span class="hidden md:inline"> Favorited by</span>
|
||||
</button>
|
||||
</li>
|
||||
<li class="mr-2 w-full md:w-auto" role="presentation">
|
||||
<li class="md:mr-2 w-full md:w-auto flex items-center justify-center" role="presentation">
|
||||
<!-- prettier-ignore -->
|
||||
<button class="inline-flex p-4 mrounded-t-lg hover:text-gray-600 dark:hover:text-gray-300" id="contributors-tab" data-tabs-target="#contributors" type="button" role="tab" aria-controls="contributors" {% if active_tab=='contributors' %}aria-selected="true"{% endif %}><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 mr-3"> <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>
|
||||
<span class="hidden md:inline"> Contributors</span>
|
||||
</button>
|
||||
</li>
|
||||
<li class="mr-2 w-full md:w-auto" role="presentation">
|
||||
<li class="md:mr-2 w-full md:w-auto flex items-center justify-center" role="presentation">
|
||||
<!-- prettier-ignore -->
|
||||
<button class="inline-flex p-4 mrounded-t-lg hover:text-gray-600 dark:hover:text-gray-300" id="version-tab" data-tabs-target="#version" type="button" role="tab" aria-controls="version" {% if active_tab=='version' %}aria-selected="true"{% endif %}><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 mr-3"> <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>
|
||||
<span class="hidden md:inline"> Released versions</span>
|
||||
</button>
|
||||
</li>
|
||||
<li class="mr-2 w-full md:w-auto" role="presentation">
|
||||
<li class="md:mr-2 w-full md:w-auto flex items-center justify-center" role="presentation">
|
||||
<!-- prettier-ignore -->
|
||||
<button class="inline-flex p-4 rounded-t-lg hover:text-gray-600 dark:hover:text-gray-300" id="fork-tab" data-tabs-target="#fork" type="button" role="tab" aria-controls="fork" {% if active_tab=='forks' %}aria-selected="true"{% endif %}><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 mr-3"> <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>
|
||||
<span class="hidden md:inline"> Forks</span>
|
||||
|
|
|
@ -11,60 +11,13 @@
|
|||
<svg class="w-6 h-6" aria-hidden="true" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path clip-rule="evenodd" fill-rule="evenodd" d="M2 4.75A.75.75 0 012.75 4h14.5a.75.75 0 010 1.5H2.75A.75.75 0 012 4.75zm0 10.5a.75.75 0 01.75-.75h7.5a.75.75 0 010 1.5h-7.5a.75.75 0 01-.75-.75zM2 10a.75.75 0 01.75-.75h14.5a.75.75 0 010 1.5H2.75A.75.75 0 012 10z"></path> </svg>
|
||||
</button>
|
||||
<!-- prettier-ignore -->
|
||||
<a href="/" class="flex ml-32 md:ml-2 md:mr-24"> <img src="{{url_for('static',filename='img/logo.svg')}}" class="h-8 md:mr-3" alt="OpenLaw Logo" /> <span class="hidden md:inline-block self-center text-xl font-semibold sm:text-2xl whitespace-nowrap dark:text-white" >OpenLaw</span > </a>
|
||||
<a href="/" class="flex ml-32 md:ml-2 md:mr-24">
|
||||
<img src="{{url_for('static',filename='img/logo.svg')}}" class="h-8 md:mr-3" alt="OpenLaw Logo" />
|
||||
<span class="hidden md:inline-block self-center text-xl font-semibold sm:text-2xl whitespace-nowrap dark:text-white" >
|
||||
OpenLaw
|
||||
</span >
|
||||
</a>
|
||||
<!-- prettier-ignore -->
|
||||
{% if selected_tab=='my_library' or selected_tab=='favorite_books' or selected_tab=='explore_books' or selected_tab=='latest_interpretations' or selected_tab=='my_contributions' %}
|
||||
<button id="dropdownDelayButton" data-dropdown-toggle="dropdownDelay" data-dropdown-delay="500" data-dropdown-trigger="hover" class="md:hidden text-white ml-auto bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2.5 text-center inline-flex items-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800" type="button">
|
||||
Sort by
|
||||
{{request.args.get('sort',"")}}
|
||||
<!-- prettier-ignore -->
|
||||
<svg class="w-4 h-4 ml-auto" aria-hidden="true" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path> </svg>
|
||||
</button>
|
||||
|
||||
<!-- Dropdown menu -->
|
||||
<!-- prettier-ignore -->
|
||||
<div id="dropdownDelay" class="z-10 hidden bg-white divide-y divide-gray-100 rounded-lg shadow w-44 dark:bg-gray-700">
|
||||
<ul class="py-2 text-sm text-gray-700 dark:text-gray-200" aria-labelledby="dropdownDelayButton">
|
||||
<!-- prettier-ignore -->
|
||||
{% if selected_tab=='latest_interpretations' or selected_tab=='my_contributions' %}
|
||||
<li>
|
||||
<a href="?sort=upvoted" class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white" >
|
||||
Most upvoted
|
||||
</a >
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if selected_tab=='my_library' or selected_tab=='favorite_books' or selected_tab=='explore_books'%}
|
||||
<li>
|
||||
<a href="?sort=favorited" class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white" >
|
||||
Most favorited
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
<li>
|
||||
<a href="?sort=recent" class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white" >
|
||||
Most recent
|
||||
</a >
|
||||
</li>
|
||||
{% if selected_tab=='latest_interpretations' or selected_tab=='my_contributions' %}
|
||||
<li>
|
||||
<a href="?sort=commented" class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white" >
|
||||
Most comments
|
||||
</a >
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if selected_tab=='my_library' or selected_tab=='favorite_books' or selected_tab=='explore_books'%}
|
||||
<li>
|
||||
<a href="?sort=interpretations" class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white" >
|
||||
Most interpretations
|
||||
</a >
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% include 'sidebar.html' %}
|
||||
{% include 'searchbar.html' %}
|
||||
<!-- prettier-ignore -->
|
||||
|
@ -76,19 +29,16 @@
|
|||
|
||||
<!-- prettier-ignore -->
|
||||
{% if not current_user.is_authenticated %}
|
||||
<button
|
||||
id="connectWalletBtn"
|
||||
type="button"
|
||||
class="md:flex hidden text-white bg-gradient-to-r from-cyan-500 to-blue-500 hover:bg-gradient-to-bl focus:ring-4 focus:outline-none focus:ring-cyan-300 dark:focus:ring-cyan-800 font-medium rounded-lg text-sm px-5 py-2.5 text-center">
|
||||
Connect wallet
|
||||
</button>
|
||||
<a
|
||||
href="https://join.status.im/b/{{request.base_url}}"
|
||||
class="md:hidden flex text-white bg-gradient-to-r from-cyan-500 to-blue-500 hover:bg-gradient-to-bl focus:ring-4 focus:outline-none focus:ring-cyan-300 dark:focus:ring-cyan-800 font-medium rounded-lg text-sm px-5 py-2.5 text-center"
|
||||
>
|
||||
Connect wallet
|
||||
</a>
|
||||
{% endif %} {% if current_user.is_authenticated %}
|
||||
<button
|
||||
id="connectWalletBtn"
|
||||
type="button"
|
||||
class="md:flex hidden text-white bg-gradient-to-r from-cyan-500 to-blue-500 hover:bg-gradient-to-bl focus:ring-4 focus:outline-none focus:ring-cyan-300 dark:focus:ring-cyan-800 font-medium rounded-lg text-sm px-5 py-2.5 text-center">
|
||||
Connect wallet
|
||||
</button>
|
||||
{% endif %}
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
{% if current_user.is_authenticated %}
|
||||
<div class="md:flex hidden">
|
||||
<div class="items-center md:ml-3 hidden md:flex">
|
||||
<!-- prettier-ignore -->
|
||||
|
|
|
@ -3,31 +3,29 @@
|
|||
<!-- prettier-ignore -->
|
||||
{% extends 'base.html' %}
|
||||
{% block content %}
|
||||
<div class="border-b pt-1 border-gray-200 dark:border-gray-700">
|
||||
<div class="border-b pt-4 border-gray-200 dark:border-gray-700">
|
||||
<!-- prettier-ignore -->
|
||||
<h1 class="hidden md:inline font-extrabold text-lg dark:text-white ml-4 mt-5">Open Common Law</h1>
|
||||
<div class="flex justify-between">
|
||||
<h1 class="hidden md:inline font-extrabold text-[2rem] dark:text-white ml-4 mt-5">Open Common Law</h1>
|
||||
<div class="flex justify-between items-center mt-5">
|
||||
<p
|
||||
class="hidden md:block text-sm ml-4 w-1/2 text-gray-500 text-center md:text-left dark:text-gray-400">
|
||||
class="hidden md:block text-base ml-4 w-2/3 text-gray-500 text-center md:text-left dark:text-gray-400">
|
||||
An open-source law hosting platform that allows online communities to
|
||||
easily create, collaborate, and publish their own body of law.
|
||||
</p>
|
||||
<div class="flex">
|
||||
<!-- prettier-ignore -->
|
||||
{% if current_user.is_authenticated %}
|
||||
<!-- prettier-ignore -->
|
||||
{% if current_user.is_authenticated %}
|
||||
{% include 'book/components/header_buttons.html' %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<!-- prettier-ignore -->
|
||||
<ul class="flex md:flex-wrap -mb-px text-xs md:text-sm font-medium text-center" id="myTab" data-tabs-toggle="#myTabContent" role="tablist">
|
||||
<li class="mr-2 w-full md:w-auto" role="presentation">
|
||||
<li class="md:mr-2 w-full md:w-auto flex items-center justify-center" role="presentation">
|
||||
<!-- prettier-ignore -->
|
||||
<a href="{{url_for('home.get_all')}}" class="inline-flex py-4 md:p-4 items-center rounded-t-lg" id="last-interpretations-tab" data-tabs-target="#last-interpretations" type="button" role="tab" aria-controls="last-interpretations" aria-selected="false"> <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 mr-3"> <path stroke-linecap="round" stroke-linejoin="round" d="M3.75 13.5l10.5-11.25L12 10.5h8.25L9.75 21.75 12 13.5H3.75z" /> </svg>
|
||||
Latest Interpretations
|
||||
</a>
|
||||
</li>
|
||||
<li class="mr-2 w-full md:w-auto" role="presentation">
|
||||
<li class="md:mr-2 w-full md:w-auto flex items-center justify-center" role="presentation">
|
||||
<!-- prettier-ignore -->
|
||||
<button class="inline-flex py-4 md:p-4 items-center rounded-t-lg hover:text-gray-600 dark:hover:text-gray-300" id="explore-books-tab" data-tabs-target="#explore-books" type="button" role="tab" aria-controls="explore-books" aria-selected="true"> <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 mr-3"> <path stroke-linecap="round" stroke-linejoin="round" d="M16.5 3.75V16.5L12 14.25 7.5 16.5V3.75m9 0H18A2.25 2.25 0 0120.25 6v12A2.25 2.25 0 0118 20.25H6A2.25 2.25 0 013.75 18V6A2.25 2.25 0 016 3.75h1.5m9 0h-9" /> </svg>
|
||||
Explore Books
|
||||
|
@ -35,6 +33,11 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="md:hidden flex justify-end border-b py-3 px-4 border-gray-200 dark:border-gray-700">
|
||||
{% include 'book/components/sort_by_btn.html' %}
|
||||
</div>
|
||||
|
||||
<div id="myTabContent">
|
||||
<!-- prettier-ignore -->
|
||||
<div class="hidden md:p-4 rounded-lg bg-gray-50 dark:bg-gray-800" id="last-interpretations" role="tabpanel" aria-labelledby="last-interpretations-tab"></div>
|
||||
|
|
|
@ -3,27 +3,28 @@
|
|||
<!-- prettier-ignore -->
|
||||
{% extends 'base.html' %}
|
||||
{% block content %}
|
||||
<div class="border-b pt-1 border-gray-200 dark:border-gray-700">
|
||||
<div class="border-b pt-4 border-gray-200 dark:border-gray-700">
|
||||
<!-- prettier-ignore -->
|
||||
<h1 class="hidden md:inline font-extrabold text-lg dark:text-white ml-4 mt-5">Open Common Law</h1>
|
||||
<div class="flex justify-between">
|
||||
<h1 class="hidden md:inline font-extrabold text-[2rem] dark:text-white ml-4 mt-5">Open Common Law</h1>
|
||||
<div class="flex justify-between items-center mt-5">
|
||||
<p
|
||||
class="hidden md:block text-sm ml-4 w-1/2 text-gray-500 text-center md:text-left dark:text-gray-400">
|
||||
An open-source law hosting platform that allows online communities to
|
||||
easily create, collaborate, and publish their own body of law.
|
||||
class="hidden md:block text-base ml-4 w-2/3 text-gray-500 text-center md:text-left dark:text-gray-400">
|
||||
An open-source law hosting platform that allows online communities to easily
|
||||
create, collaborate, and publish their own body of law.
|
||||
</p>
|
||||
{% if current_user.is_authenticated %} {% include
|
||||
'book/components/header_buttons.html' %} {% endif %}
|
||||
{% if current_user.is_authenticated %}
|
||||
{% include 'book/components/header_buttons.html' %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<!-- prettier-ignore -->
|
||||
<ul class="flex md:flex-wrap -mb-px text-xs md:text-sm font-medium text-center" id="myTab" data-tabs-toggle="#myTabContent" role="tablist">
|
||||
<li class="mr-2 w-full md:w-auto" role="presentation">
|
||||
<ul class="flex md:flex-wrap -mb-px text-xs md:text-sm font-medium text-center" id="myTab" data-tabs-toggle="#myTabContent" role="tablist">
|
||||
<li class="md:mr-2 w-full md:w-auto flex items-center justify-center" role="presentation">
|
||||
<!-- prettier-ignore -->
|
||||
<button class="inline-flex py-4 md:p-4 rounded-t-lg items-center" id="last-interpretations-tab" data-tabs-target="#last-interpretations" type="button" role="tab" aria-controls="last-interpretations" aria-selected="false"> <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 mr-3"> <path stroke-linecap="round" stroke-linejoin="round" d="M3.75 13.5l10.5-11.25L12 10.5h8.25L9.75 21.75 12 13.5H3.75z" /> </svg>
|
||||
Latest Interpretations
|
||||
</button>
|
||||
</li>
|
||||
<li class="mr-2 w-full md:w-auto" role="presentation">
|
||||
<li class="md:mr-2 w-full md:w-auto flex items-center justify-center" role="presentation">
|
||||
<!-- prettier-ignore -->
|
||||
<a href="{{url_for('home.explore_books')}}" class="inline-flex py-4 md:p-4 items-center rounded-t-lg hover:text-gray-600 dark:hover:text-gray-300" id="explore-books-tab" data-tabs-target="#explore-books" type="button" role="tab" aria-controls="explore-books" aria-selected="false"> <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 mr-3"> <path stroke-linecap="round" stroke-linejoin="round" d="M16.5 3.75V16.5L12 14.25 7.5 16.5V3.75m9 0H18A2.25 2.25 0 0120.25 6v12A2.25 2.25 0 0118 20.25H6A2.25 2.25 0 013.75 18V6A2.25 2.25 0 016 3.75h1.5m9 0h-9" /> </svg>
|
||||
Explore Books
|
||||
|
@ -31,6 +32,9 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="md:hidden flex justify-end border-b py-3 px-4 border-gray-200 dark:border-gray-700">
|
||||
{% include 'book/components/sort_by_btn.html' %}
|
||||
</div>
|
||||
<div id="myTabContent">
|
||||
<!-- prettier-ignore -->
|
||||
<div class="hidden md:p-4 rounded-lg bg-gray-50 dark:bg-gray-800" id="last-interpretations" role="tabpanel" aria-labelledby="last-interpretations-tab">
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
<aside
|
||||
id="logo-right-sidebar"
|
||||
class="fixed top-10 right-0 left-auto z-40 w-64 h-screen pt-28 transition-transform translate-x-96 bg-white border-r border-gray-200 md:translate-x-0 dark:bg-gray-800 dark:border-gray-700"
|
||||
aria-label="Right-sidebar">
|
||||
<div class="h-full pb-4 overflow-y-auto bg-white dark:bg-gray-800">
|
||||
<ul class="space-y-4 font-medium">
|
||||
<li>
|
||||
<!-- prettier-ignore -->
|
||||
<button type="button" data-modal-target="add-book-modal" data-modal-toggle="add-book-modal" class="text-white ml-2 w-11/12 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2.5 text-center inline-flex items-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"><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="M12 4.5v15m7.5-7.5h-15" /> </svg> New book </button>
|
||||
</li>
|
||||
<li>
|
||||
<!-- prettier-ignore -->
|
||||
<button id="dropdownDelayButton" data-dropdown-toggle="dropdownDelay" data-dropdown-delay="500" data-dropdown-trigger="hover" class="text-white ml-2 w-11/12 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2.5 text-center inline-flex items-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800" type="button">
|
||||
Sort by
|
||||
<!-- prettier-ignore -->
|
||||
<svg class="w-4 h-4 ml-auto" aria-hidden="true" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path> </svg>
|
||||
</button>
|
||||
<!-- Dropdown menu -->
|
||||
<!-- prettier-ignore -->
|
||||
<div id="dropdownDelay" class="z-10 hidden bg-white divide-y divide-gray-100 rounded-lg shadow w-44 dark:bg-gray-700">
|
||||
<ul class="py-2 text-sm text-gray-700 dark:text-gray-200" aria-labelledby="dropdownDelayButton">
|
||||
<!-- prettier-ignore -->
|
||||
<li> <a href="#" class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white" >Dashboard</a > </li>
|
||||
<li> <a href="#" class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white" >Settings</a > </li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</aside>
|
|
@ -5,11 +5,11 @@
|
|||
{% block right_sidebar %}
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="border-b border-gray-200 dark:border-gray-700">
|
||||
<div class="pt-5 border-b border-gray-200 dark:border-gray-700">
|
||||
<!-- prettier-ignore -->
|
||||
<h1 class="hidden md:inline font-extrabold text-lg dark:text-white ml-4 mt-5">Search results</h1>
|
||||
<h1 class="hidden md:inline font-extrabold text-[2rem] dark:text-white ml-4 mt-5">Search results</h1>
|
||||
<!-- prettier-ignore -->
|
||||
<p class="hidden md:block text-sm ml-4 w-1/2 text-gray-500 text-center md:text-left dark:text-gray-400"> Search result for {{query}} </p>
|
||||
<p class="hidden md:block text-sm mt-5 ml-4 w-1/2 text-gray-500 text-center md:text-left dark:text-gray-400"> Search result for <span class="font-bold dark:text-white">{{query}}</span> </p>
|
||||
<!-- prettier-ignore -->
|
||||
<p class="hidden md:block text-sm ml-4 w-1/2 text-gray-500 text-center md:text-left dark:text-gray-400"> Showing {{count}} results </p>
|
||||
<!-- prettier-ignore -->
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
{% block right_sidebar %}
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="border-b border-gray-200 dark:border-gray-700">
|
||||
<div class="pt-5 border-b border-gray-200 dark:border-gray-700">
|
||||
<!-- prettier-ignore -->
|
||||
<h1 class="hidden md:inline font-extrabold text-lg dark:text-white ml-4 mt-5">Search results</h1>
|
||||
<h1 class="hidden md:inline font-extrabold text-[2rem] dark:text-white ml-4">Search results</h1>
|
||||
<!-- prettier-ignore -->
|
||||
<p class="hidden md:block text-sm ml-4 w-1/2 text-gray-500 text-center md:text-left dark:text-gray-400"> Search result for {{query}} </p>
|
||||
<p class="hidden md:block text-sm mt-5 ml-4 w-1/2 text-gray-500 text-center md:text-left dark:text-gray-400"> Search result for <span class="font-bold dark:text-white">{{query}}</span> </p>
|
||||
<!-- prettier-ignore -->
|
||||
<p class="hidden md:block text-sm ml-4 w-1/2 text-gray-500 text-center md:text-left dark:text-gray-400"> Showing {{count}} results </p>
|
||||
<!-- prettier-ignore -->
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
{% block right_sidebar %}
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="pt-10 md:pt-0 border-b border-gray-200 dark:border-gray-700">
|
||||
<div class="!pt-5 md:pt-0 border-b border-gray-200 dark:border-gray-700">
|
||||
<!-- prettier-ignore -->
|
||||
<h1 class="hidden md:inline font-extrabold text-lg dark:text-white ml-4 mt-5">Search results</h1>
|
||||
<h1 class="hidden md:inline font-extrabold text-[2rem] dark:text-white ml-4 mt-5">Search results</h1>
|
||||
<!-- prettier-ignore -->
|
||||
<p class="hidden md:block text-sm ml-4 w-1/2 text-gray-500 text-center md:text-left dark:text-gray-400"> Search result for {{query}} </p>
|
||||
<p class="hidden md:block text-sm mt-5 ml-4 w-1/2 text-gray-500 text-center md:text-left dark:text-gray-400"> Search result for <span class="font-bold dark:text-white">{{query}}</span> </p>
|
||||
<!-- prettier-ignore -->
|
||||
<p class="hidden md:block text-sm ml-4 w-1/2 text-gray-500 text-center md:text-left dark:text-gray-400"> Showing {{count}} results </p>
|
||||
<!-- prettier-ignore -->
|
||||
|
@ -48,8 +48,8 @@
|
|||
<h1 class="hidden md:inline font-extrabold text-lg dark:text-white ml-4 mt-5">No {{query}} in any tag, try another search query.</h1>
|
||||
{% else %}
|
||||
{% for tag in tags %}
|
||||
<dl class="bg-white dark:bg-gray-900 w-full p-5 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">
|
||||
<dt><a class="flex flex-col" href="{{url_for('search.tag_search_interpretations',tag_name=tag.name)}}">{{tag.name}}</a></dt>
|
||||
<dl class="bg-white dark:bg-gray-900 w-full p-5 text-gray-900 divide-y my-1 divide-gray-200 dark:text-white dark:divide-gray-700 border-2 border-gray-200 border-solid rounded-lg dark:border-gray-700">
|
||||
<dt><a class="flex flex-col" href="{{url_for('search.tag_search_interpretations',tag_name=tag.name)}}">{{tag.name}}</a></dt>
|
||||
</dl>
|
||||
{% endfor %}
|
||||
<!-- prettier-ignore -->
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
{% block right_sidebar %}
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="border-b border-gray-200 dark:border-gray-700">
|
||||
<div class="pt-5 border-b border-gray-200 dark:border-gray-700">
|
||||
<!-- prettier-ignore -->
|
||||
<h1 class="hidden md:inline font-extrabold text-lg dark:text-white ml-4 mt-5">Search results</h1>
|
||||
<h1 class="hidden md:inline font-extrabold text-[2rem] dark:text-white ml-4 mt-5">Search results</h1>
|
||||
<!-- prettier-ignore -->
|
||||
<p class="hidden md:block text-sm ml-4 w-1/2 text-gray-500 text-center md:text-left dark:text-gray-400"> Search result for {{query}} </p>
|
||||
<p class="hidden md:block text-sm mt-5 ml-4 w-1/2 text-gray-500 text-center md:text-left dark:text-gray-400"> Search result for <span class="font-bold dark:text-white">{{query}}</span> </p>
|
||||
<!-- prettier-ignore -->
|
||||
<p class="hidden md:block text-sm ml-4 w-1/2 text-gray-500 text-center md:text-left dark:text-gray-400"> Showing {{count}} results </p>
|
||||
<!-- prettier-ignore -->
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
{% block right_sidebar %}
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="border-b border-gray-200 dark:border-gray-700">
|
||||
<div class="pt-5 border-b border-gray-200 dark:border-gray-700">
|
||||
<!-- prettier-ignore -->
|
||||
<h1 class="hidden md:inline font-extrabold text-lg dark:text-white ml-4 mt-5">Tag search results</h1>
|
||||
<h1 class="hidden md:inline font-extrabold text-[2rem] dark:text-white ml-4 mt-5">Tag search results</h1>
|
||||
<!-- prettier-ignore -->
|
||||
<p class="hidden md:block text-sm ml-4 w-1/2 text-gray-500 text-center md:text-left dark:text-gray-400">Tag search result for {{tag_name}} </p>
|
||||
<p class="hidden md:block text-sm mt-5 ml-4 w-1/2 text-gray-500 text-center md:text-left dark:text-gray-400">Tag search result for <span class="font-bold dark:text-white">{{tag_name}}</span> </p>
|
||||
<!-- prettier-ignore -->
|
||||
<p class="hidden md:block text-sm ml-4 w-1/2 text-gray-500 text-center md:text-left dark:text-gray-400"> Showing {{count}} results </p>
|
||||
<!-- prettier-ignore -->
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
{% block right_sidebar %}
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="border-b border-gray-200 dark:border-gray-700">
|
||||
<div class="pt-5 border-b border-gray-200 dark:border-gray-700">
|
||||
<!-- prettier-ignore -->
|
||||
<h1 class="hidden md:inline font-extrabold text-lg dark:text-white ml-4 mt-5">Tag search results</h1>
|
||||
<h1 class="hidden md:inline font-extrabold text-[2rem] dark:text-white ml-4 mt-5">Tag search results</h1>
|
||||
<!-- prettier-ignore -->
|
||||
<p class="hidden md:block text-sm ml-4 w-1/2 text-gray-500 text-center md:text-left dark:text-gray-400"> Tag search result for {{tag_name}} </p>
|
||||
<p class="hidden md:block text-sm mt-5 ml-4 w-1/2 text-gray-500 text-center md:text-left dark:text-gray-400"> Tag search result for <span class="font-bold dark:text-white">{{tag_name}}</span> </p>
|
||||
<!-- prettier-ignore -->
|
||||
<p class="hidden md:block text-sm ml-4 w-1/2 text-gray-500 text-center md:text-left dark:text-gray-400"> Showing {{count}} results </p>
|
||||
<!-- prettier-ignore -->
|
||||
|
|
|
@ -7,7 +7,18 @@
|
|||
<svg class="w-5 h-5 text-gray-500 dark:text-gray-400" aria-hidden="true" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z" clip-rule="evenodd"></path></svg>
|
||||
</div>
|
||||
<!-- prettier-ignore -->
|
||||
<input required minlength="1" autocomplete="off" name="search_query" {% if search_query %}value={{ search_query }}{% endif %} type="text" id="mainSearchInput" class="block p-2 pl-10 text-sm text-gray-900 border border-gray-300 rounded-lg w-80 bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" />
|
||||
<input
|
||||
required
|
||||
minlength="1"
|
||||
autocomplete="off"
|
||||
name="search_query"
|
||||
{% if search_query %}
|
||||
value='{{ search_query }}'
|
||||
{% endif %}
|
||||
type="text"
|
||||
id="mainSearchInput"
|
||||
class="block p-2 pl-10 text-sm text-gray-900 border border-gray-300 rounded-lg w-80 bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
|
||||
/>
|
||||
</div>
|
||||
<!-- prettier-ignore -->
|
||||
<button type="submit" id="global-search-button" class="md:flex p-3 text-xs text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 ml-2 font-medium rounded-lg text-center hidden items-center mr-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">Search</button>
|
||||
|
|
|
@ -64,6 +64,16 @@
|
|||
<span>Favorite Books</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if not current_user.is_authenticated %}
|
||||
<li>
|
||||
<a
|
||||
href="https://join.status.im/b/https://{{config.SERVER_NAME}}{{request.path}}"
|
||||
class="md:hidden flex justify-center text-white bg-gradient-to-r from-cyan-500 to-blue-500 hover:bg-gradient-to-bl focus:ring-4 focus:outline-none focus:ring-cyan-300 dark:focus:ring-cyan-800 font-medium rounded-lg text-sm px-5 py-2.5"
|
||||
>
|
||||
<span>Connect wallet</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>
|
||||
<a href="{{ url_for('search.search_interpretations',q='')}}" class="flex items-center p-2 text-gray-900 rounded-lg dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700">
|
||||
|
|
|
@ -31,13 +31,13 @@
|
|||
{% endif %}
|
||||
<!-- prettier-ignore -->
|
||||
<ul class="flex md:flex-wrap -mb-px text-xs md:text-sm font-medium text-center" id="myTab" data-tabs-toggle="#myTabContent" role="tablist">
|
||||
<li class="mr-2 w-full md:w-auto" role="presentation">
|
||||
<li class="md:mr-2 w-full md:w-auto flex items-center justify-center" role="presentation">
|
||||
<!-- prettier-ignore -->
|
||||
<button class="inline-flex p-4 rounded-t-lg items-center" id="library-tab" data-tabs-target="#library" type="button" role="tab" aria-controls="library" aria-selected="false"><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 mr-3"> <path stroke-linecap="round" stroke-linejoin="round" d="M16.5 3.75V16.5L12 14.25 7.5 16.5V3.75m9 0H18A2.25 2.25 0 0120.25 6v12A2.25 2.25 0 0118 20.25H6A2.25 2.25 0 013.75 18V6A2.25 2.25 0 016 3.75h1.5m9 0h-9" /> </svg>
|
||||
Library
|
||||
</button>
|
||||
</li>
|
||||
<li class="mr-2 w-full md:w-auto" role="presentation">
|
||||
<li class="md:mr-2 w-full md:w-auto flex items-center justify-center" role="presentation">
|
||||
<!-- prettier-ignore -->
|
||||
<button class="inline-flex p-4 items-center rounded-t-lg hover:text-gray-600 dark:hover:text-gray-300" id="contributions-tab" data-tabs-target="#contributions" type="button" role="tab" aria-controls="contributions" aria-selected="false"><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 mr-3"> <path stroke-linecap="round" stroke-linejoin="round" d="M3.75 13.5l10.5-11.25L12 10.5h8.25L9.75 21.75 12 13.5H3.75z" /> </svg>
|
||||
Contributions
|
||||
|
|
|
@ -34,6 +34,7 @@ def search_interpretations():
|
|||
),
|
||||
page=pagination,
|
||||
count=count,
|
||||
search_query=q,
|
||||
)
|
||||
|
||||
|
||||
|
@ -87,6 +88,7 @@ def search_books():
|
|||
books=books.paginate(page=pagination.page, per_page=pagination.per_page),
|
||||
page=pagination,
|
||||
count=count,
|
||||
search_query=q,
|
||||
)
|
||||
|
||||
|
||||
|
@ -119,6 +121,7 @@ def search_users():
|
|||
users=users.paginate(page=pagination.page, per_page=pagination.per_page),
|
||||
page=pagination,
|
||||
count=count,
|
||||
search_query=q,
|
||||
)
|
||||
|
||||
|
||||
|
@ -142,6 +145,7 @@ def search_tags():
|
|||
tags=tags.paginate(page=pagination.page, per_page=pagination.per_page),
|
||||
page=pagination,
|
||||
count=count,
|
||||
search_query=q,
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ class BaseConfig(BaseSettings):
|
|||
|
||||
ENV: str = "base"
|
||||
APP_NAME: str = "Open Law"
|
||||
SERVER_NAME: str = "open-law.net"
|
||||
SECRET_KEY: str
|
||||
SQLALCHEMY_TRACK_MODIFICATIONS: bool = False
|
||||
WTF_CSRF_ENABLED: bool = False
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
# NOTE: This file will not be placed under version control.
|
||||
|
||||
APP_NAME=Open Law
|
||||
SERVER_NAME=127.0.0.1:5006
|
||||
SECRET_KEY=set_here_secret
|
||||
|
||||
# Database
|
||||
|
|
Loading…
Reference in New Issue