word: move subpages and includes to word/ directory
[sheet.git] / word.plp
index b5a07bf60a9fe9b0f24f49a5df6048a1bfc2ce23..9fa1aaaf87c7b7987c5d0e5c6cf39b45a64d2193 100644 (file)
--- a/word.plp
+++ b/word.plp
@@ -1,22 +1,11 @@
 <(common.inc.plp)><:
 
-if ($Request and $Request =~ s{^edit/?}{}) {
-       Include 'writer.plp';
-       exit;
-}
-
-if ($Request and $Request =~ s{^quiz/?}{}) {
-       Html({
-               raw => <<'EOT',
-<script src="/wordquiz.js"></script>
-<style>
-.wrong {background: red}
-.good {background: green}
-</style>
-EOT
-       });
-       say '<h1>quiz</h1><p id="quiz">test</p>';
-       exit;
+if ($Request and $Request =~ m{\A([^/]+)}) {
+       my $page = "word/$1.plp";
+       if (-e $page) {
+               Include $page;
+               exit;
+       }
 }
 
 my $lang = $get{lang} || 'en';