incorporation feuille de style dans lib/RecusHTML.php

FossilOrigin-Name: fb483e52b61476d0f050be88b34d91dcb4dcf627b71c85ef256d59a18f3427ec
This commit is contained in:
engel 2022-03-04 12:54:53 +00:00
parent 33bb577b34
commit 5074876f0a
3 changed files with 87 additions and 134 deletions

View File

@ -148,14 +148,99 @@ FDD;
protected function entete() protected function entete()
{ {
$styleSheet = \Garradin\PLUGIN_ROOT . "/lib/pdf.css"; // $styleSheet = \Garradin\PLUGIN_ROOT . "/lib/pdf.css";
// error_log("pdf.css = " . $styleSheet);
ob_start(); ob_start();
echo <<<FDD echo <<<FDD
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<link rel="stylesheet" type="text/css" href="{$styleSheet}" /> <style>
/* organisation spatiale */
@page
{
size: A4 portrait;
margin: 1cm;
}
body
{
font-family: Serif;
font-size: 11pt;
background-color: white;
}
#logoCerfa
{
line-height: 40px;
width: 100px;
background-color: rgb(0, 0, 128);
border-radius : 50%;
text-align : center;
margin : 2mm;
}
.centre
{
display : inline-block;
vertical-align : middle;
line-height: 20px; /* moitié de la hauteur du logo */
color : white;
font-weight: bold;
font-size : 14pt;
}
#numCerfa
{
width: 100px; /* largeur du logo */
text-align: center;
}
#titre
{
margin : 0 4cm 0 4cm;
text-align : center;
font-size : 14pt;
font-weight: bold;
}
#articles
{
margin : 0 4cm 0 4cm; /* idem titre */
text-align : center;
}
#numRecu
{
text-align : right;
}
#final
{
height : 5cm;
}
.rubrique
{
background-color : rgb(200, 200, 250);
padding : 2mm;
}
.cartouche
{
margin : 2mm auto;
padding : 0 2mm;
border : 1px solid rgb(0, 0, 128);
border-radius : 8px;
}
.titre, .important
{
font-weight:bold;
}
#signature
{
display: block;
max-width : 7cm;
max-height : 2cm;
margin: 0 auto;
padding-bottom : 2mm;
}
#fonction, #nom
{
text-align : center;
}
</style>
</head> </head>
<body> <body>
<div class="cartouche" id="entete"> <div class="cartouche" id="entete">

View File

@ -1,126 +0,0 @@
/* organisation spatiale */
@page
{
size: A4 portrait;
margin: 1cm;
}
body
{
font-family: Serif;
font-size: 11pt;
background-color: white;
display: grid;
grid-template-areas:
'entete'
'beneficiaire'
'donateur'
'versements'
'signature';
}
#entete
{
grid-area: entete;
}
#logoCerfa
{
line-height: 40px;
width: 100px;
background-color: rgb(0, 0, 128);
border-radius : 50%;
text-align : center;
margin : 2mm;
}
.centre
{
display : inline-block;
vertical-align : middle;
line-height: 20px; /* moitié de la hauteur du logo */
color : white;
font-weight: bold;
font-size : 14pt;
}
#numCerfa
{
width: 100px; /* largeur du logo */
text-align: center;
}
#titre
{
margin : 0 4cm 0 4cm;
text-align : center;
font-size : 14pt;
font-weight: bold;
}
#articles
{
margin : 0 4cm 0 4cm; /* idem titre */
text-align : center;
}
#numRecu
{
text-align : right;
}
#beneficiaire
{
grid-area: beneficiaire;
}
#donateur
{
grid-area: donateur;
}
#versements
{
grid-area: versements;
}
#final
{
grid-area: signature;
height : 5cm;
}
.rubrique
{
background-color : rgb(200, 200, 250);
padding : 2mm;
}
.cartouche
{
margin : 2mm auto;
padding : 0 2mm;
border : 1px solid rgb(0, 0, 128);
border-radius : 8px;
}
.titre, .important
{
font-weight:bold;
}
#signature
{
display: block;
max-width : 7cm;
max-height : 2cm;
margin: 0 auto;
padding-bottom : 2mm;
}
#fonction, #nom
{
text-align : center;
}

View File

@ -8,12 +8,6 @@
<button type="button" data-icon="↑" class="icn-btn" id="close_details">Replier toutes les activités</button> <button type="button" data-icon="↑" class="icn-btn" id="close_details">Replier toutes les activités</button>
</div> </div>
{*
<form method="post" id="imprimer_activites" action="imprimer_activites.php">
<input type="submit" value="Fabriquer PDF">
</form>
*}
<form method="post" id="versements_activites" action="generer_activites.php"> <form method="post" id="versements_activites" action="generer_activites.php">
<fieldset class="versements" id="versements_global"> <fieldset class="versements" id="versements_global">