migrate embedpdf styles

This commit is contained in:
Aaron Qian 2022-11-14 15:29:49 -08:00 committed by Aaron Qian
parent 4b512c3b07
commit 1f614c2c24
No known key found for this signature in database
GPG key ID: BF1A987C395B5B0E
3 changed files with 46 additions and 44 deletions

View file

@ -0,0 +1,41 @@
.pdf-viewer {
canvas {
border: 1px solid black;
direction: ltr;
width: 100%;
height: auto;
display: none;
}
.paginator {
display: none;
text-align: center;
margin-bottom: 10px;
}
.loading-wrapper {
display: none;
justify-content: center;
align-items: center;
width: 100%;
height: 350px;
}
.loading {
display: inline-block;
width: 50px;
height: 50px;
border: 3px solid #d2d0d0;;
border-radius: 50%;
border-top-color: #383838;
animation: spin 1s ease-in-out infinite;
-webkit-animation: spin 1s ease-in-out infinite;
}
@keyframes spin {
to { -webkit-transform: rotate(360deg); }
}
@-webkit-keyframes spin {
to { -webkit-transform: rotate(360deg); }
}
}

View file

@ -24,4 +24,8 @@ math:
services:
katex:
styles:
- katex/dist/katex
- katex/dist/katex
embedpdf:
styles:
- ./sections/pdf-viewer

View file

@ -23,46 +23,3 @@
<canvas class="pdf-canvas"></canvas>
</div>
</div>
<!-- Finally, make the canvas more beautiful -->
<style>
.pdf-viewer canvas {
border: 1px solid black;
direction: ltr;
width: 100%;
height: auto;
display: none;
}
.pdf-viewer .paginator {
display: none;
text-align: center;
margin-bottom: 10px;
}
.pdf-viewer .loading-wrapper {
display: none;
justify-content: center;
align-items: center;
width: 100%;
height: 350px;
}
.pdf-viewer .loading {
display: inline-block;
width: 50px;
height: 50px;
border: 3px solid #d2d0d0;;
border-radius: 50%;
border-top-color: #383838;
animation: spin 1s ease-in-out infinite;
-webkit-animation: spin 1s ease-in-out infinite;
}
@keyframes spin {
to { -webkit-transform: rotate(360deg); }
}
@-webkit-keyframes spin {
to { -webkit-transform: rotate(360deg); }
}
</style>