One-line calendar

Dec 10, 2008 08:20

Is it at all possible to tweak an Expressive layout (using either CSS or a theme layer) to display a calendar in a single bar at the top of the page, just like Nebula?

sidebar:calendar, s2:theme layer, advanced, $acct level:paid or perm

Leave a comment

Comments 9

av8rmike December 10 2008, 13:46:37 UTC
Sure, it's possible, but it's definitely a theme layer change and it wouldn't look exactly like it does in Nebula.

Reply

orexisbella December 10 2008, 14:38:28 UTC
I don't really want it to look exactly like Nebula, anyway. :) I just want to get it all in one row like that, then I figure I can customise the way it looks with CSS.

What do I have to put in a theme layer to get it to display in a single row?

Reply

av8rmike December 17 2008, 14:38:52 UTC
Hey, I wanted to let you know that I haven't forgotten about you! Just been a little busy with a variety of project, but I plan to get to it in the next few days.

Reply

orexisbella December 18 2008, 00:33:57 UTC
Hey Mike, no problem. :) I really appreciate you taking the time to help!

Reply


av8rmike December 18 2008, 04:24:25 UTC
This was an interesting challenge, but I basically just ended up copying the code from the Nebula layer. The calendar goes above the header image, which I hope is where you want it. I even changed the month heading into a link to the proper Month page, but you can take that out if you don't like it. I'll post the CSS in a separate comment so I don't hit the comment limit.
function Page::lay_print_header_links() {
# Print Nebula-style linear calendar above the header
var string calendar = "";
var YearMonth m = $this->get_latest_month();
var string month = $m->month_format();
if($m.has_entries) {
$calendar = """

$month  
""";
var YearWeek[] theWeeks = $m.weeks;
foreach var YearWeek w ($theWeeks) {
var YearDay[] theDays = $w.days;
var int start = $w.pre_empty;
foreach var YearDay d ($theDays) {
$start = $start + 1;
$calendar = $calendar + "\n """ + $d.day->zeropad(2) + "";
... )

Reply

orexisbella December 18 2008, 12:17:22 UTC
Hey Mike,

It's put the calendar up there (yay!), but to my consternation it seems to have wreaked havoc on my custom CSS. If you look at my journal, you'll see that the content has gotten shoved way over to the right side for no reason that I can fathom. :(

Here's my theme layer with css (which is compiling error-free), and here's the preview of what my layout used to look like.

Thanks again for your help! :)

Reply

av8rmike December 18 2008, 14:35:42 UTC
Try adding set use_vox_base = false; to your theme layer code. I think the base style sheets will screw up grrliz's code if you don't disable them.

Reply

orexisbella December 18 2008, 15:12:44 UTC
It's working perfectly now! Thank you so much, it looks fabulous :)

Reply


av8rmike December 18 2008, 04:26:22 UTC
Here's the CSS that you can tweak to make the colors suit your theme (I think they came from the default Nebula theme). Don't hesitate to let me know if something doesn't work right or if you want to change something else.

.MiniCalContainer { background:#8381DA; border:2px solid #000000; }
.MiniCalDayPosts { font-weight:bold;}
td.MiniCalWeekend { background-color:#3C38C0;}
td.MiniCalDay, td.MiniCalDayPosts { color:#FFFFFF; font-family:Trebuchet,Verdana,sans-serif; font-size:0.95em; }
.MiniCalDay a, .MiniCalDay a:active, .MiniCalDayPosts a, .MiniCalDayPosts a:active { color:#000000; }
.MiniCalDay a:visited, .MiniCalDayPosts a:visited { color:#000000; }

Reply


Leave a comment

Up