Skip to content

Migrated plugins.jquery.com to the new-new-css #99

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Oct 16, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
138 changes: 37 additions & 101 deletions themes/plugins.jquery.com/content-jquery_plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,105 +9,41 @@
?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="entry-content clearfix">
<div id="content">
<h1 class="entry-title"><?php the_title(); ?></h1>
<p class="attribution">by <?php echo jq_release_author(); ?></p>
<div class="block description">
<?php the_content(); ?>
</div> <!-- /.description -->

<hr />

<?php if ( $keywords = jq_release_keywords() ) { ?>
<div class="block tags">
<h2>Tags</h2>
<?php echo $keywords; ?>
</div> <!-- /.tags -->

<hr />

<?php } ?>
<div class="block versions">
<h2>Versions</h2>
<table>
<thead>
<tr>
<th class="version-head">Version</th>
<th class="release-date-head">Date</th>
</tr>
</thead>
<tbody>
<?php foreach( jq_plugin_versions() as $version ) : ?>
<tr>
<td class="version"><?php echo $version[ 'link' ]; ?></td>
<td class="release-date"><?php echo date_format(new DateTime($version[ 'date' ]), "M j Y"); ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div><!-- /.versions -->
</div> <!-- /.plugin-main -->
<div class="plugin-metadata">
<div class="block toolbox">
<div class="inner">
<header class="clearfix">
<div class="version-info">
<p class="version-number"><?php echo jq_release_version(); ?></p>
<p class="caption">Version</p>
</div> <!-- /.version-info -->
<div class="release-info">
<p class="date"><?php echo jq_release_date(); ?></p>
<p class="caption">Released</p>
</div>
</header>
<div class="body">
<a class="download" href="<?php echo jq_release_download_url(); ?>">
<span class="inner-wrapper"><span class="icon-download-alt"></span>Download now</span>
</a>
<a class="other-link gh-fork" href="<?php echo jq_plugin_repo_url(); ?>"><span class="icon-github"></span>Fork on GitHub</a>
<a class="other-link view-homepage" href="<?php echo jq_release_homepage(); ?>"><span class="icon-external-link"></span>View Homepage</a>
<a class="other-link demo" href="<?php echo jq_release_demo(); ?>"><span class="icon-eye-open"></span>Try a Demo</a>
<a class="other-link read-docs" href="<?php echo jq_release_docs(); ?>"><span class="icon-file"></span>Read the Docs</a>
</div> <!-- /.body -->
</div> <!-- /.inner -->
</div> <!-- /.toolbox -->

<div class="block github-activity group">
<h3><span class="icon-github"></span>GitHub Activity</h3>
<div class="box">
<div class="info-block watchers">
<p class="number"><?php echo jq_plugin_watchers(); ?></p>
<p class="caption">Watchers</p>
</div> <!-- /.watchers -->
<div class="info-block forks">
<p class="number"><?php echo jq_plugin_forks(); ?></p>
<p class="caption">Forks</p>
</div> <!-- /.forks -->
</div> <!-- /.box -->
</div> <!-- /.github-activity -->
<div class="block author-info">
<h3><span class="icon-user"></span>Author</h3>
<ul>
<li class="icon-caret-right"><?php echo jq_release_author(); ?></li>
</ul>
</div> <!-- /.author-info -->
<?php if ( $maintainers = jq_release_maintainers() ) { ?>
<div class="block maintainer-info">
<h3><span class="icon-wrench"></span>Maintainers</h3>
<?php echo $maintainers; ?>
</div> <!-- /.maintainer-info -->
<?php } ?>
<div class="block licenses">
<h3><span class="icon-book"></span>Licenses</h3>
<?php echo jq_release_licenses(); ?>
</div> <!-- /.licenses -->
<div class="block dependencies">
<h3><span class="icon-sitemap"></span>Dependencies</h3>
<?php echo jq_release_dependencies(); ?>
</div> <!-- /.dependencies -->
</div> <!-- /.plugin-metadata -->
</div><!-- .entry-content -->
<footer class="entry-meta">
</footer><!-- .entry-meta -->

<h1 class="entry-title"><?php the_title(); ?></h1>
<p class="attribution">by <?php echo jq_release_author(); ?></p>
<div class="block description">
<?php the_content(); ?>
</div> <!-- /.description -->

<hr/>

<?php if ( $keywords = jq_release_keywords() ) { ?>
<div class="block tags">
<h2>Tags</h2>
<?php echo $keywords; ?>
</div> <!-- /.tags -->
<hr/>
<?php } ?>

<div class="block versions">
<h2>Versions</h2>
<table>
<thead>
<tr>
<th class="version-head">Version</th>
<th class="release-date-head">Date</th>
</tr>
</thead>
<tbody>
<?php foreach( jq_plugin_versions() as $version ) : ?>
<tr>
<td class="version"><?php echo $version[ 'link' ]; ?></td>
<td class="release-date"><?php echo date_format(new DateTime($version[ 'date' ]), "M j Y"); ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div><!-- /.versions -->

