Skip to content

Commit

Permalink
pdf bloc with padding compatible rtl
Browse files Browse the repository at this point in the history
  • Loading branch information
wincelau committed Sep 22, 2023
1 parent 76b1857 commit ac0cfbc
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
8 changes: 8 additions & 0 deletions public/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,11 @@
font-size: .875em
}
}

.decalage-pdf-div:dir(ltr) {
padding-right: 350px;
}

.decalage-pdf-div:dir(rtl) {
padding-left: 350px;
}
4 changes: 2 additions & 2 deletions public/js/organization.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ var disabledHoverStyle = function() {
}
var responsiveDisplay = function() {
if(is_mobile()) {
document.getElementById('page-organization').style.paddingRight = "inherit";
document.getElementById('page-organization').classList.remove('decalage-pdf-div');
menu.classList.remove('show');
menuOffcanvas.hide();
document.getElementById('container-pages').classList.remove('vh-100');
Expand All @@ -36,7 +36,7 @@ var responsiveDisplay = function() {
document.getElementById('container-btn-zoom').classList.add('d-none');
} else {
menuOffcanvas.show();
document.getElementById('page-organization').style.paddingRight = "350px";
document.getElementById('page-organization').classList.add('decalage-pdf-div');
document.getElementById('container-pages').classList.add('vh-100');
document.getElementById('container-btn-zoom').style.top = '6px';
document.getElementById('container-btn-zoom').style.right = '368px';
Expand Down
4 changes: 2 additions & 2 deletions public/js/signature.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,13 @@ var is_mobile = function() {

var responsiveDisplay = function() {
if(is_mobile()) {
document.getElementById('page-signature').style.paddingRight = "inherit";
document.getElementById('page-signature').classList.remove('decalage-pdf-div');
menu.classList.remove('show');
menuOffcanvas.hide();
document.getElementById('container-pages').classList.remove('vh-100');
} else {
menuOffcanvas.show();
document.getElementById('page-signature').style.paddingRight = "350px";
document.getElementById('page-signature').classList.add('decalage-pdf-div');
document.getElementById('container-pages').classList.add('vh-100');
}
menu.classList.remove('d-md-block');
Expand Down
2 changes: 1 addition & 1 deletion templates/organization.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<small><?php echo _("Free open-source software"); ?> <span class="d-none d-md-inline"><?php echo _("under AGPL-3.0 license"); ?></span> : <a href="https://github.com/24eme/signaturepdf"><?php echo _("see the source code"); ?></a><?php if($COMMIT): ?> <span class="d-none d-md-inline small">[<a href="https://github.com/24eme/signaturepdf/tree/<?php echo $COMMIT ?>"><?php echo $COMMIT ?></a>]</span><?php endif; ?></small>
</footer>
</div>
<div id="page-organization" style="padding-right: 350px;" class="d-none">
<div id="page-organization" class="d-none decalage-pdf-div">
<div id="div-margin-top" style="height: 88px;" class="d-md-none"></div>
<div style="top: 62px;" class="w-100 position-absolute text-center text-muted opacity-50 d-md-none"><em><?php echo _("Touch a page to select it"); ?></em></div>
<div id="container-main">
Expand Down
2 changes: 1 addition & 1 deletion templates/signature.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<small><?php echo _("Free open-source software"); ?> <span class="d-none d-md-inline"><?php echo _("under AGPL-3.0 license"); ?></span> : <a href="https://github.com/24eme/signaturepdf"><?php echo _("see the source code"); ?></a><?php if($COMMIT): ?> <span class="d-none d-md-inline small">[<a href="https://github.com/24eme/signaturepdf/tree/<?php echo $COMMIT ?>"><?php echo $COMMIT ?></a>]</span><?php endif; ?></small>
</footer>
</div>
<div id="page-signature" style="padding-right: 350px;" class="d-none">
<div id="page-signature" class="d-none decalage-pdf-div">
<?php if(isset($hash)): ?>
<div id="alert-signature-help" class="position-relative d-none">
<div class="alert alert-primary alert-dismissible position-absolute top-0 start-50 translate-middle-x text-center mt-4 pb-2 w-50 opacity-100" style="z-index: 100;" role="alert">
Expand Down

0 comments on commit ac0cfbc

Please sign in to comment.