xref: /OpenGrok/opengrok-web/src/main/webapp/httpheader.jspf (revision 0f28cab504dc8fea1bf4ce630481d9e52785a4a4)
1<%--
2$Id$
3
4CDDL HEADER START
5
6The contents of this file are subject to the terms of the
7Common Development and Distribution License (the "License").
8You may not use this file except in compliance with the License.
9
10See LICENSE.txt included in this distribution for the specific
11language governing permissions and limitations under the License.
12
13When distributing Covered Code, include this CDDL HEADER in each
14file and include the License file at LICENSE.txt.
15If applicable, add the following below this CDDL HEADER, with the
16fields enclosed by brackets "[]" replaced with your own identifying
17information: Portions Copyright [yyyy] [name of copyright owner]
18
19CDDL HEADER END
20
21Copyright (c) 2007, 2021, Oracle and/or its affiliates. All rights reserved.
22Portions Copyright 2011 Jens Elkner.
23Portions Copyright (c) 2017-2018, 2020, Chris Fraire <cfraire@me.com>.
24Portions Copyright (c) 2020, Aleksandr Kirillov <alexkirillovsamara@gmail.com>.
25
26--%><%--
27
28All pages, which include this fragment should use the following code snippet
29to set the title of the document before the include directive for this fragment:
30<pre>
31
32    cfg = PageConfig.get(request);
33    cfg.setTitle("your title");
34
35</pre>
36--%>
37<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" import="
38org.opengrok.indexer.Info,
39org.opengrok.web.PageConfig,
40org.opengrok.indexer.web.Prefix,
41org.opengrok.web.Scripts"
42%><%
43/* ---------------------- httpheader.jsp start --------------------- */
44{
45    PageConfig cfg = PageConfig.get(request);
46    String styleDir = cfg.getCssDir();
47    String ctxPath = request.getContextPath();
48    String dstyle = styleDir + '/' + "style-1.0.4.min.css";
49    String pstyle = styleDir + '/' + "print-1.0.2.min.css";
50    String mstyle = styleDir + '/' + "mandoc-1.0.0.min.css";
51%><!DOCTYPE html>
52<html lang="en"
53      class="<%= request.getServletPath().length() > 0 ? request.getServletPath().substring(1) : "" %>">
54<head>
55<meta charset="UTF-8">
56<meta name="robots" content="noindex,nofollow" />
57<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
58<meta name="generator" content="{OpenGrok <%=Info.getVersion()%> (<%=Info.getRevision()%>)" />
59<meta name="theme-color" content="#ffffff">
60<link rel="icon" href="<%=styleDir%>/img/favicon.svg">
61<link rel="mask-icon" href="<%=styleDir%>/img/mask-icon.svg" color="#000000">
62<link rel="apple-touch-icon" href="<%=styleDir%>/img/apple-touch-icon.png">
63<link rel="manifest" href="<%=ctxPath%>/manifest.json">
64<link rel="preload" href="<%=styleDir%>/font/SunSansRegular.woff2" as="font" type="font/woff2" crossorigin>
65<link rel="stylesheet" type="text/css" media="all"
66    title="Default" href="<%= dstyle %>" />
67<link rel="alternate stylesheet" type="text/css" media="all"
68    title="Paper White" href="<%= pstyle %>" />
69<link rel="stylesheet" type="text/css" href="<%= mstyle %>" media="all" />
70<link rel="stylesheet" type="text/css" href="<%= pstyle %>" media="print" />
71<link rel="stylesheet" type="text/css" href="<%=styleDir%>/jquery-ui-1.12.1-custom.min.css" />
72<link rel="stylesheet" type="text/css" href="<%=styleDir%>/jquery-ui-1.12.1-custom.structure.min.css" />
73<link rel="stylesheet" type="text/css" href="<%=styleDir%>/jquery-ui-1.12.1-custom.theme.min.css" />
74<link rel="stylesheet" type="text/css" href="<%=styleDir%>/jquery.tooltip.min.css" />
75<link rel="stylesheet" type="text/css" href="<%=styleDir%>/jquery.tablesorter.min.css" />
76<link rel="stylesheet" type="text/css" href="<%=styleDir%>/searchable-option-list-2.0.3.min.css" />
77
78<%
79    /**
80     * The order can be arbitrary here, it is hardcoded in Scripts. These
81     * are printed out in footer.
82     *
83     * @see Scripts
84     */
85    cfg.addScript("jquery");
86    cfg.addScript("jquery-ui");
87    cfg.addScript("jquery-tablesorter");
88    cfg.addScript("tablesorter-parsers");
89    cfg.addScript("searchable-option-list");
90    cfg.addScript("utils");
91    cfg.addScript("jquery-caret");
92
93if (cfg.getPrefix().equals(Prefix.HIST_L)) {
94    out.write("<link rel=\"alternate\" type=\"application/rss+xml\" " +
95        "title=\"RSS feed for " + cfg.getPath() + "\" " +
96        "href=\"" + ctxPath + Prefix.RSS_P + cfg.getPath() + "\" />");
97}
98%>
99<link rel="search" href="<%=ctxPath%>/opensearch"
100    type="application/opensearchdescription+xml"
101    title="OpenGrok Search for current project(s)" />
102<script type="text/javascript">/* <![CDATA[ */
103    window.contextPath = '<%= ctxPath %>';
104    document.xrefPath = '<%= request.getContextPath() + Prefix.XREF_P %>';
105    document.pageReady = [];
106    document.domReady = [];
107/* ]]> */
108</script>
109<%= cfg.getEnv().getIncludeFiles().getHttpHeaderIncludeFileContent(false) %>
110<title><%=cfg.getTitle()%></title><%
111    out.write(cfg.getHeaderData());
112%>
113</head><%
114}
115/* ---------------------- httpheader.jsp end --------------------- */
116%>
117