<commit_before>doctype 5
html
  head
    title Dashboard
    link(rel='stylesheet',href='../css/butter.ui.css')
    script
      (function(){
        var currentDeletionId;

        function setDeletionHeaderState( state, projectName ) {
          var header = document.querySelector( 'div.butter-delete-confirmation' ),
              nameSpan = header.querySelector( 'span' ),
              table = document.querySelector( 'table' );

          if ( !state ) {
            //avoid shim problems completely
            header.className = 'butter-delete-confirmation';
            table.className = '';
          }
          else {
            nameSpan.innerHTML = projectName;

            //avoid shim problems completely
            header.className = 'butter-delete-confirmation open';
            table.className = 'confirm-delete';
          }
        }

        function createDeleteHandler( deleteElement ) {
          var projectId = deleteElement.getAttribute( 'data-project-id' ),
              projectName = deleteElement.getAttribute( 'data-project-name' );

          deleteElement.addEventListener( 'click', function( e ) {
            setDeletionHeaderState( true, projectName );
            currentDeletionId = projectId;
          }, false );
        }

        document.addEventListener( 'DOMContentLoaded', function( e ) {
          var deleteButtons = document.querySelectorAll( 'td > a.butter-delete-button' ),
              i = deleteButtons ? deleteButtons.length : 0,
              noButton = document.querySelector( 'div.butter-delete-confirmation > button.no' ),
              yesButton = document.querySelector( 'div.butter-delete-confirmation > button.yes' );

          noButton.addEventListener( 'click', function( e ) {
            setDeletionHeaderState( false );
            currentDeletionId = null;
          }, false );

          yesButton.addEventListener( 'click', function( e ) {
            var req, 
                row;
            if ( currentDeletionId ) {
              req = new XMLHttpRequest();
              req.open( 'GET', '/api/delete/' + currentDeletionId, false );
              row = document.querySelector( 'tr[data-project-id="' + currentDeletionId + '"]' );
              currentDeletionId = null;
              req.send( null );
              if ( req.status == 200 ) {
                row.parentNode.removeChild( row );
              }
              setDeletionHeaderState( false );
            }
          }, false );

          while ( i-- ) {
            createDeleteHandler( deleteButtons[ i ] );
          }
        }, false );
      }());
    style
      body {
        font-family: "Open Sans", "Helvetica Neue", sans-serif;
        background: #3D3F44;
        color: #888;
        width: 650px;
        margin: 0 auto;
        font-size: .9em;
      }
      table, th, tr, td {
        border: none;
        border-spacing: 0;
        padding: 0;
        margin: 0;
      }
      table {
        margin-top: 20px;
        -moz-transition: margin-top 0.5s;
        -webkit-transition: margin-top 0.5s;
        -ms-transition: margin-top 0.5s;
        -o-transition: margin-top 0.5s;
        transition: margin-top 0.5s;
      }
      table.confirm-delete {
        margin-top: 35px;
      }
      th {
        text-align: left;
        color: #EEE;
        border-bottom: 1px solid #222;
        font-size: 1.2em;
      }
      td, th {
        padding: 5px 10px;
      }
      td a {
        text-decoration: none;
        color: #fff;
      }
      td a:hover {
        text-decoration: underline;
        color: #fff;
      }
      td:first-child {
        width: 350px;
      }
      td:first-child:hover {
        background: rgb(255,239,158);
        -webkit-transition: .2s all;
        -moz-transition: .2s all;
        -ms-transition: .2s all;
        -o-transition: .2s all;
        transition: .2s all;
      }
      td:first-child:hover a {
        color: #242428; 
      }
      td:nth-child(2) {
        width: 300px;
      }
      tr:nth-child(odd) {
        background: rgba(0,0,0,.3);
      }
      tr:nth-child(even) {
        background: rgba(0,0,0,.4);
      }
      
      .butter-projects-title {
        display: block;
        text-align: left;
        text-decoration: none;
        color: #EEE;
      }
      .butter-projects-title:hover {
        color: #FFF;
      }
      .butter-delete-confirmation {
        position: fixed;
        width: 100%;
        left: 0;
        top: 51px;
        background: rgb(241,218,54); /* Old browsers */
        background: -moz-linear-gradient(top,  rgba(241,218,54,1) 0%, rgba(252,239,118,1) 100%); /* FF3.6+ */
        background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(241,218,54,1)), color-stop(100%,rgba(252,239,118,1))); /* Chrome,Safari4+ */
        background: -webkit-linear-gradient(top,  rgba(241,218,54,1) 0%,rgba(252,239,118,1) 100%); /* Chrome10+,Safari5.1+ */
        background: -o-linear-gradient(top,  rgba(241,218,54,1) 0%,rgba(252,239,118,1) 100%); /* Opera 11.10+ */
        background: -ms-linear-gradient(top,  rgba(241,218,54,1) 0%,rgba(252,239,118,1) 100%); /* IE10+ */
        background: linear-gradient(top,  rgba(241,218,54,1) 0%,rgba(252,239,118,1) 100%); /* W3C */
        filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f1da36', endColorstr='#fcef76',GradientType=0 ); /* IE6-9 */
        -moz-transition: all 0.5s;
        -webkit-transition: all 0.5s;
        -ms-transition: all 0.5s;
        -o-transition: all 0.5s;
        transition: all 0.5s;
        padding: 0px;
        color: #000;
        text-align: center;
        height: 0px;
        overflow: hidden;
      }
      .butter-delete-confirmation span {
        display: inline-block;
        max-width: 200px;
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: nowrap;
      }
      .butter-delete-confirmation.open {
        height: 20px;
        padding: 3px;
      }
  body.butter-header-spacing
    div#butter-header
      div.butter-header-inner
        div.butter-logo
        span.butter-name My Dashboard &ndash; 
          = user.email
    div.butter-delete-confirmation
      | Are you sure you want to delete "
      span.project-name
      | "? 
      button.yes Yes
      button.no No

    table
      tr
        th Project Title
        th Template
        th
      each project in projects<commit_msg>[t1643] css review changes<commit_after>doctype 5
