'caption' => 'Save'));
}
- $tem->set('form', array(
- 'visible_fields' => $visible_fields,
- 'hidden_fields' => $hidden_fields));
+ $form_fields = array();
+ $form_fields['visible_fields'] = $visible_fields;
+ if($hidden_fields) {
+ $form_fields['hidden_fields'] = $hidden_fields;
+ }
+ $tem->set('form', $form_fields);
# opt_display and opt_listing control whether these are actually displayed
$tem->set('display_fields', $display_fields);
"INSTALL" => read_whole_file('code/wfpl/metaform/INSTALL'),
".htaccess" => make_htaccess(),
#"run.php ->" => 'code/wfpl/run.php',
- "style.css" => read_whole_file('code/wfpl/metaform/style.css'),
+ "style.less" => read_whole_file('code/wfpl/metaform/style.less'),
+ "template.html" => read_whole_file('code/wfpl/metaform/site-template.html'),
"$name.html" => make_html(),
"$name.php" => make_php());
if($GLOBALS['opt_db']) {
# You should rename your images and css files when you change them so they can
# be cached forever
-<FilesMatch "\.(css|jpg|png)$">
+<FilesMatch "\.(css|less|jpg|png)$">
ExpiresActive On
ExpiresDefault A31536000
</FilesMatch>
# stylesheet without actually renaming it all the time. This is needed even if
# you don't set a long cache period on stylesheets, because Safari will check
# for a new html, but not check for a new css.
-RewriteRule ^style_[0-9]*.css$ /style.css [L]
+RewriteRule ^style_[0-9]*.less$ /style.less [L]
# To enable larger uploads, you'll need both of these:
# php_value upload_max_filesize 200M
-############ START OF PRETTY URLS SETTINGS
+############ START OF PRETTY URLS SETTINGS ############
# This section contains directives to enable pretty URLs, and instruct apache
# to run wfpl on them. This runs code/config.php if it exists, then loads
# templates, then loads the php file, and call's it's main function. See
# use this line instead if you have this (.htaccess) file and your php and html
# files in the ~form~ directory:
#RewriteRule ^[^/.]*$ /~form~/run.php
-############ END OF PRETTY URLS SETTINGS
+############ END OF PRETTY URLS SETTINGS ############
--- /dev/null
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8" />
+ <title>~main-title html~</title>
+ <!--[if lt IE 9]>
+ <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
+ <![endif]-->
+ <link rel="stylesheet/less" href="style_01.less" />
+ <script src="http://lesscss.googlecode.com/files/less-1.0.41.min.js"></script>
+ <!--~extra-headers~-->
+</head>
+
+<body>
+ <div id="centerer">
+ <header>
+ </header>
+
+ <nav>
+ </nav>
+
+ <div id="main-body">
+ <!--~wfpl_messages once_if {~-->
+ <div id="wfpl_messages">
+ <!--~wfpl_messages {~-->
+ <p>~data html~</p>
+ <!--~ sep {~-->
+ <hr>
+ <!--~}~-->
+ <!--~}~-->
+ </div>
+ <!--~}~-->
+
+ <article>
+ ~main_body~
+ </article>
+
+ <footer>
+ </footer>
+ </div>
+ </div>
+</body>
+</html>
+++ /dev/null
-.caption {
- margin-top: 15px;
- font-weight: bold;
-}
-.field {
- margin-bottom: 15px;
-}
-div.field_notes {
- font-size: 12px;
- line-height: 16px;
-}
-fieldset {
- border: 1px dotted black;
- padding: 0 15px 15px 15px;
- margin: 15px 0;
- position: relative;
-}
-legend {
- padding: 0 6px;
- font-weight: bold;
-}
-div.error {
- border: 2px solid red;
- padding: 13px;
- margin: 20px;
- background: #fdd;
-}
-
-/* hack so that vertical margins are only between siblings for the most part */
-td > :first-child,
-th > :first-child,
-legend + *,
-article > :first-child,
-section > :first-child,
-nav > :first-child,
-div > :first-child,
-.first {
- margin-top: 0px;
-}
-td > :last-child,
-th > :last-child,
-fieldset > :last-child,
-article > :last-child,
-section > :last-child,
-nav > :last-child,
-div > :last-child,
-.last {
- margin-bottom: 0px;
-}
--- /dev/null
+#wfpl_messages {
+ border: 2px solid red;
+ background: #fbb;
+ padding: 5px;
+ margin: 20px 0px;
+ p {
+ font-size: 120%;
+ padding: 5px;
+ margin: 0px;
+ }
+ hr {
+ height: 1px;
+ }
+}
+.caption {
+ margin-top: 15px;
+ font-weight: bold;
+}
+.field {
+ margin-bottom: 15px;
+}
+div.field_notes {
+ font-size: 12px;
+ line-height: 16px;
+}
+fieldset {
+ border: 1px dotted black;
+ padding: 0 15px 15px 15px;
+ margin: 15px 0;
+ position: relative;
+}
+legend {
+ padding: 0 6px;
+ font-weight: bold;
+}
+div.error {
+ border: 2px solid red;
+ padding: 13px;
+ margin: 20px;
+ background: #fdd;
+}
+
+/* hack so that vertical margins are only between siblings for the most part */
+td > :first-child,
+th > :first-child,
+legend + *,
+article > :first-child,
+section > :first-child,
+nav > :first-child,
+div > :first-child,
+.first {
+ margin-top: 0px;
+}
+td > :last-child,
+th > :last-child,
+fieldset > :last-child,
+article > :last-child,
+section > :last-child,
+nav > :last-child,
+div > :last-child,
+.last {
+ margin-bottom: 0px;
+}
</head>
<body>
-<!--~~main_body show {~~-->
-
- <!--~~wfpl_messages once_if {~~-->
- <div style="border: 2px solid red; background: #fbb; padding: 5px; margin: 20px 0px">
- <!--~~wfpl_messages {~~-->
- <p style="font-size: 120%; padding: 5px; margin: 0px">~~data html~~</p>
- <!--~~ sep {~~-->
- <hr>
- <!--~~}~~-->
- <!--~~}~~-->
- </div>
- <!--~~}~~--><!--~opt_display {~-->
-
+<!--~~main_body show {~~--><!--~opt_display {~-->
<!--~~display {~~-->
<h2>~singular cap~ details</h2><!--~opt_listing {~-->