Parcourir la source

Print invoices without links, and give their cells room

A printed invoice carried two live links into the PDF: the post title
from post_title.tx and the series tag from post_tags.tx.  Both point at
the backoffice, which a client cannot reach.  The invoice now hides both
in print and prints a plain copy of the title instead.  The new
printonly class is hidden by screen.css, so it shows only in print.

The invoice table cells had no padding, so the lines ran together.  They
now get padding, a line height of 1.5, and top alignment, from
structure.css, which loads for both screen and print.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
George Baugh il y a 1 semaine
Parent
commit
81c2b9f759

+ 4 - 0
www/styles/screen.css

@@ -541,3 +541,7 @@ pre {
     font-weight: normal;
     opacity: .7;
 }
+
+.printonly {
+    display: none;
+}

+ 6 - 0
www/styles/structure.css

@@ -161,3 +161,9 @@ iframe.responsive {
 		display: none;
 	}
 }
+
+.invoice .table-cell {
+    padding: .5rem .25rem;
+    line-height: 1.5;
+    vertical-align: top;
+}

+ 4 - 1
www/templates/html/components/forms/invoice.tx

@@ -1,14 +1,17 @@
 <div class="post <: $style :>">
     :if ( !$post.addpost ) {
+        <div class="noprint">
         : include "post_title.tx";
         : include "post_tags.tx";
+        </div>
+        <h3 class="blogtitles printonly"><: $post.title :></h3>
 
         : if ( !$post.video_href && !$post.is_image && !$post.is_video && !$post.is_profile && $post.preview ) {
             <img src="<: $post.preview :>" class="responsive-img" loading="lazy" />
         : }
 
         <div class="postData responsive-text" id="postData-<: $post.id :>">
-            <div class="table">
+            <div class="table invoice">
                 <div class="table-row">
                     <div class="table-cell">
                         Invoice ID# <: $post.id :><br />