Skip to content

Commit b12072b

Browse files
committed
All: Import config for blog.jqueryui.com and blog.jquerymobile.com
Follows-up 9131422, which did most of the legwork already by importing theme code for blog.jquery.com, which I did (mostly) in a way that is shared and blended into the jquery base theme so that there is very little to import from the jqueryui and jquerymobile blog themes, yet producing an identical rendering for them. From https://github.com/jquery/blog.jquery.com-theme/tree/6710984735eb980cc9845b17f98aa0db8eac09e6/jqueryui.com and https://github.com/jquery/blog.jquery.com-theme/tree/6710984735eb980cc9845b17f98aa0db8eac09e6/jquerymobile.com blog/jqueryui.com -> themes/jqueryui.com blog/jquerymobile.com -> themes/jquerymobile.com * /category.php /index.php /style.css Redundant with inherited themes/jquery/category.php. Is identical apart from minor coding style differences. * /content.php Redundant with inherited themes/jquery/content.php. Slight differences regarding showing excerpts for non-first results on the home page, which has been intentionally changed in previous commits to jquery-wp-content, and blog still has the older version. Ignore in favour of what we have here. * /footer.php Same as destination themes/jqueryui.com/footer.php. * /single.php /sidebar.php These differ from the base theme in an important way, but are identical to the one for blog.jquery.com, which I previously imported into the base theme single-blogpost.php and sidebar-blogpost.php, so we only need stubs there, just like we did in themes/jquery.com/ before. * /functions.php - Hardcodes "jquery-ui" or "jquery-mobile" for body_class. We set this via the jquery_body_class option in sites.php instead. - Various dynamic body class entries. This is already covered by /plugins/jquery-filters.php, which we enable on all sites and will be enabled on the blog too when we switch it to use jquery-wp-content. Additionally, blog/jquerymobile.com/ had a builder.css and builder.js. They were copied to the blog when the blog originally forked off from jquery-wp-content, and were never used there. The copy in the original repo here has since been removed in bd3f0d61cdc98 as part of #272. Ref jquery/infrastructure-puppet#17
1 parent c974c08 commit b12072b

File tree

9 files changed

+39
-12
lines changed

9 files changed

+39
-12
lines changed

sites.php

+24-5
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ function jquery_sites() {
1919
'cookie_domain' => '.jquery.com',
2020
'options' => array(
2121
'blogname' => 'jQuery',
22-
'jquery_description' => 'jQuery: The Write Less, Do More, JavaScript Library',
2322
'stylesheet' => 'jquery.com',
2423
'active_plugins' => array(
2524
'jquery-static-index.php',
2625
),
2726
'jquery_body_class' => 'jquery',
27+
'jquery_description' => 'jQuery: The Write Less, Do More, JavaScript Library',
2828
'jquery_xfn_rel_me' => 'https://social.lfx.dev/@jquery',
2929
'jquery_typesense_key' => 'Zh8mMgohXECel9wjPwqT7lekLSG3OCgz',
3030
'jquery_typesense_collection' => 'jquery_com',
@@ -35,12 +35,13 @@ function jquery_sites() {
3535
'options' => array(
3636
'blogname' => 'Official jQuery Blog',
3737
'blogdescription' => 'New Wave JavaScript',
38-
'jquery_author' => 'jQuery Team - jquery.com',
39-
'jquery_description' => 'jQuery: The Write Less, Do More, JavaScript Library',
38+
'permalink_structure' => '/%year%/%monthnum%/%day%/%postname%/',
4039
'stylesheet' => 'jquery.com',
4140
'jquery_body_class' => 'jquery',
42-
'permalink_structure' => '/%year%/%monthnum%/%day%/%postname%/',
4341
'jquery_is_blog' => true,
42+
'jquery_author' => 'jQuery Team',
43+
'jquery_description' => 'jQuery: The Write Less, Do More, JavaScript Library',
44+
'jquery_xfn_rel_me' => 'https://social.lfx.dev/@jquery',
4445
),
4546
),
4647
'api.jquery.com' => array(
@@ -87,8 +88,13 @@ function jquery_sites() {
8788
'cookie_domain' => '.jqueryui.com',
8889
'options' => array(
8990
'blogname' => 'jQuery UI Blog',
90-
'stylesheet' => 'blog.jqueryui.com',
91+
'blogdescription' => 'All news about jQuery UI',
92+
'permalink_structure' => '/%year%/%monthnum%/%postname%/',
93+
'stylesheet' => 'jqueryui.com',
9194
'jquery_body_class' => 'jquery-ui',
95+
'jquery_is_blog' => true,
96+
'jquery_author' => 'jQuery Team',
97+
'jquery_description' => 'jQuery: The Write Less, Do More, JavaScript Library',
9298
'jquery_twitter_link' => 'https://twitter.com/jqueryui',
9399
),
94100
),
@@ -181,6 +187,19 @@ function jquery_sites() {
181187
'jquery_twitter_link' => 'https://twitter.com/jquerymobile',
182188
),
183189
),
190+
'blog.jquerymobile.com' => array(
191+
'cookie_domain' => '.jquerymobile.com',
192+
'options' => array(
193+
'blogname' => 'jQuery Mobile Blog',
194+
'permalink_structure' => '/%year%/%monthnum%/%day%/%postname%/',
195+
'stylesheet' => 'jquerymobile.com',
196+
'jquery_body_class' => 'jquery-mobile',
197+
'jquery_is_blog' => true,
198+
'jquery_author' => 'jQuery Team',
199+
'jquery_description' => 'jQuery: The Write Less, Do More, JavaScript Library',
200+
'jquery_twitter_link' => 'https://twitter.com/jquerymobile',
201+
),
202+
),
184203
'brand.jquery.org' => array(
185204
'cookie_domain' => '.jquery.org',
186205
'options' => array(

themes/jquery.com/single.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<?php
2-
get_template_part( 'single', 'blogpost' );
2+
get_template_part( 'single-blogpost' );

themes/jquery/sidebar.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* The default sidebar lists categories, up to 2 levels deep.
44
*/
55
if ( get_option( 'jquery_is_blog' ) ):
6-
require __DIR__ . '/sidebar-blogpost.php';
6+
get_template_part( 'sidebar-blogpost' );
77
else:
88
?>
99
<div id="sidebar" class="widget-area" role="complementary">

themes/jquerymobile.com/footer.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php get_template_part( 'footer', 'mobile' ); ?>
1+
<?php get_template_part( 'footer', 'mobile' );

themes/jquerymobile.com/page.php

-2
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,3 @@
22

33
// jquerymobile.com doesn't use sidebars, so we alias page to page-contentfull
44
get_template_part( 'page', 'contentfull' );
5-
6-
?>

themes/jquerymobile.com/single.php

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?php
2+
get_template_part( 'single-blogpost' );

themes/jqueryui.com/footer.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php get_template_part( 'footer', 'ui' ); ?>
1+
<?php get_template_part( 'footer', 'ui' );

themes/jqueryui.com/sidebar.php

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
<div id="sidebar" class="widget-area" role="complementary">
1+
<?php
2+
if ( get_option( 'jquery_is_blog' ) ):
3+
get_template_part( 'sidebar-blogpost' );
4+
else:
5+
?><div id="sidebar" class="widget-area" role="complementary">
26
<aside class="widget">
37
<h3 class="widget-title">Interactions</h3>
48
<ul>
@@ -24,3 +28,5 @@
2428
</ul>
2529
</aside>
2630
</div>
31+
<?php
32+
endif;

themes/jqueryui.com/single.php

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?php
2+
get_template_part( 'single-blogpost' );

0 commit comments

Comments
 (0)