word: move subpages and includes to word/ directory
[sheet.git] / word / edit.plp
similarity index 97%
rename from writer.plp
rename to word/edit.plp
index cd2e2bf1d6369529ad52a1186dcb14792ea82f2f..d8de60249c7a54945d048885acc4fb747d87357a 100644 (file)
@@ -1,12 +1,13 @@
-<(common.inc.plp)><:
+<(../common.inc.plp)><:
 
+s{\Aedit(/|\z)}{} for $Request // ();
 Html({
        title => 'words cheat sheet admin',
        version => '1.0',
        nocache => 1,
        raw => <<'EOT',
-<link rel="stylesheet" type="text/css" media="all" href="/editor.css" />
-<script src="/writer.js"></script>
+<link rel="stylesheet" type="text/css" media="all" href="/word/editor.css" />
+<script src="/word/editor.js"></script>
 EOT
 });
 
@@ -20,7 +21,7 @@ my $db = eval {
 } or Abort('Database error', 501, $@);
 
 my $user = eval {
-       my $rootpath = ($ENV{REQUEST_URI} // '/writer') =~ s{(?<!^)/.+}{}r;
+       my $rootpath = '/word/edit';
        if (defined $post{username}) {
                $cookie{login} = EncodeURI(join ':', @post{qw( username pass )});
        }