Link FAQ about indexing in the right-panel footer ()

Link FAQ about indexing in the right-panel footer so people can more easily
understand what goes into the result and find issues to track about opting out.

 - https://github.com/matrix-org/matrix-public-archive/issues/47
 - 5caf9dc1b8/docs/faq.md (how-do-i-opt-out-and-keep-my-room-from-being-indexed-by-search-engines)
This commit is contained in:
Eric Eastwood 2023-05-31 01:23:39 -05:00 committed by GitHub
parent 5caf9dc1b8
commit dfeae90829
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 35 additions and 4 deletions

View File

@ -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;

View File

@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11 10">
<g fill="none" fill-rule="evenodd" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
<path d="M8.5 5.5v3a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h3M7 .5h3v3M4.5 6L10 .5"/>
</g>
</svg>

After

(image error) Size: 278 B

View File

@ -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',