Add default print styles

This commit is contained in:
Marcus Kammer 2024-08-19 08:55:55 +02:00
parent b2d862596e
commit b26aa0f805

View file

@ -78,7 +78,7 @@
(defparameter *color-theme* "light")
(defparameter *print-css-url* "/print.css")
(defparameter *print-css-url* nil)
(defun bs-url-css ()
(if *use-cdn*
@ -156,7 +156,9 @@ Example usage:
(:title ,title)
(:link :type "text/css" :rel "stylesheet" :href ,*print-css-url*)
(:style (:raw "@media print{.navbar,.nav,.btn,.carousel,.dropdown-menu,footer,.no-print{display:none!important}.container,.container-fluid{width:100%!important;padding:0!important;margin:0!important}[class^=\"col-\"]{width:100%!important;flex:0 0 100%!important;max-width:100%!important}body{font-size:12pt;line-height:1.5}h1,.h1{font-size:24pt}h2,.h2{font-size:22pt}h3,.h3{font-size:20pt}h4,.h4{font-size:18pt}h5,.h5{font-size:16pt}h6,.h6{font-size:14pt}h1,h2,h3,h4,h5,h6,p,img,table,figure{page-break-inside:avoid}a{text-decoration:underline;color:#000!important}a[href^=\"http\"]:after{content:\" (\" attr(href) \")\";font-size:80%}.table-responsive{overflow:visible!important}.card{border:none!important;box-shadow:none!important}@page{margin:1in}}"))
(when *print-css-url*
(:link :type "text/css" :rel "stylesheet" :href ,*print-css-url*))
(:link :type "text/css" :rel "stylesheet" :href ,(bs-url-css))
,@(loop for url in add-css-urls
collect `(:link :type "text/css"