summaryrefslogtreecommitdiff
path: root/lib/VNWeb/User
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2019-10-16 10:36:59 +0200
committerYorhel <git@yorhel.nl>2019-10-16 10:37:03 +0200
commit3f9a77c094f744f3f781bb0648f6ac2dd09038f5 (patch)
treebcc6d84064b95f562d713c261243521431a0e1b3 /lib/VNWeb/User
parentb7c525893bdd374d067e34d307bf0bc32df73f97 (diff)
HTML: Make "noindex" the default
Adding 'index => 0' to all pages is error-prone, and the majority of the pages aren't indexed. Requiring an 'index => 1' for pages that may be indexed is less work and a safer solution. (Doesn't affect the v2 codebase, which still requires an explicit 'noindex => 1')
Diffstat (limited to 'lib/VNWeb/User')
-rw-r--r--lib/VNWeb/User/Edit.pm4
-rw-r--r--lib/VNWeb/User/List.pm2
-rw-r--r--lib/VNWeb/User/Login.pm2
-rw-r--r--lib/VNWeb/User/Notifications.pm2
-rw-r--r--lib/VNWeb/User/Page.pm2
-rw-r--r--lib/VNWeb/User/PassReset.pm2
-rw-r--r--lib/VNWeb/User/PassSet.pm2
-rw-r--r--lib/VNWeb/User/Register.pm2
8 files changed, 9 insertions, 9 deletions
diff --git a/lib/VNWeb/User/Edit.pm b/lib/VNWeb/User/Edit.pm
index 936a65e2..80fbacdf 100644
--- a/lib/VNWeb/User/Edit.pm
+++ b/lib/VNWeb/User/Edit.pm
@@ -71,7 +71,7 @@ TUWF::get qr{/$RE{uid}/edit}, sub {
}
my $title = $u->{id} == auth->uid ? 'My Account' : "Edit $u->{username}";
- framework_ title => $title, index => 0, type => 'u', dbobj => $u, tab => 'edit',
+ framework_ title => $title, type => 'u', dbobj => $u, tab => 'edit',
sub {
elm_ 'User.Edit', $FORM, $u;
};
@@ -153,7 +153,7 @@ json_api qr{/u/edit}, $FORM, sub {
TUWF::get qr{/$RE{uid}/setmail/(?<token>[a-f0-9]{40})}, sub {
my $success = auth->setmail_confirm(tuwf->capture('id'), tuwf->capture('token'));
my $title = $success ? 'E-mail confirmed' : 'Error confirming email';
- framework_ title => $title, index => 0, sub {
+ framework_ title => $title, sub {
div_ class => 'mainbox', sub {
h1_ $title;
div_ class => $success ? 'notice' : 'warning', sub {
diff --git a/lib/VNWeb/User/List.pm b/lib/VNWeb/User/List.pm
index dc34fe38..cb106a7c 100644
--- a/lib/VNWeb/User/List.pm
+++ b/lib/VNWeb/User/List.pm
@@ -78,7 +78,7 @@ TUWF::get qr{/u/(?<char>[0a-z]|all)}, sub {
);
my $count = @where ? tuwf->dbVali('SELECT count(*) FROM users WHERE', sql_and @where) : tuwf->{stats}{users};
- framework_ title => 'Browse users', index => 0, sub {
+ framework_ title => 'Browse users', sub {
div_ class => 'mainbox', sub {
h1_ 'Browse users';
form_ action => '/u/all', method => 'get', sub {
diff --git a/lib/VNWeb/User/Login.pm b/lib/VNWeb/User/Login.pm
index 160e6d99..7c93e058 100644
--- a/lib/VNWeb/User/Login.pm
+++ b/lib/VNWeb/User/Login.pm
@@ -9,7 +9,7 @@ TUWF::get '/u/login' => sub {
my $ref = tuwf->reqGet('ref');
$ref = '/' if !$ref || $ref !~ /^\//;
- framework_ title => 'Login', index => 0, sub {
+ framework_ title => 'Login', sub {
elm_ 'User.Login' => tuwf->compile({}), $ref;
};
};
diff --git a/lib/VNWeb/User/Notifications.pm b/lib/VNWeb/User/Notifications.pm
index bb9328a2..b9327c93 100644
--- a/lib/VNWeb/User/Notifications.pm
+++ b/lib/VNWeb/User/Notifications.pm
@@ -111,7 +111,7 @@ TUWF::get qr{/$RE{uid}/notifies}, sub {
'ORDER BY n.id', $opt->{r} ? 'DESC' : 'ASC'
);
- framework_ title => 'My notifications', index => 0,
+ framework_ title => 'My notifications',
sub {
div_ class => 'mainbox', sub {
h1_ 'My notifications';
diff --git a/lib/VNWeb/User/Page.pm b/lib/VNWeb/User/Page.pm
index 8e13e74b..dbb4a086 100644
--- a/lib/VNWeb/User/Page.pm
+++ b/lib/VNWeb/User/Page.pm
@@ -143,7 +143,7 @@ TUWF::get qr{/$RE{uid}}, sub {
});
my $title = user_displayname($u)."'s profile";
- framework_ title => $title, index => 0, type => 'u', pubskin => $u, dbobj => $u,
+ framework_ title => $title, type => 'u', pubskin => $u, dbobj => $u,
sub {
div_ class => 'mainbox userpage', sub {
h1_ $title;
diff --git a/lib/VNWeb/User/PassReset.pm b/lib/VNWeb/User/PassReset.pm
index 0037fdff..0edd21e3 100644
--- a/lib/VNWeb/User/PassReset.pm
+++ b/lib/VNWeb/User/PassReset.pm
@@ -4,7 +4,7 @@ use VNWeb::Prelude;
TUWF::get '/u/newpass' => sub {
return tuwf->resRedirect('/', 'temp') if auth;
- framework_ title => 'Password reset', index => 0, sub {
+ framework_ title => 'Password reset', sub {
elm_ 'User.PassReset';
};
};
diff --git a/lib/VNWeb/User/PassSet.pm b/lib/VNWeb/User/PassSet.pm
index ef124cb4..71929812 100644
--- a/lib/VNWeb/User/PassSet.pm
+++ b/lib/VNWeb/User/PassSet.pm
@@ -18,7 +18,7 @@ TUWF::get $reset_url, sub {
return tuwf->resNotFound if !$name || !auth->isvalidtoken($id, $token);
- framework_ title => 'Set password', index => 0, sub {
+ framework_ title => 'Set password', sub {
elm_ 'User.PassSet', tuwf->compile({}), tuwf->reqPath;
};
};
diff --git a/lib/VNWeb/User/Register.pm b/lib/VNWeb/User/Register.pm
index 2f79a93d..5135531b 100644
--- a/lib/VNWeb/User/Register.pm
+++ b/lib/VNWeb/User/Register.pm
@@ -5,7 +5,7 @@ use VNWeb::Prelude;
TUWF::get '/u/register', sub {
return tuwf->resRedirect('/', 'temp') if auth;
- framework_ title => 'Register', index => 0, sub {
+ framework_ title => 'Register', sub {
elm_ 'User.Register';
};
};