You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by us...@apache.org on 2020/02/26 00:42:13 UTC
[lucene-site] branch master updated: LUCENE-9227: Remove LucidFind
and adapt styling/font-size + javascript removal
This is an automated email from the ASF dual-hosted git repository.
uschindler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-site.git
The following commit(s) were added to refs/heads/master by this push:
new 9d06297 LUCENE-9227: Remove LucidFind and adapt styling/font-size + javascript removal
9d06297 is described below
commit 9d0629721968be2ec904938e8b0fe8fbae5ce8ce
Author: Uwe Schindler <us...@apache.org>
AuthorDate: Wed Feb 26 01:41:50 2020 +0100
LUCENE-9227: Remove LucidFind and adapt styling/font-size + javascript removal
---
themes/lucene/static/css/lucene/core.css | 4 ++
themes/lucene/static/css/lucene/global.css | 4 ++
themes/lucene/static/css/solr/base.css | 24 +++-------
themes/lucene/static/javascript/lucene/search.js | 39 ----------------
themes/lucene/templates/lucene/_javascript.html | 1 -
themes/lucene/templates/lucene/_search.html | 49 +-------------------
themes/lucene/templates/solr/_search.html | 57 ++----------------------
7 files changed, 18 insertions(+), 160 deletions(-)
diff --git a/themes/lucene/static/css/lucene/core.css b/themes/lucene/static/css/lucene/core.css
index a11d508..e8eae27 100644
--- a/themes/lucene/static/css/lucene/core.css
+++ b/themes/lucene/static/css/lucene/core.css
@@ -455,6 +455,10 @@ input.button {
background-color:#444;
}
+#search input[type="search"] {
+ width: 24em;
+}
+
.hintText {
display: none;
}
diff --git a/themes/lucene/static/css/lucene/global.css b/themes/lucene/static/css/lucene/global.css
index ce8b9d0..e9a2073 100644
--- a/themes/lucene/static/css/lucene/global.css
+++ b/themes/lucene/static/css/lucene/global.css
@@ -454,6 +454,10 @@ input.button {
background-color:#444;
}
+#search input[type="search"] {
+ width: 24em;
+}
+
.hintText {
display: none;
}
diff --git a/themes/lucene/static/css/solr/base.css b/themes/lucene/static/css/solr/base.css
index 7d10631..669994f 100644
--- a/themes/lucene/static/css/solr/base.css
+++ b/themes/lucene/static/css/solr/base.css
@@ -846,7 +846,7 @@ ul.side-nav > li {
display: inline-block;
padding-right: 1em;
position: relative;
- width: 200px;
+ width: 150px;
height: 42px;
}
@@ -854,13 +854,14 @@ ul.side-nav > li {
font-family: 'Raleway', 'Helvetica Neue', sans-serif;
font-weight:300;
height: 28px;
- width: 185px;
- font-size: 18px;
+ width: 135px;
+ font-size: 12px;
border: none;
box-shadow: none;
position: absolute;
- top: 0px;
+ top: 8px;
left: 0px;
+ padding-right: 26px;
}
#search input[type="search"]:focus {
@@ -874,7 +875,7 @@ ul.side-nav > li {
background-color: transparent !important;
line-height: 23px !important;
padding: 0 !important;
- top: 2px;
+ top: 10px;
right: 17px;
margin:0;
}
@@ -885,19 +886,6 @@ ul.side-nav > li {
margin:0;
}
-select.search-provider {
- position:absolute;
- height:19px;
- width: 185px;
- top:29px;
- left:0px;
- font-size:0.85em;
- font-style: italic;
- color: #888;
- padding:0;
- padding-left:7px;
-}
-
.nested-nav {
}
diff --git a/themes/lucene/static/javascript/lucene/search.js b/themes/lucene/static/javascript/lucene/search.js
deleted file mode 100755
index 7cafb80..0000000
--- a/themes/lucene/static/javascript/lucene/search.js
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-*/
-function initSearch(){
- var methods = {
- defaultValueActsAsHint: function(element){
- element = $(element);
- element._default = element.value;
- return element.observe('focus', function(){
- if(element._default != element.value) return;
- element.removeClassName('hint').value = '';
- }).observe('blur', function(){
- if(element.value.strip() != '') return;
- element.addClassName('hint').value = element._default;
- }).addClassName('hint');
- }
- };
- $w('input textarea').each(function(tag){ Element.addMethods(tag, methods) });
-}
-initSearch();
-
-document.observe('dom:loaded', function(){
- $('searchDocs').defaultValueActsAsHint();
-});
\ No newline at end of file
diff --git a/themes/lucene/templates/lucene/_javascript.html b/themes/lucene/templates/lucene/_javascript.html
index cc962b0..fb36111 100644
--- a/themes/lucene/templates/lucene/_javascript.html
+++ b/themes/lucene/templates/lucene/_javascript.html
@@ -1,4 +1,3 @@
<script type="text/javascript" src="{{ SITEURL }}/theme/javascript/lucene/prototype.js{{ STATIC_RESOURCE_SUFFIX }}"></script>
<script type="text/javascript" src="{{ SITEURL }}/theme/javascript/lucene/effects.js{{ STATIC_RESOURCE_SUFFIX }}"></script>
-<script type="text/javascript" src="{{ SITEURL }}/theme/javascript/lucene/search.js{{ STATIC_RESOURCE_SUFFIX }}"></script>
<script type="text/javascript" src="{{ SITEURL }}/theme/javascript/lucene/slides.js{{ STATIC_RESOURCE_SUFFIX }}"></script>
diff --git a/themes/lucene/templates/lucene/_search.html b/themes/lucene/templates/lucene/_search.html
index 27a72b9..9cbd6e3 100644
--- a/themes/lucene/templates/lucene/_search.html
+++ b/themes/lucene/templates/lucene/_search.html
@@ -6,58 +6,11 @@
}
return true;
}
-
- function submitForm(form) {
- provider = form.elements['searchProvider'].value;
- if (provider == "any") {
- if (Math.random() > 0.5) {
- provider = "lucid";
- } else {
- provider = "sematext";
- }
- }
-
- if (provider == "lucid") {
- form.action = "http://find.searchhub.org/p:lucene,solr";
- } else if (provider == "sematext") {
- form.action = "https://sematext.com/opensee/lucene";
- }
-
- days = 90; // cookie will be valid for 90 days
- date = new Date();
- date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
- expires = "; expires=" + date.toGMTString();
- document.cookie = "searchProvider=" + provider + expires + "; path=/";
-
- return true;
- }
</script>
- <form id="quick-search" method="GET" onsubmit="return submitForm(this)"
- action="https://sematext.com/opensee/lucene"
- name="searchform">
+ <form id="quick-search" method="GET" action="https://sematext.com/opensee/lucene" name="searchform">
<fieldset>
<input type="search" id="q" name="q" value="Search with Apache Solr..." class="class1 class2 hint" accesskey="q"
onfocus="getBlank(this, 'Search with Apache Solr...')">
- <span style="color:white">@</span>
- <select name="searchProvider" id="searchProvider">
- <option value="any">select provider</option>
- <option value="lucid">Lucid Find</option>
- <option value="sematext">Sematext Opensee</option>
- </select>
</fieldset>
- <script type="text/javascript">
- if (document.cookie.length > 0) {
- cStart = document.cookie.indexOf("searchProvider=");
- if (cStart != -1) {
- cStart = cStart + "searchProvider=".length;
- cEnd = document.cookie.indexOf(";", cStart);
- if (cEnd == -1) {
- cEnd = document.cookie.length;
- }
- provider = unescape(document.cookie.substring(cStart, cEnd));
- document.forms['searchform'].elements['searchProvider'].value = provider;
- }
- }
- </script>
</form>
</div>
diff --git a/themes/lucene/templates/solr/_search.html b/themes/lucene/templates/solr/_search.html
index 72ce014..3cd2723 100644
--- a/themes/lucene/templates/solr/_search.html
+++ b/themes/lucene/templates/solr/_search.html
@@ -5,64 +5,13 @@
}
return true;
}
-
-function selectProvider(form) {
- lucidAction = "http://find.searchhub.org/p:lucene,solr";
- sematextAction = "https://sematext.com/opensee/solr";
-
- provider = document.getElementById('searchProvider').value;
- if (provider == "lucid" || provider == "sematext") {
- if (provider == "lucid") {
- form.action = lucidAction;
- } else if (provider == "sematext") {
- form.action = sematextAction;
- }
-
- // Only store provider preference cookie if the user selected it
- days = 90; // cookie will be valid for 90 days
- date = new Date();
- date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
- expires = "; expires=" + date.toGMTString();
- document.cookie = "searchProvider=" + provider + expires + "; path=/";
- } else {
- if (Math.random() > 0.5) {
- form.action = lucidAction;
- } else {
- form.action = sematextAction;
- }
- }
- return true;
-}
</script>
-<form id="quick-search" method="GET" onsubmit="return selectProvider(this)"
- action="https://sematext.com/opensee/solr"
- name="searchform">
+<form id="quick-search" method="GET" action="https://sematext.com/opensee/solr" name="searchform">
<fieldset>
<div ng-show="toggled" class="search-box ng-hide">
- <input type="search" name="q" placeholder="Search |" accesskey="q"
- onfocus="getBlank(this, 'Search |');"/>
- <a class="search-button" type="submit"
- onclick="form = document.getElementById('quick-search'); selectProvider(form); form.submit();"><img src="{{ SITEURL }}/theme/images/solr/magnifying-glass.png"/></a>
- <select id="searchProvider" class="search-provider">
- <option value="any"> - select provider - </option>
- <option value="lucid">@ Lucid Find</option>
- <option value="sematext">@ Sematext Opensee</option>
- </select>
+ <input type="search" name="q" placeholder="Search..." accesskey="q" onfocus="getBlank(this, 'Search...');"/>
+ <a class="search-button" type="submit" onclick="this.closest('form').submit();return false;"><img src="{{ SITEURL }}/theme/images/solr/magnifying-glass.png"/></a>
</div>
</fieldset>
- <script type="text/javascript">
- if (document.cookie.length > 0) {
- cStart = document.cookie.indexOf("searchProvider=");
- if (cStart != -1) {
- cStart = cStart + "searchProvider=".length;
- cEnd = document.cookie.indexOf(";", cStart);
- if (cEnd == -1) {
- cEnd = document.cookie.length;
- }
- provider = unescape(document.cookie.substring(cStart, cEnd));
- document.getElementById('searchProvider').value = provider;
- }
- }
- </script>
</form>