REBOL [
Title: "site-build"
Date: 5-May-2001
Version: 1.0.0
File: %site-build.r
Author: "Rishi Oswal"
Purpose: {site-build basicaly builds/updates a website based on the template I have developed. Requires html 4.0 compliant browser (opera 5 or IE 5).
}
Email: rishio@mail.com
Web: http://www.rishio.com/
library: [
level: none
platform: none
type: none
domain: 'markup
tested-under: none
support: none
license: none
see-also: none
]
]
on-net: true
g-files: make object! [
globalcss: %./global.css
globaljs: %./global.js
menushift: %./menushift.js
template: %./template.html
images: %./images/
]
if on-net [
g-files/globalcss: ftp://g-viz.com/pub/myrebol/site-build/global.css
g-files/globaljs: ftp://g-viz.com/pub/myrebol/site-build/global.js
g-files/menushift: ftp://g-viz.com/pub/myrebol/site-build/menushift.js
g-files/template: ftp://g-viz.com/pub/myrebol/site-build/template.html
g-files/images: ftp://g-viz.com/pub/myrebol/site-build/images/
]
global-options: make object! [
background-color: {bgcolor="FAEBD7"}
background-image: {background="./images/background.gif"}
folder: %/c/windows/desktop/site-folder/
door: true
num-menus: 5;
menu: ["Menu1" "Menu2" "Menu3" "Menu4" "Menu5"]
]
menu1-options: make object! [
title: ""
date-bar: now/date
num-submenus: 0
]
menu2-options: make object! [
title: ""
date-bar: ""
num-submenus: 0
]
menu3-options: make object! [
title: ""
date-bar: ""
num-submenus: 0
]
menu4-options: make object! [
title: ""
date-bar: ""
num-submenus: 0
]
menu5-options: make object! [
title: ""
date-bar: ""
num-submenus: 0
]
build-menu1: func [
"builds menu1.html page"
/local menu1-template menu1 begin ending submenu-top content-visibility submenu-color
][
menu1-template: read/string g-files/template
;;;;;;;;;;;;;;;;;;;MENUNAMES
parse menu1-template [
thru {onmouseout="offMenu1();">} begin: to {} ending:
(change/part begin global-options/menu/1 ending)
thru {onmouseout="offMenu2();">} begin: to {} ending:
(change/part begin global-options/menu/2 ending)
thru {onmouseout="offMenu3();">} begin: to {} ending:
(change/part begin global-options/menu/3 ending)
thru {onmouseout="offMenu4();">} begin: to {} ending:
(change/part begin global-options/menu/4 ending)
thru {onmouseout="offMenu5();">} begin: to {} ending:
(change/part begin global-options/menu/5 ending)
]
;;;;;;;;;;;;;;;;;;;;BACKGROUND IMAGES
parse menu1-template [
thru {} ending:
(change/part begin reform [global-options/background-color global-options/background-image] ending)
]
;;;;;;;;;;;;;;;;;;;;;;TITLEBAR
parse menu1-template [
thru {} begin: to {} ending:
(change/part begin menu1-options/title ending)
]
;;;;;;;;;;;;;;;;;;;DATEBAR
parse menu1-template [
thru {} begin: to {
} ending:
(change/part begin menu1-options/date-bar ending)
]
;;;;;;;;;;;;;;;;;;;;;SELECTEDMENUJAVASCRIPT
parse menu1-template [
thru {//SELECTEDMENUBEGIN} begin: to {//SELECTEDMENUEND} ending:
(insert begin {
g_unidocument.MENU1.style.color = "gold";
g_unidocument.MENU1.style.background = "black";} ending)
]
;;;;;;;;;;;;;;;;;;;;;CURRENTMENUHTML
parse menu1-template [
thru {