dannyk
Oct-28-2007, 12:31 AM
Hello,
Been browsing forums for few days and got my starting site up and running.
I wanted my homepage to have a picture that links to separate page with the galleries (done). I'm able to get the nav bar set up and working as well. Got the picture with the link (on main homepge) from the code that I found on forums but the only problem is that the picture shows in the footer part of the galleries page as well which I don't want. (I guess because the code is added for the footer part) I used the code for making second homepage to have galleries on separate pages.
Any help appreciated, and I'm sorry if it's too messy when it comes to code.
(site address: http://www.dkphotoservices.smugmug.com)
CSS:
/* hides your name (including any 's) */
#userName {
display: none;
}
/* hides the word home */
#userHome {
display: none;
}
/* remove the 's */
.possess {
display: none;
}
p.updated {
display: none;
}
/* this part hides the your photos/home, login and help links */
#toolbar a.nav {display: none;}
/* THIS PART ADDS NAV BAR */
#navcontainer ul {
margin: 0;
padding: 10px;
list-style-type: none;
text-align: center;
}
#navcontainer ul li {
display: inline;
}
#navcontainer ul li a {
text-decoration: none;
padding: .2em 1em;
color: #fff;
background-color: #000;
}
#navcontainer ul li a:hover {
color: #fff;
background-color: #5E5E5E;
}
/* html only page for gallery 3720214 */
.gallery_3720214 .nophotos {
display: none;
}
.gallery_3720214 .pageNav {
display: none;
}
/* CODE FOR NO GALLERY ON HOMEPAGE */
.homepage #galleriesBox,
.homepage #categoriesBox,
.homepage #featuredBox {
display: none;
}
.galleries #bioBox {
display: none;
}
.galleries #galleriesBox,
.galleries #categoriesBox,
.galleries #featuredBox {
display: block;
}
.loggedIn .homepage #galleriesBox,
.loggedIn .homepage #categoriesBox {
display: block;
}
.myhomepagepic {
margin: 0 auto;
width: 600px;
height: 400px;
background: url(http://dkphotoservices.smugmug.com/photos/213393551-M.jpg) no-repeat;
}
.homepage .myhomepagepic {display: block;}
Java:
// removes the pipes characters in the toolbar header
YE.onAvailable('toolbar', function(e) {
this.innerHTML = this.innerHTML.replace(new RegExp(/\|/g),"");
});
YE.onAvailable('galleryTitle', function() {this.innerHTML = 'Photos'});
function hasPath(sPath)
{
re = new RegExp("\/" + sPath + "(\/|$)");
return re.test(window.location)
}
Footer:
********>
if (hasPath("galleries"))
YD.addClass(document.body, "galleries");
</********
<div class="myhomepagepic"><a href="<A href="http://dkphotoservices.smugmug.com/galleries"><img">http://dkphotoservices.smugmug.com/galleries"><img src="http://dkphotoservices.smugmug.com/photos/213393551-M.jpg" width="600" height="399" border="0" /></a></div>
Been browsing forums for few days and got my starting site up and running.
I wanted my homepage to have a picture that links to separate page with the galleries (done). I'm able to get the nav bar set up and working as well. Got the picture with the link (on main homepge) from the code that I found on forums but the only problem is that the picture shows in the footer part of the galleries page as well which I don't want. (I guess because the code is added for the footer part) I used the code for making second homepage to have galleries on separate pages.
Any help appreciated, and I'm sorry if it's too messy when it comes to code.
(site address: http://www.dkphotoservices.smugmug.com)
CSS:
/* hides your name (including any 's) */
#userName {
display: none;
}
/* hides the word home */
#userHome {
display: none;
}
/* remove the 's */
.possess {
display: none;
}
p.updated {
display: none;
}
/* this part hides the your photos/home, login and help links */
#toolbar a.nav {display: none;}
/* THIS PART ADDS NAV BAR */
#navcontainer ul {
margin: 0;
padding: 10px;
list-style-type: none;
text-align: center;
}
#navcontainer ul li {
display: inline;
}
#navcontainer ul li a {
text-decoration: none;
padding: .2em 1em;
color: #fff;
background-color: #000;
}
#navcontainer ul li a:hover {
color: #fff;
background-color: #5E5E5E;
}
/* html only page for gallery 3720214 */
.gallery_3720214 .nophotos {
display: none;
}
.gallery_3720214 .pageNav {
display: none;
}
/* CODE FOR NO GALLERY ON HOMEPAGE */
.homepage #galleriesBox,
.homepage #categoriesBox,
.homepage #featuredBox {
display: none;
}
.galleries #bioBox {
display: none;
}
.galleries #galleriesBox,
.galleries #categoriesBox,
.galleries #featuredBox {
display: block;
}
.loggedIn .homepage #galleriesBox,
.loggedIn .homepage #categoriesBox {
display: block;
}
.myhomepagepic {
margin: 0 auto;
width: 600px;
height: 400px;
background: url(http://dkphotoservices.smugmug.com/photos/213393551-M.jpg) no-repeat;
}
.homepage .myhomepagepic {display: block;}
Java:
// removes the pipes characters in the toolbar header
YE.onAvailable('toolbar', function(e) {
this.innerHTML = this.innerHTML.replace(new RegExp(/\|/g),"");
});
YE.onAvailable('galleryTitle', function() {this.innerHTML = 'Photos'});
function hasPath(sPath)
{
re = new RegExp("\/" + sPath + "(\/|$)");
return re.test(window.location)
}
Footer:
********>
if (hasPath("galleries"))
YD.addClass(document.body, "galleries");
</********
<div class="myhomepagepic"><a href="<A href="http://dkphotoservices.smugmug.com/galleries"><img">http://dkphotoservices.smugmug.com/galleries"><img src="http://dkphotoservices.smugmug.com/photos/213393551-M.jpg" width="600" height="399" border="0" /></a></div>