![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
![[community profile]](https://www.dreamwidth.org/img/silk/identity/community.png)
Many Dreamwidth s2/Core2 styles have the "back to top" link at the bottom of the Recent Entries view, but Transmogrified doesn't. I had the same problem on LJ, when I used the Bloggish layout with a custom style sheet and theme layer, but I couldn't solve it, not even by modifying s2 Mixit's code to fix the problem, because Bloggish lacked a "back to top" link in the HTML to hook the s2 to.
So my question is kind of two-fold:
Is there any way to get all the proper HTML (including the necessary but missing HTML links and the requisite s2 to make it all work) into Transmogrified, and if so, how?
Because my other problem is I cannot figure out how DW's s2 differs from LJ's version of it. So I would need someone to work out the code for me but hopefully someone who could also explain how s2 differs on DW from LJ's version (or at least point me in the right direction, if there's something I can read on that to make it more clear).
Because the way I figure it, if I can't read (that is, understand) the s2 on DW, I'll never be able to modify or write it. And I want to be able to do both.
So my question is kind of two-fold:
Is there any way to get all the proper HTML (including the necessary but missing HTML links and the requisite s2 to make it all work) into Transmogrified, and if so, how?
Because my other problem is I cannot figure out how DW's s2 differs from LJ's version of it. So I would need someone to work out the code for me but hopefully someone who could also explain how s2 differs on DW from LJ's version (or at least point me in the right direction, if there's something I can read on that to make it more clear).
Because the way I figure it, if I can't read (that is, understand) the s2 on DW, I'll never be able to modify or write it. And I want to be able to do both.
no subject
Date: 2010-11-29 08:01 am (UTC)You can see the original function here, I only added two lines to it:
* One to add the
<div id="top"></div>
to make it use #top like the other layouts, above the #header div.* One to add the
<div class="top"><a href="#top">Top of Page</a></div>
at the bottom of the footer, so you can style it how you like.You can, of course, tweak with this--put the code in different places, etc.
Now, I realize you're probably going to need more information than just this, but I'll need to know where to start explaining-- Have you ever made a theme layer before and then used it in a style? If not, that is probably where to start!
no subject
Date: 2010-11-29 04:39 pm (UTC)I can't see why it's not actually there though, very strange to have it in every other style, was transmog the first non tabula layout?
no subject
Date: 2010-11-29 04:41 pm (UTC)Yeah, it was. Not sure if I shouldn't add it or if that would be TOO DISRUPTIVE or what.
no subject
Date: 2010-11-30 05:46 am (UTC)no subject
Date: 2010-11-30 06:30 am (UTC)The heck with DISRUPTIVE. :)
Oh, and I added it to the Suggestions queue just minutes after I wrote the OP these comments are attached to, so don't think it was your comment or anything - it wasn't - I just thought, heck, why not?
Oh my, it...
Date: 2010-11-30 06:23 am (UTC)It broke my footer a little but that's just CSS so I can probably fix that, no probs. :)
So here's the thing: I knew Bloggish was missing the top link altogether - so I used exactly the same code you just gave me, more or less (meaning LJ's version of it, with the head HTML and DOC type and all that in it) to fix the problem on LJ once I realized I need to hard-code that top link in.
And still it didn't work. I would have tried more or less the same code you just gave me for my DW but with how different the functions are from LJ's, and with my previous failure on LJ to pull this off at all even knowing the code and functions as well as I did there, I figured I needed help, so thank you very much for jumping in there for me with this code.
Beyond that, Mat's comment below cleared up a lot of this for me - apparently I'm playing around in the wrong Core. If I was using Core1 I could probably figure out much of what I need to know on my own, but apparently, thanks to the rewritten functions for Core2, it's kind of like...I feel like I'm starting all over again, and I don't feel like I know what I'm looking at.
So if I had...almost like a cheat sheet I could look at that says "For function A, write it this way instead, and call it Function A1" I think I could figure a lot of this out, but I need to start there, I think.
no subject
Date: 2010-11-29 04:45 pm (UTC)The S2 itself doesn't differ. The difference is in the basic core layer, which does have substantial changes to it, which overall make it a lot easier to understand, and negate the need to reinvent the wheel regularly, unlike on LJ where so many different layouts do the same thing in differing ways in a confusing manner.
The styles team put a lot of work into making the basics right so we can build on it much easier, I've found learnign S2 on DW a lot easier, so I can now look at LJ code and figure out what it's doing, whereas before 'twas all Greek.
Essentially, in the advanced layer browser, Core1 is LJs S2, Core2 is DWs S2, and reading Core2 with the stuff on the Wiki should get you most of the way.
no subject
Date: 2010-11-30 06:05 am (UTC)I'm glad you said this, since that was the part I wasn't getting. So if Core1 is LJ's s2 I would still be able to read, write and modify DW's code if I used Core1. I'm using Core2 (I was wondering what made it all Greek to me, so now I know... which is a relief).
If I can give you an example, since I still own a copy of my s2 custom theme layer for LJ - here:
On LJ, I did this to make the journal title clickable for the Bloggish style:
On Dreamwidth, I use this code to do the same thing for the title:
But I was not able to come up with DW's version of that mod on my own, since there was too many differences in the code. I thought it was down to "new sort of s2" (which admittedly sort of strained logic, since it's all Perl) - it just never occurred to me it was down to the Cores having major differences.
So what I need to figure out is....OK. In all honesty, I don't know where to start. I've thrown both layers up in tabs to see what I should be doing and intuiting differently, but ....I'm afraid it's too many things...*sigh*
no subject
Date: 2010-11-30 08:54 pm (UTC)Start with Core2, read it through, the code is fairly good (for example, have a look at the base Tabula Rasa layer and see how little is needed to make a layout work). IF there's stuff that's not commented or clear, that sort of counts as a bug, but may be better solved in the how-tos.
BTB, I don't think you need to include the third function (given that the code looks Very familiar), it doesn't affect the page display.
Effectively, we have got a new sort of S2, but only because they went back to first principles, figured out what the thing could do, and made it much easier to do it. Some of the end results are, unfortunately, stylistic choices I disagree with (like the way header TITLEs are done by default), but they're all easily fixed.