Skip to content

Commit 5a446b8

Browse files
committed
Initial migration of plugins site to new-new-css.
Mostly straightforward migration to the new-new CSS framework, cross-referencing the new foundation site with the old stage.jquery.com. Major changes include: - Split the sidebar from content-jquery_plugin.php off into its own include, sidebar-jquery_plugin.php - Removed several no-longer-necessary wrapper divs - Cleaned-up style.css organization; it had gotten messy Remaining issues: - Single-plugin page project info is still broken - Lots of pruning still required to remove styles that are now in base - Media queries haven't yet been migrated
1 parent e1bba2e commit 5a446b8

14 files changed

+771
-767
lines changed

themes/plugins.jquery.com/content-jquery_plugin.php

Lines changed: 37 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -9,105 +9,41 @@
99
?>
1010

1111
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
12-
<div class="entry-content clearfix">
13-
<div id="content">
14-
<h1 class="entry-title"><?php the_title(); ?></h1>
15-
<p class="attribution">by <?php echo jq_release_author(); ?></p>
16-
<div class="block description">
17-
<?php the_content(); ?>
18-
</div> <!-- /.description -->
19-
20-
<hr />
21-
22-
<?php if ( $keywords = jq_release_keywords() ) { ?>
23-
<div class="block tags">
24-
<h2>Tags</h2>
25-
<?php echo $keywords; ?>
26-
</div> <!-- /.tags -->
27-
28-
<hr />
29-
30-
<?php } ?>
31-
<div class="block versions">
32-
<h2>Versions</h2>
33-
<table>
34-
<thead>
35-
<tr>
36-
<th class="version-head">Version</th>
37-
<th class="release-date-head">Date</th>
38-
</tr>
39-
</thead>
40-
<tbody>
41-
<?php foreach( jq_plugin_versions() as $version ) : ?>
42-
<tr>
43-
<td class="version"><?php echo $version[ 'link' ]; ?></td>
44-
<td class="release-date"><?php echo date_format(new DateTime($version[ 'date' ]), "M j Y"); ?></td>
45-
</tr>
46-
<?php endforeach; ?>
47-
</tbody>
48-
</table>
49-
</div><!-- /.versions -->
50-
</div> <!-- /.plugin-main -->
51-
<div class="plugin-metadata">
52-
<div class="block toolbox">
53-
<div class="inner">
54-
<header class="clearfix">
55-
<div class="version-info">
56-
<p class="version-number"><?php echo jq_release_version(); ?></p>
57-
<p class="caption">Version</p>
58-
</div> <!-- /.version-info -->
59-
<div class="release-info">
60-
<p class="date"><?php echo jq_release_date(); ?></p>
61-
<p class="caption">Released</p>
62-
</div>
63-
</header>
64-
<div class="body">
65-
<a class="download" href="<?php echo jq_release_download_url(); ?>">
66-
<span class="inner-wrapper"><span class="icon-download-alt"></span>Download now</span>
67-
</a>
68-
<a class="other-link gh-fork" href="<?php echo jq_plugin_repo_url(); ?>"><span class="icon-github"></span>Fork on GitHub</a>
69-
<a class="other-link view-homepage" href="<?php echo jq_release_homepage(); ?>"><span class="icon-external-link"></span>View Homepage</a>
70-
<a class="other-link demo" href="<?php echo jq_release_demo(); ?>"><span class="icon-eye-open"></span>Try a Demo</a>
71-
<a class="other-link read-docs" href="<?php echo jq_release_docs(); ?>"><span class="icon-file"></span>Read the Docs</a>
72-
</div> <!-- /.body -->
73-
</div> <!-- /.inner -->
74-
</div> <!-- /.toolbox -->
75-
76-
<div class="block github-activity group">
77-
<h3><span class="icon-github"></span>GitHub Activity</h3>
78-
<div class="box">
79-
<div class="info-block watchers">
80-
<p class="number"><?php echo jq_plugin_watchers(); ?></p>
81-
<p class="caption">Watchers</p>
82-
</div> <!-- /.watchers -->
83-
<div class="info-block forks">
84-
<p class="number"><?php echo jq_plugin_forks(); ?></p>
85-
<p class="caption">Forks</p>
86-
</div> <!-- /.forks -->
87-
</div> <!-- /.box -->
88-
</div> <!-- /.github-activity -->
89-
<div class="block author-info">
90-
<h3><span class="icon-user"></span>Author</h3>
91-
<ul>
92-
<li class="icon-caret-right"><?php echo jq_release_author(); ?></li>
93-
</ul>
94-
</div> <!-- /.author-info -->
95-
<?php if ( $maintainers = jq_release_maintainers() ) { ?>
96-
<div class="block maintainer-info">
97-
<h3><span class="icon-wrench"></span>Maintainers</h3>
98-
<?php echo $maintainers; ?>
99-
</div> <!-- /.maintainer-info -->
100-
<?php } ?>
101-
<div class="block licenses">
102-
<h3><span class="icon-book"></span>Licenses</h3>
103-
<?php echo jq_release_licenses(); ?>
104-
</div> <!-- /.licenses -->
105-
<div class="block dependencies">
106-
<h3><span class="icon-sitemap"></span>Dependencies</h3>
107-
<?php echo jq_release_dependencies(); ?>
108-
</div> <!-- /.dependencies -->
109-
</div> <!-- /.plugin-metadata -->
110-
</div><!-- .entry-content -->
111-
<footer class="entry-meta">
112-
</footer><!-- .entry-meta -->
12+
13+
<h1 class="entry-title"><?php the_title(); ?></h1>
14+
<p class="attribution">by <?php echo jq_release_author(); ?></p>
15+
<div class="block description">
16+
<?php the_content(); ?>
17+
</div> <!-- /.description -->
18+
19+
<hr/>
20+
21+
<?php if ( $keywords = jq_release_keywords() ) { ?>
22+
<div class="block tags">
23+
<h2>Tags</h2>
24+
<?php echo $keywords; ?>
25+
</div> <!-- /.tags -->
26+
<hr/>
27+
<?php } ?>
28+
29+
<div class="block versions">
30+
<h2>Versions</h2>
31+
<table>
32+
<thead>
33+
<tr>
34+
<th class="version-head">Version</th>
35+
<th class="release-date-head">Date</th>
36+
</tr>
37+
</thead>
38+
<tbody>
39+
<?php foreach( jq_plugin_versions() as $version ) : ?>
40+
<tr>
41+
<td class="version"><?php echo $version[ 'link' ]; ?></td>
42+
<td class="release-date"><?php echo date_format(new DateTime($version[ 'date' ]), "M j Y"); ?></td>
43+
</tr>
44+
<?php endforeach; ?>
45+
</tbody>
46+
</table>
47+
</div><!-- /.versions -->
48+
11349
</article><!-- #post-<?php the_ID(); ?> -->
Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
1-
<?php
2-
/**
3-
* The template for displaying content in the single.php template
4-
*
5-
* @package WordPress
6-
* @subpackage Twenty_Eleven
7-
* @since Twenty Eleven 1.0
8-
*/
9-
?>
10-
11-
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
12-
13-
<div class="entry-content">
14-
<?php the_content(); ?>
15-
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
16-
</div><!-- .entry-content -->
17-
18-
</article><!-- #post-<?php the_ID(); ?> -->
1+
<?php
2+
/**
3+
* The template for displaying content in the single.php template
4+
*
5+
* @package WordPress
6+
* @subpackage Twenty_Eleven
7+
* @since Twenty Eleven 1.0
8+
*/
9+
?>
10+
11+
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
12+
<div class="entry-content">
13+
<?php the_content(); ?>
14+
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
15+
</div><!-- .entry-content -->
16+
</article><!-- #post-<?php the_ID(); ?> -->

