-
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 And refactor these slightly in order to work with 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. * /comments.php Support for post_password_required is present at https://github.com/jquery/blog.jquery.com-theme but missing here. Given non-blog sites wouldn't use this it makes sense that it was absent. Cary this over as-is instead of figuring out whether we want or need it. It won't do anything on regular blog posts or an any non-blog sites. 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. Additional CSS changes and fixes relating to blog posts: * Move text-shadow from `blockquote p` to `blockquote`. On our doc sites, HTML comes from Markdown parsers, which generally wrap text paragraphs. In WordPress, our blog posts are already stored in HTML, where there is generally not a paragraph wrapper within simple blockquotes. Fix our styles accomodate blog posts with blockquotes by applying this to the outer element. It should not affect any blockquotes that do for some reason have paragraphs in them, as they inherit the text-shadow just the same. Follows-up #454. * Fix broken `#comments-title` rule, lost to `#content h2`. Fix broken `.commentlist > li.bypostauthor` rule, lost to `#comments .commentlist > li.comment`. These were already broken on the blog, Bring these back in a more suble way (the original, if restored, was quite dark and imho hard to read), and strengthen the selector for now as-needed (one day, we'll get rid of these ID selectors...) * Remove unused `#reply-title` rule, lost in practice to `#content h3`, which seems fine as-is. * Remove unused `p.comment-form-comment` rule, lost in practice to `#respond p`, which looks fine. * Remove unused `.commentlist .children` rules. Unused for a long time since thread_comments=0 on all sites, including on the blogs. When thread_comment equals 0, it applies how old comment threads are rendered as well, so these truly are unused. * Remove unused `#cancel-comment-reply-link`, this is specific to WordPress's comment-reply.js, which we don't load. * Remove unused `.page-template-sidebar-page-php` rules. https://github.com/search?q=org%3Ajquery+pageTemplate+NOT+repo%3Ajquery%2Firc.jquery.org+NOT+repo%3Ajquery%2Fevents.jquery.org&type=code https://github.com/search?q=org%3Ajquery+%22sidebar-page.php%22+NOT+repo%3Ajquery%2Fblog.jquery.com-theme&type=code Ref jquery/infrastructure-puppet#17
- Loading branch information
Showing
18 changed files
with
327 additions
and
198 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
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
Oops, something went wrong.