</article><!-- #post-<?php the_ID(); ?> -->
34 changes: 16 additions & 18 deletions themes/plugins.jquery.com/content-single.php
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
<?php
/**
* The template for displaying content in the single.php template
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

<div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->

</article><!-- #post-<?php the_ID(); ?> -->
<?php
/**
* The template for displaying content in the single.php template
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
</article><!-- #post-<?php the_ID(); ?> -->
82 changes: 41 additions & 41 deletions themes/plugins.jquery.com/content.php
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
<?php
/**
* The default template for displaying content
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php if ( is_sticky() ) : ?>
<hgroup>
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<h3 class="entry-format"><?php _e( 'Featured', 'twentyeleven' ); ?></h3>
</hgroup>
<?php else : ?>
<h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
<?php endif; ?>
</header><!-- .entry-header -->
<?php if ( is_search() ) : // Only display Excerpts for Search ?>
<div class="entry-summary">
<p>
Version <?php $latest = get_post_meta( $post->ID, 'latest' ); echo $latest[0]; ?> -
Released <?php echo human_time_diff( get_the_time('U'), current_time('timestamp') ) . ' ago.'; ?>
<br>
Tags: <?php the_terms( $post->ID, 'post_tag' ); ?>
</p>
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
<?php else : ?>
<div class="entry-content">
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<?php endif; ?>
</article><!-- #post-<?php the_ID(); ?> -->
<?php
/**
* The default template for displaying content
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php if ( is_sticky() ) : ?>
<hgroup>
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<h3 class="entry-format"><?php _e( 'Featured', 'twentyeleven' ); ?></h3>
</hgroup>
<?php else : ?>
<h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
<?php endif; ?>

</header><!-- .entry-header -->

<?php if ( is_search() ) : // Only display Excerpts for Search ?>
<div class="entry-summary">
<p>
Version <?php $latest = get_post_meta( $post->ID, 'latest' ); echo $latest[0]; ?> -
Released <?php echo human_time_diff( get_the_time('U'), current_time('timestamp') ) . ' ago.'; ?>
<br>
Tags: <?php the_terms( $post->ID, 'post_tag' ); ?>
</p>
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
<?php else : ?>
<div class="entry-content">
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<?php endif; ?>

</article><!-- #post-<?php the_ID(); ?> -->
87 changes: 43 additions & 44 deletions themes/plugins.jquery.com/excerpt.php
Original file line number Diff line number Diff line change
@@ -1,44 +1,43 @@
<?php
/**
* The template for displaying an excerpt
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php if ( is_sticky() ) : ?>
<hgroup>
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<h3 class="entry-format"><?php _e( 'Featured', 'twentyeleven' ); ?></h3>
</hgroup>
<?php else : ?>
<h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
<?php endif; ?>

</header><!-- .entry-header -->

<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->

<footer class="entry-meta">
<?php $show_sep = false; ?>
<?php
/* translators: used between list items, there is a space after the comma */
$tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
if ( $tags_list ):
if ( $show_sep ) : ?>
<span class="sep"> | </span>
<?php endif; // End if $show_sep ?>
<span class="tag-links">
<?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list );
$show_sep = true; ?>
</span>
<?php endif; // End if $tags_list ?>

</footer><!-- #entry-meta -->
</article><!-- #post-<?php the_ID(); ?> -->
<?php
/**
* The template for displaying an excerpt
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php if ( is_sticky() ) : ?>
<hgroup>
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<h3 class="entry-format"><?php _e( 'Featured', 'twentyeleven' ); ?></h3>
</hgroup>
<?php else : ?>
<h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
<?php endif; ?>
</header><!-- .entry-header -->

<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->

<footer class="entry-meta">
<?php $show_sep = false; ?>
<?php
/* translators: used between list items, there is a space after the comma */
$tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
if ( $tags_list ):
if ( $show_sep ) : ?>
<span class="sep"> | </span>
<?php endif; // End if $show_sep ?>
<span class="tag-links">
<?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list );
$show_sep = true; ?>
</span>
<?php endif; // End if $tags_list ?>

</footer><!-- #entry-meta -->
</article><!-- #post-<?php the_ID(); ?> -->
12 changes: 6 additions & 6 deletions themes/plugins.jquery.com/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function jq_new_plugins($total = 10) {
while ( $new_plugins->have_posts() ) :
$new_plugins->the_post();
?>
<li class="icon-caret-right">
<li>
<a href="/<?php echo $post->post_name; ?>/"><?php echo $post->post_title; ?></a>
</li>
<?php
Expand Down Expand Up @@ -105,7 +105,7 @@ function jq_updated_plugins( $total = 10 ) {
$parent = get_post( $parent_id );

?>
<li class="icon-caret-right">
<li>
<a href="/<?php echo $parent->post_name . '/' . $post->post_name ?>/"><?php echo $post->post_title; ?></a><br />
(version <?php echo $post->post_name; ?>)
</li>
Expand Down Expand Up @@ -178,7 +178,7 @@ function jq_release_licenses() {
foreach( $pkg->licenses as $license ) {
$url = htmlspecialchars( $license->url );
$type = empty( $license->type ) ? $url : htmlspecialchars( $license->type );
$ret .= "<li class=\"icon-caret-right\"><a href='$url'>$type</a></li>";
$ret .= "<li><a href='$url'>$type</a></li>";
}
$ret .= '</ul>';
return $ret;
Expand All @@ -193,7 +193,7 @@ function jq_release_maintainers( $options = array('avatar' => false) ) {

$ret = '<ul>';
foreach( $pkg->maintainers as $maintainer ) {
$ret .= '<li class="icon-caret-right">' . person( $maintainer, $options['avatar'] ) . '</li>';
$ret .= '<li>' . person( $maintainer, $options['avatar'] ) . '</li>';
}
$ret .= '</ul>';
return $ret;
Expand All @@ -209,9 +209,9 @@ function jq_release_dependencies() {
$ret = '<ul>';
foreach( $pkg->dependencies as $plugin => $version ) {
if ( get_page_by_path( $plugin ) ) {
$ret .= "<li class=\"icon-caret-right\"><a href='/$plugin'>$plugin</a> $version</li>";
$ret .= "<li><a href='/$plugin'>$plugin</a> $version</li>";
} else {
$ret .= "<li class=\"icon-caret-right\">$plugin $version</li>";
$ret .= "<li>$plugin $version</li>";
}
}
$ret .= '</ul>';
Expand Down
Binary file added themes/plugins.jquery.com/images/bullet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading