Skip to content

Instantly share code, notes, and snippets.

@robertgreiner
Created June 4, 2010 19:41
Show Gist options
  • Save robertgreiner/425858 to your computer and use it in GitHub Desktop.
Save robertgreiner/425858 to your computer and use it in GitHub Desktop.
source code for searchstackoverflow.com
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Search StackOverflow</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.gsc-control-cse {
font-family: Arial, sans-serif;
border-color: #FFFFFF;
background-color: #FFFFFF;
}
input.gsc-input {
border-color: #777777;
}
input.gsc-search-button {
border-color: #333333;
background-color: #333333;
}
.gsc-tabHeader.gsc-tabhInactive {
border-color: #777777;
background-color: #777777;
}
.gsc-tabHeader.gsc-tabhActive {
border-color: #333333;
background-color: #333333;
}
.gsc-tabsArea {
border-color: #333333;
}
.gsc-webResult.gsc-result {
border-color: #FFFFFF;
background-color: #FFFFFF;
}
.gsc-webResult.gsc-result:hover {
border-color: #000000;
background-color: #FFFFFF;
}
.gs-webResult.gs-result a.gs-title:link,
.gs-webResult.gs-result a.gs-title:link b {
color: #444444;
}
.gs-webResult.gs-result a.gs-title:visited,
.gs-webResult.gs-result a.gs-title:visited b {
color: #444444;
}
.gs-webResult.gs-result a.gs-title:hover,
.gs-webResult.gs-result a.gs-title:hover b {
color: #444444;
}
.gs-webResult.gs-result a.gs-title:active,
.gs-webResult.gs-result a.gs-title:active b {
color: #777777;
}
.gsc-cursor-page {
color: #444444;
}
a.gsc-trailing-more-results:link {
color: #444444;
}
.gs-webResult.gs-result .gs-snippet {
color: #333333;
}
.gs-webResult.gs-result .gs-visibleUrl {
color: #000000;
}
.gs-webResult.gs-result .gs-visibleUrl-short {
color: #000000;
}
.gsc-cursor-box {
border-color: #FFFFFF;
}
.gsc-results .gsc-cursor-page {
border-color: #777777;
background-color: #FFFFFF;
}
.gsc-results .gsc-cursor-page.gsc-cursor-current-page {
border-color: #333333;
background-color: #333333;
}
.gs-promotion.gs-result {
border-color: #CCCCCC;
background-color: #E6E6E6;
}
.gs-promotion.gs-result a.gs-title:link {
color: #0000CC;
}
.gs-promotion.gs-result a.gs-title:visited {
color: #0000CC;
}
.gs-promotion.gs-result a.gs-title:hover {
color: #444444;
}
.gs-promotion.gs-result a.gs-title:active {
color: #00CC00;
}
.gs-promotion.gs-result .gs-snippet {
color: #333333;
}
.gs-promotion.gs-result .gs-visibleUrl,
.gs-promotion.gs-result .gs-visibleUrl-short {
color: #00CC00;
}
body {
background-color: #FFFFFF;
color: #333333;
font-family: Arial,Verdana,sans-serif;
font-size: 62.5%;
}
#footer {
margin: 0px auto;
padding-top: 100px;
text-align: center;
}
#container {
font-size: 1.3em;
margin: 0px;
}
h2 {
margin: 0px 0px 0px 30px;
padding: 0px;
}
</style>
</head>
<body>
<div id="container">
<h2>StackOverflow Advanced Search</h2>
<div id="cse" style="width: 100%;">Loading</div>
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
google.load('search', '1', {language : 'en'});
google.setOnLoadCallback(function() {
var customSearchControl = new google.search.CustomSearchControl('008012805377932627297:jckm4_r_8po');
customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
var options = new google.search.DrawOptions();
options.setAutoComplete(true);
customSearchControl.draw('cse', options);
}, true);
</script>
<link rel="stylesheet" href="http://www.google.com/cse/style/look/minimalist.css" type="text/css" />
</div>
<div id="footer">
Created by <a href="http://creatingcode.com">Robert Greiner</a>.<br />
Source code available at <a href="http://github.com/robertgreiner/SearchStackOverflow">Github</a>.<br />
searchstackoverflow.com is not associated with StackOverflow in any way.<br />
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment