This repository has been archived by the owner on Mar 16, 2022. It is now read-only.
/
two-column.html.xqy
74 lines (67 loc) · 3.18 KB
/
two-column.html.xqy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
(:
Copyright 2012 MarkLogic Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
:)
xquery version "1.0-ml";
import module namespace vh = "http://marklogic.com/roxy/view-helper" at "/roxy/lib/view-helper.xqy";
import module namespace uv = "http://www.marklogic.com/roxy/user-view" at "/app/views/helpers/user-lib.xqy";
declare variable $view as item()* := vh:get("view");
declare variable $sidebar as item()* := vh:get("sidebar");
declare variable $title as xs:string? := vh:get("title");
declare variable $username as xs:string? := vh:get("username");
declare variable $q as xs:string? := vh:get("q");
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>{$title}</title>
<link href="/css/themes/ui-lightness/jquery-ui.css" type="text/css" rel="stylesheet"/>
<link href="/css/two-column.less" type="text/css" rel="stylesheet/less"/>
<link href="/css/app.less" type="text/css" rel="stylesheet/less"/>
<script src="/js/lib/less-1.3.0.min.js" type='text/javascript'></script>
<script src="/js/lib/jquery-1.7.1.min.js" type='text/javascript'></script>
<script src="/js/lib/jquery-ui-1.8.18.min.js" type='text/javascript'></script>
<script src="/js/two-column.js" type='text/javascript'></script>
<script src="/js/app.js" type='text/javascript'></script>
{ vh:get("additional-js") }
</head>
<body>
<div class="home" id="home">
<a class="text" href="/" title="Home">My Application</a>
</div>
{
uv:build-user($username, fn:concat("/user/profile?user=", $username), "/user/login", "/user/register", "/user/logout")
}
<div class="canvas">
<div class="header" arcsize="5 5 0 0">
<label>Search</label>
<form id="searchform" name="searchform" method="GET" action="/">
<input type="text" id="q" name="q" class="searchbox" value="{$q}"/>
<div id="suggestions"><!--suggestions here--></div>
<div id="searchbutton" class="searchbutton">
<button type="submit" title="Run Search"><img src="/images/mt_icon_search.gif"/></button>
</div>
</form>
</div>
{ $sidebar }
<div class="content">
{ $view }
</div>
<div class="footer" arcsize="0 0 5 5"><span class="copyright">© 2012, MarkLogic Corporation, All Rights Reserved.</span>
<a href="/page/help">My Application Help</a>
<span class="pipe"> </span>
<a href="/page/contact">Contact Us</a>
<span class="pipe"> </span>
<a href="/page/terms">Terms of Use</a>
</div>
</div>
</body>
</html>