-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
blog.jquery.com: Sync sites.php entry and import blog.jquery.com theme
The version of this theme in this repo is practicaly empty and hasn't been used in a long time. When activating this locally via jquery-wp-docker, I noticed the settings don't match what we use in production. * Import files from: https://github.com/jquery/blog.jquery.com-theme/tree/6710984735eb/jquery.com Refactor files slightly to work on the current version of the base theme. blog.jquery.com-theme/jquery/ - /header.php /footer-bottom.php /menu-header.php /page-fullwidth.php /searchform.php Minor differences, differed only in being a older but compatible version. Kept the newer ones here unchanged. (e.g. still mentioned Forum, IRC, and StackPath, and older search input field styling). - /functions.jquery.php This defined one extra function, jq_logo_link, which served as a workaround for missing some parts of jquery-wp-content by hardcoding `return '/'`, and already had a TODO for removing it when merging into jquery-wp-content. It was used in header.php, where we now use `get_option('jquery_logo_link', '/')` which works fine for the blog. blog.jquery.com-theme/jquery.com/ - /functions.php: The body_class filter for class "listing" is already here as part of plugins/jquery-filters.php. The twentyeleven_comment (now jq_comment) function had logic for pingbanks. Import this code over so that (approved) pingbacks remain displayed among blog comments. - /category.php Identical to the one in the current "jquery" base theme, except for the heading "Category Archives" instead of "Category". This is presumably because API pages are considered posts in a category, and so the word "Archives" would be confusing there. Solve this by keeping the neutral "Category" that we have in the base theme and remove the forked veersion for that one word difference. - /content.php The only difference was the class "entry-posted" instead of "entry-meta" for the "posted on" date. This branch in the base theme is never used, so change it to the one the blog has. The entry-posted class is styled nearly the same as entry-meta except that in category/search listings we don't float "post on" to the right, whereas entry-meta categories are. - /single.php This is an override for blog posts. In order to share this neatly across the three blogs in the future, I've added this to the base theme as "single-blogpost.php" with a stub in blog.jquery.com/single.php that references this. This is akin to how we share templates for API sites with single-api.php. * comments.php: Add missing support for post_password_required This is included at https://github.com/jquery/blog.jquery.com-theme but missing here. Given no other sites use this, prefer to keep this as-is instead of figuring out whether it is safe to remove. * base.css: Move text-shadow from `blockquote p` to `blockquote`. In markdown, things generally get wrapped in paragraphs, but in WordPress they typically don't. Tweak this to match the styles of the blog theme instead, which should still apply to paragraphs inside quotes just as well. Follows-up #454. Ref jquery/infrastructure-puppet#17
- Loading branch information
Showing
17 changed files
with
413 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<div id="sidebar" class="widget-area" role="complementary"> | ||
<aside class="widget"> | ||
<h3 class="widget-title">Categories</h3> | ||
<ul> | ||
<?php wp_list_categories(array( | ||
'depth' => 1, | ||
'title_li' => '', | ||
'exclude' => '1' | ||
)); ?> | ||
</ul> | ||
</aside> | ||
<aside class="widget"> | ||
<h3 class="widget-title">Recent Posts</h3> | ||
<ul> | ||
<?php | ||
$recent_posts = wp_get_recent_posts(array( | ||
'post_status' => 'publish' | ||
)); | ||
foreach( $recent_posts as $recent ){ | ||
echo '<li><a href="' . get_permalink($recent["ID"]) . '">' . $recent["post_title"].'</a></li>'; | ||
} | ||
?> | ||
</ul> | ||
</aside> | ||
<aside class="widget"> | ||
<h3 class="widget-title">Archives</h3> | ||
<ul> | ||
<?php wp_get_archives( array( 'type' => 'monthly' ) ); ?> | ||
</ul> | ||
</aside> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?php | ||
get_template_part( 'single', 'blogpost' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.