Skip to content

Commit

Permalink
added eo-events to loop-index
Browse files Browse the repository at this point in the history
  • Loading branch information
frebro committed Feb 26, 2012
1 parent 88e3d05 commit 419564d
Show file tree
Hide file tree
Showing 8 changed files with 93 additions and 3 deletions.
Binary file added images/unhyped-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions loop-index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php
/**
* The loop that displays events on the index page.
*
* @package WordPress
* @subpackage UNHYPED
*/

$events = eo_get_events();

if( $events ) :
$return= '<ul class="eo-events">';
foreach ($events as $event):
//Check if all day, set format accordingly
if($event->event_allday) :
$format = get_option('date_format');
else :
$format = get_option('date_format').' '.get_option('time_format');
endif;

$return .= '<li id="eo-event-'.$event->ID.'" class="eo-event"><a title="'.$event->post_title.'" href="'.get_permalink($event->ID).'"><figure class="eo-event-thumbnail">'.get_the_post_thumbnail($event->ID).'</figure><span class="eo-event-title">'.$event->post_title.'</span></a> on '.eo_format_date($event->StartDate.' '.$event->StartTime, $format).'</li>';
endforeach;

$return.='</ul>';
echo $return;
endif;

echo '<!--';
print_r($events);
echo '-->';

?>
13 changes: 13 additions & 0 deletions sass/modules/_eo-event.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

.eo-events {
@include unstyled-list;
}

.eo-event {
.eo-event-thumbnail {
img {
height: auto;
max-width: 100%;
}
}
}
1 change: 1 addition & 0 deletions sass/partials/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ $xlarge-font-size : 1.625em; // ~26px
$xxlarge-font-size : 2.125em; // ~34px

$bg-color : #eee;
$line-color : #ccc;
$text-color : #444;
$link-color : #f03;

Expand Down
9 changes: 9 additions & 0 deletions sass/partials/_media.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,12 @@
@media only screen and (-webkit-min-device-pixel-ratio: 2) {
}


/**
* Widescreen display
*/
@media all and ( min-width: 1248px ) {
#container {
width: 1218px;
}
}
36 changes: 34 additions & 2 deletions sass/partials/_page.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

$debug: false;


body {
background-color: $bg-color;
color: $text-color;
Expand All @@ -13,13 +16,42 @@ a {
#container {
@include box-sizing( border-box );
@include clearfix;
margin: $base-vmargin auto;
margin: 0 auto;
padding: $base-vmargin $base-hmargin;
width: 978px;
}

#header {
@include clearfix;
margin-bottom: 2 * $base-hmargin;
border-bottom: 1px solid $line-color;
margin-bottom: $base-hmargin;
padding-bottom: $base-hmargin;
.site-title {
@include replace-linked-text( 'unhyped-logo.png', false, true );
float: left;
margin-right: $base-hmargin;
padding-top: .25em;
}
.site-description {
font-size: $small-font-size;
float: left;
width: 20em;
}
}

// Debug colors
@if ( $debug ) {
#container {
background-color: rgba( gray, .1 );
}
#header {
background-color: rgba( purple, .1 );
}
#access {
background-color: rgba( red, .1 );
}
#main {
background-color: rgba( green, .1 );
}
}

3 changes: 3 additions & 0 deletions sass/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,8 @@ Template: synack-wpbp
// Page
@import "partials/page";

// Modules
@import "modules/eo-event";

// Media queries
@import "partials/media";
2 changes: 1 addition & 1 deletion style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 419564d

Please sign in to comment.