Adventures in layouts:

I changed mine! It does not work in IE very well. I will--rage about that later. And Im almost done with another one for a friend that acts like it's working, but I am wary.

The new layout is open to taking if anyone particularly wants it, but it has a couple of bugs, and the CSS is still a mess that I haven't cleaned up, being involved in a face-off with the horizontal calendar. It's set to public if anyone wants to look at the code or use any of it. I'm also still not sure of the hover-background color change--it was neat to do! But not so neat to use. I don't know. I'm torn.

This is where I realized what the user level was for. Seriously, I am so getting into that.

Adventures with documentation:

I haven't added much to the wiki, as it takes forever to code it into readability, but doing the preliminary work in Notetab and adding a bit every time I go in to play with the core functions and properties and sometimes, I almost think I understand! Then I realize I don't.

It's somewhat lowering and yet exciting I am still falling over things that make no sense to me.



So I found out while reading Lj's s2 core documentation that you can write your own properties. Properties are important. Yes, obviously I just realized this myself, hence the italics.

I've been working on a layout for [personal profile] winterlive with the new layout options (all columns, all the time) and while staring blankly at the CSS--my understanding of current CSS is growing in leaps and bounds by dint of staring at it in horror and asking why, God, why, I realized that the new layouts totally did not allow modules to be in the header, and the navigation menu (Recent Entries, Friends, etc, if you have the negatives layout, that thing below the control strip) could no longer go where I wanted it to go, and also, holy floating id's, Batman. I am not good with complicated floats. They scare me and require negative values.

[This is where I point out, this is how I learn. It requires a lot of disaster before I get a success to work.]

I also found the custom text function that will soon be added. After staring at it for a while, I realized I wanted to see if I could do the custom text in column without it.

