Skip to content

Commit 30ce478

Browse files
committed
Better design when the Google ads are on the top of the page
1 parent 5025647 commit 30ce478

File tree

319 files changed

+3509
-957
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

319 files changed

+3509
-957
lines changed

cargo/Adding+TLD+support+to+the+Jetty+container.html

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,16 @@
4141
document.getElementById("cargo-content").style.paddingBottom = space + "px";
4242
}
4343
} else if (i.style.top) {
44-
if (parseInt(i.style.top) === 0) {
45-
headerPosition = "static";
44+
var top = parseInt(i.style.top)
45+
if (!isNaN(top)) {
46+
// The way Google handles the element is that the height (with the ad) is fixed,
47+
// appearing and disappearing is handled by making the top style negative
48+
var space = i.offsetHeight + top;
49+
if (space < 0) {
50+
space = 0;
51+
}
52+
document.getElementById("cargo-header").style.paddingTop = space + "px";
53+
document.getElementById("cargo-header-spacing").style.height = (83 + space) + "px";
4654
}
4755
}
4856
}
@@ -54,7 +62,7 @@
5462
<body>
5563
<table class="layout" style="border-collapse:collapse;position:absolute;width:100%;height:100%" border="none">
5664
<tbody>
57-
<tr style="height:83px">
65+
<tr id="cargo-header-spacing" style="height:83px">
5866
<td colspan="2" style="padding:0px">
5967
<div id="cargo-header" style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
6068
<table class="banner" style="padding:0px;width:100%;background-image:url('attachments/cargo-banner-center.png')">

cargo/Adding+a+JMS+resource+to+Resin3x.html

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,16 @@
4141
document.getElementById("cargo-content").style.paddingBottom = space + "px";
4242
}
4343
} else if (i.style.top) {
44-
if (parseInt(i.style.top) === 0) {
45-
headerPosition = "static";
44+
var top = parseInt(i.style.top)
45+
if (!isNaN(top)) {
46+
// The way Google handles the element is that the height (with the ad) is fixed,
47+
// appearing and disappearing is handled by making the top style negative
48+
var space = i.offsetHeight + top;
49+
if (space < 0) {
50+
space = 0;
51+
}
52+
document.getElementById("cargo-header").style.paddingTop = space + "px";
53+
document.getElementById("cargo-header-spacing").style.height = (83 + space) + "px";
4654
}
4755
}
4856
}
@@ -54,7 +62,7 @@
5462
<body>
5563
<table class="layout" style="border-collapse:collapse;position:absolute;width:100%;height:100%" border="none">
5664
<tbody>
57-
<tr style="height:83px">
65+
<tr id="cargo-header-spacing" style="height:83px">
5866
<td colspan="2" style="padding:0px">
5967
<div id="cargo-header" style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
6068
<table class="banner" style="padding:0px;width:100%;background-image:url('attachments/cargo-banner-center.png')">

cargo/Adding+a+Samples+Test.html

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,16 @@
4141
document.getElementById("cargo-content").style.paddingBottom = space + "px";
4242
}
4343
} else if (i.style.top) {
44-
if (parseInt(i.style.top) === 0) {
45-
headerPosition = "static";
44+
var top = parseInt(i.style.top)
45+
if (!isNaN(top)) {
46+
// The way Google handles the element is that the height (with the ad) is fixed,
47+
// appearing and disappearing is handled by making the top style negative
48+
var space = i.offsetHeight + top;
49+
if (space < 0) {
50+
space = 0;
51+
}
52+
document.getElementById("cargo-header").style.paddingTop = space + "px";
53+
document.getElementById("cargo-header-spacing").style.height = (83 + space) + "px";
4654
}
4755
}
4856
}
@@ -54,7 +62,7 @@
5462
<body>
5563
<table class="layout" style="border-collapse:collapse;position:absolute;width:100%;height:100%" border="none">
5664
<tbody>
57-
<tr style="height:83px">
65+
<tr id="cargo-header-spacing" style="height:83px">
5866
<td colspan="2" style="padding:0px">
5967
<div id="cargo-header" style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
6068
<table class="banner" style="padding:0px;width:100%;background-image:url('attachments/cargo-banner-center.png')">

