WordPress.org

Making WordPress.org

Changeset 4902


Ignore:
Timestamp:
02/14/2017 05:33:38 AM (3 years ago)
Author:
coffee2code
Message:

developer.wordpress.org: Display code reference table of contents items as links.

Also minor ToC box style tweaks and renaming to "Contents".

Props keesiemeijer, kevinwhoffman.
Fixes #1814.

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/content-reference.php

    r3629 r4902  
    2121    if ( class_exists( 'WPorg_Handbook_TOC' ) ) :
    2222        $TOC = new \WPorg_Handbook_TOC( get_parsed_post_types(), array(
    23             'header_text' => __( 'Table of Contents', 'wporg' )
     23            'header_text' => __( 'Contents', 'wporg' )
    2424        ) );
    2525
    26         $content = $TOC->add_toc( $content );
     26        $content = '<div class="content-toc">' . $TOC->add_toc( $content ) . '</div>';
     27
    2728    endif;
    2829    ?>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/scss/main.scss

    r4660 r4902  
    11321132        }
    11331133        .table-of-contents {
    1134             width: 300px;
     1134            border: none;
     1135            width: 260px;
     1136            margin-left: 30px;
     1137
     1138            h2 {
     1139                padding: 3px 0;
     1140            }
    11351141
    11361142            & > ul {
     
    11391145        }
    11401146        ul.items {
     1147            margin: 1em 20px !important;
     1148
    11411149            li {
    11421150                padding-bottom: 0px !important;
     
    11461154            }
    11471155            a {
     1156                color: #21759b !important;
     1157
    11481158                &:hover {
    11491159                    color: #d54e21 !important;
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/stylesheets/main.css

    r4660 r4902  
    15451545
    15461546.devhub-wrap .wp-parser-class .table-of-contents, .devhub-wrap .wp-parser-function .table-of-contents, .devhub-wrap .wp-parser-hook .table-of-contents, .devhub-wrap .wp-parser-method .table-of-contents {
    1547   width: 300px;
     1547  border: none;
     1548  width: 260px;
     1549  margin-left: 30px;
     1550}
     1551
     1552.devhub-wrap .wp-parser-class .table-of-contents h2, .devhub-wrap .wp-parser-function .table-of-contents h2, .devhub-wrap .wp-parser-hook .table-of-contents h2, .devhub-wrap .wp-parser-method .table-of-contents h2 {
     1553  padding: 3px 0;
    15481554}
    15491555
     
    15521558}
    15531559
     1560.devhub-wrap .wp-parser-class ul.items, .devhub-wrap .wp-parser-function ul.items, .devhub-wrap .wp-parser-hook ul.items, .devhub-wrap .wp-parser-method ul.items {
     1561  margin: 1em 20px !important;
     1562}
     1563
    15541564.devhub-wrap .wp-parser-class ul.items li, .devhub-wrap .wp-parser-function ul.items li, .devhub-wrap .wp-parser-hook ul.items li, .devhub-wrap .wp-parser-method ul.items li {
    15551565  padding-bottom: 0px !important;
     
    15581568.devhub-wrap .wp-parser-class ul.items > li, .devhub-wrap .wp-parser-function ul.items > li, .devhub-wrap .wp-parser-hook ul.items > li, .devhub-wrap .wp-parser-method ul.items > li {
    15591569  padding-bottom: 8px !important;
     1570}
     1571
     1572.devhub-wrap .wp-parser-class ul.items a, .devhub-wrap .wp-parser-function ul.items a, .devhub-wrap .wp-parser-hook ul.items a, .devhub-wrap .wp-parser-method ul.items a {
     1573  color: #21759b !important;
    15601574}
    15611575
Note: See TracChangeset for help on using the changeset viewer.