imio.smartweb.core 1.2.90__py3-none-any.whl → 1.2.91__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,10 @@
1
1
  # -*- coding: utf-8 -*-
2
2
 
3
+ from imio.smartweb.locales import SmartwebMessageFactory as _
4
+ from plone import api
3
5
  from plone.app.layout.viewlets import common
4
6
  from zope.component import getMultiAdapter
7
+ from zope.i18n import translate
5
8
  from zope.viewlet.interfaces import IViewletManager
6
9
 
7
10
 
@@ -10,7 +13,14 @@ class HeaderActionsViewlet(common.ViewletBase):
10
13
  context_state = getMultiAdapter(
11
14
  (self.context, self.request), name="plone_context_state"
12
15
  )
16
+ language = api.portal.get_current_language(context=self.context)
13
17
  self.actions = context_state.actions("header_actions")
18
+ for action in self.actions:
19
+ if action["id"] == "account":
20
+ action["link_target"] = "_blank"
21
+ desc = translate(_(action["description"]), target_language=language)
22
+ new_tab = translate(_("New tab"), target_language=language)
23
+ action["description"] = f"{desc} ({new_tab})"
14
24
 
15
25
 
16
26
  class HeaderActionsContainerViewlet(common.ViewletBase):
@@ -5,6 +5,8 @@
5
5
  <a href="#"
6
6
  tal:define="icon nocall:link/icon"
7
7
  tal:attributes="class link/id;
8
+ target link/link_target;
9
+ title link/description;
8
10
  href link/url;">
9
11
  <span tal:condition="not:icon"
10
12
  tal:content="link/title">
@@ -1,13 +1,38 @@
1
1
  <div class="offcanvas offcanvas-start" tabindex="-1" id="offcanvasSearch" aria-labelledby="offcanvasSearchLabel">
2
2
  <div class="offcanvas-header">
3
- <button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close"></button>
3
+ <button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close" tabindex="-1"></button>
4
4
  </div>
5
5
  <div class="offcanvas-body">
6
- <div class="search">
7
- <smartweb-search tal:attributes="current-language view/current_language;
8
- query-url view/navroot_url;
9
- result-option view/get_search_result_option">
10
- </smartweb-search >
6
+ <div class="search" id="search-container">
7
+ <template id="search-template">
8
+ <smartweb-search tal:attributes="current-language view/current_language;
9
+ query-url view/navroot_url;
10
+ result-option view/get_search_result_option">
11
+ </smartweb-search>
12
+ </template>
11
13
  </div>
12
14
  </div>
13
15
  </div>
16
+
17
+ <script>
18
+ document.addEventListener('DOMContentLoaded', function() {
19
+ const offcanvas = document.getElementById('offcanvasSearch');
20
+ const searchContainer = document.getElementById('search-container');
21
+ const template = document.getElementById('search-template');
22
+ let searchContent = null;
23
+
24
+ offcanvas.addEventListener('show.bs.offcanvas', function () {
25
+ if (!searchContent) {
26
+ searchContent = template.content.cloneNode(true);
27
+ searchContainer.appendChild(searchContent);
28
+ }
29
+ });
30
+
31
+ offcanvas.addEventListener('hidden.bs.offcanvas', function () {
32
+ if (searchContent) {
33
+ searchContainer.innerHTML = '';
34
+ searchContent = null;
35
+ }
36
+ });
37
+ });
38
+ </script>
@@ -1,5 +1,5 @@
1
1
  <div id="subsite-logo" tal:condition="view/available">
2
- <a tal:attributes="href string:${view/subsite_root/absolute_url}">
2
+ <a tal:attributes="href string:${view/subsite_root/absolute_url}; aria-label string:accueil du sous-site">
3
3
  <img tal:condition="view/show_logo"
4
4
  tal:attributes="src view/get_logo_scale_url;
5
5
  alt view/subsite_root/title;
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: imio.smartweb.core
3
- Version: 1.2.90
3
+ Version: 1.2.91
4
4
  Summary: Core product for iMio websites
5
5
  Home-page: https://github.com/imio/imio.smartweb.core
6
6
  Author: Christophe Boulanger
@@ -203,6 +203,16 @@ Changelog
203
203
  =========
204
204
 
205
205
 
206
+ 1.2.91 (2025-03-03)
207
+ -------------------
208
+
209
+ - Accessibility : Added aria-label to subsite-logo link
210
+ [thomlamb]
211
+
212
+ - Accessibility : Add title / target attributes to "my account" action link
213
+ [boulch]
214
+
215
+
206
216
  1.2.90 (2025-02-24)
207
217
  -------------------
208
218
 
@@ -1,4 +1,4 @@
1
- imio.smartweb.core-1.2.90-py3.12-nspkg.pth,sha256=XZ3YhlzwpUCC8tXtelHRqxVxo3NWomIiMsUfUshrbeE,1011
1
+ imio.smartweb.core-1.2.91-py3.12-nspkg.pth,sha256=XZ3YhlzwpUCC8tXtelHRqxVxo3NWomIiMsUfUshrbeE,1011
2
2
  imio/smartweb/core/__init__.py,sha256=iwhKnzeBJLKxpRVjvzwiRE63_zNpIBfaKLITauVph-0,24
