Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                
<div class="bloading"></div>
<div id="feed"></div>
              
            
!

CSS

              
                ul.bsitemap, ul.bsitemap ul, ul.bsitemap li {width: 100%;margin: 0;padding: 0 ;list-style:none;font-family: arial;}
ul.bsitemap li a {display: block;margin: 0 0 2px 0;padding:0 10px;background: #666;color: #fff;text-decoration: none;font-size: 20x;line-height: 28px;text-transform: uppercase;}
ul.bsitemap li li a {background: transparent;color:#333;line-height:22px;}
/* Símbolo elemento no desplegable */
ul.bsitemap li a:before {content: "\25CF\00A0";width: 28px;display: inline-block;vertical-align: top;}
/* Símbolo elemento desplegable cerrado */
ul.bsitemap li.desplegable a:before {content: "\25BA\00A0";}
/* Símbolo elemento desplegable abierto */
ul.bsitemap li.desplegable.activa a:before {content: "\25BC\00A0";}
ul.bsitemap li.desplegable ul li a:before, ul.bsitemap li.desplegable.activa ul li a:before {content: none}
ul.bsitemap ul {display: none;}
ul.bsitemap ul a {padding-left: 40px;text-transform: none;}
ul.bsitemap li li a:hover {background: transparent;text-decoration: underline;}
/* Estilo marca NUEVO (último mes) */
.bnuevo {color: red;font-style: italic;font-weight: bold;}
.bnuevo:after {content:" Nuevo";margin-left: 10px;padding: 2px 8px;color: white;background:red;font-style: italic;font-weight: bold;font-size: 80%;border-radius: 4px;}
/* Símbolo animado cargador */
.bloading {display: block;width: 80px;height: 80px;margin: 10px auto;font-size: 10px;text-align: center;border-width: 30px;border-radius: 50%;-webkit-animation: spin 1s linear infinite;animation: spin 1s linear infinite;border-style: double;border-color: #666 transparent;}
.bloading:before {content: "CARGANDO";font-weight: bold;line-height: 80px;color: #990000;}
@-webkit-keyframes spin {100% {-webkit-transform: rotate(359deg);}}
@keyframes spin {100% {transform: rotate(359deg);}}
              
            
!

JS

              
                  // Parámetros configurables
  var feed = 'https://inspiringy.blogspot.com/feeds/posts/default';
  // Etiquetas a  excluir del índice  
  var exclusion = ['BPT', 'CSS', 'X-Topic','etc'];
  var cajasalida = $('#feed'); // Nombre caja para insertar posts
$( document ).ready(function() { 
  var postsxfeed = 150; // Tope entradas que admite el feed
  // Parte ejecución
  var leermaximo = 10000; // Máximo de entradas a leer/mostrar
  var posts = new Array();
  $.getJSON(feed + '?alt=json&callback=?').done(function(data) {
    var longfeed = parseInt(data.feed.openSearch$totalResults.$t);
    if (leermaximo < longfeed) {
      longfeed = leermaximo;
    }
    if (Math.ceil(longfeed / postsxfeed) < 2) {postsxfeed = longfeed-1;}
    var peticiones = Math.ceil(longfeed / postsxfeed);
    var ajax = [];
    for (i = 0; i < peticiones; i++) {
        ajax.push(leerfeeds(i));
    }

    function leerfeeds(id) {
      var startindex = (i * postsxfeed) + 1;
      var maxresults = postsxfeed;
      if (i == (peticiones - 1)) {
        maxresults = leermaximo - (postsxfeed * i);
      }
      var url = feed + '?orderby=published&start-index=' + startindex + '&max-results=' + maxresults + '&alt=json&callback=?';
      return $.getJSON(url);
    }
    $.when.apply($, ajax).done(function(data) {
      var obj = [];
      var orden = 0;
      for (var i = 0; i < arguments.length; i++) {
        obj.push(arguments[i][0]);
      }
      for (i = 0; i < arguments.length; i++) {
        $.each(
          obj[i].feed.entry || [],
          function(i, e) {
            var etiquetas = [];
            if (e.category) {
              for (var k = 0; k < e.category.length; k++) {
                var incluir = true;
                for (var x = 0; x < exclusion.length; x++) {
                  if (e.category[k].term == exclusion[x]) {
                    incluir = false;
                    break;
                  }
                }
                if (incluir) {
                  posts[orden] = new Array();
                  // Etiquetas [x][0]
                  posts[orden][0] = e.category[k].term;
                  // Fecha [x][1]
                  posts[orden][1] = new Date(e.published.$t || Date.now());
                  // Titulo [x][2]
                  posts[orden][2] = (e.title.$t || '');
                  // Link [x][3]
                  posts[orden][3] = (e.link || []).slice(-1)[0].href;
                  orden++;
                }
              }
            } else {
                  posts[orden] = new Array();
              posts[orden][0] = 'Varios';
              posts[orden][1] = new Date(e.published.$t || Date.now());
              posts[orden][2] = (e.title.$t || '');
              posts[orden][3] = (e.link || []).slice(-1)[0].href;
              orden++;
            }
          });
      }
      posts.sort(function(a, b) {
        // Ordenar ETIQUETA A-Z
        if (a[0] > b[0]) return 1;
        if (a[0] < b[0]) return -1;
        // Ordenar ETIQUETA Z-A
        //if (a[0] > b[0]) return -1;
        //if (a[0] < b[0]) return 1;
        // Ordenar POST por titulo A-Z
        if (a[2] > b[2]) return 1;
        if (a[2] < b[2]) return -1;
        // Ordenar POST por titulo Z-A
        //if (a[2] > b[2]) return -1;
        //if (a[2] < b[2]) return 1;
        // Ordenar POST por fecha Reciente-Antigua
        //if (a[1] < b[1]) return 1;
        //if (a[1] > b[1]) return -1;
        return 0;
      });
      var actual = '';
      var anterior = '';
      var salida = '';
      var cierre = '';
      cajasalida.append('<ul class="bsitemap"></ul>');
      for (var j = 0; j < posts.length; j++) {
        actual = posts[j][0];
        if (j > 0) {
          anterior = posts[j - 1][0];
          cierre = '</ul></li>';
        }
        if (actual != anterior) {
          salida += cierre + '<li><a href="javascript:void();">' + posts[j][0] + '</a><ul>';
        }
        var timestamp = new Date().getTime() - (30 * 24 * 60 * 60 * 1000);
        if (timestamp <= posts[j][1]) {
          clase = 'bnuevo';
        } else {
          clase = 'bantiguo';
        }
        salida += '<li><a class="' + clase + '" href="' + posts[j][3] + '">' + posts[j][2] + '</a></li>';
      }
      salida += '</ul></li>';
      $('.bloading').remove();
      $('ul.bsitemap').append(salida);
      $('ul.bsitemap > li:has(ul)').addClass('desplegable');
      $('ul.bsitemap > li a').click(function() {
        var comprobar = $(this).next();
        $('ul.bsitemap li').removeClass('activa');
        $(this).closest('li').addClass('activa');
        if ((comprobar.is('ul')) && (comprobar.is(':visible'))) {
          $(this).closest('li').removeClass('activa');
          comprobar.slideUp('normal');
        }
        if ((comprobar.is('ul')) && (!comprobar.is(':visible'))) {
          $('ul.bsitemap ul:visible').slideUp('normal');
          comprobar.slideDown('normal')
        }
      });
    });
  });
    });
              
            
!
999px

Console