Skip to content

Instantly share code, notes, and snippets.

View JMWebDevelopment's full-sized avatar

Jacob Martella Web Development JMWebDevelopment

View GitHub Profile
<div class="post-area">
<div class="post-container row small-up-2 medium-up-4 large-up-5">
<div id="post-{{post.id}}" class="post post-{{post.id}} column" ng-repeat="post in posts">
<a href="{{post.link}}">
<img ng-src="{{post.featured_image}}" />
<div class="post-overlay">
<span class="day">{{ post.date | date:"dd" }}</span>
<span class="month">{{ post.date | date:"MMMM" }}</span>
</div>
</a>
<div class="post-container row small-up-2 medium-up-4 large-up-5">
<div id={{post.id}} class="post column" ng-repeat="post in new_archive_posts">
<a href="{{post.link}}">
<img ng-src="{{post.featured_image}}" />
<div class="post-overlay">
<span class="day">{{ post.date | date:"dd" }}</span>
<span class="month">{{ post.date | date:"MMMM" }}</span>
</div>
</a>
</div>
.directive('archiveLoadMore', ['$compile', '$http', function($compile, $http) {
return {
restrict: 'E',
replace: true,
templateUrl: quotidiano.partials + 'loaded-archive-post.html',
link: function($scope, element, attrs) {
$scope.paged = 2;
$scope.loadMorePosts= function() {
jQuery('.post').each( function() {
jQuery(this).removeAttr("ng-repeat");
<?php
/**
* Template Name: Player
*/
get_header(); ?>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?php
<?php if ( class_exists( 'Sports_Bench_Player' ) ) { ?>
<?php if ( get_query_var( 'player_slug' ) ) { ?>
<?php } else { ?>
<?php } ?>
<?php } ?>
<div class="player-info-top clearfix">
<div class="player-photo" style="width: 23%; padding: 0 1%; float: left; position: relative">
<?php $photo = $player->get_player_photo(); ?>
<?php if ( $photo == null ) { ?>
<img src="<?php echo plugins_url( 'sports-bench/images/mystery-person.jpg' ); ?>" />
<?php } else { ?>
<?php echo $photo; ?>
<?php } ?>
</div>
<div class="player-info-bottom clearfix">
<h4>Career Stats</h4>
<?php echo sports_bench_get_season_stats( $player ); ?>
</div>
<div id="team-select" class="row">
<select name="player-page-select" id="player-page-select">
<option value=""><?php _e( '--- Select a Team ---', 'sports-bench' ); ?></option>
<option value="0"><?php _e( 'Free Agent', 'sports-bench' ); ?></option>
<?php
$teams = sports_bench_get_teams( true );
foreach ( $teams as $team_id => $team_name ) {
echo '<option value="' . $team_id . '">' . $team_name . '</option>';
}
?>
<?php
/**
* Template Name: Player
*/
if ( get_query_var( 'player_slug' ) ) {
$player = new Sports_Bench_Player(get_query_var('player_slug'));
$team = new Sports_Bench_Team((int)$player->team_id);
}
<?php
/**
* Template Name: Team
*/
get_header(); ?>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?php