[personal profile] maytakecenturies posting in [community profile] style_system
Hi! I'm hoping someone will have more experience with this than me...I found a great layout on Insanejournal, and I've been trying to apply it to this journal on DW with absolutely no luck. Ironically, I thought the hard part would be finding the source code for IJ's base Generator layout, but that was easy enough - I was able to compile it as an S1 layout thanks to IJ posting the source code.

However, the layout - code here, along with a preview of what it should look like - isn't compatible right off the bat. I have some experience with CSS, but I haven't used Span and Div IDs and Classes in layout CSS before, so I'm not sure how to translate this properly, or if it can be. I've already spoken with the layout's creator, and unfortunately s/he doesn't have any DW experience and doesn't know how to make it work over here.

Does anyone have suggestions? I would be eternally grateful!

Date: 2016-01-19 08:05 am (UTC)
marahmarie: (M In M Forever) (Default)
From: [personal profile] marahmarie
Our compiler, from what I understand, doesn't compile s1 layouts. Instead of s1 and s2 it has Core1 and Core2 . Core1 is pretty much LJ's s2, pre-2008ish. Core2 is Dreamwidth's newer version of s2, and is a completely different version of whatever s2 LJ has used since 2009. Neither Core will run LJ's s1 code.

(Which is the main reason you'll never see s1 Generator here, though it was one of LJ's most popular and enduring styles.)
Edited (changed "reason" to "main reason", as there are open vs. closed source issues with using certain LJ layouts here, as well) Date: 2016-01-19 08:09 am (UTC)

Date: 2016-01-19 04:48 pm (UTC)
momijizukamori: Green icon with white text - 'I do believe in phosphorylation! I do!' with a string of DNA basepairs on the bottom (Default)
From: [personal profile] momijizukamori
Honestly I'm kind of amazed it even compiled - can you link the source you were using for the base?

Our code doesn't have the backend data to properly format S1 layouts, where were written in a different language than S2 layouts - not only is the CSS probably missing, a lot of the variable names probably are too.

Date: 2016-01-19 06:11 pm (UTC)
momijizukamori: Green icon with white text - 'I do believe in phosphorylation! I do!' with a string of DNA basepairs on the bottom (Default)
From: [personal profile] momijizukamori

Hm. That layout is actually written in S2, so somewhere IJ must have code to convert S1-style layout variables to S2 or something. S1 layout sources look fairly different (I wrote one or two, a loooong time ago). Without a converter, you'd have to effectively write most of the layout over again, at which point you may as well do it on core2 - core1 is legacy, and doesn't get all the new features we implement.

Date: 2016-01-19 06:25 pm (UTC)
momijizukamori: Green icon with white text - 'I do believe in phosphorylation! I do!' with a string of DNA basepairs on the bottom (Default)
From: [personal profile] momijizukamori

nah, the code is written for core1. Basically both core layers provide a really basic framework to build layout layers on - core2 provides a lot more framework than core1, though. A bunch of our layouts are effectively just stylesheets on top of core2, or stylesheets with a tiny bit of extra code - with core1 layouts typically had to individually write formatting code for parts of the page (which is why some of LJ's core1 layouts look really different from each other, and why custom CSS for one layout would fail basically completely on another layout).

Thinking about it - the CSS parts of the custom generator layout should work on top of that compiled source, because the element names are the same. The trouble is that it looks like the custom layout uses an S1 hack to embed extra HTML into the layout, changing the page structure - those parts would have to be re-written, I suspect.

(I hope that makes sense, I'm not fully awake right now)

Date: 2016-01-19 06:41 pm (UTC)
momijizukamori: Green icon with white text - 'I do believe in phosphorylation! I do!' with a string of DNA basepairs on the bottom (Default)
From: [personal profile] momijizukamori

Yeah, the WEBSITE and TALK_LINKS sections shove in a bunch more HTML code (which was pretty common, because free accounts couldn't actually touch the layout source on LJ), and I assume at least some of the CSS in GLOBAL_HEAD applies to that. If the extra code isn't there, the CSS for those elements don't do anything. Glad I could help!

Date: 2016-01-20 01:37 am (UTC)
marahmarie: (M In M Forever) (Default)
From: [personal profile] marahmarie
No, it's not the CSS at fault. It's something with the s1 itself (s1/s2 are LJ's names for their own versions of Perl, a specific backend coding language widely used across the web). The Perl/s1 itself does not work with Core1. There's a tiny bit more info on that here:

http://www.dreamwidth.org/support/faqbrowse?faqid=129

The upside is, if you can somehow make your CSS work on a Core1 layer (which runs LJ's old s2) or Core2 (which runs DW's newer s2) you'll get more features than LJ's s1 had (with Core2 being the most feature-rich by far).

ETA: I just realized [personal profile] momijizukamori's replies show the reason the layer compiled correctly is it was LJ's old s2 that got converted from s1. I was wondering how it could've possibly compiled myself, so that answers that question!

If it's already working as a Core1 style then it's really just a matter of getting the CSS to work with the s2 (which might require a major rewriting to match the differing HTML elements and account for any missing or extra).

Core2 would still be more feature-rich (and easier to use once up and running, because it has all the modern features that Core1's s2 lacks) so if you're going to rewrite the CSS anyway, I'd go with that.

I don't really know how to convert your layout to from Core1 or Core2, though, sorry (it's cute, though! I can see why you'd like to use it here).
Edited (typo, clarity, and just saw all the other replies, cool - added more on that) Date: 2016-01-20 01:50 am (UTC)

Profile

Dreamwidth style system discussion

April 2025

S M T W T F S
  12345
6 78910 1112
13 141516171819
2021 2223242526
27282930   

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 31st, 2025 07:50 am
Powered by Dreamwidth Studios