themes/plugins.jquery.com/content.php

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
1-
<?php
2-
/**
3-
* The default template for displaying content
4-
*
5-
* @package WordPress
6-
* @subpackage Twenty_Eleven
7-
* @since Twenty Eleven 1.0
8-
*/
9-
?>
10-
11-
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
12-
<header class="entry-header">
13-
<?php if ( is_sticky() ) : ?>
14-
<hgroup>
15-
<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>
16-
<h3 class="entry-format"><?php _e( 'Featured', 'twentyeleven' ); ?></h3>
17-
</hgroup>
18-
<?php else : ?>
19-
<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>
20-
<?php endif; ?>
21-
22-
</header><!-- .entry-header -->
23-
24-
<?php if ( is_search() ) : // Only display Excerpts for Search ?>
25-
<div class="entry-summary">
26-
<p>
27-
Version <?php $latest = get_post_meta( $post->ID, 'latest' ); echo $latest[0]; ?> -
28-
Released <?php echo human_time_diff( get_the_time('U'), current_time('timestamp') ) . ' ago.'; ?>
29-
<br>
30-
Tags: <?php the_terms( $post->ID, 'post_tag' ); ?>
31-
</p>
32-
<?php the_excerpt(); ?>
33-
</div><!-- .entry-summary -->
34-
<?php else : ?>
35-
<div class="entry-content">
36-
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>
37-
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
38-
</div><!-- .entry-content -->
39-
<?php endif; ?>
40-
41-
</article><!-- #post-<?php the_ID(); ?> -->
1+
<?php
2+
/**
3+
* The default template for displaying content
4+
*
5+
* @package WordPress
6+
* @subpackage Twenty_Eleven
7+
* @since Twenty Eleven 1.0
8+
*/
9+
?>
10+
11+
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
12+
<header class="entry-header">
13+
<?php if ( is_sticky() ) : ?>
14+
<hgroup>
15+
<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>
16+
<h3 class="entry-format"><?php _e( 'Featured', 'twentyeleven' ); ?></h3>
17+
</hgroup>
18+
<?php else : ?>
19+
<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>
20+
<?php endif; ?>
21+
22+
</header><!-- .entry-header -->
23+
24+
<?php if ( is_search() ) : // Only display Excerpts for Search ?>
25+
<div class="entry-summary">
26+
<p>
27+
Version <?php $latest = get_post_meta( $post->ID, 'latest' ); echo $latest[0]; ?> -
28+
Released <?php echo human_time_diff( get_the_time('U'), current_time('timestamp') ) . ' ago.'; ?>
29+
<br>
30+
Tags: <?php the_terms( $post->ID, 'post_tag' ); ?>
31+
</p>
32+
<?php the_excerpt(); ?>
33+
</div><!-- .entry-summary -->
34+
<?php else : ?>
35+
<div class="entry-content">
36+
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>
37+
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
38+
</div><!-- .entry-content -->
39+
<?php endif; ?>
40+
41+
</article><!-- #post-<?php the_ID(); ?> -->