cargo/Adding+a+container.html

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,16 @@
4141
document.getElementById("cargo-content").style.paddingBottom = space + "px";
4242
}
4343
} else if (i.style.top) {
44-
if (parseInt(i.style.top) === 0) {
45-
headerPosition = "static";
44+
var top = parseInt(i.style.top)
45+
if (!isNaN(top)) {
46+
// The way Google handles the element is that the height (with the ad) is fixed,
47+
// appearing and disappearing is handled by making the top style negative
48+
var space = i.offsetHeight + top;
49+
if (space < 0) {
50+
space = 0;
51+
}
52+
document.getElementById("cargo-header").style.paddingTop = space + "px";
53+
document.getElementById("cargo-header-spacing").style.height = (83 + space) + "px";
4654
}
4755
}
4856
}
@@ -54,7 +62,7 @@
5462
<body>
5563
<table class="layout" style="border-collapse:collapse;position:absolute;width:100%;height:100%" border="none">
5664
<tbody>
57-
<tr style="height:83px">
65+
<tr id="cargo-header-spacing" style="height:83px">
5866
<td colspan="2" style="padding:0px">
5967
<div id="cargo-header" style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
6068
<table class="banner" style="padding:0px;width:100%;background-image:url('attachments/cargo-banner-center.png')">

cargo/Announcing+Codehaus+Cargo+1.7.16.html

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,16 @@
4141
document.getElementById("cargo-content").style.paddingBottom = space + "px";
4242
}
4343
} else if (i.style.top) {
44-
if (parseInt(i.style.top) === 0) {
45-
headerPosition = "static";
44+
var top = parseInt(i.style.top)
45+
if (!isNaN(top)) {
46+
// The way Google handles the element is that the height (with the ad) is fixed,
47+
// appearing and disappearing is handled by making the top style negative
48+
var space = i.offsetHeight + top;
49+
if (space < 0) {
50+
space = 0;
51+
}
52+
document.getElementById("cargo-header").style.paddingTop = space + "px";
53+
document.getElementById("cargo-header-spacing").style.height = (83 + space) + "px";
4654
}
4755
}
4856
}
@@ -54,7 +62,7 @@
5462
<body>
5563
<table class="layout" style="border-collapse:collapse;position:absolute;width:100%;height:100%" border="none">
5664
<tbody>
57-
<tr style="height:83px">
65+
<tr id="cargo-header-spacing" style="height:83px">
5866
<td colspan="2" style="padding:0px">
5967
<div id="cargo-header" style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
6068
<table class="banner" style="padding:0px;width:100%;background-image:url('attachments/cargo-banner-center.png')">

cargo/Another+jump+in+Codehaus+Cargo+s+history+version+1.8.0+is+here.html

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,16 @@
4141
document.getElementById("cargo-content").style.paddingBottom = space + "px";
4242
}
4343
} else if (i.style.top) {
44-
if (parseInt(i.style.top) === 0) {
45-
headerPosition = "static";
44+
var top = parseInt(i.style.top)
45+
if (!isNaN(top)) {
46+
// The way Google handles the element is that the height (with the ad) is fixed,
47+
// appearing and disappearing is handled by making the top style negative
48+
var space = i.offsetHeight + top;
49+
if (space < 0) {
50+
space = 0;
51+
}
52+
document.getElementById("cargo-header").style.paddingTop = space + "px";
53+
document.getElementById("cargo-header-spacing").style.height = (83 + space) + "px";
4654
}
4755
}
4856
}
@@ -54,7 +62,7 @@
5462
<body>
5563
<table class="layout" style="border-collapse:collapse;position:absolute;width:100%;height:100%" border="none">
5664
<tbody>
57-
<tr style="height:83px">
65+
<tr id="cargo-header-spacing" style="height:83px">
5866
<td colspan="2" style="padding:0px">
5967
<div id="cargo-header" style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
6068
<table class="banner" style="padding:0px;width:100%;background-image:url('attachments/cargo-banner-center.png')">

cargo/Ant+Tasks+Reference+Guide.html

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,16 @@
4141
document.getElementById("cargo-content").style.paddingBottom = space + "px";
4242
}
4343
} else if (i.style.top) {
44-
if (parseInt(i.style.top) === 0) {
45-
headerPosition = "static";
44+
var top = parseInt(i.style.top)
45+
if (!isNaN(top)) {
46+
// The way Google handles the element is that the height (with the ad) is fixed,
47+
// appearing and disappearing is handled by making the top style negative
48+
var space = i.offsetHeight + top;
49+
if (space < 0) {
50+
space = 0;
51+
}
52+
document.getElementById("cargo-header").style.paddingTop = space + "px";
53+
document.getElementById("cargo-header-spacing").style.height = (83 + space) + "px";
4654
}
4755
}
4856
}
@@ -54,7 +62,7 @@
5462
<body>
5563
<table class="layout" style="border-collapse:collapse;position:absolute;width:100%;height:100%" border="none">
5664
<tbody>
57-
<tr style="height:83px">
65+
<tr id="cargo-header-spacing" style="height:83px">
5866
<td colspan="2" style="padding:0px">
5967
<div id="cargo-header" style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
6068
<table class="banner" style="padding:0px;width:100%;background-image:url('attachments/cargo-banner-center.png')">

