Source: site.view [edit]
Function name: sitepage
Arguments: content
Description: A basic web page, with Collaborama site layout, holding supplied content
Page type: webl
Render function:  
Module: siteutil

Page source:

var reqinfo, cmdinfo, usermsg;

if wubinfo.user != nil then
   usermsg = `User: <a href="/webl/WubHub_DoIt?cmdline=` + wubinfo.user + `.profile">`+wubinfo.user + `</a> [<a href="/webl/WubHub_DoIt?cmdline=site.logout">logout</a>]`
else
   usermsg = `Anonymous [<a href="/webl/WubHub_DoIt?cmdline=site.login">login</a>]`
end;

if wubinfo.cmd != nil then
  reqinfo = "Source: "+wubinfo.cmd+` [<a href="/webl/WubHub_DoIt?cmdline=site.edit(`+wubinfo.cmd+`)">edit</a>]`;
  cmdinfo = "Command: "+wubinfo.cmdline;
else
  reqinfo = "Source: (none)";
  cmdinfo = "";
end;
 
var header = Markup(WubCall("siteheader",[usermsg]));
var footer = "<p>" + cmdinfo + "</p><p>Generated by Collaborama (v. "+wubinfo.wubversion+")</p>";
NewPage(`
<html lang="en">
	
	<head>
        <title>Collaborama</title>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
        <link rel="stylesheet" type="text/css" href="/webl/WubHub_DoIt?cmdline=basiccss"/>				
		<link rel="stylesheet" href="/webl/WubHub_DoIt?cmdline=threeDcss">
		<link rel="stylesheet" href="/webl/WubHub_DoIt?cmdline=accordionCSS">
	</head>
	
	<body onload="document.forms.wubhub.cmdline.focus()">

		<div class="meny">
` + Markup(WubCall("collabSidebar", [])) + `        
		</div>

		<div class="meny-arrow"></div>

		<div class="meny-contents">
			<article>
        
`
+ header +
`
<div id="bodytop">&nbsp;</div>
<div id="bodywrap">
	
	<div id="contentbody">

<div id="content">        
  <div id="content-header">`
+ reqinfo +
`
  </div>        
  <div id="main-text">`
+ content +
`
  </div>
</div>
</div></div></div>
<!-- div id="footer">
`
+ footer +
`
</div -->        
			</article>
</div>        

		<!-- script type="text/javascript" src="http://rawgithub.com/hakimel/Meny/master/js/meny.min.js"></script -->
		<script type="text/javascript" src="http://lab.hakim.se/meny/js/meny.min.js"></script>
		<script>
			// Create an instance of Meny
			var meny = Meny.create({
				// The element that will be animated in from off screen
				menuElement: document.querySelector( '.meny' ),

				// The contents that gets pushed aside while Meny is active
				contentsElement: document.querySelector( '.meny-contents' ),

				// [optional] The alignment of the menu (top/right/bottom/left)
				position: Meny.getQuery().p || 'left',

				// [optional] The height of the menu (when using top/bottom position)
				height: 200,

				// [optional] The width of the menu (when using left/right position)
				width: 260,

				// [optional] Distance from mouse (in pixels) when menu should open
				threshold: 40
			});

			// API Methods:
			// meny.open();
			// meny.close();
			// meny.isOpen();
			
			// Events:
			// meny.addEventListener( 'open', function(){ console.log( 'open' ); } );
			// meny.addEventListener( 'close', function(){ console.log( 'close' ); } );

			// Embed an iframe if a URL is passed in
			if( Meny.getQuery().u && Meny.getQuery().u.match( /^http/gi ) ) {
				var contents = document.querySelector( '.meny-contents' );
				contents.style.padding = '0px';
				contents.innerHTML = '<div class="cover"></div><iframe src="'+ Meny.getQuery().u +'" style="width: 100%; height: 100%; border: 0; position: absolute;"></iframe>';
			}
		</script>

	</body>
</html>
`,

"text/html");