[personal profile] magz posting in [community profile] style_system
I'm attempting to poke together a layout using Paletteable, and was wondering if there was a way to move the username of the poster so it's right-aligned, opposite the timestamp on the entry. I've tried floating it and modifying the margins, but because of the order in which things print in the layout, the username gets stuck to the left of the user icon.

Is there a bit of code I could rearrange so that the poster prints first and then the user icon, which I could then toss into the theme layer? I've been looking through the Palettable and DW s2 source codes and unless I'm scrolling past it, I haven't found what I'm looking for so far.

Any suggestions?

[ETA] In the meantime I've done a messy bit of work with margins which seems to be working for now:

.poster, .entry-poster {
margin-top: -30px;
margin-right: -80px;
float: right;
}

Date: 2011-12-28 12:23 am (UTC)
branchandroot: oak against sky (Default)
From: [personal profile] branchandroot
If you still want to try the S2 way, I think this is the function you want:

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();
"""
\n""";
$e->print_subject();
$e->print_metatypes();
$e->print_time();
"""
\n""";
"""
\n""";
"""
\n""";
"""
\n""";
$e->print_userpic();
$e->print_poster();
if ($*entry_metadata_position == "top") { $e->print_metadata(); }
$e->print_text();
if ($*entry_metadata_position == "bottom") { $e->print_metadata(); }
"""
\n""";
"""
\n""";
"""
\n""";

"""
\n""";
"""
\n""";
$e->print_tags();
$this->print_entry_footer($e);
"
\n
\n";

$e->print_wrapper_end();

}


If you move print_poster up into the header, just below print_time, then you should be able to float them left and right, clear the title, and have them align the way you want.
(reply from suspended user)

Profile

Dreamwidth style system discussion

June 2025

S M T W T F S
1234567
891011121314
15161718 1920 21
22232425262728
2930     

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 24th, 2025 03:19 pm
Powered by Dreamwidth Studios