/
head.html
75 lines (66 loc) · 2.4 KB
/
head.html
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
<html lift:content_id="main">
<head>
<title>Lift Example</title>
</head>
<body>
<div id="main" class="lift:surround?with=default;at=content">
<style>
/* <![CDATA[ */
p + p {
margin-top: 0em;
text-indent: 0em;
}
.dpp_stuff p {
padding-left: 15px;
}
/* ]]> */
</style>
<p>
Lift keeps the page as an XML data structure throughout
the rendering process. This allows Lift to rewrite the
web page at different rendering phases. After the
rendering is complete, Lift looks for all the
<code><head/></code>
tags in the <code><body></code> tag. Lift
takes the contents of each <code><head/></code>
tag, removes any duplicates and places
the resulting tags in the top level <code><head/></code>
tag.
</p>
<p>
So, if you have the following code in your page:
<style type="text/css">
/* <![CDATA[ */
.function-name {
/* font-lock-function-name-face */
color: #0000ff;
}
.string {
/* font-lock-string-face */
color: #bc8f8f;
}
.variable-name {
/* font-lock-variable-name-face */
color: #b8860b;
}
/* ]]> */
</style>
<pre>
<<span class="function-name">span</span>>
<<span class="function-name">head</span>>
<<span class="function-name">script</span> <span class="variable-name">type</span>=<span class="string">"text/javascript"</span> <span class="variable-name">src</span>=<span class="string">"/classpath/jquery.js"</span>/>
</<span class="function-name">head</span>>
do some jQuery stuff here
</<span class="function-name">span</span>>
<<span class="function-name">span</span>>
<<span class="function-name">head</span>>
<<span class="function-name">script</span> <span class="variable-name">type</span>=<span class="string">"text/javascript"</span> <span class="variable-name">src</span>=<span class="string">"/classpath/jquery.js"</span>/>
</<span class="function-name">head</span>>
Do some other jQuery stuff here
</<span class="function-name">span</span>>
</pre>
Lift will put a single <<span class="function-name">script</span> <span class="variable-name">type</span>=<span class="string">"text/javascript"</span> <span class="variable-name">src</span>=<span class="string">"/classpath/jquery.js"</span>/> into the <code><head/></code> of the page.
</p>
</div>
</body>
</html>