summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndras Timar <andras.timar@collabora.com>2018-08-27 08:43:05 +0200
committerAndras Timar <andras.timar@collabora.com>2018-08-27 08:43:05 +0200
commita556b2de153dcc079d4ce98cb381b684e84c4e79 (patch)
tree75764cc8cd55579148afe79313463c728e0311ec
parent48d4955e831f043979857cdfe3e733b3545baea3 (diff)
[cp] replate Google Search to Xapian Omega search
Change-Id: I0defae3675b0686e15e943ff08014ac98bcbbcbf
-rw-r--r--help3xsl/default.css21
-rw-r--r--help3xsl/help.html2
-rw-r--r--help3xsl/index.html2
-rw-r--r--help3xsl/index2.html2
-rw-r--r--help3xsl/online_transform.xsl25
5 files changed, 28 insertions, 24 deletions
diff --git a/help3xsl/default.css b/help3xsl/default.css
index bf5b3610b..b3c64bbde 100644
--- a/help3xsl/default.css
+++ b/help3xsl/default.css
@@ -574,10 +574,23 @@ li.disabled a {
#search-bar {
margin-top: 10px;
}
-.google-search {
- max-width: 300px;
+.xapian-omega-search {
+ max-width: 800px;
margin: 0 auto;
}
+.xapian-omega-search-button {
+ background-color: #5c3de2;
+ border: 3px solid #5c3de2;
+ border-radius: 8px;
+ color: #5c3de2;
+ padding: 5px 30px;
+ text-align: center;
+ text-decoration: none;
+ display: inline-block;
+ font-size: 24px;
+ margin: 4px 10px;
+ cursor: pointer;
+}
.modules {
border-bottom: 2px solid #f3f3f3;
}
@@ -763,11 +776,11 @@ li.disabled a {
.rightside {
grid-area: rightside;
}
- .google-search {
+ .xapian-omega-search {
margin: 0;
position: absolute;
top: 19px;
- left: 860px;
+ left: 360px;
}
.lang {
position: absolute;
diff --git a/help3xsl/help.html b/help3xsl/help.html
index 58115f9cf..f726f211f 100644
--- a/help3xsl/help.html
+++ b/help3xsl/help.html
@@ -9,7 +9,7 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
- <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline' 'unsafe-eval' *.google.com *.googleapis.com"/>
+ <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline' 'unsafe-eval'"/>
</head>
<body>
<script type="text/javascript">
diff --git a/help3xsl/index.html b/help3xsl/index.html
index d1129527d..161ab952f 100644
--- a/help3xsl/index.html
+++ b/help3xsl/index.html
@@ -9,7 +9,7 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
- <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline' 'unsafe-eval' *.google.com *.googleapis.com"/>
+ <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline' 'unsafe-eval'"/>
</head>
<body>
<script type="text/javascript">
diff --git a/help3xsl/index2.html b/help3xsl/index2.html
index ac073ae0f..54b8ff90d 100644
--- a/help3xsl/index2.html
+++ b/help3xsl/index2.html
@@ -9,7 +9,7 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
- <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline' 'unsafe-eval' *.google.com *.googleapis.com"/>
+ <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline' 'unsafe-eval'"/>
<script type="text/javascript" src="help2.js"></script>
<script type="text/javascript" src="hid2file.js"></script>
<script type="text/javascript" src="languages.js"></script>
diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl
index 13c20bd02..c2a781706 100644
--- a/help3xsl/online_transform.xsl
+++ b/help3xsl/online_transform.xsl
@@ -144,7 +144,7 @@
<base href="{$install}"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<xsl:if test="$online">
- <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline' 'unsafe-eval' *.google.com *.googleapis.com"/>
+ <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline' 'unsafe-eval'"/>
</xsl:if>
<title><xsl:value-of select="$titleL10N"/></title>
<link rel="shortcut icon" href="{$target}media/navigation/favicon.ico" />
@@ -204,22 +204,13 @@
<xsl:apply-templates select="/helpdocument/body"/>
<footer>
<xsl:if test="$online">
- <div class="google-search">
- <script type="text/javascript">
- <![CDATA[
- (function() {]]>
- <xsl:call-template name="getToken"><xsl:with-param name="lang" select="$lang"/></xsl:call-template>
- <![CDATA[
- var gcse = document.createElement('script');
- gcse.type = 'text/javascript';
- gcse.async = true;
- gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
- var s = document.getElementsByTagName('script')[0];
- s.parentNode.insertBefore(gcse, s);
- })();
- ]]>
- </script>
- <xsl:text disable-output-escaping="yes">&lt;gcse:search&gt;&lt;/gcse:search&gt;</xsl:text>
+ <div class="xapian-omega-search">
+ <form name="P" method="get" action="/cgi-bin/omega/omega" target="_top">
+ <input type="hidden" name="DB" value="{$lang}"/>
+ <input type="hidden" name="DEFAULTOP" value="and"/>
+ <input id="omega-autofocus" type="search" name="P" size="65"/>
+ <input type="submit" class="xapian-omega-search-button" value="&#x1f50d;"/>
+ </form>
</div>
</xsl:if>
<xsl:if test="$online">