Skip to content

Commit

Permalink
Remove Read more button in page decoration (#232)
Browse files Browse the repository at this point in the history
* Remove Read more button in page decoration

* Cleanup
  • Loading branch information
jrlarano authored May 21, 2024
1 parent 19ca3c9 commit b196a08
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 24 deletions.
5 changes: 0 additions & 5 deletions lib/kits/core-ui/paged-publication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,6 @@ const PagedPublication = (
if (!scriptEls.disablePageDecorations) {
sgnPageDecorations = await bootstrapper.fetchPageDecorations();
bootstrapper.applyPageDecorations(sgnViewer, sgnPageDecorations);

updateViewerTranslation({
'paged_publication.hotspot_picker.pagedecoration.link':
translate('publication_viewer_hotspot_decoration_link')
});
}

sgnViewer.bind('hotspotClicked', clickHotspot);
Expand Down
12 changes: 2 additions & 10 deletions lib/kits/paged-publication/hotspots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,8 @@ function renderHotspot(hotspot, position, contentRect, boundingRect) {
`;
} else if (hotspot.link) {
el.innerHTML = `
<a href="${
hotspot.link
}" class="sgn-pagedecoration-hotspot-link" rel="noreferrer noopener" target="_blank">
<div class="sgn-pagedecoration-hotspot-link-content" style="width:100%;height:100%;">
<div class="sgn-pagedecoration-hotspot-link-label">
${translations.t(
'paged_publication.hotspot_picker.pagedecoration.link'
)}
</div>
</div>
<a href="${hotspot.link}" class="sgn-pagedecoration-hotspot-link" rel="noreferrer noopener" target="_blank">
<div class="sgn-pagedecoration-hotspot-link-content"></div>
</a>
`;
}
Expand Down
2 changes: 2 additions & 0 deletions lib/kits/paged-publication/viewer.styl
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@
display flex
align-items flex-end
padding 0.5rem
width 100%
height 100%

&:hover
background-color rgba(#fff, 0.1)
Expand Down
1 change: 0 additions & 1 deletion lib/translations.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Mustache from 'mustache';
const pairs = {
'paged_publication.hotspot_picker.header': 'Which offer did you mean?',
'paged_publication.hotspot_picker.pagedecoration.link': 'Read more',
'incito_publication.product_picker.header': 'Which product?'
};

Expand Down
3 changes: 1 addition & 2 deletions locales/da_DK.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,5 @@ export default {
publication_viewer_close_label: 'Tilbage',
publication_viewer_add_to_shopping_list: 'Tilføj til indkøbsliste',
publication_viewer_visit_webshop_link: 'Besøg webshoplink',
publication_viewer_upcoming: 'Kommende',
publication_viewer_hotspot_decoration_link: 'Læs mere'
publication_viewer_upcoming: 'Kommende'
};
3 changes: 1 addition & 2 deletions locales/en_US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,5 @@ export default {
publication_viewer_close_label: 'Close',
publication_viewer_add_to_shopping_list: 'Add to Shopping List',
publication_viewer_visit_webshop_link: 'Visit Webshop Link',
publication_viewer_upcoming: 'Upcoming',
publication_viewer_hotspot_decoration_link: 'Read more'
publication_viewer_upcoming: 'Upcoming'
};
3 changes: 1 addition & 2 deletions locales/nb_NO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,5 @@ export default {
publication_viewer_close_label: 'Tilbake',
publication_viewer_add_to_shopping_list: 'Legg til handleliste',
publication_viewer_visit_webshop_link: 'Besøk nettbutikklink',
publication_viewer_upcoming: 'Påkommende',
publication_viewer_hotspot_decoration_link: 'Les mer'
publication_viewer_upcoming: 'Påkommende'
};
3 changes: 1 addition & 2 deletions locales/sv_SE.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,5 @@ export default {
publication_viewer_close_label: 'Tillbaka',
publication_viewer_add_to_shopping_list: 'Lägg till inköpslista',
publication_viewer_visit_webshop_link: 'Besök webbshoplänk',
publication_viewer_upcoming: 'Kommende',
publication_viewer_hotspot_decoration_link: 'Läs mer'
publication_viewer_upcoming: 'Kommende'
};

0 comments on commit b196a08

Please sign in to comment.