From 0cee888122c80886e539eb55697a0b5e9f1d927b Mon Sep 17 00:00:00 2001 From: Souvik Kumar Date: Sat, 17 Aug 2024 15:35:58 +0530 Subject: [PATCH 1/6] add alt attribute to imgs --- openlibrary/i18n/messages.pot | 7 +++++-- openlibrary/macros/EditionNavBar.html | 6 +++--- openlibrary/templates/account/view.html | 2 +- openlibrary/templates/type/edition/modal_links.html | 12 ++++++------ .../templates/type/edition/title_and_author.html | 4 ++-- static/css/components/nav-bar.less | 2 ++ 6 files changed, 19 insertions(+), 14 deletions(-) diff --git a/openlibrary/i18n/messages.pot b/openlibrary/i18n/messages.pot index 55539345d9b..91fa24ed4b2 100644 --- a/openlibrary/i18n/messages.pot +++ b/openlibrary/i18n/messages.pot @@ -7308,6 +7308,10 @@ msgstr[1] "" msgid "Related Books" msgstr "" +#: EditionNavBar.html +msgid "Go to next section" +msgstr "" + #: Follow.html msgid "UnfollowFollow" msgstr "" @@ -7940,5 +7944,4 @@ msgstr "" #: forms.py msgid "Choose a password" -msgstr "" - +msgstr "" \ No newline at end of file diff --git a/openlibrary/macros/EditionNavBar.html b/openlibrary/macros/EditionNavBar.html index 13bf3fbc5f6..70f1dd71d2f 100644 --- a/openlibrary/macros/EditionNavBar.html +++ b/openlibrary/macros/EditionNavBar.html @@ -32,7 +32,7 @@ $if not desktop_only: - - - + diff --git a/openlibrary/templates/account/view.html b/openlibrary/templates/account/view.html index d52bfebd4ca..cce1ac94ab7 100644 --- a/openlibrary/templates/account/view.html +++ b/openlibrary/templates/account/view.html @@ -47,7 +47,7 @@

$header_title

$set_share_links(url=request.canonical_url, title=header_title, view_context=ctx) $if ctx.get('share_links'): $ share_str = _('Share') - $ share_content = ' %s' % share_str + $ share_content = ' %s' % share_str $ page_url = request.home $ share_links = ctx.get('share_links') $:macros.ShareModal(share_links, page_url, share_content, "share-modal-wrapper", show_embed=False) diff --git a/openlibrary/templates/type/edition/modal_links.html b/openlibrary/templates/type/edition/modal_links.html index 0fa39702a83..512f3e2c0b5 100644 --- a/openlibrary/templates/type/edition/modal_links.html +++ b/openlibrary/templates/type/edition/modal_links.html @@ -1,6 +1,6 @@ $def with (work, edition, page_url, mobile=False) -$def icon_link(link_class, img_src, link_text, login_redirect=True, ga_data=None): +$def icon_link(link_class, img_src, link_text, login_redirect=True, ga_data=None, alt=""): $ href = 'javascript:;' $if not ctx.user and login_redirect: $# Change classname to avoid adding click listeners and redirect to login page: @@ -9,23 +9,23 @@ $ ga_attr = 'data-ol-link-track=%s' % ga_data if ga_data else '' - + $alt + \ No newline at end of file diff --git a/openlibrary/templates/type/edition/title_and_author.html b/openlibrary/templates/type/edition/title_and_author.html index 5baa37c8597..8741496eea9 100644 --- a/openlibrary/templates/type/edition/title_and_author.html +++ b/openlibrary/templates/type/edition/title_and_author.html @@ -5,7 +5,7 @@ $ ga_attr = 'data-ol-link-track=%s' % ga_data if ga_data else '' - + @@ -52,4 +52,4 @@

$ share_content = icon_link("share-modal-link", "/static/images/icons/share.svg", _("Share"), login_redirect=False, ga_data="ModalLinkClick|ShareIcon") $ share_links = ctx.get('share_links') $:macros.ShareModal(share_links, page_url, share_content) - + \ No newline at end of file diff --git a/static/css/components/nav-bar.less b/static/css/components/nav-bar.less index b417579cb73..4634f5fc326 100644 --- a/static/css/components/nav-bar.less +++ b/static/css/components/nav-bar.less @@ -58,6 +58,8 @@ .nav-arrow { padding-left: 20px; + background: none; + border: none; img { max-width: unset !important; From 56f98cd628c3777cb887b0a5a72eb76c0f2f1bff Mon Sep 17 00:00:00 2001 From: Souvik Kumar Date: Fri, 6 Sep 2024 01:07:16 +0530 Subject: [PATCH 2/6] Address review changes --- openlibrary/templates/type/edition/modal_links.html | 10 +++++----- .../templates/type/edition/title_and_author.html | 2 +- static/css/components/nav-bar.less | 2 -- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/openlibrary/templates/type/edition/modal_links.html b/openlibrary/templates/type/edition/modal_links.html index 512f3e2c0b5..ea3b4bb3dcd 100644 --- a/openlibrary/templates/type/edition/modal_links.html +++ b/openlibrary/templates/type/edition/modal_links.html @@ -1,6 +1,6 @@ $def with (work, edition, page_url, mobile=False) -$def icon_link(link_class, img_src, link_text, login_redirect=True, ga_data=None, alt=""): +$def icon_link(link_class, img_src, link_text, login_redirect=True, ga_data=None): $ href = 'javascript:;' $if not ctx.user and login_redirect: $# Change classname to avoid adding click listeners and redirect to login page: @@ -9,23 +9,23 @@ $ ga_attr = 'data-ol-link-track=%s' % ga_data if ga_data else '' - $alt + \ No newline at end of file + diff --git a/openlibrary/templates/type/edition/title_and_author.html b/openlibrary/templates/type/edition/title_and_author.html index 8741496eea9..f5f2aad4130 100644 --- a/openlibrary/templates/type/edition/title_and_author.html +++ b/openlibrary/templates/type/edition/title_and_author.html @@ -52,4 +52,4 @@