Tuesday, April 1, 2025

print design in browser via PHP

 It's funny in how so many ways I can use a little coding mojo and not have to fiddle with Word/Google Doc, Excel/Sheets - or Wordpress for that matter, but that's a longer story.

But yeah, helping my sweetie run together some tiny bits of campaign material via PHP:

<!DOCTYPE html>
<html>
<head>
  <title>Lynette Table</title>
  <style>
  body { font-family: sans-serif; }
    table { border-collapse: collapse;  font-size:1.5em;}
    td { border: 0px solid black; padding: 10px; text-align: center;
    
    padding:24px;
    
    }
    
    .bigger{
        font-size:1.4em;   
    }
  </style>
</head>
<body>

<table>
<?php
for ($row = 0; $row < 5; $row++) {
    echo "<tr>";
    for ($col = 0; $col < 3; $col++) {
                echo <<<HTML
<td>

Vote this Sat April 5!<br>
<b class="bigger">Lynette Martyn</b> <br>
Town Meeting Member, Precinct 12<br>
A progressive voice for your neighborhood<br>
<b>www.LynetteMartyn.com</b>


</td>
HTML;
    }
    echo "</tr>";
}
?>
</table>

</body>
</html>

 slapped on this webpage gave me



and that was a lot easier to iterate on and tweak than if I had to copy and paste each time...

No comments:

Post a Comment