PAD Showcase
All tags/Excerpt

Teasers from HTML

The first 25 words of each post body - its tags dropped with html, an ellipsis where it goes on.

1 The data excerpt/teaser.php php
<?php

  $posts = [
    [ 'title' => 'Templates that drive', 'date' => '2026-09-14',
      'body'  => '<p>Most frameworks start in a controller. The controller fetches the data, decides what to show and hands it to a template, which is the last and least important step.</p><p>PAD turns that around: the template is where a request starts. It asks for the data it needs, the way a reader asks for a page, and the PHP beside it answers.</p>' ],
    [ 'title' => 'Charts without JavaScript', 'date' => '2026-10-01',
      'body'  => '<p>A chart is a picture, and a picture can be drawn on the server. The chart tag writes inline SVG: bars, lines, pies and forty other kinds, with a title and a description for a screen reader &amp; colours that follow the page into dark mode.</p>' ] ];

?>
2 The template excerpt/teaser.pad pad
<div>
  {posts}
    <article>
      <h3>{$title}</h3>
      <p><small>{$date}</small> {excerpt $body, words=25, html}</p>
    </article>
  {/posts}
</div>
3 The result rendered on the server

Templates that drive

2026-09-14

Most frameworks start in a controller. The controller fetches the data, decides what to show and hands it to a template, which is the last …

Charts without JavaScript

2026-10-01 A chart is a picture, and a picture can be drawn on the server. The chart tag writes inline SVG: bars, lines, pies and forty …