Skip to content

Commit 031f4bd

Browse files
committed
More hacks to fix issues caused by the need for a sticky footer. This time, on search pages.
1 parent c9ba1ed commit 031f4bd

File tree

5 files changed

+289
-2
lines changed

5 files changed

+289
-2
lines changed

_includes/frontpage-header.txt

+12
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,18 @@
3131
<script type="text/javascript" src="{{ site.baseurl }}/resources/javascript/jquery.accordionza.js"></script>
3232
<script src="{{ site.baseurl }}/resources/javascript/frontpage.js" type="text/javascript" ></script>
3333

34+
<script type="text/javascript">
35+
36+
$(document).ready(function() {
37+
38+
var offset = $(".push").height() + $(".scrollingmenu").height() + 36;
39+
if ( offset + $('.bottom').height() < $(window).height() ) {
40+
var height = $(window).height() - offset;
41+
$('.bottom').css("height", height);
42+
}
43+
44+
});
45+
</script>
3446

3547
<style type="text/css">
3648
html {

_includes/index-header.txt

+4-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
<!-- jquery js -->
1818
<script src="{{ site.baseurl }}/resources/javascript/jquery.js" type="text/javascript" ></script>
1919

20+
<!-- Search CSS -->
21+
<link rel="stylesheet" href="{{ site.baseurl }}/resources/stylesheets/search.css" type="text/css" />
22+
2023
<!-- Bootstrap JS and CSS -->
2124
<link rel="stylesheet" href="{{ site.baseurl }}/resources/stylesheets/bootstrap.css" type="text/css" />
2225
<script src="{{ site.baseurl }}/resources/javascript/bootstrap-dropdown.js" type="text/javascript" ></script>
@@ -47,7 +50,7 @@
4750
</script>
4851

4952
<script type="text/javascript">
50-
jQuery(document).ready(function($) {
53+
$(document).ready(function() {
5154

5255
var offset = $(".push").height() + $(".scrollingmenu").height() + 36;
5356
if ( offset + $('.bottom').height() < $(window).height() ) {

_includes/search-header.txt

+249
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,249 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
5+
<title>{% if page.title %}{{ page.title }} - {% endif %}{{ site.title }}</title>
6+
{% if page.description %}
7+
<meta name="description" content="{{ page.description }}" />
8+
{% endif %}
9+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
10+
11+
<link rel="icon" type="image/png" href="{{ site.baseurl }}/resources/favicon.ico">
12+
13+
<!-- prettify js and CSS -->
14+
<link rel="stylesheet" href="{{ site.baseurl }}/resources/stylesheets/prettify.css" type="text/css" />
15+
<script src="{{ site.baseurl }}/resources/javascript/prettify/prettify.js" type="text/javascript" ></script>
16+
17+
<!-- jquery js -->
18+
<script src="{{ site.baseurl }}/resources/javascript/jquery.js" type="text/javascript" ></script>
19+
20+
<!-- Search CSS -->
21+
<link rel="stylesheet" href="{{ site.baseurl }}/resources/stylesheets/search.css" type="text/css" />
22+
23+
<!-- Bootstrap JS and CSS -->
24+
<link rel="stylesheet" href="{{ site.baseurl }}/resources/stylesheets/bootstrap.css" type="text/css" />
25+
<script src="{{ site.baseurl }}/resources/javascript/bootstrap-dropdown.js" type="text/javascript" ></script>
26+
<script src="{{ site.baseurl }}/resources/javascript/bootstrap-dropdown-app.js" type="text/javascript" ></script>
27+
28+
<!-- Base stylesheet for all pages -->
29+
<link rel="stylesheet" href="{{ site.baseurl }}/resources/stylesheets/base.css" type="text/css" />
30+
31+
<!-- prettyprint js to prepend generated pre/code tags -->
32+
<script type="text/javascript">
33+
function styleCode()
34+
{
35+
if (typeof disableStyleCode != "undefined")
36+
{
37+
return;
38+
}
39+
var a = false;
40+
$("pre code").parent().each(function()
41+
{
42+
if (!$(this).hasClass("prettyprint"))
43+
{
44+
$(this).addClass("prettyprint lang-scala linenums");
45+
a = true
46+
}
47+
});
48+
if (a) { prettyPrint() }
49+
}
50+
</script>
51+
52+
<script type="text/javascript">
53+
54+
$(document).ready(function() {
55+
56+
var offset = $(".push").height() + $(".scrollingmenu").height() + 36;
57+
if ( offset + $('.bottom').height() < $(window).height() ) {
58+
var height = $(window).height() - offset;
59+
$('.bottom').css("height", height);
60+
}
61+
62+
});
63+
</script>
64+
65+
66+
<style type="text/css">
67+
68+
body {
69+
padding-top: 36px;
70+
height: 100%;
71+
background:url({{ site.baseurl }}/resources/images/bg-short.jpg) no-repeat top center #310808;
72+
-webkit-box-shadow: inset 0 10px 50px rgba(0,0,0,.6);
73+
-moz-box-shadow: inset 0 10px 50px rgba(0,0,0,.6);
74+
/* box-shadow: inset 0 10px 30px rgba(0,0,0,.3);*/
75+
}
76+
77+
.scrollingmenu {
78+
width: 940px;
79+
margin-left: auto;
80+
margin-right: auto;
81+
height: 70px;
82+
zoom: 1;
83+
}
84+
.scrollingmenu h2 {
85+
padding-bottom: 30px;
86+
color: #ffffff;
87+
font-size: 42px;
88+
line-height: 1;
89+
text-shadow: 0 1px 2px rgba(0,0,0,.5);
90+
}
91+
92+
.bottom {
93+
background-color: #bcbcbc;
94+
padding-top: 20px;
95+
border-top: 1px solid #8e397d;
96+
height: 1150px;
97+
}
98+
.bottom h1,h2,h3 {
99+
text-shadow: 0 1px 2px rgba(255,255,255,.5);
100+
}
101+
.bottom h1,h2,h3 a {
102+
color: #404040;
103+
text-shadow: 0 1px 2px rgba(255,255,255,.5);
104+
}
105+
106+
.bottom small {
107+
color: #808080;
108+
text-shadow: 0 1px 1px rgba(255,255,255,.5);
109+
}
110+
111+
.bottom p.under {
112+
color: #808080;
113+
text-shadow: 0 1px 1px rgba(255,255,255,.5);
114+
font-size: 18px;
115+
line-height: 36px;
116+
margin-top: -25px;
117+
}
118+
119+
.bottom ul {
120+
margin: -4px 0 4px 25px;
121+
list-style: square;
122+
}
123+
124+
.bottom ul li {
125+
color: #404040;
126+
font-size: 18px;
127+
line-height: 24px;
128+
margin: 0px;
129+
}
130+
131+
.bottom ul li.tour-of-scala {
132+
font-size: 16px;
133+
line-height: 22px;
134+
}
135+
136+
.bottom ul li p {
137+
color: #404040;
138+
text-shadow: 0 1px 0 rgba(255, 255,255,.5);
139+
font-size: 18px;
140+
line-height: 24px;
141+
margin: 0px;
142+
}
143+
144+
.bottom ul li a {
145+
color: #404040;
146+
text-shadow: 0 1px 0 rgba(255, 255,255,.5);
147+
}
148+
149+
.bottom ul li a:hover {
150+
color: #00408C;
151+
}
152+
153+
.bottom ul li ul li {
154+
font-size: 14px;
155+
line-height: 18px;
156+
text-shadow: 0 1px 0 rgba(255, 255,255,.5);
157+
}
158+
159+
.bottom ul li ul li a {
160+
color: #606060;
161+
}
162+
163+
.bottom ul li ul li ul {
164+
margin-top: 3px;
165+
}
166+
167+
.bottom ul li ul li ul li {
168+
font-size: 12px;
169+
line-height: 16px;
170+
text-shadow: 0 1px 0 rgba(255, 255,255,.5);
171+
}
172+
173+
.bottom ul li ul li ul li a {
174+
color: #707070;
175+
}
176+
177+
.box {
178+
position:relative;
179+
padding:7px 15px;
180+
margin-bottom:18px;
181+
color:#ffffff;
182+
background-color:#b12c67;
183+
background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#b12c67), to(#340a06));
184+
background-image:-moz-linear-gradient(top, #b12c67, #340a06);
185+
background-image:-ms-linear-gradient(top, #b12c67, #340a06);
186+
background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #b12c67), color-stop(100%, #340a06));
187+
background-image:-webkit-linear-gradient(top, #b12c67, #340a06);
188+
background-image:-o-linear-gradient(top, #b12c67, #340a06);
189+
background-image:linear-gradient(top, #b12c67, #340a06);
190+
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b12c67', endColorstr='#eedc94', GradientType=0);
191+
text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);
192+
border-color:#340a06 #340a06 #340a06;
193+
border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
194+
text-shadow:0 1px 0 rgba(0, 0, 0, 0.5);
195+
border-width:1px;border-style:solid;-webkit-border-radius:4px;
196+
-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.25);
197+
-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.25);
198+
box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.25);
199+
}
200+
201+
.box h2 {
202+
padding-bottom: 8px;
203+
color: #ffffff;
204+
font-size: 36px;
205+
line-height: 1;
206+
text-shadow: 0 1px 2px rgba(0,0,0,.5);
207+
}
208+
209+
.box h3 {
210+
padding-bottom: 8px;
211+
color: #ffffff;
212+
font-size: 24px;
213+
line-height: 1;
214+
text-shadow: 0 1px 2px rgba(0,0,0,.5);
215+
}
216+
217+
.box ul li {
218+
list-style-image: url({{ site.baseurl }}/resources/images/check-mark.png);
219+
}
220+
221+
.box ul li {
222+
color: #cccccc;
223+
font-weight: bold;
224+
font-size: 26px;
225+
line-height: 36px;
226+
text-shadow: 0 1px 2px rgba(0,0,0,.5);
227+
margin: 0 0 0 150px;
228+
}
229+
230+
.box ul li a {
231+
color: #cccccc;
232+
}
233+
234+
.box ul li a:hover {
235+
color: #aaaaaa;
236+
}
237+
238+
.page-header-index{
239+
margin-bottom:17px;
240+
border-bottom:1px solid #808080;
241+
-webkit-box-shadow:0 1px 0 rgba(255, 255, 255, 0.5);
242+
-moz-box-shadow:0 1px 0 rgba(255, 255, 255, 0.5);
243+
box-shadow:0 1px 0 rgba(255, 255, 255, 0.5);
244+
}
245+
246+
</style>
247+
248+
</head>
249+
<body>

_layouts/search.html

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
layout: default
3+
---
4+
5+
{% include search-header.txt %}
6+
7+
<div class="wrapper">
8+
{% include topbar.txt %}
9+
10+
<header class="scrollingmenu">
11+
<h2>{{ page.title }}</h2>
12+
</header>
13+
14+
<div class="bottom">
15+
<div class="container">
16+
<div class="row">
17+
{{ content }}
18+
</div>
19+
</div>
20+
</div>
21+
<div class="push"></div>
22+
</div>
23+
{% include frontpage-footer.txt %}

search.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
layout: index
2+
layout: search
33
title: Search
44
---
55

0 commit comments

Comments
 (0)