themes/plugins.jquery.com/excerpt.php

Lines changed: 43 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,43 @@
1-
<?php
2-
/**
3-
* The template for displaying an excerpt
4-
*
5-
* @package WordPress
6-
* @subpackage Twenty_Eleven
7-
* @since Twenty Eleven 1.0
8-
*/
9-
?>
10-
11-
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
12-
<header class="entry-header">
13-
<?php if ( is_sticky() ) : ?>
14-
<hgroup>
15-
<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>
16-
<h3 class="entry-format"><?php _e( 'Featured', 'twentyeleven' ); ?></h3>
17-
</hgroup>
18-
<?php else : ?>
19-
<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>
20-
<?php endif; ?>
21-
22-
</header><!-- .entry-header -->
23-
24-
<div class="entry-summary">
25-
<?php the_excerpt(); ?>
26-
</div><!-- .entry-summary -->
27-
28-
<footer class="entry-meta">
29-
<?php $show_sep = false; ?>
30-
<?php
31-
/* translators: used between list items, there is a space after the comma */
32-
$tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
33-
if ( $tags_list ):
34-
if ( $show_sep ) : ?>
35-
<span class="sep"> | </span>
36-
<?php endif; // End if $show_sep ?>
37-
<span class="tag-links">
38-
<?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list );
39-
$show_sep = true; ?>
40-
</span>
41-
<?php endif; // End if $tags_list ?>
42-
43-
</footer><!-- #entry-meta -->
44-
</article><!-- #post-<?php the_ID(); ?> -->
1+
<?php
2+
/**
3+
* The template for displaying an excerpt
4+
*
5+
* @package WordPress
6+
* @subpackage Twenty_Eleven
7+
* @since Twenty Eleven 1.0
8+
*/
9+
?>
10+
11+
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
12+
<header class="entry-header">
13+
<?php if ( is_sticky() ) : ?>
14+
<hgroup>
15+
<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>
16+
<h3 class="entry-format"><?php _e( 'Featured', 'twentyeleven' ); ?></h3>
17+
</hgroup>
18+
<?php else : ?>
19+
<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>
20+
<?php endif; ?>
21+
</header><!-- .entry-header -->
22+
23+
<div class="entry-summary">
24+
<?php the_excerpt(); ?>
25+
</div><!-- .entry-summary -->
26+
27+
<footer class="entry-meta">
28+
<?php $show_sep = false; ?>
29+
<?php
30+
/* translators: used between list items, there is a space after the comma */
31+
$tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
32+
if ( $tags_list ):
33+
if ( $show_sep ) : ?>
34+
<span class="sep"> | </span>
35+
<?php endif; // End if $show_sep ?>
36+
<span class="tag-links">
37+
<?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list );
38+
$show_sep = true; ?>
39+
</span>
40+
<?php endif; // End if $tags_list ?>
41+
42+
</footer><!-- #entry-meta -->
43+
</article><!-- #post-<?php the_ID(); ?> -->

