feat: prominent diagonal tiled watermark on demo PDFs
Some checks are pending
Build & Deploy to Staging / Build & Deploy to Staging (push) Waiting to run
Some checks are pending
Build & Deploy to Staging / Build & Deploy to Staging (push) Waiting to run
Replace easily-croppable bottom bar with full-page diagonal repeating 'DEMO — docfast.dev' watermark pattern (80 tiles, rotated -35deg, 18% opacity). Bottom bar retained for branding. Content remains readable but watermark cannot be cropped out.
This commit is contained in:
parent
2e928c1f90
commit
3ae4f0e2a9
1 changed files with 20 additions and 1 deletions
|
|
@ -6,7 +6,26 @@ import logger from "../services/logger.js";
|
|||
|
||||
const router = Router();
|
||||
|
||||
const WATERMARK_HTML = `<div style="position:fixed;bottom:0;left:0;right:0;background:rgba(52,211,153,0.92);color:#0b0d11;text-align:center;padding:8px;font-family:sans-serif;font-size:12px;font-weight:bold;z-index:999999;letter-spacing:0.3px;">Generated by DocFast — docfast.dev | Upgrade to Pro for clean PDFs</div>`;
|
||||
const WATERMARK_HTML = `
|
||||
<style>
|
||||
@media print { .docfast-wm-overlay { display:block !important; } }
|
||||
.docfast-wm-overlay {
|
||||
position:fixed; top:0; left:0; width:200vw; height:200vh;
|
||||
z-index:999999; pointer-events:none;
|
||||
display:flex; flex-wrap:wrap; align-content:flex-start;
|
||||
transform:rotate(-35deg); transform-origin:center center;
|
||||
margin-top:-50vh; margin-left:-50vw;
|
||||
}
|
||||
.docfast-wm-tile {
|
||||
width:300px; height:120px;
|
||||
display:flex; align-items:center; justify-content:center;
|
||||
font-family:sans-serif; font-size:18px; font-weight:bold;
|
||||
color:rgba(52,211,153,0.18); letter-spacing:1px;
|
||||
white-space:nowrap; user-select:none;
|
||||
}
|
||||
</style>
|
||||
<div class="docfast-wm-overlay">${Array(80).fill('<div class="docfast-wm-tile">DEMO — docfast.dev</div>').join("")}</div>
|
||||
<div style="position:fixed;bottom:0;left:0;right:0;background:rgba(52,211,153,0.92);color:#0b0d11;text-align:center;padding:8px;font-family:sans-serif;font-size:12px;font-weight:bold;z-index:999999;letter-spacing:0.3px;">Generated by DocFast — docfast.dev | Upgrade to Pro for clean PDFs</div>`;
|
||||
|
||||
function injectWatermark(html: string): string {
|
||||
if (html.includes("</body>")) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue