Making WordPress.org

Changeset 969


Ignore:
Timestamp:
11/10/2014 11:10:21 PM (10 years ago)
Author:
coffee2code
Message:

developer.wordpress.org: Add responsive styles for Dashicons resource page

fixes #711.
props ryelle.

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

    r814 r969  
    4343                glyph: glyphtext
    4444            }) );
    45 
    46             $(window).scrollTop(0);
    4745        }
    4846    };
     
    7573
    7674            dashicons.display( attr, cssClass );
     75            $(window).scrollTop( $("#glyph").offset().top );
    7776
    7877        });
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/page-dashicons.php

    r957 r969  
    335335            <div class="info">
    336336                <span class="name">← {{data.cssClass}}</span>
    337                 <span><a href='javascript:dashicons.copy( "content: \"\\{{data.attr}}\";", "css" )'>Copy CSS</a></span>
    338                 <span><a href="javascript:dashicons.copy( '{{data.html}}', 'html' )">Copy HTML</a></span>
    339                 <span><a href="javascript:dashicons.copy( '{{data.glyph}}' )">Copy Glyph</a></span>
     337                <span class="link"><a href='javascript:dashicons.copy( "content: \"\\{{data.attr}}\";", "css" )'>Copy CSS</a></span>
     338                <span class="link"><a href="javascript:dashicons.copy( '{{data.html}}', 'html' )">Copy HTML</a></span>
     339                <span class="link"><a href="javascript:dashicons.copy( '{{data.glyph}}' )">Copy Glyph</a></span>
    340340            </div>
    341341        </script>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/scss/page-dashicons.scss

    r814 r969  
    2222        bottom: $spacing * 2;
    2323        padding: 0 2.5em;
    24         width: 30em;
     24        width: 50%;
    2525
    2626        #search {
     
    4242        margin-top: 0 !important;
    4343        padding: 1.5em $spacing;
    44         width: 30em;
     44        width: 50%;
    4545    }
    4646
     
    4848        float:left;
    4949        padding: 1.5em $spacing;
    50         width: 30em;
     50        width: 50%;
    5151
    5252        .dashicons {
     
    6060            float:right;
    6161            margin-top: $spacing*2;
    62             width: 10em;
     62            width: 35%;
    6363        }
    6464
     
    139139        display: block;
    140140        font: 14px/1.5 monospace;
    141         width: 600px;
     141        max-width: 600px;
    142142        white-space: pre;
    143143        border: 1px solid #ccc;
     
    147147    }
    148148
     149    @media ( max-width: 900px ) {
     150        .icon-filter {
     151            position: relative;
     152            left: auto;
     153            bottom: auto;
     154            padding-left: $spacing;
     155            padding-right: $spacing;
     156            padding-bottom: $spacing;
     157            width: 100%;
     158        }
     159
     160        .entry-content {
     161            float: none;
     162            padding-bottom: 0;
     163            width: 100%;
     164        }
     165
     166        #glyph {
     167            float: none;
     168            width: 100%;
     169            text-align: center;
     170
     171            .dashicons {
     172                font-size: 240px;
     173                width: 240px;
     174                height: 240px;
     175                overflow: visible;
     176            }
     177
     178            .info {
     179                float: none;
     180                margin-top: 0;
     181                width: 100%;
     182            }
     183
     184            span.link {
     185                display: inline-block;
     186                margin-right: 10px;
     187                margin-bottom: 10px;
     188                margin-left: 10px;
     189
     190                &:nth-of-type(2) {
     191                    margin-left: 0;
     192                }
     193                &:last-of-type {
     194                    margin-right: 0;
     195                }
     196            }
     197        }
     198    }
     199
     200    @media ( max-width: 400px ) {
     201        #glyph,
     202        .entry-content,
     203        .icon-filter {
     204            padding-left: 0;
     205            padding-right: 0;
     206        }
     207    }
     208
    149209}
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/stylesheets/page-dashicons.css

    r814 r969  
    1818  bottom: 50px;
    1919  padding: 0 2.5em;
    20   width: 30em;
     20  width: 50%;
    2121}
    2222.dashicons-page .icon-filter #search {
     
    3636  margin-top: 0 !important;
    3737  padding: 1.5em 25px;
    38   width: 30em;
     38  width: 50%;
    3939}
    4040.dashicons-page #glyph {
    4141  float: left;
    4242  padding: 1.5em 25px;
    43   width: 30em;
     43  width: 50%;
    4444}
    4545.dashicons-page #glyph .dashicons {
     
    5252  float: right;
    5353  margin-top: 50px;
    54   width: 10em;
     54  width: 35%;
    5555}
    5656.dashicons-page #glyph span {
     
    115115  display: block;
    116116  font: 14px/1.5 monospace;
    117   width: 600px;
     117  max-width: 600px;
    118118  white-space: pre;
    119119  border: 1px solid #ccc;
     
    122122  min-height: 180px;
    123123}
     124@media (max-width: 900px) {
     125  .dashicons-page .icon-filter {
     126    position: relative;
     127    left: auto;
     128    bottom: auto;
     129    padding-left: 25px;
     130    padding-right: 25px;
     131    padding-bottom: 25px;
     132    width: 100%;
     133  }
     134  .dashicons-page .entry-content {
     135    float: none;
     136    padding-bottom: 0;
     137    width: 100%;
     138  }
     139  .dashicons-page #glyph {
     140    float: none;
     141    width: 100%;
     142    text-align: center;
     143  }
     144  .dashicons-page #glyph .dashicons {
     145    font-size: 240px;
     146    width: 240px;
     147    height: 240px;
     148    overflow: visible;
     149  }
     150  .dashicons-page #glyph .info {
     151    float: none;
     152    margin-top: 0;
     153    width: 100%;
     154  }
     155  .dashicons-page #glyph span.link {
     156    display: inline-block;
     157    margin-right: 10px;
     158    margin-bottom: 10px;
     159    margin-left: 10px;
     160  }
     161  .dashicons-page #glyph span.link:nth-of-type(2) {
     162    margin-left: 0;
     163  }
     164  .dashicons-page #glyph span.link:last-of-type {
     165    margin-right: 0;
     166  }
     167}
     168@media (max-width: 400px) {
     169  .dashicons-page #glyph, .dashicons-page .entry-content, .dashicons-page .icon-filter {
     170    padding-left: 0;
     171    padding-right: 0;
     172  }
     173}
Note: See TracChangeset for help on using the changeset viewer.