Skip to content

Commit bd6e6d5

Browse files
committed
Set up index.html
1 parent 0718542 commit bd6e6d5

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

generic.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ stream@threeoh.com
66

77

88
/* Generics */
9-
BODY { font:9px verdana, arial, san-serif; }
9+
BODY { font:9px verdana, arial, san-serif; margin:2em 2.5em; }
1010
A {color: #3399CC; text-decoration:none}
1111
A:hover {color: #FF0066}
1212
A:visited {color: #999999}

index.html

+12-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,17 @@
77
</head>
88
<body onload="new ThreeOhScroll('filter')">
99

10-
<div id="filter" style="position:absolute; left:6px; top:8px; width:290px; height:268px;">
10+
<div style="font-size:1.2em;">
11+
<p><b>Three.OH Scroller</b><br>March 2001
12+
13+
<p>A custom scroller built for the design website threeoh.com.
14+
15+
<p><a href="https://github.com/aboodman/threeoh">source code</a>
16+
</div>
17+
18+
<br><br>
19+
20+
<div id="filter" style="position:relative; width:290px; height:268px;" >
1121
<div id="filterScrollBar" style="position:absolute; left:267px; width:23px; height:268px">
1222
<div id="filterThumbContainer" style="position:absolute; z-index:3; left:13px; top:1px; width:9px; height:266px"><div id="filterThumb" style="position:absolute; top:0px; cursor:pointer; cursor:hand; background-color:#5EBBE7"><img id="filterThumbImg" src="thumb.gif" width="9" height="50" /></div></div>
1323
<div id="filterArrowContainer" style="position:absolute; z-index:4; top:1px; left:10px; width:4px; height:266px"><div id="filterArrow" style="position:absolute"><img id="filterArrowImg" src="arrow.gif" width="4" height="7" /></div></div>
@@ -65,4 +75,4 @@
6575
</div>
6676

6777
</body>
68-
</html>
78+
</html>

scroll.js

+4-8
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ ThreeOhScroll.pc = navigator.platform == "Win32"
1313
// you set the number of pixels that the desc tag will be permanently.
1414
ThreeOhScroll.ie4pcDescWidth = 100
1515

16-
// i have no idea why this number is necessary, it just is. it is related to how far the scroller is from the top of the window
17-
// in mozilla, but you will have to play with it to get it just right.
18-
ThreeOhScroll.mozAdjust = ThreeOhScroll.mo5 ? 75 : 0
19-
2016
// this is how long it should take the scroller to animate when the user clicks a marker (in milliseconds)
2117
ThreeOhScroll.aniLen = 250
2218

@@ -32,13 +28,13 @@ function ThreeOhScroll(id)
3228
this.clipH = parseInt(this.container.style.height)
3329
this.PTags = ypGetDescendantsByTagName("P", this.content)
3430
var lastP = this.PTags[this.PTags.length-1]
35-
var lastPTop = lastP.offsetTop - ThreeOhScroll.mozAdjust
31+
var lastPTop = lastP.offsetTop;
3632
this.docH = lastPTop + Math.max(lastP.offsetHeight, this.clipH)
3733
this.scrollH = this.docH - this.clipH
3834
this.markersMax = parseInt(this.markers.style.height) - 7
3935
this.thumbMax = parseInt(this.thumbContainer.style.height) - this.thumbImg.height
4036
this.arrowMax = parseInt(this.arrowContainer.style.height) - this.arrowImg.height
41-
37+
4238
this.gRef = "ThreeOhScroll_"+id
4339
eval(this.gRef+"=this")
4440
this.thumb.obj = this
@@ -57,14 +53,14 @@ ThreeOhScroll.prototype.initMarkers = function() {
5753
var shtml = "", sTitle, iTop
5854
for (var i = 0; i < this.PTags.length; i++) {
5955
sTitle = this.PTags[i].getAttribute("description")
60-
pTop = this.PTags[i].offsetTop - ThreeOhScroll.mozAdjust
56+
pTop = this.PTags[i].offsetTop;
6157
iTop = Math.round(pTop * this.markersMax / this.scrollH)
6258
if (sTitle && sTitle != "" && sTitle != null) {
6359
shtml += "<div id='" + this.id + "_marker_" + i + "' "
6460
shtml += "style='position:absolute; left:2px; top:" + (iTop + 2) + "px; "
6561
shtml += "width:5px; height:3px; clip:rect(0 5 3 0); background-color:#CCCCCC; z-index:3;'></div>"
6662
shtml += "<div style='position:absolute; left:0px; top:" + iTop + "px; "
67-
shtml += "cursor:pointer; cursor:hand; width:9px; height:7px; clip:rect(0 9 7 0); z-index:4;' "
63+
shtml += "cursor:pointer; cursor:hand; width:9px; height:7px; clip:rect(0 9 7 0); z-index:4;' "
6864
shtml += "onmousedown='" + this.gRef + ".scrollTo(" + pTop + ")' "
6965
shtml += "onmouseover='" + this.gRef + ".toggleMarker(this, " + i + ", 1)' "
7066
shtml += "onmouseout='" + this.gRef + ".toggleMarker(this, " + i + ", 0)' "

0 commit comments

Comments
 (0)