diff options
author | Andras Timar <andras.timar@collabora.com> | 2018-08-27 08:43:05 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2019-07-14 21:18:57 +0200 |
commit | 4aeac3fa2e9c50c8e32e17e4afb6241264e98ef2 (patch) | |
tree | 57b7bd4d184d6b236a22c38087ba846a2330dcc5 | |
parent | 1d522f23278d6c056bb183da114170e55ec8ecd2 (diff) |
[cp] replace Google Search to Xapian Omega search
Change-Id: I0defae3675b0686e15e943ff08014ac98bcbbcbf
-rw-r--r-- | help3xsl/default.css | 19 | ||||
-rw-r--r-- | help3xsl/help.html | 2 | ||||
-rw-r--r-- | help3xsl/index.html | 2 | ||||
-rw-r--r-- | help3xsl/index2.html | 2 | ||||
-rw-r--r-- | help3xsl/online_transform.xsl | 27 |
5 files changed, 28 insertions, 24 deletions
diff --git a/help3xsl/default.css b/help3xsl/default.css index ee67073001..e2bb6b30ac 100644 --- a/help3xsl/default.css +++ b/help3xsl/default.css @@ -593,10 +593,23 @@ li.disabled a { font-size:1.2rem; text-align: center; } -.google-search { - max-width: 300px; +.xapian-omega-search { + max-width: 800px; margin: 40px auto 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; background-color: #233336; @@ -785,7 +798,7 @@ li.disabled a { .rightside { grid-area: rightside; } - .google-donation { + .xapian-omega-search { grid-area: google; position: sticky; top: 0px; diff --git a/help3xsl/help.html b/help3xsl/help.html index 58115f9cf7..f726f211f0 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 d1129527db..161ab952fd 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 c0281b1d00..6784f592c1 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 38716891e4..abf8c0f819 100644 --- a/help3xsl/online_transform.xsl +++ b/help3xsl/online_transform.xsl @@ -142,7 +142,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"/> @@ -219,23 +219,14 @@ </div> <div class="google-donation"> <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"><gcse:search></gcse:search></xsl:text> - </div> + <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="🔍"/> + </form> + </div> </xsl:if> </div> <footer> |