UNPKG

svelte-pdfz

Version:

svelte-pdf provides a component for rendering PDF documents using PDF.js

297 lines (254 loc) 4.82 kB
:global(html) { scroll-behavior: smooth; } .parent { display: flex; flex-direction: column; margin: 0 1.25rem; } .password-viewer { border-width: 1px; border-color: #000; border-style: solid; align-items: center; display: flex; flex-direction: column; justify-content: center; height: 100%; widows: 100%; } .password-message { color: red; margin: 8px 0px; } .password-container { align-items: center; display: flex; justify-content: center; margin: 8px 0px; } .password-input { border: 1px solid rgba(0, 0, 0, 0.2); padding: 8px; width: 200px; } .password-button { background-color: rgb(53, 126, 221); border: 1px solid rgba(0, 0, 0, 0.2); color: rgb(255, 255, 255); border-left-color: transparent; cursor: pointer; padding: 8px 16px; } .control { margin-top: 1.25rem; margin-bottom: 0; margin-right: 2.5rem; margin-left: 2.5rem; border-radius: 0.25rem; overflow: auto; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); background-color: #fff; border-width: 1px; } .control-start { padding: 1.25rem; } .line { display: flex; flex-direction: row; font-family: Georgia, Cambria, "Times New Roman", Times, serif; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 1px; border-left-width: 0px; border-color: #4fd1c5; border-style: dotted; margin-bottom: 0.75rem; padding-top: 0.5rem; padding-bottom: 0.5rem; justify-content: center; } .button-control { display: flex; flex-direction: row; padding: 0.5rem; margin: 0.75rem; border-radius: 0.25rem; overflow: hidden; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); border-left-width: 1px; border-bottom-width: 1px; border-right-width: 1px; cursor: pointer; } .viewer { border-width: 1px; border-color: #000; border-style: solid; } .icon { height: 1.25rem; width: 1.25rem; fill: currentColor; color: #38b2ac; } .disabled { cursor: not-allowed; box-shadow: none; } .page-info { display: flex; flex-direction: row; padding-top: 0.5rem; margin: 0.75rem; overflow: hidden; } .text { margin-left: 0.5rem; cursor: default; } .rot-icon { transform: scaleX(-1); } #topBtn { position: fixed; bottom: 10px; float: right; right: 10%; left: 90%; max-width: 30px; width: 100%; border-color: #000; background-color: #fff; padding: 0.5px; border-radius: 9999px; } #topBtn:hover { background-color: #000; color: #fff; } /* ##Device = Tablets, Ipads (portrait) ##Screen = B/w 768px to 1024px */ @media (min-width: 768px) and (max-width: 1024px) { .parent { margin: 0; } .control { margin: 0; } .control-start { padding: 0; } .line { justify-content: center; } .button-control { display: flex; flex-direction: row; padding: 0.5rem; margin: 0.5rem; border-radius: 0.25rem; overflow: hidden; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); border-left-width: 1px; border-bottom-width: 1px; border-right-width: 1px; cursor: pointer; } .page-info { display: none; } canvas { width: 100%; height: 100%; } } /* ##Device = Low Resolution Tablets, Mobiles (Landscape) ##Screen = B/w 481px to 767px */ @media (min-width: 481px) and (max-width: 767px) { .parent { margin: 0; } .control { margin: 0; } .control-start { padding: 0; } .line { justify-content: center; } .button-control { display: flex; flex-direction: row; padding: 0.5rem; margin: 0.5rem; border-radius: 0.25rem; overflow: hidden; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); border-left-width: 1px; border-bottom-width: 1px; border-right-width: 1px; cursor: pointer; } .page-info { display: none; } canvas { width: 100%; height: 100%; } } /* ##Device = Most of the Smartphones Mobiles (Portrait) ##Screen = B/w 320px to 479px */ @media (min-width: 320px) and (max-width: 480px) { .parent { margin: 0; } .control { margin: 0; } .control-start { padding: 0; } .line { justify-content: center; } .button-control { display: flex; flex-direction: row; padding: 0.4rem; margin: 0.4rem; border-radius: 0.25rem; overflow: hidden; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); border-left-width: 1px; border-bottom-width: 1px; border-right-width: 1px; cursor: pointer; } .page-info { display: none; } canvas { width: 100%; height: 100%; } }