themes/plugins.jquery.com/functions.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function jq_new_plugins($total = 10) {
6969
while ( $new_plugins->have_posts() ) :
7070
$new_plugins->the_post();
7171
?>
72-
<li class="icon-caret-right">
72+
<li>
7373
<a href="/<?php echo $post->post_name; ?>/"><?php echo $post->post_title; ?></a>
7474
</li>
7575
<?php
@@ -105,7 +105,7 @@ function jq_updated_plugins( $total = 10 ) {
105105
$parent = get_post( $parent_id );
106106

107107
?>
108-
<li class="icon-caret-right">
108+
<li>
109109
<a href="/<?php echo $parent->post_name . '/' . $post->post_name ?>/"><?php echo $post->post_title; ?></a><br />
110110
(version <?php echo $post->post_name; ?>)
111111
</li>
@@ -178,7 +178,7 @@ function jq_release_licenses() {
178178
foreach( $pkg->licenses as $license ) {
179179
$url = htmlspecialchars( $license->url );
180180
$type = empty( $license->type ) ? $url : htmlspecialchars( $license->type );
181-
$ret .= "<li class=\"icon-caret-right\"><a href='$url'>$type</a></li>";
181+
$ret .= "<li><a href='$url'>$type</a></li>";
182182
}
183183
$ret .= '</ul>';
184184
return $ret;
@@ -193,7 +193,7 @@ function jq_release_maintainers( $options = array('avatar' => false) ) {
193193

194194
$ret = '<ul>';
195195
foreach( $pkg->maintainers as $maintainer ) {
196-
$ret .= '<li class="icon-caret-right">' . person( $maintainer, $options['avatar'] ) . '</li>';
196+
$ret .= '<li>' . person( $maintainer, $options['avatar'] ) . '</li>';
197197
}
198198
$ret .= '</ul>';
199199
return $ret;
@@ -209,9 +209,9 @@ function jq_release_dependencies() {
209209
$ret = '<ul>';
210210
foreach( $pkg->dependencies as $plugin => $version ) {
211211
if ( get_page_by_path( $plugin ) ) {
212-
$ret .= "<li class=\"icon-caret-right\"><a href='/$plugin'>$plugin</a> $version</li>";
212+
$ret .= "<li><a href='/$plugin'>$plugin</a> $version</li>";
213213
} else {
214-
$ret .= "<li class=\"icon-caret-right\">$plugin $version</li>";
214+
$ret .= "<li>$plugin $version</li>";
215215
}
216216
}
217217
$ret .= '</ul>';
224 Bytes
Loading

0 commit comments

Comments
 (0)