Entry tags:
it's been one of those weekends
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
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
Function
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.)
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?]
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
function
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
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.]
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]](https://www.dreamwidth.org/img/silk/identity/user.png)
[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]](https://www.dreamwidth.org/img/silk/identity/user.png)
[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.]
no subject
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.
no subject
no subject
no subject
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 :/
no subject
no subject
Use a
float:left
instead of afloat: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
no subject
no subject