diff --git a/bookwyrm/static/css/fonts/icomoon.eot b/bookwyrm/static/css/fonts/icomoon.eot index 8eba8692f..7b1f2d9d9 100644 Binary files a/bookwyrm/static/css/fonts/icomoon.eot and b/bookwyrm/static/css/fonts/icomoon.eot differ diff --git a/bookwyrm/static/css/fonts/icomoon.svg b/bookwyrm/static/css/fonts/icomoon.svg index 82e413294..7dbbe0dc5 100644 --- a/bookwyrm/static/css/fonts/icomoon.svg +++ b/bookwyrm/static/css/fonts/icomoon.svg @@ -46,4 +46,5 @@ + \ No newline at end of file diff --git a/bookwyrm/static/css/fonts/icomoon.ttf b/bookwyrm/static/css/fonts/icomoon.ttf index 5bf90a0a7..151f2b782 100644 Binary files a/bookwyrm/static/css/fonts/icomoon.ttf and b/bookwyrm/static/css/fonts/icomoon.ttf differ diff --git a/bookwyrm/static/css/fonts/icomoon.woff b/bookwyrm/static/css/fonts/icomoon.woff index 6ce6834d5..bc0818413 100644 Binary files a/bookwyrm/static/css/fonts/icomoon.woff and b/bookwyrm/static/css/fonts/icomoon.woff differ diff --git a/bookwyrm/static/css/vendor/icons.css b/bookwyrm/static/css/vendor/icons.css index b43224e34..9c35b1be7 100644 --- a/bookwyrm/static/css/vendor/icons.css +++ b/bookwyrm/static/css/vendor/icons.css @@ -1,10 +1,10 @@ @font-face { font-family: 'icomoon'; - src: url('../fonts/icomoon.eot?36x4a3'); - src: url('../fonts/icomoon.eot?36x4a3#iefix') format('embedded-opentype'), - url('../fonts/icomoon.ttf?36x4a3') format('truetype'), - url('../fonts/icomoon.woff?36x4a3') format('woff'), - url('../fonts/icomoon.svg?36x4a3#icomoon') format('svg'); + src: url('../fonts/icomoon.eot?r7jc98'); + src: url('../fonts/icomoon.eot?r7jc98#iefix') format('embedded-opentype'), + url('../fonts/icomoon.ttf?r7jc98') format('truetype'), + url('../fonts/icomoon.woff?r7jc98') format('woff'), + url('../fonts/icomoon.svg?r7jc98#icomoon') format('svg'); font-weight: normal; font-style: normal; font-display: block; @@ -142,3 +142,6 @@ .icon-spinner:before { content: "\e97a"; } +.icon-download:before { + content: "\ea36"; +} diff --git a/bookwyrm/templates/author/author.html b/bookwyrm/templates/author/author.html index 0d7d102d0..3fe4b7abc 100644 --- a/bookwyrm/templates/author/author.html +++ b/bookwyrm/templates/author/author.html @@ -70,63 +70,65 @@

{% trans "External links" %}

{% if author.wikipedia_link %} -

+

{% endif %} {% if author.isni %} -

+

{% endif %} + {% trans "Load data" as button_text %} {% if author.openlibrary_key %} -

- +

+ {% trans "View on OpenLibrary" %} {% if request.user.is_authenticated and perms.bookwyrm.edit_book %} -
- {% csrf_token %} - -
+ {% with controls_text="ol_sync" controls_uid=author.id %} + {% include 'snippets/toggle/toggle_button.html' with text=button_text focus="modal_title_ol_sync" class="is-small" icon_with_text="download" %} + {% include "author/sync_modal.html" with source="opnlibrary.org" source_name="OpenLibrary" %} + {% endwith %} {% endif %} -

+
{% endif %} {% if author.inventaire_id %} -

- +

+ {% trans "View on Inventaire" %} + {% if request.user.is_authenticated and perms.bookwyrm.edit_book %} -
- {% csrf_token %} - -
+ {% with controls_text="iv_sync" controls_uid=author.id %} + {% include 'snippets/toggle/toggle_button.html' with text=button_text focus="modal_title_iv_sync" class="is-small" icon_with_text="download" %} + {% include "author/sync_modal.html" with source="inventaire.io" source_name="Inventaire" %} + {% endwith %} {% endif %} -

+
{% endif %} {% if author.librarything_key %} -

+

{% endif %} {% if author.goodreads_key %} -

+

{% endif %}
diff --git a/bookwyrm/templates/author/sync_modal.html b/bookwyrm/templates/author/sync_modal.html new file mode 100644 index 000000000..a061ada80 --- /dev/null +++ b/bookwyrm/templates/author/sync_modal.html @@ -0,0 +1,30 @@ +{% extends 'components/modal.html' %} +{% load i18n %} + +{% block modal-title %} +{% trans "Load data" %} +{% endblock %} + +{% block modal-form-open %} +
+ {% csrf_token %} +{% endblock %} + +{% block modal-body %} +

+ {% blocktrans trimmed %} + Loading data will connect to {{ source_name }} and check for any metadata about this author which aren't present here. Existing metadata will not be overwritten. + {% endblocktrans %} +

+{% endblock %} + +{% block modal-footer %} + + +{% trans "Cancel" as button_text %} +{% include 'snippets/toggle/toggle_button.html' with text=button_text %} +{% endblock %} + +{% block modal-form-close %}
{% endblock %}