Author |
Message |
Registered: March 13, 2007 | Posts: 646 |
| Posted: | | | | Quoting Mark Harrison: Quote: Quoting xyrano:
Quote: The tricky part will be to switch class on the span tag, following the genre of the current tagline. How should the genre matching the tagline be defined? I was thinking something like this: <tagline=[genre]#tagline_text@[genre]#tagline_text .. [genre]#tagline_text />
I don't play with HTML windows, but wouldn't you just take the first genre defined in the DP Header_Vars? You are correct. I was tired when I wrote yesterday and missed "the primary genre listing in the profile" from Antares post, to be honest. So, while we are to grab the genres from HEADER_VARS, I guess we only need the first one listed. Thus, add the following code after the row "rotatingTextElement = document.getElementById("textToChange");": Quote: if ( typeof DP_Genres != "undefined" && DP_Genres[0] != "") rotatingTextElement.className = DP_Genres[0].toLowerCase(); | | | Last edited: by xyrano |
|
Registered: May 26, 2007 | Reputation: | Posts: 599 |
| Posted: | | | | It works and it looks pretty cool. The only thing that needs to be changed if you're going to use it is the font on Drama, Classics & Animation. Xyrano must have been slleepy when he initially wrote them, it should read... .animation { font: bold 14pt "Snap ITC"; } .classic, .drama { font: bold 14pt "Modern No. 20"; } Thanks for the work Xyrano!, Green Arrow |
|
Registered: May 26, 2007 | Reputation: | Posts: 599 |
| Posted: | | | | Did a little work with this, it looks pretty good. Just add it where Xyrano stated...
.accessories { font: bold 20pt "Arial"; } .action { font: 24pt "Impact"; } .adventure { font: bold 24pt "Colonna MT"; } .animation, .anime { font: 26pt "Snap ITC"; } .classic, .drama, .television { font: bold italic 22pt "Century"; } .comedy { font: bold 16pt "Kristen ITC"; } .crime, .suspensethriller { font: bold 26pt "Onyx"; } .documentary { font: 28pt "Poor Richard"; } .family { font: bold 20pt "Lucida Calligraphy"; } .fantasy { font: bold italic 20pt "Tempus Sans ITC"; } .horror { font: bold 36pt "Chiller"; } .musical { font: bold 20pt "Broadway"; } .romance { font: 24pt "Monotype Corsiva"; } .science-fiction { font:24pt "Haettenschweiler"; } .sports { font: 20pt "Cooper Black"; } .war { font: 24pt "Stencil"; } .western { font: 20pt "Showcard Gothic"; } | | | Last edited: by Antares |
|
Registered: March 13, 2007 | Posts: 646 |
| Posted: | | | | Quoting Antares: Quote: It works and it looks pretty cool. The only thing that needs to be changed if you're going to use it is the font on Drama, Classics & Animation. Xyrano must have been slleepy when he initially wrote them, it should read...
.animation { font: bold 14pt "Snap ITC"; } .classic, .drama { font: bold 14pt "Modern No. 20"; }
Thanks for the work Xyrano!, Green Arrow Hehe... yea... was soooo tired :D Thanks. Glad I could help out some. Add a "dot" before television or else its not gonna show. |
|
Registered: May 26, 2007 | Reputation: | Posts: 599 |
| Posted: | | | | There is one small problem. The first listing reverts back to the default font for some reason.
Oh, and how would you write the code for Suspense/Thriller? For some reason the slash does something to revert it to default. | | | Last edited: by Antares |
|
Registered: May 22, 2007 | Reputation: | Posts: 1,033 |
| Posted: | | | | can't say for sure, but / is probably a special character in javascript
i don't know if you can escape it as part of the style script.
one possibility is to store the value from DP_Genres[0] in a temp variable and remove the / don't know if there is a replace function in javascript off the top of my head (in which case it could be done in one line). i'll take a look into it and post back
-Agrare |
|
Registered: May 22, 2007 | Reputation: | Posts: 1,033 |
| Posted: | | | | ok, this change should work
if ( typeof DP_Genres != "undefined" && DP_Genres[0] != "") rotatingTextElement.className = DP_Genres[0].replace(/\//, "").toLowerCase();
tested out similar with the replace but not the actual line above
*edit* ok, that should work, changed it some to remove some unneeded parts
-Agrare | | | Last edited: by Agrare |
|
Registered: May 26, 2007 | Reputation: | Posts: 599 |
| Posted: | | | | Quoting Agrare: Quote: if ( typeof DP_Genres != "undefined" && DP_Genres[0] != "") rotatingTextElement.className = DP_Genres[0].replace(/\//, "").toLowerCase(); So where does it go in the code structure? |
|
Registered: May 22, 2007 | Reputation: | Posts: 1,033 |
| Posted: | | | | it just replaces the line of code after the row "rotatingTextElement = document.getElementById("textToChange");":
(from xyrano's post top of this page)
also, for your line that has the font for Suspense/Thriller take out the / so .suspensethriller { font: bold 14pt "fontname"; }
-Agrare |
|
Registered: May 26, 2007 | Reputation: | Posts: 599 |
| Posted: | | | | Thanks, it works.
Green Arrow |
|