Skip to content

Commit

Permalink
Add Google search.
Browse files Browse the repository at this point in the history
  • Loading branch information
Vlad Piersec committed Sep 19, 2015
1 parent 1fa8d4c commit 1d7cdf6
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 7 deletions.
42 changes: 42 additions & 0 deletions root/assets/styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,28 @@ a.no-hover:hover {
.charts-themes-list .chart{
list-style-type: decimal;
}
.google-search {
display: inline-block;
margin-left: 2rem;
width: 25rem;
position: relative;
top: 1.5rem;
}
.google-search .gsc-control-cse {
height: 0;
padding: 0;
border: 0;
}
.google-search .gsc-input-box {
border-color: #3A377D;
margin: 0;
}
input.gsc-search-button.gsc-search-button-v2 {
background-color: #3A377D;
}
input.gsc-search-button.gsc-search-button-v2:hover {
background-color: #E85085;
}

@media all and (max-width:419px) and (min-width:0px) {
h1 {
Expand Down Expand Up @@ -202,6 +224,11 @@ a.no-hover:hover {
.footer-info {
background-color: #5E5BA8;
}
.google-search {
display: inline-block;
width: 100%;
margin-left: 0;
}
}
@media all and (max-width:859px) and (min-width:420px) {
.center-wrapper {
Expand All @@ -213,6 +240,11 @@ a.no-hover:hover {
.theme-small-img {
width: 100%;
}
.google-search {
margin-left: 0;
display: inline-block;
width: 100%;
}
}

@media all and (max-width:1279px) and (min-width:860px) {
Expand All @@ -222,6 +254,11 @@ a.no-hover:hover {
.cell {
width: 427px;
}
.google-search {
margin-left: 0;
display: inline-block;
width: 100%;
}
}

@media all and (max-width:1600px) and (min-width:1280px) {
Expand All @@ -231,4 +268,9 @@ a.no-hover:hover {
.cell {
width: 33%;
}
.google-search {
margin-left: 0;
display: inline-block;
width: 100%;
}
}
12 changes: 12 additions & 0 deletions src/partial-templates/footer.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,15 @@
This site was generated using <a class="no-hover" href="http://nodejs.org/">node.js</a>. License: <a class="no-hover" rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img class="license-logo" alt="Creative Commons License" src="https://i.creativecommons.org/l/by/4.0/80x15.png" /></a> See more on <a class="no-hover" href="https://github.com/emacs-themes">❦ Github</a>.
</div>
</div>
<script>
(function() {
var cx = '000119424081826278907:84wrhblj5xq';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
'//cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
14 changes: 7 additions & 7 deletions src/partial-templates/head.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<link rel="icon" type="image/png" href="http://emacsthemes.com/assets/styles/favicon.ico">
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-66895931-1', 'auto');
ga('send', 'pageview');
</script>
ga('create', 'UA-66895931-1', 'auto');
ga('send', 'pageview');
</script>
</head>
1 change: 1 addition & 0 deletions src/partial-templates/header.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<li class="menu-item"><a href="{{ chartsFile }}">Charts</a></li>
<li class="menu-item"><a href="{{ aboutFile }}">About</a></li>
</ul>
<div class="google-search"><gcse:search></gcse:search></div>
</div>
</div>
</div>
Expand Down

0 comments on commit 1d7cdf6

Please sign in to comment.