-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.xq
95 lines (80 loc) · 2.12 KB
/
index.xq
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
(: CroALaBro index auctorum, operum, generum, temporum :)
import module namespace croalabro = "http://croala.ffzg.unizg.hr/croalabro" at "../../repo/croalabro.xqm";
import module namespace croalabro-html = "http://croala.ffzg.unizg.hr/croalabro-html" at "../../repo/croalabro-html.xqm";
declare namespace page = 'http://basex.org/examples/web-page';
declare variable $title := 'Croatiae auctores Latini: quaestio et indices';
declare variable $subtitle := '';
declare variable $content := "Display list of authors, works, genres, periods.";
declare variable $keywords := "Neo-Latin, Croatia, text corpus";
(:~
: This function returns an XML response message.
:)
declare
%rest:path("index")
%output:method(
"xhtml"
)
%output:omit-xml-declaration(
"no"
)
%output:doctype-public(
"-//W3C//DTD XHTML 1.0 Transitional//EN"
)
%output:doctype-system(
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
)
function page:croalabroindex()
{
(: HTML template starts here :)
<html>
{ croalabro-html:htmlheadserver($title, $content, $keywords) }
<body>
<div class="container">
<div class="row">
<div class="col">
<h1 class=" text-center">{ $title }</h1>
</div>
</div>
<div class="row">
<div class="col">
{ croalabro-html:searchform( "quaere", "verbum" , "Quaere vocabulum sive phrasin..." ) }
</div>
</div>
<div class="row">
<div class="col text-center">
<!-- function here -->
{ element p { "... seu " , croalabro-html:link("quaere-multimode","quaere multis modis") } }
{ croalabro-html:folium("p") }
</div>
</div>
<div class="row">
<div class="col text-center">
<h4>Indices</h4>
<!-- function here -->
{ croalabro-html:link("auctores","Auctores") }
</div>
</div>
<div class="row">
<div class="col text-center">
<!-- function here -->
{ croalabro-html:link("opera","Opera") }
</div>
</div>
<div class="row">
<div class="col text-center">
<!-- function here -->
{ croalabro-html:link("genera","Genera") }
</div>
</div>
<div class="row">
<div class="col text-center">
<!-- function here -->
{ croalabro-html:link("tempora","Tempora") }
</div>
</div>
{ croalabro-html:footerserver() }
</div>
</body>
</html>
};
return