html
  head
    title Dashboard
    link(rel='stylesheet',href='../css/butter.ui.css')
    script
      (function(){
        var currentDeletionId;

        function setDeletionHeaderState( state, projectName ) {
          var header = document.querySelector( 'div.butter-delete-confirmation' ),
              nameSpan = header.querySelector( 'span' ),
              table = document.querySelector( 'table' );

          if ( !state ) {
            //avoid shim problems completely
            header.className = 'butter-delete-confirmation';
            table.className = '';
          }
          else {
            nameSpan.innerHTML = projectName;

            //avoid shim problems completely
            header.className = 'butter-delete-confirmation open';
            table.className = 'confirm-delete';
          }
        }

        function createDeleteHandler( deleteElement ) {
          var projectId = deleteElement.getAttribute( 'data-project-id' ),
              projectName = deleteElement.getAttribute( 'data-project-name' );

          deleteElement.addEventListener( 'click', function( e ) {
            setDeletionHeaderState( true, projectName );
            currentDeletionId = projectId;
          }, false );
        }

        document.addEventListener( 'DOMContentLoaded', function( e ) {
          var deleteButtons = document.querySelectorAll( 'td > a.butter-delete-button' ),
              i = deleteButtons ? deleteButtons.length : 0,
              noButton = document.querySelector( 'div.butter-delete-confirmation > button.no' ),
              yesButton = document.querySelector( 'div.butter-delete-confirmation > button.yes' );

          noButton.addEventListener( 'click', function( e ) {
            setDeletionHeaderState( false );
            currentDeletionId = null;
          }, false );

          yesButton.addEventListener( 'click', function( e ) {
            var req, 
                row;
            if ( currentDeletionId ) {
              req = new XMLHttpRequest();
              req.open( 'GET', '/api/delete/' + currentDeletionId, false );
              row = document.querySelector( 'tr[data-project-id="' + currentDeletionId + '"]' );
              currentDeletionId = null;
              req.send( null );
              if ( req.status == 200 ) {
                row.parentNode.removeChild( row );
              }
              setDeletionHeaderState( false );
            }
          }, false );

          while ( i-- ) {
            createDeleteHandler( deleteButtons[ i ] );
          }
        }, false );
      }());
    style
      body {
        font-family: "Open Sans", "Helvetica Neue", sans-serif;
        background: #3D3F44;
        color: #888;
        width: 650px;
        margin: 0 auto;
        font-size: .9em;
      }
      table, th, tr, td {
        border: none;
        border-spacing: 0;
        padding: 0;
        margin: 0;
      }
      table {
        margin-top: 20px;
        -moz-transition: margin-top 0.3s;
        -webkit-transition: margin-top 0.3s;
        -ms-transition: margin-top 0.3s;
        -o-transition: margin-top 0.3s;
        transition: margin-top 0.3s;
      }
      table.confirm-delete {
        margin-top: 45px;
      }
      th {
        text-align: left;
        color: #EEE;
        border-bottom: 1px solid #222;
        font-size: 1.2em;
      }
      td, th {
        padding: 5px 10px;
      }
      td a {
        text-decoration: none;
        color: #fff;
      }
      td a:hover {
        text-decoration: underline;
        color: #fff;
      }
      td:first-child {
        width: 350px;
      }
      td:first-child:hover {
        background: rgb(255,239,158);
        -webkit-transition: .2s all;
        -moz-transition: .2s all;
        -ms-transition: .2s all;
        -o-transition: .2s all;
        transition: .2s all;
      }
      td:first-child:hover a {
        color: #242428; 
      }
      td:nth-child(2) {
        width: 300px;
      }
      tr:nth-child(odd) {
        background: rgba(0,0,0,.3);
      }
      tr:nth-child(even) {
        background: rgba(0,0,0,.4);
      }
      
      .butter-projects-title {
        display: block;
        text-align: left;
        text-decoration: none;
        color: #EEE;
      }
      .butter-projects-title:hover {
        color: #FFF;
      }
      .butter-delete-confirmation {
        position: fixed;
        width: 100%;
        left: 0;
        top: 51px;
        background: rgb(241,218,54); /* Old browsers */
        background: -moz-linear-gradient(top,  rgba(241,218,54,1) 0%, rgba(252,239,118,1) 100%); /* FF3.6+ */
        background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(241,218,54,1)), color-stop(100%,rgba(252,239,118,1))); /* Chrome,Safari4+ */
        background: -webkit-linear-gradient(top,  rgba(241,218,54,1) 0%,rgba(252,239,118,1) 100%); /* Chrome10+,Safari5.1+ */
        background: -o-linear-gradient(top,  rgba(241,218,54,1) 0%,rgba(252,239,118,1) 100%); /* Opera 11.10+ */
        background: -ms-linear-gradient(top,  rgba(241,218,54,1) 0%,rgba(252,239,118,1) 100%); /* IE10+ */
        background: linear-gradient(top,  rgba(241,218,54,1) 0%,rgba(252,239,118,1) 100%); /* W3C */
        filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f1da36', endColorstr='#fcef76',GradientType=0 ); /* IE6-9 */
        -moz-transition: all 0.3s;
        -webkit-transition: all 0.3s;
        -ms-transition: all 0.3s;
        -o-transition: all 0.3s;
        transition: all 0.3s;
        padding: 0px;
        color: #000;
        text-align: center;
        height: 0px;
        overflow: hidden;
      }
      .butter-delete-confirmation span {
        max-width: 200px;
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: nowrap;
      }
      .butter-delete-confirmation.open {
        height: 20px;
        padding: 8px;
      }
  body.butter-header-spacing
    div#butter-header
      div.butter-header-inner
        div.butter-logo
        span.butter-name My Dashboard &ndash; 
          = user.email
    div.butter-delete-confirmation
      | Are you sure you want to delete "
      span.project-name
      | "? 
      button.yes Yes
      button.no No

    table
      tr
        th Project Title
        th Template
        th
      each project in projects
{'fraction_non_alphanumeric': 0.1285068578553616, 'fraction_numerical': 0.042861596009975064, 'mean_word_length': 1.7544537454389353, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3602927', 'n_tokens_mistral': 4366, 'n_tokens_neox': 3906, 'n_words': 792}