cargo/Ant+support.html

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,16 @@
4141
document.getElementById("cargo-content").style.paddingBottom = space + "px";
4242
}
4343
} else if (i.style.top) {
44-
if (parseInt(i.style.top) === 0) {
45-
headerPosition = "static";
44+
var top = parseInt(i.style.top)
45+
if (!isNaN(top)) {
46+
// The way Google handles the element is that the height (with the ad) is fixed,
47+
// appearing and disappearing is handled by making the top style negative
48+
var space = i.offsetHeight + top;
49+
if (space < 0) {
50+
space = 0;
51+
}
52+
document.getElementById("cargo-header").style.paddingTop = space + "px";
53+
document.getElementById("cargo-header-spacing").style.height = (83 + space) + "px";
4654
}
4755
}
4856
}
@@ -54,7 +62,7 @@
5462
<body>
5563
<table class="layout" style="border-collapse:collapse;position:absolute;width:100%;height:100%" border="none">
5664
<tbody>
57-
<tr style="height:83px">
65+
<tr id="cargo-header-spacing" style="height:83px">
5866
<td colspan="2" style="padding:0px">
5967
<div id="cargo-header" style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
6068
<table class="banner" style="padding:0px;width:100%;background-image:url('attachments/cargo-banner-center.png')">

cargo/Application+Classpath.html

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,16 @@
4141
document.getElementById("cargo-content").style.paddingBottom = space + "px";
4242
}
4343
} else if (i.style.top) {
44-
if (parseInt(i.style.top) === 0) {
45-
headerPosition = "static";
44+
var top = parseInt(i.style.top)
45+
if (!isNaN(top)) {
46+
// The way Google handles the element is that the height (with the ad) is fixed,
47+
// appearing and disappearing is handled by making the top style negative
48+
var space = i.offsetHeight + top;
49+
if (space < 0) {
50+
space = 0;
51+
}
52+
document.getElementById("cargo-header").style.paddingTop = space + "px";
53+
document.getElementById("cargo-header-spacing").style.height = (83 + space) + "px";
4654
}
4755
}
4856
}
@@ -54,7 +62,7 @@
5462
<body>
5563
<table class="layout" style="border-collapse:collapse;position:absolute;width:100%;height:100%" border="none">
5664
<tbody>
57-
<tr style="height:83px">
65+
<tr id="cargo-header-spacing" style="height:83px">
5866
<td colspan="2" style="padding:0px">
5967
<div id="cargo-header" style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
6068
<table class="banner" style="padding:0px;width:100%;background-image:url('attachments/cargo-banner-center.png')">

cargo/Architecture.html

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,16 @@
4141
document.getElementById("cargo-content").style.paddingBottom = space + "px";
4242
}
4343
} else if (i.style.top) {
44-
if (parseInt(i.style.top) === 0) {
45-
headerPosition = "static";
44+
var top = parseInt(i.style.top)
45+
if (!isNaN(top)) {
46+
// The way Google handles the element is that the height (with the ad) is fixed,
47+
// appearing and disappearing is handled by making the top style negative
48+
var space = i.offsetHeight + top;
49+
if (space < 0) {
50+
space = 0;
51+
}
52+
document.getElementById("cargo-header").style.paddingTop = space + "px";
53+
document.getElementById("cargo-header-spacing").style.height = (83 + space) + "px";
4654
}
4755
}
4856
}
@@ -54,7 +62,7 @@
5462
<body>
5563
<table class="layout" style="border-collapse:collapse;position:absolute;width:100%;height:100%" border="none">
5664
<tbody>
57-
<tr style="height:83px">
65+
<tr id="cargo-header-spacing" style="height:83px">
5866
<td colspan="2" style="padding:0px">
5967
<div id="cargo-header" style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
6068
<table class="banner" style="padding:0px;width:100%;background-image:url('attachments/cargo-banner-center.png')">

cargo/Archived+Downloads.html

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,16 @@
4141
document.getElementById("cargo-content").style.paddingBottom = space + "px";
4242
}
4343
} else if (i.style.top) {
44-
if (parseInt(i.style.top) === 0) {
45-
headerPosition = "static";
44+
var top = parseInt(i.style.top)
45+
if (!isNaN(top)) {
46+
// The way Google handles the element is that the height (with the ad) is fixed,
47+
// appearing and disappearing is handled by making the top style negative
48+
var space = i.offsetHeight + top;
49+
if (space < 0) {
50+
space = 0;
51+
}
52+
document.getElementById("cargo-header").style.paddingTop = space + "px";
53+
document.getElementById("cargo-header-spacing").style.height = (83 + space) + "px";
4654
}
4755
}
4856
}
@@ -54,7 +62,7 @@
5462
<body>
5563
<table class="layout" style="border-collapse:collapse;position:absolute;width:100%;height:100%" border="none">
5664
<tbody>
57-
<tr style="height:83px">
65+
<tr id="cargo-header-spacing" style="height:83px">
5866
<td colspan="2" style="padding:0px">
5967
<div id="cargo-header" style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
6068
<table class="banner" style="padding:0px;width:100%;background-image:url('attachments/cargo-banner-center.png')">

