Skip to content

Commit

Permalink
Added Description and show/hide on focus
Browse files Browse the repository at this point in the history
  • Loading branch information
bronius committed May 30, 2014
1 parent f57068d commit 9ae2298
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
15 changes: 13 additions & 2 deletions css/program-events.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ body {
}
#events-ui #details {
width: 417px;
font-variant: small-caps;
}

#events-ui #thumbs a {
Expand All @@ -44,7 +43,7 @@ body {
#events-ui #details a {
display: block;
background-color: #333;
color: white;
color: #ddd;
text-decoration: none;
}
#events-ui #thumbs a .text,
Expand Down Expand Up @@ -74,3 +73,15 @@ body {
font-size: 10px;
}

#events-ui #details .organization {
font-variant: small-caps;
}

#events-ui #details .description {
padding: 1em;
color: white;
display: none;
}
#events-ui #details .active .description {
display: block;
}
3 changes: 2 additions & 1 deletion js/program-events.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ function wizardScrollTo(container, block, id, href, clicked_element) {
var targetblock = $('a[name="'+blockid+'"]');
$(container + ' .active').toggleClass('active');
targetblock.toggleClass('active');
// Scroll related blocks into view
if (clicked_element != block) {
var top = targetblock.position().top + $(container).scrollTop() - 250;
var top = targetblock.position().top + $(container).scrollTop() - 250;
$(container).animate({
scrollTop: top
}, 500, function () {
Expand Down
8 changes: 6 additions & 2 deletions program-events.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,21 @@
$filename = $event['Image'];
$eventname = $event['Event Name'];
$organization = $event['Org Name'];
$description = $event['Description'];
$location = $event['Location'];
$datetime = $event['Start Date'] . (isset($event['Start Time']) ? ' ' . $event['Start Time'] . '' : '');
$datetime .= isset($event['End Date']) ? ' - ' . $event['End Date'] . ' ' . $event['End Time'] : '';
?>
<a href="#event-<?php echo $id; ?>" name="info-<?php echo $id; ?>">
<img src="images/380x245/<?php echo $filename; ?>?<?php echo $id; ?>" />
<div class="text">
<?php echo $organization; ?>:<br/>
<div class="organization"><?php echo $organization; ?>:</div>
<?php echo $datetime; ?><br/>
<?php echo $eventname; ?><br/>
<?php echo $location; ?>
<?php echo $location; ?><br/>
<div class="description">
<?php echo $description; ?>
</div>
</div>
</a>
<?php
Expand Down

0 comments on commit 9ae2298

Please sign in to comment.