Lisa Fewell (liabunny) wrote in component_help,
Lisa Fewell
liabunny
component_help

Answers to some FAQs, and other useful things...

I was going through old entries, looking for something, and I noticed some things that have been asked a few times, either in posts or comments. So I thought I'd go ahead and combine some of those answers here for everyone... and this makes it a little easier for me to just add this to the memories instead of adding a ton of posts there just for little things like this...


Aligning the text in the Navigation Bar
In your style sheet, add in:

.header { text-align: CENTER OR RIGHT; }

If you already have .header in your stylesheet, just add in text-align: CENTER OR RIGHT; to it.

Where I put CENTER OR RIGHT, just put in either center or right (left is default).

Default User-Icon Code
If you want to put your default user-icon in a text box or somewhere in your layout, use $p.journal.default_pic

Getting rid of the border around user-pics
Add this into your stylesheet: .userpic {border-width:0px; }

Putting an image between your comment links
In your theme layer, put this:

function CommentInfo::print() {
    if (not $.enabled) { return; }
    if ($.count > 0 or $.screened) {
        $this->print_readlink();
        """ <img src="IMAGE URL" /> """;
    }
    $this->print_postlink();
}


Change IMAGE URL to the url of the image you want to use.

Combining Features in Your Layer
A few people have posted saying they had problems combinging different features, like having the profile override *and* free text overrides *and* overriding the stylesheet, etc... I posted this in a comment to someone who asked about this, but I'm gonna go ahead and repeat it here.

Just keep adding all your code to the theme layer. For instance...

function print_stylesheet() {
"""
ALL YOUR STYLESHEET OVERRIDES GO HERE
""";
}

function print_free_text(Page p) {
ALL YOUR FREE_TEXT COMPONENTS GO HERE
)

function print_profile(Page p) {
print_comp_header("profile");
"""
ALL YOUR PROFILE OVERRIDES GO HERE
""";
print_comp_footer();
}


From that you should be able to follow the tutorials and combine them together.

Customizing drop-down menus
On the "Post a Comment" page, if you are using a dark background, you may have a problem seeing the text in the drop-down menus (mood menu, icon menu). To change this, put this in your stylesheet:

select {
font-family: Arial, sans-serif;
font-size: 11px;
background-color: #ffffff;
color: #000000;
}


That will give you a white background with black text in the menu, but of course you can change that if you want.

Making the background of the entries transparent
Add this in your stylesheet:
td.entry { background-color: transparent; }

Or... To set how much transparency is there, use this:
td.entry { filter:alpha(opacity=65); -moz-opacity:0.65; }
Tags: admin: deprecated, user: liabunny
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 29 comments
Previous
← Ctrl ← Alt
Next
Ctrl → Alt →
Previous
← Ctrl ← Alt
Next
Ctrl → Alt →