content_template.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. function content_start($ppub) {
  3. $metadata = $ppub->metadata;
  4. ?>
  5. <!DOCTYPE html>
  6. <html>
  7. <head>
  8. <meta charset="utf-8">
  9. <title><?php echo(htmlentities($metadata["title"]));?> - <?php echo(SITE_NAME);?></title>
  10. <meta name="description" content="<?php echo(htmlentities($metadata["description"]));?>">
  11. <meta name="author" content="<?php echo(htmlentities($metadata["author"]));?>">
  12. <link rel="stylesheet" href="/vanilla.css">
  13. <link rel="alternate" type="application/x-ppub" title="<?php echo(htmlentities($metadata["title"]));?> (as PPUB)" href="?download=true" />
  14. </head>
  15. <body>
  16. <?php
  17. }
  18. function content_html($content) {
  19. echo $content;
  20. }
  21. function content_end($ppub) {
  22. ?>
  23. <footer role="contentinfo">
  24. <hr>
  25. <p><strong><?php echo(htmlentities($ppub->metadata["title"]));?></strong><br/>Post authored by <?php echo(htmlentities($ppub->metadata["author"]));?>.<br/><a href="/">Return to <?php echo(PUBLICATION_NAME);?> Index</a> | <a href="/feed.rss">Subscribe to <?php echo(SITE_NAME);?> RSS</a> | <a href="?download=true">Download <?php echo(PUBLICATION_NAME);?> PPUB</a></p>
  26. <p><br/><small>Powered by php-ppub, styled with <a href="https://vanillacss.com/">Vanilla CSS</a>.</small></p>
  27. </footer>
  28. </body>
  29. </html>
  30. <?php
  31. }
  32. ?>