From c8d6725f2dfb378c744c569df1b9981623808c87 Mon Sep 17 00:00:00 2001
From: Malf Furious <m@lfurio.us>
Date: Tue, 27 Jun 2017 01:26:33 -0400
Subject: Reformat view helper modules

To limit whitespace being piped to the client, remove empty lines of
free HTML between PHP functions defined in view files.  To maintain
readability, this spacing is added back at the top and bottom of each
PHP function.
---
 app/view/formctrl.php | 5 ++++-
 app/view/stdpage.php  | 7 ++++---
 2 files changed, 8 insertions(+), 4 deletions(-)

(limited to 'app/view')

diff --git a/app/view/formctrl.php b/app/view/formctrl.php
index deac491..ee0243f 100644
--- a/app/view/formctrl.php
+++ b/app/view/formctrl.php
@@ -18,15 +18,18 @@ namespace formctrl;
 
 <?php function text(string $label, string $name, string $value = "", string $placeholder = "",
         bool $required = true, bool $disabled = false) : void { ?>
+
     <div class="form-group">
         <label><?=$label?></label>
         <input type="text" name="input[<?=$name?>]" value="<?=$value?>" placeholder="<?=$placeholder?>" class="form-control" <?=($required ? "required" : "")?> <?=($disabled ? "disabled" : "")?> />
     </div>
-<?php } ?>
 
+<?php } ?>
 <?php function password(string $label, string $name, bool $required = true) : void {?>
+
     <div class="form-group">
         <label><?=$label?></label>
         <input type="password" name="input[<?=$name?>]" class="form-control" <?=($required ? "required" : "")?> />
     </div>
+
 <?php } ?>
diff --git a/app/view/stdpage.php b/app/view/stdpage.php
index 157dc1b..4bdc0c5 100644
--- a/app/view/stdpage.php
+++ b/app/view/stdpage.php
@@ -17,7 +17,6 @@ namespace stdpage;
 require_once "class/globals.php";
 
 ?>
-
 <?php function head(?string $title = NULL) : void { ?>
 
     <!--
@@ -54,12 +53,14 @@ require_once "class/globals.php";
     <title>Scrott<?=($title ? " - ".$title : "")?></title>
 
     <link rel="stylesheet" type="text/css" href="<?=ar()?>/static/css/bootstrap.min.css" />
-<?php } ?>
 
-<?php function top() : void { ?>
 <?php } ?>
+<?php function top() : void { ?>
 
+<?php } ?>
 <?php function foot() : void { ?>
+
     <script type="text/javascript" src="<?=ar()?>/static/js/jquery.min.js"></script>
     <script type="text/javascript" src="<?=ar()?>/static/js/bootstrap.min.js"></script>
+
 <?php } ?>
-- 
cgit v1.2.3