3
3
  imio/smartweb/core/config.py,sha256=BUgfvh4hCaw0onCYAG4gQI1O4hZ-GzXWEltdHi4YLIs,337
4
4
  imio/smartweb/core/configure.zcml,sha256=PeC4rF--rF6MfVQ0NzggQrZWIl35oPtJdEhvQwGxhhI,1459
@@ -629,7 +629,7 @@ imio/smartweb/core/upgrades/profiles/1063_to_1064/types/Link.xml,sha256=19TjIa4m
629
629
  imio/smartweb/core/upgrades/profiles/1063_to_1064/types/imio.smartweb.BlockLink.xml,sha256=1r5sydZbHyom_VIrH_gT34FwwPUMyk87x2g3FAjNltE,293
630
630
  imio/smartweb/core/upgrades/profiles/1063_to_1064/types/imio.smartweb.SectionSlide.xml,sha256=kViKVS5u-x54Au1ShmOs4gUCd0a2UOwyAv_JgThzdVQ,296
631
631
  imio/smartweb/core/viewlets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
632
- imio/smartweb/core/viewlets/actions.py,sha256=QWj_pLNxH4223XPk4b4Dc79DiajF0HHfaXlUmXTwJ8k,661
632
+ imio/smartweb/core/viewlets/actions.py,sha256=CUMkS3w_MXOxqOzqp7s3PFCUF-RCrCFsKw3oxv0C37E,1200
633
633
  imio/smartweb/core/viewlets/arcgis_header.pt,sha256=iQc5ZG3g1Cmap963OG-wPotllr7oWmVSMoAnA7tctrQ,3428
634
634
  imio/smartweb/core/viewlets/banner.pt,sha256=fFhT7paFQ8bO-BioOnh2Rwtl_dW4GfMs-HGpJgWs1C8,1277
635
635
  imio/smartweb/core/viewlets/banner.py,sha256=u-RI3m0j3XmCgu3b-NJhgrNcqUHqKIzM8nAM7wmnbdA,2302
@@ -643,7 +643,7 @@ imio/smartweb/core/viewlets/external_content.py,sha256=YeTvnnfnAS1jsgsqvwTmYjjOH
643
643
  imio/smartweb/core/viewlets/footer.pt,sha256=KZVvks-NtSzAoQTTMClTUy0M07r0kgbd6B6bgKXVaK4,1103
644
644
  imio/smartweb/core/viewlets/footer.py,sha256=pzhepBKL_vjpSrfS_0IMyEVzZ_PHfzIOt7IgSIuUbkU,3455
645
645
  imio/smartweb/core/viewlets/header.py,sha256=QcKtG0KJjLMyChOQblwyTcCc3Qj7_bOzHTmvVRS8lJg,367
646
- imio/smartweb/core/viewlets/header_actions.pt,sha256=LNpems7Hm_pm1ksgolKaTS63o8JpkvnLLBKusrtP7Ik,577
646
+ imio/smartweb/core/viewlets/header_actions.pt,sha256=7DDPEndWg-EnMVyfakAiK5TsUhRmU20-_in_JZWOPAE,672
647
647
  imio/smartweb/core/viewlets/header_actions_viewlet.pt,sha256=8XzyvcdvhyWneUrv7FUXyHMF2ghDUgldqVv7zP6TEfw,129
648
648
  imio/smartweb/core/viewlets/header_top_viewlet.pt,sha256=nn7AhTim_4yfhxevbW1-UsQ62tREyFZhZKq1FODmccc,137
649
649
  imio/smartweb/core/viewlets/herobanner.pt,sha256=Zg7Hv44VkU5FZ7T0RcuDCcZ7oDcvVX5HQyiVrPU62bU,688
@@ -661,7 +661,7 @@ imio/smartweb/core/viewlets/minisite.py,sha256=5477JK5xc-KJCAowGOn0KooSYpDo-6cUw
661
661
  imio/smartweb/core/viewlets/minisite_link.pt,sha256=4BwRkbEAT-9TElSsUPUBOki9VZqKMnfac1icTUDBINI,370
662
662
  imio/smartweb/core/viewlets/navigation.py,sha256=-woNkfk67arOSfTKekPEUS7McheunveTgJM2NedniiU,7284
663
663
  imio/smartweb/core/viewlets/odwb_widget_header.pt,sha256=bmtPkjfd40fwOqsCL1sQFCnJaR8Xfm6wka9Cs5fFWZc,1176
664
- imio/smartweb/core/viewlets/offcanvas.pt,sha256=VfHFI9WoDqcm5nfJ-OTHACnJn0F5PfEE4FXZFzPM3JQ,613
664
+ imio/smartweb/core/viewlets/offcanvas.pt,sha256=HTmwDJERsehha8zr84hA0Mr1NkqgYihFzC_P8f1CXiw,1426
665
665
  imio/smartweb/core/viewlets/offcanvas.py,sha256=3VE2WJcvSKp3oAKYwGuwaHYMoK_83KMksMFDa75u52Y,129
