diff options
author | Jiachen Yang <farseerfc@gmail.com> | 2012-03-12 20:51:04 +0900 |
---|---|---|
committer | Jiachen Yang <farseerfc@gmail.com> | 2012-03-12 20:51:04 +0900 |
commit | baab5dd99bc9e36ec29bce48e14e1aa997dda542 (patch) | |
tree | bbaa533128ab5e0c340ad77a6952edcf9c44c47b /bootstrap2/templates | |
parent | 57e72fb6519ce07a5b8acf1a83955c245c4aa9db (diff) | |
download | pelican-themes-baab5dd99bc9e36ec29bce48e14e1aa997dda542.tar.gz |
add google custom search support
Diffstat (limited to 'bootstrap2/templates')
-rw-r--r-- | bootstrap2/templates/base.html | 9 | ||||
-rw-r--r-- | bootstrap2/templates/search_sidebar.html | 15 |
2 files changed, 21 insertions, 3 deletions
diff --git a/bootstrap2/templates/base.html b/bootstrap2/templates/base.html index 326bb62..0086f1a 100644 --- a/bootstrap2/templates/base.html +++ b/bootstrap2/templates/base.html @@ -88,10 +88,12 @@ </li> {% endfor %} - <li class="divider-vertical"></li> + <ul class="nav pull-right"> + <li><a href="{{ SITEURL }}/archives.html"><i class="icon-th-list"></i>Archives</a></li> + </ul> + + - <li><a href="{{ SITEURL }}/archives.html"><i class="icon-th-list"></i>Archives</a></li> - </li> </ul> <!--<p class="navbar-text pull-right">Logged in as <a href="#">username</a></p>--> @@ -140,6 +142,7 @@ {% endfor %} {% include 'twitter_profile.html' %} + {% include 'search_sidebar.html' %} {% if SIDEBAR_CUSTOM %} {{ SIDEBAR_CUSTOM }} diff --git a/bootstrap2/templates/search_sidebar.html b/bootstrap2/templates/search_sidebar.html new file mode 100644 index 0000000..00c81e3 --- /dev/null +++ b/bootstrap2/templates/search_sidebar.html @@ -0,0 +1,15 @@ +{% if GOOGLE_CUSTOM_SEARCH_SIDEBAR %} +<li class="nav-header"><h4><i class="icon-search"></i>Google Search</h4></li> +<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'); + google.setOnLoadCallback(function() { + var customSearchOptions = {}; var customSearchControl = new google.search.CustomSearchControl( + '{{GOOGLE_CUSTOM_SEARCH_SIDEBAR}}', customSearchOptions); + customSearchControl.setResultSetSize(google.search.Search.SMALL_RESULTSET); + customSearchControl.draw('cse'); + }, true); +</script> +<link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css" type="text/css" /> +{% endif %}
\ No newline at end of file |