NAME Web::Scaffold -- build minimalist fancy web sites SYNOPSIS use Web::Scaffold; Web::Scaffold::build(\%specs,\%pages); DESCRIPTION Web::Scaffold is a module that allows you to easily and quickly build a fancy web site with drop down menus an a variable number of columns. This is accomplished with a simple specification and a series of minimal html page includes that are written in very basic html. In its simplest form, your web will have the following structure: pages/ contains minimalist html pages public_html/ contains the index page and any non Web::Scaffold pages images/ contains web site images lib/ contains javascript library(s) The index pages requires Server Side Includes (SSI) and is as follows: Alternatively, you can use the included pages.cgi script as an example to build your own more sophisticated cgi or mod_perl application. CONFIGURATION build(%specs,%pages) A web site with drop down menus can be complete configured with two hash arrays. The %specs array configures the style and form of the site and the %pages array configures the menus and column layout. %specs The specifications for fonts, menu, links, colors %specs = ( # directory path for 'html pages' relative to the html root # i.e. public_html/ defaults to: # pagedir => '../pages', # directory path for 'javascript libraries' relative to # html root defaults to: javascript => 'lib', # font family used throughout the document # face => 'VERANDA,ARIAL,HELVETICA,SAN-SERIF', # background color of the web page # this can be a web color like 'white' or number '#ffffff' # backcolor => 'white', # Menu specifications # barcolor => 'red', menudrop => '55', # drop down position menuwidth => '100px', # width of menu item pagewidth => '620px', # recommended # meNU font specifications - class='NU' menucolor => 'black', menuhot => 'yellow', # mouse over menucold => 'white', # page selected menustyle => 'normal', # bold, italic menusize => '13px', # font points or pixels sepcolor => 'black', # separator color # Basic link font specifications - class='B' # linkcolor => 'blue', linkhot => 'green', linkstyle => 'normal', # bold, italic linksize => '13px', # font points or pixels # Page Text font specifications - class='PT' # fontcolor => 'black', fontstyle => 'normal', fontsize => '13px', # Heading Text specifications - class='HT' # headcolor => 'black', headstyle => 'bold', # normal, italic headsize => '16px', ); %pages The specifications for menus and pages. Menus can be single link or a series of drop down menu depending on how you specifiy the page. The page names are the keys to the hash and are used as the menu-bar link text. All page files are placed in the 'pages' directory. FILE NAME SYNTAX: Files are named with the 'key' name of the page as the lefthand side and a suffix designating the file's purpose as the right hand side. For the required page 'Home', they are as follows: # [optional] page used if there are not individual pages # NOTE: neither a Default page or individual page is required Default.meta # meta text loaded after Default.head # optional additional <head> text # that is on every page, end of page # optional body text that appears # on every page before menu-bar # i.e. logo, etc... # for each individual page Home.meta # meta text loaded after <title> Home.head # optional additional <head> text # body text that appears before # menu-bar. i.e. logo, etc... Home.c1 # column 1 content Home.c2 # column 2 content # column 'n' content %pages = ( # REQUIRED page # Home => { menu => [qw(Home Page1 Page2 Page5)], # optional title text - if missing, 'heading' text will be used title => 'page title', heading => 'Text under menu, over body text', # number of columns and column width in pixels column => [20, 200, 400], # three columns # optional submenu => [qw(Page3 Page4)], # drop down menu # optional trailer bar trailer => { # a named page links => [qw(Page5 Page6)], # optional right hand side text. if there are no links then the # text will be placed on the left hand side of the trailer bar text => 'Copyright 2006, yourname', }, }, # next page # Page1 => ... same as above }, # # ... and so on # and for debug... example # load this page segment as source in a single window '' => { # copy prototype page from this one page. debug => 'Home', # optional location if not in the 'pages' directory # location => 'path/to/filename', }, ); OPERATION The sample index.shtml and pages.cgi script may be used together with the above specification and configuration data to produce a multi-page web site with with drop down menus. Each of the sub-pages specified in the ./pages directory may be prepared in a simple text editor with 'basic' html formating. LINKS WITHIN THE PAGE may be regular html or to take advantage of the MouseOver and STATUS reporting features of Web::Scaffold, may be specified using the special syntax: LINK<#page_name#optional link text#optional status text#> or LINK<#URL#optional link text#optional status text#> URL syntax is as follows: uppercase word "LINK" less than symbol < delimiter (any char) # page name or url text ./dir/file or http://.... [optional] delimiter # link text optional text for link delimiter # status bar text optional browser status bar text delimiter # required greater than symbol > Where the first syntax refers to a named page in the %pages array and the second syntax refers to a real URL optionally followed by the text to appear as the "link" text and in the status bar. Line breaks are not allowed in LINK<#text> Web::Scaffold builds the page with menus and incorporates the various include files (page.head,, page.c1, page.c2, etc...) to produce a website that can be easily and quickly maintained by simply editing the page includes. AUTHOR Michael Robinton <> COPYRIGHT AND LICENCE This notice does NOT cover the javascript libraries. Those libraries are freely usable but copyright and licensed all or in part by others and have their own copyright notices and license requirements. Please read the text in the individual libraries to determine their specific licensing and copyright notice requirements. Copyright 2006, Michael Robinton <> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.