Date: 2010-06-06 03:38 pm (UTC)
afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
From: [personal profile] afuna
Okay, that sounds cool then!

This is the code to reorder your currents/tags. It moves the tags text out of the entry footer, and to above the other metadata. (That means that the previous sample CSS I gave you will no longer work, btw *g*)

You'll need to make sure to create a new theme layer and add it to your style (if you use an existing wizard layer, the changes will be lost when you next use /customize/options). Just copy and paste it in:


## reorder metadata and tags in entry
function Page::print_entry(Entry e) 
"The meat of each new layout. Describes how each page will look. In nearly all cases, the logic and decision-making processes should come from pre-existing functions in core2, and should not get written here. If you limit the structure of the page to HTML, function calls, and attached CSS, then you will be able to pick up all of the enhancements  and accessibility requirements managed by core2."
{
    ## For most styles, this will be overridden by FriendsPage::print_entry and such.
    $e->print_wrapper_start();
    """<div class="header">\n""";
    $e->print_subject();
    $e->print_metatypes();
    $e->print_time();
    """</div>\n""";
    """<div>\n""";
    """<div class="contents">\n""";
    """<div class="inner">\n""";
    $e->print_userpic();
    $e->print_poster();
    if ($*entry_metadata_position == "top") { $e->print_tags(); $e->print_metadata(); }
    $e->print_text();
    if ($*entry_metadata_position == "bottom") { $e->print_tags(); $e->print_metadata(); }
    """</div>\n""";
    """</div>\n""";
    """</div>\n""";
    """<div class="footer">\n""";
    """<div class="inner">\n""";
    $e->print_management_links();
    if ($this isa EntryPage) {
        """<hr class="above-entry-interaction-links" />""";
        $e->print_interaction_links("topcomment");
        $this->print_reply_container({ "target" => "topcomment" });
        """<hr class="below-reply-container" />""";
    }
    else {
        $e->print_interaction_links();
    }
    "</div>\n</div>\n";
    $e->print_wrapper_end();

}

function Entry::print_metadata() {
    if (size $.metadata) {
        var string position = ($*entry_metadata_position == "top") ? " top-metadata" : " bottom-metadata";
        """<div class="metadata$position">\n<ul>\n""";
        foreach var string m (["music", "mood", "groups", "xpost", "location"]) {
            if ($.metadata{$m} == "") { continue; }

            var string metadata_name = lang_metadata_title($m);
            """<li><span class="metadata-label metadata-label-$m">$metadata_name: </span>""";
            if ($m == "mood") {
                " $.mood_icon ";
            }
            """<span class="metadata-item metadata-item-$m">$.metadata{$m}</span></li>\n""";
        }
        "</ul>\n</div>\n";
    }
}



To edit the text, go here:
http://www.dreamwidth.org/customize/options?group=text

Click on the "Entry" header; that will open up, and you'll see the "Current Music/Mood/Location"



To add some spacing, use this CSS (you can put it where you usually do *g*) (Note that this adds some space, even if there's no metadata on the entry)
.entry .footer { margin-top: 1em; }

To style the entry metadata and tags, for color and stuff, start with this code:

.entry .tags { /* stuff goes here */}
.entry .metadata { /* stuff goes here*/}

And let me know if you run into any other issues!
This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

Profile

Dreamwidth style system discussion

June 2025

S M T W T F S
12345 67
891011121314
15161718192021
22232425262728
2930     

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 7th, 2025 12:52 pm
Powered by Dreamwidth Studios