diff options
Diffstat (limited to 'app/view')
-rw-r--r-- | app/view/templates/edit.php | 3 | ||||
-rw-r--r-- | app/view/templates/layout.php | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/app/view/templates/edit.php b/app/view/templates/edit.php index 7c6610a..8d79174 100644 --- a/app/view/templates/edit.php +++ b/app/view/templates/edit.php @@ -24,6 +24,9 @@ </main> +<script> + const artid = '<?= $art->id() ?>'; +</script> <script src="<?= Model::jspath() ?>edit.js"></script> </body> diff --git a/app/view/templates/layout.php b/app/view/templates/layout.php index e0b2e1c..b054791 100644 --- a/app/view/templates/layout.php +++ b/app/view/templates/layout.php @@ -12,7 +12,11 @@ <?php } ?> <title><?= $title ?></title> <link rel="stylesheet" href="<?= $css ?>"> - + <script> + // global js vars + const basepath = '/<?= Config::basepath() ?>/'; + const jspath = '<?= Model::jspath() ?>'; + </script> </head> |