mirror of
https://github.com/24eme/signaturepdf
synced 2026-03-14 13:55:44 +01:00
use configured revverse proxy url font paths and js routing
This commit is contained in:
parent
95089100dc
commit
7d6227a4be
6 changed files with 21 additions and 19 deletions
|
|
@ -1,17 +1,3 @@
|
|||
@font-face {
|
||||
font-family: 'Caveat';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(/vendor/fonts/Caveat-Regular.ttf) format('truetype');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Tajawal';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(/vendor/fonts/Tajawal-Medium.ttf) format('truetype');
|
||||
}
|
||||
|
||||
#container-pages {
|
||||
overflow: auto;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -330,7 +330,7 @@ async function pageUpload() {
|
|||
if(await canUseCache()) {
|
||||
const file = document.getElementById('input_pdf_upload').files[0]
|
||||
storeFileInCache(file, file.name);
|
||||
history.pushState({}, '', '/metadata#'+file.name);
|
||||
history.pushState({}, '', `${REVERSE_PROXY_URL ? '/': ''}${REVERSE_PROXY_URL}/metadata#${file.name}`);
|
||||
}
|
||||
pageMetadata(null);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1176,7 +1176,7 @@ async function pageUpload() {
|
|||
if(await canUseCache()) {
|
||||
const file = document.getElementById('input_pdf_upload').files[0]
|
||||
storeFileInCache(file, file.name);
|
||||
history.pushState({}, '', '/signature#'+file.name);
|
||||
history.pushState({}, '', `${REVERSE_PROXY_URL ? '/': ''}${REVERSE_PROXY_URL}/signature#${file.name}`);
|
||||
}
|
||||
pageSignature(null);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
<?php endif; ?>
|
||||
<script src="<?php echo $REVERSE_PROXY_URL; ?>/js/common.js?<?php echo ($COMMIT) ? $COMMIT : filemtime($ROOT."/public/js/common.js") ?>"></script>
|
||||
<script>
|
||||
var REVERSE_PROXY_URL = <?php echo json_encode($REVERSE_PROXY_URL); ?>;
|
||||
var trad = <?php echo json_encode([
|
||||
'Select this page' => _('Select this page'),
|
||||
'Delete this page' => _('Delete this page'),
|
||||
|
|
|
|||
|
|
@ -8,3 +8,18 @@
|
|||
<?php endif; ?>
|
||||
<link rel="icon" type="image/x-icon" href="<?php echo $REVERSE_PROXY_URL; ?>/favicon.ico">
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="<?php echo $REVERSE_PROXY_URL; ?>/favicon.png" />
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: 'Caveat';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url('<?php echo $REVERSE_PROXY_URL; ?>/vendor/fonts/Caveat-Regular.ttf') format('truetype');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Tajawal';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url('<?php echo $REVERSE_PROXY_URL; ?>/vendor/fonts/Tajawal-Medium.ttf') format('truetype');
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -351,11 +351,11 @@
|
|||
]); ?>;
|
||||
|
||||
<?php if ($TRANSLATION_LANGUAGE == 'ar'): ?>
|
||||
url_font = <?php echo json_encode('/vendor/fonts/Tajawal-Medium.ttf') ?>
|
||||
url_font = <?php echo json_encode((!empty($REVERSE_PROXY_URL) ? '/': '') . $REVERSE_PROXY_URL . '/vendor/fonts/Tajawal-Medium.ttf') ?>
|
||||
<?php elseif ($TRANSLATION_LANGUAGE == 'kab'): ?>
|
||||
url_font = <?php echo json_encode('/vendor/fonts/FiraSans-MediumItalic.ttf') ?>
|
||||
url_font = <?php echo json_encode((!empty($REVERSE_PROXY_URL) ? '/': '') . $REVERSE_PROXY_URL . '/vendor/fonts/FiraSans-MediumItalic.ttf') ?>
|
||||
<?php else: ?>
|
||||
url_font = <?php echo json_encode('/vendor/fonts/Caveat-Regular.ttf') ?>
|
||||
url_font = <?php echo json_encode((!empty($REVERSE_PROXY_URL) ? '/': '') . $REVERSE_PROXY_URL . '/vendor/fonts/Caveat-Regular.ttf') ?>
|
||||
<?php endif; ?>
|
||||
</script>
|
||||
<script src="<?php echo $REVERSE_PROXY_URL; ?>/js/signature.js?<?php echo ($COMMIT) ? $COMMIT : filemtime($ROOT."/public/js/signature.js") ?>"></script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue