Skip to content

Commit

Permalink
Remove search
Browse files Browse the repository at this point in the history
The search box regularly does not render in the correct position; at
the moment, it renders just above and to the right of the Sugar Labs
logo.  The search function does nothing particularly useful, it
delegates to Google Search.  It would be best to leave searching to
the better user experience of search engines and browsers.

- remove the search box,

- remove the search feature,

- remove the supporting styles and documentation.

Signed-off-by: James Cameron <[email protected]>
  • Loading branch information
quozl authored and chimosky committed Sep 12, 2022
1 parent d6d2a3b commit 833ef87
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 224 deletions.
15 changes: 1 addition & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,9 @@ These notes were part of a project that has since been merged.
This repository contains the code for the redesigned version of "www.sugarlabs.org". This repository code base was used for the development of the GSOC 2017 project **Giving Sugar Labs Website a New Look** under the organization **Sugar Labs**. The changes, made by Pericherla Seetarama Raju and overseen by Samson Goddy, Hrishi Patel, and Walter Bender during the 2017 **GSOC** period, can be viewed at [https://github.com/sugarlabs/www-sugarlabs/issues/63](https://github.com/sugarlabs/www-sugarlabs/issues/63). The work during **GSOC** was done in the repository [https://github.com/geekrypter/sugarLabsWebsiteRedesign](https://github.com/geekrypter/sugarLabsWebsiteRedesign). A live preview of the website is hosted using **Github pages** and can be viewed at [https://geekrypter.github.io/sugarLabsWebsiteRedesign/](https://geekrypter.github.io/sugarLabsWebsiteRedesign/). The code uses the same Jekyll environment as that of the original website's code. Do check out the code!

### Major Services
We have integrated 4 major features with the help of third party services:
We have integrated three major features with the help of third party services:
1. Website users tracking - We have used the [Google Analytics](https://analytics.google.com/) service to track users on the website and get a more detailed analysis of the user's usage.
3. Newsletter subscription through email - We have used the [Mailchimp](https://mailchimp.com) service to let users subscribe to our newsletters through their emails.
4. Customized search functionality - We have used [Google custom search engine](https://www.google.co.in/cse) to provide a customized search for users.

### Feedback/Suggestions and Issues
Feedback/Suggestions are always welcome and do mention any issues found. They can be provided through the Issues section of this repository
Expand Down Expand Up @@ -172,7 +171,6 @@ inquiry.html
more.html
music-blocks.html
press.html
search.html
sugar-forraspberry-pi.html
turtle-blocks-js.html**

Expand All @@ -192,10 +190,6 @@ The relevant pages can be checked to adopt a similar design.
1. Go to **index.html** file.
2. Go to the **Loader section** (check comments) and remove the whole section.

### How to disable search functionality?
1. Go to **search.html** file.
2. Go to the **Search functionality Javascript code** section (check comments) and remove the whole section.

### How to alter disabling?
1. Go to **main.js** file.
2. Go to **Disabling code** section (check comments) and change the code accordingly.
Expand All @@ -221,13 +215,6 @@ The relevant pages can be checked to adopt a similar design.
4. Add all the font format files to the **fonts** folder.
5. Go to the **googlefonts.css** file and add those references.

### How to alter Goggle custom search engine customizations?
1. Go to [Google custom search engine](https://www.google.co.in/cse).
2. Log in using the "Sugar Labs" account.
3. You can do any customizations and get the final code.
4. Go to **search.html** file.
5. Replace the existing code with the final code under the **Search functionality Javascript code** section (check comments).

### How to alter Google analytics code?
1. Go to [Google Analytics](https://analytics.google.com/).
2. Your account needs admin rights so ask Samson Goddy for admin permissions.
Expand Down
88 changes: 0 additions & 88 deletions _includes/nav.html
Original file line number Diff line number Diff line change
@@ -1,81 +1,4 @@
<!-- Header for screens with width > 1260px and width <= 767px -->
<script>
if(window.innerWidth > 1260){
var expanded = false;
$(document).ready(function(){
$("#SearchBar").focus(function(event){
event.stopPropagation();
expander();
});
$(document).click( function(){
if(expanded){
condenser();}
});
$("#searchForm").click( function(event){
if(expanded){
event.stopPropagation();}
});

var searchbar = $("#searchForm").offset();
var menubar = $("#menuBar").offset();var distance1 = menubar.left -(searchbar.left + 200);
if((searchbar.left +200)>menubar.left){
var distance= distance1 + 13 + searchbar.left;
$("#searchForm").css("left", distance.toString() + "px");
}else if(distance1>39){
var distance = searchbar.left + distance1 - 39;
$("#searchForm").css("left", distance.toString() + "px");}
$(window).resize(function(){
var searchbar = $("#searchForm").offset();
var menubar = $("#menuBar").offset();
var distance1 = menubar.left -(searchbar.left + 200) ;
if((searchbar.left +200)>menubar.left){
$("#searchForm").css("left", "25.2%");
}else if(distance1>39){
var distance =searchbar.left + distance1 - 39;
$("#searchForm").css("left", distance.toString() + "px");
}
}
);
});
}
function searchLoad(){
var re = document.getElementById("SearchBar").value;
document.getElementById("searchLink").href = "{{ site.baseurl }}/search/?q=" + re;
};
document.addEventListener('keyup', function(ev) {
if( ev.keyCode == 13 ) {
var re = document.getElementById("SearchBar").value;
document.getElementById("searchLink").href = "{{ site.baseurl }}/search/?q=" + re;
document.getElementById("searchLink").click();}
});
function expander(){
if(window.innerWidth > 767){
document.getElementById("searchForm").style.width="53%";
document.getElementById("SearchBar").style.width="90%";
document.getElementById("menuBar").style.visibility="hidden";

setTimeout(function(){
document.getElementById("closebtn").style.visibility="visible";
document.getElementById("closebutton").style.height="14px";
document.getElementById("closebutton").style.width="14px";
expanded = true;}, 400);
}
};
function condenser(){
if(window.innerWidth > 767){
document.getElementById("menuBar").style.visibility="visible";
document.getElementById("searchForm").style.width="200px";
document.getElementById("SearchBar").style.width="75%";
setTimeout(function(){
document.getElementById("closebutton").style.height="0px";
document.getElementById("closebutton").style.width="0px";
document.getElementById("closebtn").style.visibility="hidden";
expanded = false;}, 300);
}

};
</script>

<header class="large" id="firstHeader" >
<div class="row">
<div class="container">
Expand All @@ -93,13 +16,6 @@
</div>
<div class="d-flex justify-content-center">
<div class="collapse navbar-collapse zeroMarPadBtm">
<div id="searchForm">
<input type="text" id="SearchBar" onchange="searchLoad()">
<a onclick="condenser()" id="closebtn" style="visibility:hidden;height:0px;padding-right:5px;width:0px;position:relative;">
<svg id="closebutton"height="0px" id="Layer_1" style="enable-background:new 0 0 512 512;" version="1.1" viewBox="0 0 512 512" width="0px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M437.5,386.6L306.9,256l130.6-130.6c14.1-14.1,14.1-36.8,0-50.9c-14.1-14.1-36.8-14.1-50.9,0L256,205.1L125.4,74.5 c-14.1-14.1-36.8-14.1-50.9,0c-14.1,14.1-14.1,36.8,0,50.9L205.1,256L74.5,386.6c-14.1,14.1-14.1,36.8,0,50.9 c14.1,14.1,36.8,14.1,50.9,0L256,306.9l130.6,130.6c14.1,14.1,36.8,14.1,50.9,0C451.5,423.4,451.5,400.6,437.5,386.6z"/></svg>
</a>
<a id="searchLink"><span class="ion-android-search customFontSize3" ></a>
</div>
<ul class="mr-5 navbar-nav" id="menuBar">
<li class="nav-item"><a class="nav-link" href="{{ site.baseurl }}/about-us">About</a></li>
<li class="nav-item"><a class="nav-link" href="http://server.sugarizer.org">Try Now</a></li>
Expand Down Expand Up @@ -171,10 +87,6 @@
<div class="sidebar-header">
<h3>Sugar Labs</h3>
</div>
<div>
<div id="searchForm1" style="width:230px;" >
<input type="text" id="SearchBar1" onchange="searchLoad()" style="width:190px;color:#7C7A86;">
<a id="searchLink"><span class="ion-android-search customFontSize3" ></a></div></div>
<ul class="list-unstyled components">
<li><a href="{{ site.baseurl }}/about-us"><span>About</span></a></li>
<li><a href="http://server.sugarizer.org"><span>Try Now</span></a></li>
Expand Down
66 changes: 0 additions & 66 deletions css/airspace.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,53 +2,6 @@
/*--
Common Css
--*/
#searchForm {
margin-right:5px;
position:absolute;
left:350px;
z-index:2;
width: 180px;
box-sizing: border-box;
border: 2px solid #ccc;
border-radius: 4px;
font-size: 16px;
background-color: #FCFCFC;
background-position: 10px 10px;
background-repeat: no-repeat;
padding: 7px 10px 7px 10px;
-webkit-transition: width 0.4s ease-in-out;
transition: width 0.4s ease-in-out;
}
#SearchBar {
border: none;
font-size: 18px;
width: 75%;
-webkit-transition: width 0.4s ease-in-out;
transition: width 0.4s ease-in-out;
background-color: #FCFCFC;
}

#SearchBar1 {
border: none;
font-size: 18px;
width: 90%;
background-color: #E6E6FA;
}
#searchForm1{
margin-left:5px;
display:block;
padding:5px;
border-radius:2px;
border-bottom: 2px solid #7C7A86;
background-color: #E6E6FA;
}
#searchLink{
padding-left:0px!important;
}
#searchLink:hover{
cursor:pointer;
}

header.large{ height: 100px;
}
header.large #navh{ width: 300px; height: 40px;
Expand Down Expand Up @@ -2438,10 +2391,6 @@ h1:before {
.form-control {width:120px;}
.popover {max-width:400px;}

#google-custom-search {
margin-top: 50px;
}

input.gsc-input,
.gsc-input-box,
.gsc-input-box-hover,
Expand All @@ -2451,22 +2400,7 @@ input.gsc-input,
box-sizing: content-box;
line-height: normal;
}
.searchBoxStyle{
margin-bottom:50px;padding-left:50px;padding-right:50px;
}
@media only screen and (max-width: 767px) {
#searchForm {
margin: 20px;
position: relative;
left: 0px !important;
width: 280px;
}
#SearchBar {
width: 85%;
}
.searchBoxStyle{
margin-bottom:20px;padding-left:5px;padding-right:5px;
}
}
@media only screen and (max-width: 1260px) {
.section-title1 {
Expand Down
55 changes: 0 additions & 55 deletions search.html

This file was deleted.

1 change: 0 additions & 1 deletion sitemap.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ https://www.sugarlabs.org/sugar-lesson-plans
https://www.sugarlabs.org/sugar-stories
https://www.sugarlabs.org/sugar-for-raspberry-pi
https://www.sugarlabs.org/sugar-for-raspbian
https://www.sugarlabs.org/search
https://www.sugarlabs.org/music-blocks
https://www.sugarlabs.org/turtle-blocks-js
https://www.sugarlabs.org/profiles
Expand Down

0 comments on commit 833ef87

Please sign in to comment.