Hi,
the environment:
sorry can’t setup a live test, it’s a drupal local install with fullcalendar view.
I have this collapsable element (calendar), and it works fine, save couple things:
1 - might be something wrong by me, or a code bug (?), so if it’s beyond this thread no worry, I can live with it;
when clicking to expand (show calendar) the calendar header (nav buttons) display, but the actual calendar does not till you click any of the nav buttons.
2 - the width, and content alignment of the expand/collapse “button”
right now it spans the whole width of the page, and I’d like to limit it to the width of the content, and to have the text part in more lines, but side by side of the image.
something like this:
_________
| | expand to
| image | view graphic
| | calendar of
|________| events
instead of
_________
| |
| image |
| |
|________| expand to view graphic calendar of events
I can make this by creating the image containing both image, and text in photoshop, but keeping them separate gives me more immediate control over the text, in case of editing needs.
The code I am using now:
/* collapse/expand cal-view */
#top-content-wrap {
vertical-align: top;
height:auto !important;
margin-bottom: 19px;
clear: left;
}
#hide1 a, #show1 a {
color: #fc7c01;
text-decoration: none;
background-color: #c9c9c9;
display: block;
padding: 9px;
max-width: auto;
}
.cal-view {display:none; }
.show {display: none; }
.hide:target + .show {display: inline; }
.hide:target {display: none; }
.hide:target ~ .cal-view {display:inline; }
@media print { .hide, .show { display: none; } }
/* END collapse/expand cal-view */
html (don’t know if it’s a bug in Sitepoint code, but I had to remove all opening < to be able to see the code preview, and add them back again one by one, as of now it shows fine on preview, hope it’ll be the same when I submit - not first time it occured to me)
<div id="top-content-wrap" class="column">
<div id="hide1" class="hide">
<a href="#hide1">
<img src="sites/all/themes/afz_dru_02/fz-images/cal_02_90.png" />
Expand to view graphic calendar of events /a>
</div>
<div id="show1" class="show">
<a href="#show1">
<img src="sites/all/themes/afz_dru_02/fz-images/cal_02_90.png" />
Collapse</a>
<br />Please click on "today" button for current month
<!-- needed since only header is shown at first -->
</div>
<div class="cal-view">
<!-- FZ added to show the calendar (page) view
since the block view shows only the dates when something's going on w/o differentiating overlapping events -->
<div id="cal-view" class="column">
<?php print views_embed_view('calendar_of_events', 'page'); ?>
</div>
<!-- END FZ added to show the calendar (page) view -->
</div>
</div>
Thank you