diff --git a/client/css/styles.css b/client/css/styles.css index 078e858..1b05f76 100644 --- a/client/css/styles.css +++ b/client/css/styles.css @@ -23,6 +23,20 @@ summary { cursor: pointer; } +.external-link::after { + content: ''; + + display: inline-block; + width: 1.1ch; + height: 1.1ch; + margin-left: 0.3ch; + + background: url('../img/external-link-icon.svg'); + background-repeat: no-repeat; + background-size: contain; + vertical-align: baseline; +} + .PrimaryActionButton { display: inline-block; padding: 4px 16px; diff --git a/client/img/external-link-icon.svg b/client/img/external-link-icon.svg new file mode 100644 index 0000000..1186ca3 --- /dev/null +++ b/client/img/external-link-icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/shared/views/RightPanelContentView.js b/shared/views/RightPanelContentView.js index 59dd96c..fbb0bc5 100644 --- a/shared/views/RightPanelContentView.js +++ b/shared/views/RightPanelContentView.js @@ -2,18 +2,18 @@ const { TemplateView } = require('hydrogen-view-sdk'); +const assert = require('matrix-public-archive-shared/lib/assert'); const CalendarView = require('matrix-public-archive-shared/views/CalendarView'); const TimeSelectorView = require('matrix-public-archive-shared/views/TimeSelectorView'); -const assert = require('matrix-public-archive-shared/lib/assert'); class RightPanelContentView extends TemplateView { render(t, vm) { assert(vm.shouldIndex !== undefined); assert(vm.shouldShowTimeSelector !== undefined); - let maybeIndexedMessage = 'This room is not being indexed by search engines.'; + let maybeIndexedMessage = 'This room is not being indexed by search engines '; if (vm.shouldIndex) { - maybeIndexedMessage = 'This room is being indexed by search engines.'; + maybeIndexedMessage = 'This room is being indexed by search engines '; } return t.div( @@ -33,7 +33,19 @@ class RightPanelContentView extends TemplateView { className: 'RightPanelContentView_footer', }, [ - t.p(maybeIndexedMessage), + t.p([ + maybeIndexedMessage, + '(', + t.a( + { + className: 'external-link RightPanelContentView_footerLink', + href: 'https://github.com/matrix-org/matrix-public-archive/blob/main/docs/faq.md#how-do-i-opt-out-and-keep-my-room-from-being-indexed-by-search-engines', + target: '_blank', + }, + 'more info' + ), + ').', + ]), t.div( { className: 'RightPanelContentView_footerLinkList',