cargo/Articles.html

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,16 @@
4141
document.getElementById("cargo-content").style.paddingBottom = space + "px";
4242
}
4343
} else if (i.style.top) {
44-
if (parseInt(i.style.top) === 0) {
45-
headerPosition = "static";
44+
var top = parseInt(i.style.top)
45+
if (!isNaN(top)) {
46+
// The way Google handles the element is that the height (with the ad) is fixed,
47+
// appearing and disappearing is handled by making the top style negative
48+
var space = i.offsetHeight + top;
49+
if (space < 0) {
50+
space = 0;
51+
}
52+
document.getElementById("cargo-header").style.paddingTop = space + "px";
53+
document.getElementById("cargo-header-spacing").style.height = (83 + space) + "px";
4654
}
4755
}
4856
}
@@ -54,7 +62,7 @@
5462
<body>
5563
<table class="layout" style="border-collapse:collapse;position:absolute;width:100%;height:100%" border="none">
5664
<tbody>
57-
<tr style="height:83px">
65+
<tr id="cargo-header-spacing" style="height:83px">
5866
<td colspan="2" style="padding:0px">
5967
<div id="cargo-header" style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
6068
<table class="banner" style="padding:0px;width:100%;background-image:url('attachments/cargo-banner-center.png')">

cargo/As+the+year+slowly+comes+to+an+end+please+welcome+Codehaus+Cargo+1.7.8.html

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,16 @@
4141
document.getElementById("cargo-content").style.paddingBottom = space + "px";
4242
}
4343
} else if (i.style.top) {
44-
if (parseInt(i.style.top) === 0) {
45-
headerPosition = "static";
44+
var top = parseInt(i.style.top)
45+
if (!isNaN(top)) {
46+
// The way Google handles the element is that the height (with the ad) is fixed,
47+
// appearing and disappearing is handled by making the top style negative
48+
var space = i.offsetHeight + top;
49+
if (space < 0) {
50+
space = 0;
51+
}
52+
document.getElementById("cargo-header").style.paddingTop = space + "px";
53+
document.getElementById("cargo-header-spacing").style.height = (83 + space) + "px";
4654
}
4755
}
4856
}
@@ -54,7 +62,7 @@
5462
<body>
5563
<table class="layout" style="border-collapse:collapse;position:absolute;width:100%;height:100%" border="none">
5664
<tbody>
57-
<tr style="height:83px">
65+
<tr id="cargo-header-spacing" style="height:83px">
5866
<td colspan="2" style="padding:0px">
5967
<div id="cargo-header" style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
6068
<table class="banner" style="padding:0px;width:100%;background-image:url('attachments/cargo-banner-center.png')">

cargo/Be+secure+-+Upgrade+to+Codehaus+Cargo+1.8.1.html

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,16 @@
4141
document.getElementById("cargo-content").style.paddingBottom = space + "px";
4242
}
4343
} else if (i.style.top) {
44-
if (parseInt(i.style.top) === 0) {
45-
headerPosition = "static";
44+
var top = parseInt(i.style.top)
45+
if (!isNaN(top)) {
46+
// The way Google handles the element is that the height (with the ad) is fixed,
47+
// appearing and disappearing is handled by making the top style negative
48+
var space = i.offsetHeight + top;
49+
if (space < 0) {
50+
space = 0;
51+
}
52+
document.getElementById("cargo-header").style.paddingTop = space + "px";
53+
document.getElementById("cargo-header-spacing").style.height = (83 + space) + "px";
4654
}
4755
}
4856
}
@@ -54,7 +62,7 @@
5462
<body>
5563
<table class="layout" style="border-collapse:collapse;position:absolute;width:100%;height:100%" border="none">
5664
<tbody>
57-
<tr style="height:83px">
65+
<tr id="cargo-header-spacing" style="height:83px">
5866
<td colspan="2" style="padding:0px">
5967
<div id="cargo-header" style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
6068
<table class="banner" style="padding:0px;width:100%;background-image:url('attachments/cargo-banner-center.png')">

0 commit comments

Comments
 (0)