diff --git a/swh/web/ui/templates/includes/home-directory.html b/swh/web/ui/templates/includes/home-directory.html new file mode 100644 index 000000000..4183b1cbc --- /dev/null +++ b/swh/web/ui/templates/includes/home-directory.html @@ -0,0 +1,111 @@ + +
+
+ Advanced search +
+ diff --git a/swh/web/ui/templates/includes/home-origin.html b/swh/web/ui/templates/includes/home-origin.html new file mode 100644 index 000000000..8ca5db0a6 --- /dev/null +++ b/swh/web/ui/templates/includes/home-origin.html @@ -0,0 +1,57 @@ + +
+
+ Advanced search +
+ diff --git a/swh/web/ui/templates/includes/home-revision.html b/swh/web/ui/templates/includes/home-revision.html new file mode 100644 index 000000000..043b1077a --- /dev/null +++ b/swh/web/ui/templates/includes/home-revision.html @@ -0,0 +1,66 @@ + +
+
+ Advanced search +
+ diff --git a/swh/web/ui/templates/search-form.html b/swh/web/ui/templates/includes/search-form.html similarity index 81% rename from swh/web/ui/templates/search-form.html rename to swh/web/ui/templates/includes/search-form.html index 1303828c5..51e0d7bf4 100644 --- a/swh/web/ui/templates/search-form.html +++ b/swh/web/ui/templates/includes/search-form.html @@ -1,72 +1,70 @@ -

Search with SHA-1 or SHA-256:

+

-

Search with files

+
Drag and drop or click here to hash files and search for them. Your files will NOT be uploaded, hashing is done locally. Filesizes over 20Mb may be slow to process, use with care.
- - - - - +{% for fname in ['lib/core.js', 'lib/lib-typedarrays.js', 'lib/sha256.js', 'js/search.js'] %} + +{% endfor %} diff --git a/swh/web/ui/templates/search.html b/swh/web/ui/templates/search.html index d8ee8b7f3..f4f0ebaad 100644 --- a/swh/web/ui/templates/search.html +++ b/swh/web/ui/templates/search.html @@ -1,47 +1,47 @@ {% extends "layout.html" %} {% block title %}Search SWH{% endblock %} {% block content %}
- {% include 'search-form.html' %} + {% include 'includes/search-form.html' %} {% if search_res is not none %} {% if search_stats is not none %} {% endif %} {% for res in search_res %} {% if res['filename'] is not none %} {% else %} {% endif %} {% if res['found'] %} {% else %} {% endif %} {% endfor %}
File name SHA1 checksum Result
{{ res['filename'] }}From text input{{ res['sha1'] }} {{ res['sha1'] }}
{% endif %} {% if message is not none and message != '' %}
{{ message | safe }}
{% endif %} {% endblock %}