Skip to content

Commit ce3089c

Browse files
committed
Added jquerymobile.com theme.
1 parent 6b95192 commit ce3089c

File tree

9 files changed

+394
-0
lines changed

9 files changed

+394
-0
lines changed

jquerymobile.com/category.php

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<?php get_header(); ?>
2+
<div class="content-right twelve columns">
3+
<div id="content">
4+
5+
<?php if ( have_posts() ) : ?>
6+
7+
<header class="page-header">
8+
<h1 class="page-title"><?php
9+
printf( __( 'Category Archives: %s', 'twentyeleven' ), '<span>' . single_cat_title( '', false ) . '</span>' );
10+
?></h1>
11+
12+
<?php
13+
$category_description = category_description();
14+
if ( ! empty( $category_description ) )
15+
echo apply_filters( 'category_archive_meta', '<div class="category-archive-meta">' . $category_description . '</div>' );
16+
?>
17+
18+
<hr class="dots">
19+
</header>
20+
21+
<?php
22+
while ( have_posts() ) : the_post();
23+
get_template_part( 'content' );
24+
endwhile;
25+
?>
26+
27+
<?php echo jq_content_nav(); ?>
28+
29+
<?php else : ?>
30+
31+
<article id="post-0" class="post no-results not-found">
32+
<header class="entry-header">
33+
<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>
34+
</header><!-- .entry-header -->
35+
36+
<div class="entry-content">
37+
<p><?php _e( 'Apologies, but no results were found for the requested archive.', 'twentyeleven' ); ?></p>
38+
</div><!-- .entry-content -->
39+
</article><!-- #post-0 -->
40+
41+
<?php endif; ?>
42+
43+
</div>
44+
45+
<?php get_sidebar(); ?>
46+
47+
</div>
48+
49+
<?php get_footer(); ?>

jquerymobile.com/content.php

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?php
2+
/**
3+
* The default template for displaying content
4+
*/
5+
?>
6+
7+
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
8+
<header class="entry-header">
9+
<div class="entry-meta">
10+
<?php
11+
// Hide category and tag text for pages on Search
12+
if ( 'post' == get_post_type() ) :
13+
echo jq_categories_and_parents();
14+
endif;
15+
?>
16+
</div>
17+
<?php if ( is_sticky() ) : ?>
18+
<hgroup>
19+
<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>
20+
<h3 class="entry-format"><?php _e( 'Featured', 'twentyeleven' ); ?></h3>
21+
</hgroup>
22+
<?php else : ?>
23+
<h1 class="entry-title">
24+
<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>
25+
</h1>
26+
<?php endif; ?>
27+
28+
<?php if ( 'post' == get_post_type() ) : ?>
29+
<div class="entry-posted">
30+
<?php twentyeleven_posted_on(); ?>
31+
</div>
32+
<?php endif; ?>
33+
</header>
34+
35+
<?php if ( is_search() ) : // Only display Excerpts for Search ?>
36+
<div class="entry-summary">
37+
<?php the_excerpt(); ?>
38+
</div>
39+
<?php else : ?>
40+
<div class="entry-content">
41+
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>
42+
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
43+
</div>
44+
<?php endif; ?>
45+
</article>

jquerymobile.com/footer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<?php get_template_part( 'footer', 'mobile' ); ?>

jquerymobile.com/functions.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
if ( !defined( 'JQUERY_LIVE_SITE' ) ) {
4+
define( 'JQUERY_LIVE_SITE', 'blog.jquerymobile.com' );
5+
}
6+
7+
// Add body classes found in postmeta.
8+
add_filter( 'body_class', function( $classes ) {
9+
$classes = array( 'jquery-mobile' );
10+
11+
if ( is_page() )
12+
$classes[] = 'page-slug-' . sanitize_html_class( strtolower( get_queried_object()->post_name ) );
13+
if ( is_singular() && $post_classes = get_post_meta( get_queried_object_id(), 'body_class', true ) )
14+
$classes = array_merge( $classes, explode( ' ', $post_classes ) );
15+
16+
if ( is_archive() || is_search() ) {
17+
$classes[] = 'listing';
18+
}
19+
20+
return $classes;
21+
});

jquerymobile.com/i/favicon.ico

1.12 KB
Binary file not shown.

jquerymobile.com/index.php

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php get_header(); ?>
2+
3+
<div class="content-right twelve columns listing">
4+
<div id="content">
5+
<?php if ( have_posts() ) :
6+
while ( have_posts() ) : the_post();
7+
get_template_part( 'content', get_post_format() );
8+
endwhile;
9+
10+
echo jq_content_nav();
11+
else : ?>
12+
<article id="post-0" class="post no-results not-found">
13+
<header class="entry-header">
14+
<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>
15+
</header>
16+
17+
<div class="entry-content">
18+
<p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p>
19+
<?php get_search_form(); ?>
20+
</div>
21+
</article>
22+
<?php endif; ?>
23+
</div>
24+
<?php get_sidebar(); ?>
25+
</div>
26+
27+
<?php get_footer(); ?>

jquerymobile.com/sidebar.php

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<div id="sidebar" class="widget-area" role="complementary">
2+
<aside class="widget">
3+
<h3 class="widget-title">Categories</h3>
4+
<ul>
5+
<?php wp_list_categories(array(
6+
'depth' => 1,
7+
'title_li' => '',
8+
'exclude' => '1'
9+
)); ?>
10+
</ul>
11+
</aside>
12+
<aside class="widget">
13+
<h3 class="widget-title">Recent Posts</h3>
14+
<ul>
15+
<?php
16+
$recent_posts = wp_get_recent_posts(array(
17+
'post_status' => 'publish'
18+
));
19+
foreach( $recent_posts as $recent ){
20+
echo '<li><a href="' . get_permalink($recent["ID"]) . '">' . $recent["post_title"].'</a></li>';
21+
}
22+
?>
23+
</ul>
24+
</aside>
25+
<aside class="widget">
26+
<h3 class="widget-title">Archives</h3>
27+
<ul>
28+
<?php wp_get_archives( array( 'type' => 'monthly' ) ); ?>
29+
</ul>
30+
</aside>
31+
</div>

jquerymobile.com/single.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php get_header(); ?>
2+
3+
<?php the_post(); ?>
4+
5+
<div class="content-right twelve columns">
6+
<div id="content">
7+
<h1 class="entry-title"><?php the_title(); ?></h1>
8+
<?php if ( 'post' == get_post_type() ) : ?>
9+
<div class="entry-posted">
10+
<?php twentyeleven_posted_on(); ?>
11+
</div>
12+
<?php endif; ?>
13+
<hr>
14+
15+
<?php get_template_part( 'content', 'page' ); ?>
16+
<?php comments_template( '', true ); ?>
17+
</div>
18+
<?php get_sidebar(); ?>
19+
</div>
20+
21+
<?php get_footer(); ?>

0 commit comments

Comments
 (0)