Making WordPress.org

Changeset 11207


Ignore:
Timestamp:
08/26/2021 11:50:05 PM (3 years ago)
Author:
coffee2code
Message:

Developer, Dashicons: Show dashicon character code in the selected icon info panel.

See #5014.

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

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/js/page-dashicons.js

    r11206 r11207  
    3535            glyphtext = jQuery('#temp').text();
    3636
     37            // icon code
     38            var charCode = jQuery('#iconlist li.dashicons-' + permalink ).attr('data-code');
     39
    3740            var sectionName = jQuery('#iconlist li.dashicons-' + permalink ).parent().prevAll('h4').first().text();
    3841
     
    4043
    4144            jQuery( '#glyph' ).html( tmpl({
     45                charCode: charCode,
    4246                cssClass: 'dashicons-' + permalink,
    4347                sectionName: sectionName,
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/page-dashicons.php

    r11206 r11207  
    1010require_once __DIR__ . '/inc/dashicons.php';
    1111
    12 wp_enqueue_style(  'dashicons-page', get_template_directory_uri() . '/stylesheets/page-dashicons.css', array(), '20200427' );
     12wp_enqueue_style(  'dashicons-page', get_template_directory_uri() . '/stylesheets/page-dashicons.css', array(), '20210826' );
    1313wp_enqueue_script( 'dashicons-page', get_template_directory_uri() . '/js/page-dashicons.js', array( 'jquery', 'wp-util' ), '20210826' );
    1414
     
    195195                <span><strong>{{data.sectionName}}</strong></span>
    196196                <span class="name"><code>{{data.cssClass}}</code></span>
     197                <span class="charCode"><code>{{data.charCode}}</code></span>
    197198                <span class="link"><a href='javascript:dashicons.copy( "content: \"\\{{data.attr}}\";", "css" )'><?php _e( 'Copy CSS', 'wporg' ); ?></a></span>
    198199                <span class="link"><a href="javascript:dashicons.copy( '{{data.html}}', 'html' )"><?php _e( 'Copy HTML', 'wporg' ); ?></a></span>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/scss/page-dashicons.scss

    r11206 r11207  
    5959        .info {
    6060            float:right;
    61             margin-top: $spacing*2;
     61            margin-top: $spacing;
    6262            width: 35%;
     63
     64            .charCode code {
     65                color: #888;
     66            }
    6367        }
    6468
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/stylesheets/page-dashicons.css

    r11206 r11207  
    6060.dashicons-page #glyph .info {
    6161  float: right;
    62   margin-top: 50px;
     62  margin-top: 25px;
    6363  width: 35%;
     64}
     65
     66.dashicons-page #glyph .info .charCode code {
     67  color: #888;
    6468}
    6569
Note: See TracChangeset for help on using the changeset viewer.