Link FAQ about indexing

This commit is contained in:
Eric Eastwood 2023-05-31 00:54:43 -05:00
parent 5caf9dc1b8
commit 7e4bfcd7c1
3 changed files with 35 additions and 4 deletions

View File

@ -23,6 +23,20 @@ summary {
cursor: pointer; 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 { .PrimaryActionButton {
display: inline-block; display: inline-block;
padding: 4px 16px; 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

Width:  |  Height:  |  Size: 278 B

View File

@ -2,18 +2,18 @@
const { TemplateView } = require('hydrogen-view-sdk'); 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 CalendarView = require('matrix-public-archive-shared/views/CalendarView');
const TimeSelectorView = require('matrix-public-archive-shared/views/TimeSelectorView'); const TimeSelectorView = require('matrix-public-archive-shared/views/TimeSelectorView');
const assert = require('matrix-public-archive-shared/lib/assert');
class RightPanelContentView extends TemplateView { class RightPanelContentView extends TemplateView {
render(t, vm) { render(t, vm) {
assert(vm.shouldIndex !== undefined); assert(vm.shouldIndex !== undefined);
assert(vm.shouldShowTimeSelector !== 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) { if (vm.shouldIndex) {
maybeIndexedMessage = 'This room is being indexed by search engines.'; maybeIndexedMessage = 'This room is being indexed by search engines ';
} }
return t.div( return t.div(
@ -33,7 +33,19 @@ class RightPanelContentView extends TemplateView {
className: 'RightPanelContentView_footer', 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( t.div(
{ {
className: 'RightPanelContentView_footerLinkList', className: 'RightPanelContentView_footerLinkList',