diff --git a/core/lib/opensearch.py b/core/lib/opensearch.py index 41b91df..3df8c27 100644 --- a/core/lib/opensearch.py +++ b/core/lib/opensearch.py @@ -21,21 +21,23 @@ def initialise_opensearch(): return client -def construct_query(query): +def construct_query(query, fields): + if not fields: + fields = settings.OPENSEARCH_MAIN_SEARCH_FIELDS query = { "size": 5, "query": { "multi_match": { "query": query, - "fields": settings.OPENSEARCH_MAIN_SEARCH_FIELDS, + "fields": fields, } }, } return query -def run_main_query(client, query): - search_query = construct_query(query) +def run_main_query(client, query, fields=None): + search_query = construct_query(query, fields) # fmt: off response = client.search(body=search_query, index=settings.OPENSEARCH_INDEX_MAIN) diff --git a/core/static/logo.svg b/core/static/logo.svg index a0a738f..247dba5 100644 --- a/core/static/logo.svg +++ b/core/static/logo.svg @@ -1,98 +1,9 @@ - - - - - - - - image/svg+xml - - - - - - - - - - - + + + + + + + diff --git a/core/templates/base.html b/core/templates/base.html index d41856c..836da65 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -5,56 +5,108 @@ - Pathogen - {{ request.path_info }} - - - + + + -
-
-
+ + -
-
- {% block content %} - {% endblock %}
+ +
+
+ {% block content %} + {% endblock %} +
- diff --git a/core/templates/billing.html b/core/templates/billing.html index 2742381..29789af 100644 --- a/core/templates/billing.html +++ b/core/templates/billing.html @@ -1,57 +1,36 @@ {% extends "base.html" %} {% block content %} -

Billing/Plan Management

-
-
-
- -
-
- Products -
-
-
    -
  • - {{ user.first_name }} - First name -
  • -
  • - {{ user.last_name }} - Last name -
  • -
  • - {% for plan in user.plans.all %} - {{ plan.name }} - {% endfor %} - Plans -
  • -
  • - {{ user.paid }} - Paid -
  • -
  • - {{ user.last_payment }} - Last payment -
  • -
-
- -
-
-
- -
-
- Available plans -
-
- {% include "partials/product-list.html" %} -
-
- - -
-
-
+
+

+ User information +

+ + + + + {{ user.first_name }} {{ user.last_name }} + + + + + + {% for plan in user.plans.all %} + {{ plan.name }} + {% endfor %} + + + + + + {{ user.last_payment }} + + + + + + Subscription management + +
+ {% include "partials/product-list.html" %} {% endblock %} diff --git a/core/templates/partials/product-list.html b/core/templates/partials/product-list.html index 1201d3e..ff46ed4 100644 --- a/core/templates/partials/product-list.html +++ b/core/templates/partials/product-list.html @@ -1,50 +1,52 @@ {% load static %} {% for plan in plans %} - {% if plan not in user_plans %} - + + {% if plan in user_plans %} +
+ {% else %} +
{% endif %} - - {% if plan not in user_plans %} - - {% endif %} - {% endfor %} - + diff --git a/core/templates/registration/login.html b/core/templates/registration/login.html index b722cee..8bde98d 100644 --- a/core/templates/registration/login.html +++ b/core/templates/registration/login.html @@ -3,29 +3,23 @@ {% load crispy_forms_tags %} {% block content %} -
-
-
-
-
-

Please sign in

-
-
- -
-
- {% csrf_token %} - {{ form|crispy }} - - -
-

Don't have an account? Register here

-
-
+
+
+
+
+
+ + {% csrf_token %} + {{ form|crispy }} +
+ +
-
+
{% endblock %} diff --git a/core/templates/registration/signup.html b/core/templates/registration/signup.html index 2ecfc02..7beef31 100644 --- a/core/templates/registration/signup.html +++ b/core/templates/registration/signup.html @@ -3,25 +3,23 @@ {% load crispy_forms_tags %} {% block content %} -
-
-
-
-
-

Sign up

-
-
- -
-
- {% csrf_token %} - {{ form|crispy }} - -
+
+
+
+
+
+ + {% csrf_token %} + {{ form|crispy }} +
+ +
-
+ {% endblock %} diff --git a/core/templates/ui/drilldown.html b/core/templates/ui/drilldown.html index 8967696..5e35a9c 100644 --- a/core/templates/ui/drilldown.html +++ b/core/templates/ui/drilldown.html @@ -1,59 +1,142 @@ {% extends "base.html" %} {% load static %} {% block content %} -

Welcome to search, {{ user.first_name }}!

- -
-
-
-
- {% csrf_token %} -