[Also because I could follow all of it but the fact that I didnt't have anywhere to put the actual text using it. That sort of thing doesn't go in the layout normally. That goes--somewhere else. I'm not sure? Where our actual entries are stored, maybe?]

This, I realized, was a problem, until I realized that there was a user layer for a reason. That reason, of course, is for me to dump custom text to add to my account until teh customtext functions and interface are activated.

For anyone who wants to try. This will require editing the layout layers.

Custom Text Function Until DW Implements Theirs, Which Will Be So Much Better

On the layout layer:

Property

property string text_sidebar_quotes {
    des = "For sidebar quotes title";
    note = "Adds links to sidebar";
    noui = 1;
}

property string[] text_content{
    des = "For sidebar quotes";
    note = "Adds quotes to sidebar";
    noui = 1;
}

property use text_sidebar_quotes;
property use text_content;


Function

function Page::lay_print_customtext()
{
    var int high = 0;
    print safe """<h2 class="module-header">$*text_sidebar_quotes</h2>""";
    print safe """<div class="module-content"><div class="customtext">""";
    print safe """<ul>""";
    while ($high <= 20)
    {
    print safe """<li>$*text_content[$high]</li>""";
    $high=$high+1;
    }

    """</ul></div></div>""";
}


I do all declarations right after layerinfo but before anything else. That way, I can see what I messed up first.

[Exciting moment: using while. That's my favorite. Screw for and foreach--I have yet to meet a program that I could not change to while. Yes. Insane preferences are insane.

Properties need to be defined before being declared and then called. They're like functions, but don't--so far--require lay in front of them

They come in three pieces--the defintion, the use thing, and then the code to set what it says. They are extremely easy to throw in there.

The first property creates a module header that I imaginatively called Quotes. The second is the quote content. The first is a simple single variable. The second, with the bracket-things, creates an array so there can be multiples, and you can use ul and li in css for formatting.

This is where it gets tricky unless you are used to using layout and user layers simultaneously, and I'm the genius who just figured out why that's a good idea. Because I am swift like that.

Create a user layer and hook it up to the layout. On the user layer:

set text_sidebar_quotes = "Quotes"; #this is the title
set text_content = ["Thing here", "Thing here", "Thing here", Thing here"]; #this is your content

[You will need to go to Styles and edit the one you use to point to the user layer, not the layout layer. I can tell this is going to be useful and frustrating. The layout is very long and moving all the sets and the css to the user will be awesome. But it will mean I need to keep both open when editing and remember to compile both when I make changes.]

The array in text-content is controlled in format by the divs in the function. I used the divs already created for the modules to save myself stress, but I created one CSS called customtext for it that should be added to the layout layer (I think it can be added to the user layer; I mean, I know it can. But I think you have to instruct the layout layer that you are doing so or it gets confused. It's a long story and user layers and I had a terrible argument and a messy layout. It was tragic.)

.customtext {
    margin-top:4px;
    margin-bottom:4px;
    text-align:right;
    font-size:.75em;
}


Feel free to take if anyone wants to, improve, change, whatever.

Navigation Module Movement

Also, for anyone who really wants their navigation in the header; okay, I cheated and copied the function and renamed it so it would be grafted into the Page class. This is because it wouldn't easily let itself be thrown into the Page::print() easily and because I was in a hurry and it was easier to do it this way. Much easier.

[You will need to remember to adjust your modules so you set this one not to show. I mean, you don't have to if you don't assign it to one or two, I don't think, but why not?]

function Page::lay_navlinks()
{
var Page p = get_page();
    open_module("navlinks", "", "");
    var string[] links = [];
    foreach var string k ($p.views_order) {
	var string css = "";
	if ($p.view == $k) { $css = """ class="navlinks" """; }
        $links[size $links] = """<a href="$p.view_url{$k}"$css>"""+lang_viewname($k)+"""</a>""";
    }
    print_module_list($links);
    close_module();
}


$this->lay_navlinks();


Take this and insert it into the header in Page::print() inside header and voila! You will still have to format it, but go crazy.

Modules to the Side

If you are fine with it in the side, but um, maybe anal about wanting it to have a head title like everyone else, I couldn't find anything in the core that covered that, but if anyone finds it, tell me! Anyway, I was working on winterlive's layout and was getting--anal--about it just being there with no title. So there are a lot of ways to do it, but I like falling over obscure solutions because it entertains me.

This is layout layer as well.

property
property string text_nav_module {
    des="for navigation menu";
}
property use text_nav_module;


function

function print_module_navlinks() {
    var Page p = get_page();
    var string title ="";
    open_module("navlinks", $*text_nav_module,"");
    var string[] links = [];
    foreach var string k ($p.views_order) {
	var string css = "";
	if ($p.view == $k) { $css = """ class="current" """; }
        $links[size $links] = """<a href="$p.view_url{$k}"$css>"""+lang_viewname($k)+"""</a>""";
    }
    print_module_list($links);
    close_module();
}


I didn't write this function, I just added a title to the what open_module is getting.

Set the text as so:

set text_nav_module = "Navigation Title";

On line four, it was open_module ("navlinks", "", ""); I added the $text_nav_module so it would call a title for the nav menu. It will now act like any other module with a title now. So far. The law of unintended consequences could occur with taking away one fo the empty "", but I checked against page summary and the other modules and it doesnt' seem to be used for anything here So there you go.

And that ends What Seperis Learned This Week. Tune in for later issues, when I work out how the hell to get the horizontal calendar in tertiary class to stop going straight up against the header in IE instead of staying decently at the bottom of the page. I never hated IE quite as much as when [personal profile] shinetheway told me it was doing that. And some weird margining that isnt'--acting quite as it should. Stupid margins.

[Currently I'm vaguely obsessed with adding conditional arguments to everything. If you are on this page you see this but not this and only when this happens with this userpic. Somewhere, my first instructor is waking up in a cold sweat and flashbacking to the moment of epiphany I had with rock, paper, scissors and wanting to cry. Just a little.]
ratcreature: RL? What RL? RatCreature is a net addict.  (what rl?)

From: [personal profile] ratcreature Date: 2009-05-18 11:57 am (UTC)
I realized that the new layouts totally did not allow modules to be in the header

Yeah. That's the main thing I dislike about the Tabula Rasa style. I'd love to have the navigation links horizontal, but somehow you can't. So I may try your layer fix, though mostly I still hope soon people will just have written some style that looks as I'd like my journal to look, which is with two columns, page summary and tags on the left, the main navigation horizontal, and the icons on the left of the entry with the name below. I'm flexible about other stuff, but I hate the icon on the right, or icons without names below.
ratcreature: Tech-Voodoo: RatCreature waves a dead chicken over a computer. (voodoo)

From: [personal profile] ratcreature Date: 2009-05-18 12:13 pm (UTC)
The icons work okay for me in Tabula Rasa. I just added some CSS I ganked from [personal profile] gnatkip and that put them in the right place without having to do anything with layers.
snakeling: Statue of the Minoan Snake Goddess (Default)

From: [personal profile] snakeling Date: 2009-05-18 03:07 pm (UTC)
That's the main thing I dislike about the Tabula Rasa style.
That's why I prefer Transmogrified. If you don't use the default stylesheet at all, it's just as flexible as Tabula Rasa. Though it doesn't allow two columns, so it won't be any help to you :/
ratcreature: RatCreature as a sloth (sloth)

From: [personal profile] ratcreature Date: 2009-05-18 04:29 pm (UTC)
Transmogrified has two columns though I don't like that the modules are on the right. That might be fixable with enough effort but last I checked you couldn't just pick. Mostly I'm just lazy and hope that someone else will do the work. I mean, my layout preferences aren't exactly exotic. So I'm sure in a few weeks someone will have made something, and I can just reap the benefits.
snakeling: Statue of the Minoan Snake Goddess (Default)

From: [personal profile] snakeling Date: 2009-05-18 04:33 pm (UTC)
That might be fixable with enough effort but last I checked you couldn't just pick.
Use a float:left instead of a float:right, fudge a little with the margins, and it should do it :)

But yeah, given the state of betaness the styles are in right now, I'm not too fussed about things either :P
domtheknight: espresso machine brewing into little white mugs (Default)

From: [personal profile] domtheknight Date: 2009-05-18 11:41 pm (UTC)
I am styles-dumb but I love this entry.
bead: (Default)

From: [personal profile] bead Date: 2009-05-19 04:02 am (UTC)
I am mesmerized by the hopping bunny in your mood theme.

Profile

seperis: (Default)
seperis

Tags

Quotes

  • If you don't send me feedback, I will sob uncontrollably for hours on end, until finally, in a fit of depression, I slash my wrists and bleed out on the bathroom floor. My death will be on your heads. Murderers
    . -- Unknown, on feedback
    BTS List
  • That's why he goes bad, you know -- all the good people hit him on the head or try to shoot him and constantly mistrust him, while there's this vast cohort of minions saying, We wouldn't hurt you, Lex, and we'll give you power and greatness and oh so much sex...
    Wow. That was scary. Lex is like Jesus in the desert.
    -- pricklyelf, on why Lex goes bad
    LJ
  • Obi-Wan has a sort of desperate, pathetic patience in this movie. You can just see it in his eyes: "My padawan is a psychopath, and no one will believe me; I'm barely keeping him under control and expect to wake up any night now to find him standing over my bed with a knife!"
    -- Teague, reviewing "Star Wars: Attack of the Clones"
    LJ
  • Beth: god, why do i have so many beads?
    Jenn: Because you are an addict.
    Jenn: There are twelve step programs for this.
    Beth: i dunno they'd work, might have to go straight for the electroshock.
    Jenn: I'm not sure that helps with bead addiction.
    Beth: i was thinking more to demagnitize my credit card.
    -- hwmitzy and seperis, on bead addiction
    AIM, 12/24/2003
  • I could rape a goat and it will DIE PRETTIER than they write.
    -- anonymous, on terrible writing
    AIM, 2/17/2004
  • In medical billing there is a diagnosis code for someone who commits suicide by sea anenemoe.
    -- silverkyst, on wtf
    AIM, 3/25/2004
  • Anonymous: sorry. i just wanted to tell you how much i liked you. i'd like to take this to a higher level if you're willing
    Eleveninches: By higher level I hope you mean email.
    -- eleveninches and anonymous, on things that are disturbing
    LJ, 4/2/2004
  • silverkyst: I need to not be taking molecular genetics.
    silverkyst: though, as a sidenote, I did learn how to eviscerate a fruit fly larvae by pulling it's mouth out by it's mouthparts today.
    silverkyst: I'm just nowhere near competent in the subject material to be taking it.
    Jenn: I'd like to thank you for that image.
    -- silverkyst and seperis, on more wtf
    AIM, 1/25/2005
  • You know, if obi-wan had just disciplined the boy *properly* we wouldn't be having these problems. Can't you just see yoda? "Take him in hand, you must. The true Force, you must show him."
    -- Issaro, on spanking Anakin in his formative years
    LJ, 3/15/2005
  • Aside from the fact that one person should never go near another with a penis, a bottle of body wash, and a hopeful expression...
    -- Summerfling, on shower sex
    LJ, 7/22/2005
  • It's weird, after you get used to the affection you get from a rabbit, it's like any other BDSM relationship. Only without the sex and hot chicks in leather corsets wielding floggers. You'll grow to like it.
    -- revelininsanity, on my relationship with my rabbit
    LJ, 2/7/2006
  • Smudged upon the near horizon, lapine shadows in the mist. Like a doomsday vision from Watership Down, the bunny intervention approaches.
    -- cpt_untouchable, on my addition of The Fourth Bunny
    LJ, 4/13/2006
  • Rule 3. Chemistry is kind of like bondage. Some people like it, some people like reading about or watching other people doing it, and a large number of people's reaction to actually doing the serious stuff is to recoil in horror.
    -- deadlychameleon, on class
    LJ, 9/1/2007
  • If imitation is the sincerest form of flattery, then Fan Fiction is John Cusack standing outside your house with a boombox.
    -- JRDSkinner, on fanfiction
    Twitter
  • I will unashamedly and unapologetically celebrate the joy and the warmth and the creativity of a community of people sharing something positive and beautiful and connective and if you don’t like it you are most welcome to very fuck off.
    -- Michael Sheen, on Good Omens fanfic
    Twitter
    , 6/19/2019
  • Adding for Mastodon.
    -- Jenn, traceback
    Fosstodon
    , 11/6/2022

Credit

November 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 2022
Page generated Jun. 6th, 2025 03:50 am
Powered by Dreamwidth Studios