<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[8689] sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer: Developer: Import Block Editor handbook from GitHub.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="http://meta.trac.wordpress.org/changeset/8689">8689</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"http://meta.trac.wordpress.org/changeset/8689","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>coffee2code</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2019-04-25 21:57:38 +0000 (Thu, 25 Apr 2019)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Developer: Import Block Editor handbook from GitHub.
Currenly only accessible to logged in users.
See <a href="http://meta.trac.wordpress.org/ticket/4388">#4388</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgdeveloperfunctionsphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/functions.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgdeveloperinctemplatetagsphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/template-tags.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgdeveloperjschaptersjs">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/js/chapters.js</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgdeveloperscssmainscss">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/scss/main.scss</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgdeveloperstylesheetsmaincss">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/stylesheets/main.css</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgdeveloperincimportblockeditorphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/import-block-editor.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgdevelopersingleblockshandbookphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/single-blocks-handbook.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgdeveloperfunctionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/functions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/functions.php 2019-04-25 21:34:14 UTC (rev 8688)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/functions.php 2019-04-25 21:57:38 UTC (rev 8689)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -72,6 +72,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Docs Importer base class.
</span><span class="cx" style="display: block; padding: 0 10px"> require __DIR__ . '/inc/import-docs.php';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+if ( is_user_logged_in() ) {
+ // Block Editor handbook.
+ require __DIR__ . '/inc/import-block-editor.php';
+}
+
</ins><span class="cx" style="display: block; padding: 0 10px"> // Coding Standards handbook.
</span><span class="cx" style="display: block; padding: 0 10px"> require __DIR__ . '/inc/import-coding-standards.php';
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgdeveloperincimportblockeditorphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/import-block-editor.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/import-block-editor.php (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/import-block-editor.php 2019-04-25 21:57:38 UTC (rev 8689)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,175 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+
+class DevHub_Block_Editor_Importer extends DevHub_Docs_Importer {
+ /**
+ * Initializes object.
+ */
+ public function init() {
+ parent::do_init(
+ 'blocks',
+ 'block-editor',
+ 'https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/manifest.json'
+ );
+
+ add_filter( 'handbook_label', array( $this, 'change_handbook_label' ), 10, 2 );
+ add_filter( 'wporg_markdown_before_transform', array( $this, 'wporg_markdown_before_transform' ), 10, 2 );
+ add_filter( 'wporg_markdown_after_transform', array( $this, 'wporg_markdown_after_transform' ), 10, 2 );
+
+ add_action( 'pre_post_update', function( $post_id, $data ) {
+ if ( $this->get_post_type() === $data['post_type'] ) {
+ add_filter( 'wp_kses_allowed_html', array( __CLASS__, 'allow_extra_tags' ), 10, 1 );
+ }
+ }, 10, 2 );
+
+ add_action( 'edit_post_' . $this->get_post_type(), function( $post_id ) {
+ remove_filter( 'wp_kses_allowed_html', array( __CLASS__, 'allow_extra_tags' ), 10, 1 );
+ } );
+ }
+
+ /**
+ * Overrides the default handbook label since post type name does not directly
+ * translate to post type label.
+ *
+ * @param string $label The default label, which is merely a sanitized
+ * version of the handbook name.
+ * @param string $post_type The handbook post type.
+ * @return string
+ */
+ public function change_handbook_label( $label, $post_type ) {
+ if ( $this->get_post_type() === $post_type ) {
+ $label = __( 'Block Editor Handbook', 'wporg' );
+ }
+
+ return $label;
+ }
+
+ /**
+ * Modifies the Markdown text prior to being transformed into HTML.
+ *
+ * @param string $markdown The Markdown text.
+ * @param string $post_type The handbook post type.
+ * @return string
+ */
+ public function wporg_markdown_before_transform( $markdown, $post_type ) {
+ if ( $this->get_post_type() !== $post_type ) {
+ return $markdown;
+ }
+
+ // Remove any level 1 headings at the start of the markdown.
+ // This also effectively prevents the post title from being the one defined in the markdown doc.
+ if ( preg_match( '/^#\s(.+)/', $markdown, $matches ) ) {
+ $markdown = preg_replace( '/^#\s(.+)/', '', $markdown );
+ }
+
+ // Remove the .md extension from relative links and treat 'readme.md' as an index
+ $markdown = preg_replace(
+ '@(\[.*?\]\(((\.\./)+docs/|/docs/|/packages/).*?)(((?<=/)readme)?\.md)?(#.*?)?\)@i',
+ '$1$6)',
+ $markdown
+ );
+
+ // Remove the (../)*docs/ path from relative links, and replace it with an absolute URL
+ $markdown = preg_replace(
+ '@(\[.*?\])\((\.\./)+docs/(.*?)/?(#.*?)?\)@i',
+ '$1(https://developer.wordpress.org/block-editor/$3/$4)',
+ $markdown
+ );
+
+ // Handle /docs/(.+)(/README.md) path for internal links and replace it with an absolute URL
+ $markdown = preg_replace(
+ '@(\[.*?\])\(/docs/(.*?)/?(#.*?)?\)@i',
+ '$1(https://developer.wordpress.org/block-editor/$2/$3)',
+ $markdown
+ );
+
+ // Handle /packages/compomnents(/README.md)
+ $markdown = preg_replace(
+ '@(\[.*?\])\(/packages/components/?(#.*?)?\)@i',
+ '$1(https://developer.wordpress.org/block-editor/designers-developers/developers/components/$2)',
+ $markdown
+ );
+
+ // Handle /packages/components/(src/)(.+)(/README.md)
+ $markdown = preg_replace(
+ '@(\[.*?\])\(/packages/components/(src/)?(.*?)/?(#.*?)?\)@i',
+ '$1(https://developer.wordpress.org/block-editor/designers-developers/developers/components/$3/$4)',
+ $markdown
+ );
+
+ // Handle /packages/(.+)(/README.md)
+ $markdown = preg_replace(
+ '@(\[.*?\])\(/packages/(.*?)/?(#.*?)?\)@i',
+ '$1(https://developer.wordpress.org/block-editor/designers-developers/developers/packages/packages-$2/$3)',
+ $markdown
+ );
+
+ return $markdown;
+ }
+
+ /**
+ * Modifies the HTML resulting from the Markdown transformation.
+ *
+ * @param string $html The result of converting Markdown to HTML.
+ * @param string $post_type The handbook post type.
+ * @return string
+ */
+ public function wporg_markdown_after_transform( $html, $post_type ) {
+ if ( $this->get_post_type() !== $post_type ) {
+ return $html;
+ }
+
+ // Turn the code blocks into tabs
+ $html = preg_replace_callback( '/{%\s+codetabs\s+%}(.*?){%\s+end\s+%}/ms', array( __CLASS__, 'parse_code_blocks' ), $html );
+ $html = str_replace( 'class="php"', 'class="language-php"', $html );
+ $html = str_replace( 'class="js"', 'class="language-javascript"', $html );
+ $html = str_replace( 'class="jsx"', 'class="language-jsx"', $html );
+ $html = str_replace( 'class="css"', 'class="language-css"', $html );
+
+ return $html;
+ }
+
+ /**
+ * Callback for the preg_replace_callback() in wporg_markdown_after_transform()
+ * to transform a block of code tabs into HTML.
+ */
+ public static function parse_code_blocks( $matches ) {
+ $splitted_tabs = preg_split( '/{%\s+([\w]+)\s+%}/', trim( $matches[1] ), -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE );
+
+ $html = '<div class="code-tabs">';
+ $code_blocks = '';
+
+ for ( $ii = 0; $ii < count( $splitted_tabs ); $ii += 2 ) {
+ $classes = 'code-tab ' . $splitted_tabs[ $ii ];
+ $code_classes = 'code-tab-block ' . $splitted_tabs[ $ii ];
+
+ if ( 0 === $ii ) {
+ $classes .= ' is-active';
+ $code_classes .= ' is-active';
+ }
+
+ $html .= "<button data-language='{$splitted_tabs[ $ii ]}' class='$classes'>{$splitted_tabs[ $ii ]}</button>";
+ $code_blocks .= "<div class='$code_classes'>{$splitted_tabs[ $ii + 1 ]}</div>";
+ }
+
+ $html .= "$code_blocks</div>";
+
+ return $html;
+ }
+
+ /**
+ * Add extra tags to the KSES allowed tags list.
+ *
+ * @param array $tags Allowed tags.
+ * @return array
+ */
+ public static function allow_extra_tags( $tags ) {
+ if ( ! isset( $tags['style'] ) ) {
+ $tags['style'] = [];
+ }
+
+ return $tags;
+ }
+
+}
+
+DevHub_Block_Editor_Importer::instance()->init();
</ins></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgdeveloperinctemplatetagsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/template-tags.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/template-tags.php 2019-04-25 21:34:14 UTC (rev 8688)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/template-tags.php 2019-04-25 21:57:38 UTC (rev 8689)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -650,6 +650,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return __( 'Plugin Handbook', 'wporg' );
</span><span class="cx" style="display: block; padding: 0 10px"> case 'themes':
</span><span class="cx" style="display: block; padding: 0 10px"> return __( 'Theme Handbook', 'wporg' );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ case 'block-editor':
+ return __( 'Block Editor Handbook', 'wporg' );
</ins><span class="cx" style="display: block; padding: 0 10px"> case 'cli':
</span><span class="cx" style="display: block; padding: 0 10px"> return __( 'WP-CLI Commands', 'wporg' );
</span><span class="cx" style="display: block; padding: 0 10px"> case 'coding-standards':
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgdeveloperjschaptersjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/js/chapters.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/js/chapters.js 2019-04-25 21:34:14 UTC (rev 8688)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/js/chapters.js 2019-04-25 21:57:38 UTC (rev 8689)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,6 +1,17 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Mobile Subnav open/close
</span><span class="cx" style="display: block; padding: 0 10px"> jQuery(document).ready(function() {
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ jQuery( document ).on( 'click', '.code-tab', function ( e ) {
+ var $tab = jQuery( e.target );
+ if ( $tab.hasClass( 'is-active' ) ) {
+ return;
+ }
+
+ var lang = $tab.text();
+
+ $tab.parent().find( '.is-active, .' + lang ).toggleClass( 'is-active' );
+ } );
+
</ins><span class="cx" style="display: block; padding: 0 10px"> var tocContainer = jQuery( 'div[class*="-table-of-contents-container"]').first();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 0 === tocContainer.length ) {
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgdeveloperscssmainscss"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/scss/main.scss</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/scss/main.scss 2019-04-25 21:34:14 UTC (rev 8688)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/scss/main.scss 2019-04-25 21:57:38 UTC (rev 8689)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2705,3 +2705,42 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+code[class*="language-"],pre[class*="language-"]{direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;background:#2b303b;color:#c0c5ce}pre[class*="language-"]::-moz-selection,pre[class*="language-"] ::-moz-selection,code[class*="language-"]::-moz-selection,code[class*="language-"] ::-moz-selection{text-shadow:none;background:#a7adba}pre[class*="language-"]::selection,pre[class*="language-"] ::selection,code[class*="language-"]::selection,code[class*="language-"] ::selection{text-shadow:none;background:#a7adba}pre[class*="language-"]{overflow:auto}:not(pre)>code[class*="language-"]{border-radius:.3em}.token.comment,.token.prolog,.token.doctype,.token.cdata{color:#65737e}.token.punctuation{color:#c0c5ce}.token.namespace{opaci
ty:.7}.token.operator,.token.boolean,.token.number{color:#d08770}.token.property{color:#ebcb8b}.token.tag{color:#8fa1b3}.token.string{color:#96b5b4}.token.selector{color:#b48ead}.token.attr-name{color:#d08770}.token.entity,.token.url,.language-css .token.string,.style .token.string{color:#96b5b4}.token.attr-value,.token.keyword,.token.control,.token.directive,.token.unit{color:#a3be8c}.token.statement,.token.regex,.token.atrule{color:#96b5b4}.token.placeholder,.token.variable{color:#8fa1b3}.token.deleted{text-decoration:line-through}.token.inserted{border-bottom:1px dotted #eff1f5;text-decoration:none}.token.italic{font-style:italic}.token.important,.token.bold{font-weight:bold}.token.important{color:#bf616a}.token.entity{cursor:help}pre>code.highlight{outline:0.4em solid #bf616a;outline-offset:.4em}
+
+.code-tab,
+.code-tab:hover {
+ background: #fff;
+ border: none;
+ box-shadow: none;
+ text-shadow: none;
+ border: 1px solid #D0DFDA;
+ border-radius: 30px 0 0 30px;
+ padding: 8px 20px;
+}
+
+.code-tab + .code-tab {
+ border-radius: 0 30px 30px 0;
+}
+
+.code-tab:focus,
+.code-tab.is-active:focus {
+ outline: none;
+ border: 1px solid #222;
+ box-shadow: none;
+}
+
+.code-tab.is-active {
+ background: #00B975;
+ border: 1px solid #00B975;
+ box-shadow: none;
+ color: #fff;
+}
+
+.code-tab-block {
+ display: none;
+}
+
+.code-tab-block.is-active {
+ display: block;
+}
</ins></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgdevelopersingleblockshandbookphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/single-blocks-handbook.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/single-blocks-handbook.php (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/single-blocks-handbook.php 2019-04-25 21:57:38 UTC (rev 8689)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,26 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php namespace DevHub;
+/**
+ * The Template for displaying all single posts.
+ *
+ * @package wporg-developer
+ */
+
+get_header(); ?>
+
+<?php get_sidebar( 'handbook' ); ?>
+
+ <main id="primary" <?php post_class( 'site-main' ); ?> role="main">
+
+ <?php breadcrumb_trail(); ?>
+
+ <?php while ( have_posts() ) : the_post(); ?>
+
+ <?php get_template_part( 'content', 'handbook'); ?>
+
+ <?php \WPorg_Handbook_Navigation::show_nav_links( 'Block Editor Table of Contents' ); ?>
+
+ <?php endwhile; // end of the loop. ?>
+
+ </main><!-- #main -->
+
+<?php get_footer(); ?>
</ins></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgdeveloperstylesheetsmaincss"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/stylesheets/main.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/stylesheets/main.css 2019-04-25 21:34:14 UTC (rev 8688)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/stylesheets/main.css 2019-04-25 21:57:38 UTC (rev 8689)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3033,3 +3033,157 @@
</span><span class="cx" style="display: block; padding: 0 10px"> margin-right: 5px;
</span><span class="cx" style="display: block; padding: 0 10px"> cursor: pointer;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+code[class*="language-"], pre[class*="language-"] {
+ direction: ltr;
+ text-align: left;
+ white-space: pre;
+ word-spacing: normal;
+ word-break: normal;
+ -moz-tab-size: 4;
+ -o-tab-size: 4;
+ tab-size: 4;
+ -webkit-hyphens: none;
+ -moz-hyphens: none;
+ -ms-hyphens: none;
+ hyphens: none;
+ background: #2b303b;
+ color: #c0c5ce;
+}
+
+pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection, code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
+ text-shadow: none;
+ background: #a7adba;
+}
+
+pre[class*="language-"]::selection, pre[class*="language-"] ::selection, code[class*="language-"]::selection, code[class*="language-"] ::selection {
+ text-shadow: none;
+ background: #a7adba;
+}
+
+pre[class*="language-"] {
+ overflow: auto;
+}
+
+:not(pre) > code[class*="language-"] {
+ border-radius: .3em;
+}
+
+.token.comment, .token.prolog, .token.doctype, .token.cdata {
+ color: #65737e;
+}
+
+.token.punctuation {
+ color: #c0c5ce;
+}
+
+.token.namespace {
+ opacity: .7;
+}
+
+.token.operator, .token.boolean, .token.number {
+ color: #d08770;
+}
+
+.token.property {
+ color: #ebcb8b;
+}
+
+.token.tag {
+ color: #8fa1b3;
+}
+
+.token.string {
+ color: #96b5b4;
+}
+
+.token.selector {
+ color: #b48ead;
+}
+
+.token.attr-name {
+ color: #d08770;
+}
+
+.token.entity, .token.url, .language-css .token.string, .style .token.string {
+ color: #96b5b4;
+}
+
+.token.attr-value, .token.keyword, .token.control, .token.directive, .token.unit {
+ color: #a3be8c;
+}
+
+.token.statement, .token.regex, .token.atrule {
+ color: #96b5b4;
+}
+
+.token.placeholder, .token.variable {
+ color: #8fa1b3;
+}
+
+.token.deleted {
+ text-decoration: line-through;
+}
+
+.token.inserted {
+ border-bottom: 1px dotted #eff1f5;
+ text-decoration: none;
+}
+
+.token.italic {
+ font-style: italic;
+}
+
+.token.important, .token.bold {
+ font-weight: bold;
+}
+
+.token.important {
+ color: #bf616a;
+}
+
+.token.entity {
+ cursor: help;
+}
+
+pre > code.highlight {
+ outline: 0.4em solid #bf616a;
+ outline-offset: .4em;
+}
+
+.code-tab,
+.code-tab:hover {
+ background: #fff;
+ border: none;
+ box-shadow: none;
+ text-shadow: none;
+ border: 1px solid #D0DFDA;
+ border-radius: 30px 0 0 30px;
+ padding: 8px 20px;
+}
+
+.code-tab + .code-tab {
+ border-radius: 0 30px 30px 0;
+}
+
+.code-tab:focus,
+.code-tab.is-active:focus {
+ outline: none;
+ border: 1px solid #222;
+ box-shadow: none;
+}
+
+.code-tab.is-active {
+ background: #00B975;
+ border: 1px solid #00B975;
+ box-shadow: none;
+ color: #fff;
+}
+
+.code-tab-block {
+ display: none;
+}
+
+.code-tab-block.is-active {
+ display: block;
+}
</ins></span></pre>
</div>
</div>
</body>
</html>