666
666
  imio/smartweb/core/viewlets/ogp_tag_header.pt,sha256=XRWkdZS2oI7W0X1oJSskpXS9dMmxSxSx_7XWb-Q2aBk,1007
667
667
  imio/smartweb/core/viewlets/ogptags.py,sha256=ZbrOVs7bqV5Trx6izolncbuXkaiZRmd6v6E8L8f9hEI,4902
@@ -671,7 +671,7 @@ imio/smartweb/core/viewlets/searchbox.pt,sha256=Wv0DbGTKif1z_SDl9-FQKIAPJcfFAHHO
671
671
  imio/smartweb/core/viewlets/social.py,sha256=gau_zEDo1IM9ZeYWPHjNl-eMTwbmO23lxFSWf-DO9uk,1187
672
672
  imio/smartweb/core/viewlets/subsite.py,sha256=2MFX2UukohUDybF7lDklcmgtY2Z0MaFdHU2cFfiBkDo,4218
673
673
  imio/smartweb/core/viewlets/subsite_header_viewlet.pt,sha256=v0sSWJeSdUcsFygVh9UHRaf204abjZniMbaRs3eC9BQ,137
674
- imio/smartweb/core/viewlets/subsite_logo.pt,sha256=6htSau-jXv0psDpzSyWc74fePaGk5-yI8sUH46vfoFE,503
674
+ imio/smartweb/core/viewlets/subsite_logo.pt,sha256=57C45PcffBqHIQskcqZ0Nvd5xTuPdQx54W5u9oXeIJc,543
675
675
  imio/smartweb/core/viewlets/subsite_navigation.pt,sha256=6mBA66EXKsZa9JVmOkqhJFEg0L41ssyH5OroLJcZBeQ,163
676
676
  imio/smartweb/core/viewlets/toolbar.py,sha256=RmHarWPYIPSqf2qNTi30NsKMe8Uc_FLznKl5YcY1eo0,6556
677
677
  imio/smartweb/core/webcomponents/.eslintrc.json,sha256=QH-cYmAXVlIKIwm9TldshO4PA3A3J2rAzjQ-q4zrDrs,343
@@ -776,10 +776,10 @@ imio/smartweb/core/webcomponents/src/utils/Map.jsx,sha256=cYuZykMIaLjr4KiLvmS4aY
776
776
  imio/smartweb/core/webcomponents/src/utils/Map.scss,sha256=xXWz0O-JBwSZrzz2XeQdN4nZEOjppU2sVFtlLQOitQ8,77
777
777
  imio/smartweb/core/webcomponents/src/utils/translation.js,sha256=5YDHwdaRNWFWOgyNd7YejoAdcDvnvAENo3Xn0GDT8P8,8941
778
778
  imio/smartweb/core/webcomponents/src/utils/url.js,sha256=iyl_1QXfPBgUn0LEbZYT_zMEEjmj5DMiEz44Z6AKLcg,244
779
- imio.smartweb.core-1.2.90.dist-info/LICENSE.GPL,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
780
- imio.smartweb.core-1.2.90.dist-info/LICENSE.rst,sha256=RzkMFz6AX3-cHd531zd2YQcXai8RIbjFWTs6m66Y5u4,653
781
- imio.smartweb.core-1.2.90.dist-info/METADATA,sha256=2cAANOnHCM08KmqZ18MZzbP7KlOCmJDkFwcSvPN7XNs,61239
782
- imio.smartweb.core-1.2.90.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
783
- imio.smartweb.core-1.2.90.dist-info/namespace_packages.txt,sha256=Pg8AH8t9viMMW1hJbNZvTy_n2jXG2igIYUpon5RA4Js,19
784
- imio.smartweb.core-1.2.90.dist-info/top_level.txt,sha256=ZktC0EGzThvMTAin9_q_41rzvvfMT2FYbP8pbhSLMSA,5
785
- imio.smartweb.core-1.2.90.dist-info/RECORD,,
779
+ imio.smartweb.core-1.2.91.dist-info/LICENSE.GPL,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
780
+ imio.smartweb.core-1.2.91.dist-info/LICENSE.rst,sha256=RzkMFz6AX3-cHd531zd2YQcXai8RIbjFWTs6m66Y5u4,653
781
+ imio.smartweb.core-1.2.91.dist-info/METADATA,sha256=4cauftgJNP2Fr2Du4D3Rtr4DZjnbzMNpNfQNe0-3EyI,61439
782
+ imio.smartweb.core-1.2.91.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
783
+ imio.smartweb.core-1.2.91.dist-info/namespace_packages.txt,sha256=Pg8AH8t9viMMW1hJbNZvTy_n2jXG2igIYUpon5RA4Js,19
784
+ imio.smartweb.core-1.2.91.dist-info/top_level.txt,sha256=ZktC0EGzThvMTAin9_q_41rzvvfMT2FYbP8pbhSLMSA,5
785
+ imio.smartweb.core-1.2.91.dist-info/RECORD,,