<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Site Validator report for <%= @url %></title> <link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css"> <style type="text/css"> /* * Style tweaks from http://getbootstrap.com/examples/offcanvas/offcanvas.css * -------------------------------------------------- */ body { padding-top: 70px; } footer { padding-left: 15px; padding-right: 15px; } /* * Off Canvas * -------------------------------------------------- */ @media screen and (max-width: 768px) { .row-offcanvas { position: relative; -webkit-transition: all 0.25s ease-out; -moz-transition: all 0.25s ease-out; transition: all 0.25s ease-out; } .row-offcanvas-right .sidebar-offcanvas { right: -50%; /* 6 columns */ } .row-offcanvas-left .sidebar-offcanvas { left: -50%; /* 6 columns */ } .row-offcanvas-right.active { right: 50%; /* 6 columns */ } .row-offcanvas-left.active { left: 50%; /* 6 columns */ } .sidebar-offcanvas { position: absolute; top: 0; width: 50%; /* 6 columns */ } } </style> <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]> <script src="http://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.2/html5shiv.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/respond.js/1.3.0/respond.js"></script> <![endif]--> <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css"> <link rel="stylesheet" href="https://sitevalidator.com/cdn/highlightjs/7.3/styles/default.min.css"> <style type="text/css"> h1 { margin-top: 0px; margin-bottom: 15px; } a.navbar-brand { color: #FFF !important; } footer { margin-top: 10px; font-weight: bold; font-size: 0.95em; } /* Tabs */ .tab-content { border: 1px solid #ddd; border-top: 0px; padding: 10px; } .nav-tabs { margin-bottom: 0; } /* Explanations */ .w3c_explanation { border: 1px solid #ddd; background-color: #ffe; padding: 10px; margin: 5px 5px 25px 5px; font-size: 0.8em; } .helpwanted { float: right; font-size: 2em; } .coordinates { float: right; margin: 10px; background-color: #fff; color: #333; border: 1px solid #aaa;} </style> </head> <body> <div class="navbar navbar-fixed-top navbar-inverse" role="navigation"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="https://sitevalidator.com">Site Validator</a> </div> <div class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="http://sitevalidator.com/plans-and-pricing">Plans and pricing</a></li> <li><a href="https://sitevalidator.com/faqs">FAQs</a></li> <li><a href="mailto:support@sitevalidator.com">Contact</a></li> </ul> </div><!-- /.nav-collapse --> </div><!-- /.container --> </div><!-- /.navbar --> <div class="container"> <h1>Site validation for <a href='<%= @url %>'><%= @url %></a></h1> <ul class="nav nav-tabs"> <li class="active"><a href="#urls">List of URLs</a></li> <li><a href="#errors"><%= errors.length %> HTML errors</a></li> <li><a href="#warnings"><%= warnings.length %> HTML warnings</a></li> </ul> <div class="tab-content"> <div class="tab-pane active" id="urls"> <% processed_pages = pages.select{|p| !p.exception} %> <% if processed_pages.size > 0 %> <div class="accordion"> <% processed_pages.each do |page| %> <h3> <%= page.url %> <div class="pull-right"> <span class="label label-danger"><%= "#{page.errors.length} ERRORS" %></span> <span class="label label-warning"><%= "#{page.warnings.length} WARNINGS" %></span> </div> </h3> <div style="padding:10px;"> <div class="accordion"> <% page.errors.sort_by {|e| e.line.to_i}.each do |error| %> <h3> <span class="label label-danger">ERROR</span> <%= CGI::escapeHTML(error.text.capitalize) %> </h3> <div> <% if error.line && error.col %> <span class="coordinates label"> LINE <%= error.line %>, COL <%= error.col %> </span> <% end %> <% if error.source && error.source.strip.length > 0 %> <pre><code class="html"><%= error.source.strip %></code></pre> <% end %> <% if error.explanation && error.explanation.strip.length > 0 %> <div class="w3c_explanation"><%= error.explanation.strip %></div> <% end %> </div> <% end %> <% page.warnings.sort_by {|w| w.line.to_i}.each do |warning| %> <h3> <span class="label label-warning">WARNING</span> <%= CGI::escapeHTML(warning.text.capitalize) %> </h3> <div> <% if warning.line && warning.col %> <span class="coordinates label"> LINE <%= warning.line %>, COL <%= warning.col %> </span> <% end %> <% if warning.source && warning.source.strip.length > 0 %> <pre><code class="html"><%= warning.source.strip %></code></pre> <% end %> <% if warning.explanation && warning.explanation.strip.length > 0 %> <div class="w3c_explanation"><%= warning.explanation.strip %></div> <% end %> </div> <% end %> </div> </div> <% end %> </div> <% end %> </div> <div class="tab-pane" id="errors"> <% if errors.length > 0 %> <div class="accordion"> <% errors.group_by {|e| e.text}.sort_by {|t, e| e.length}.reverse.each do |text, errors| %> <h3><span class="label label-danger"><%= errors.length %></span> <%= CGI::escapeHTML(text.capitalize) %></h3> <div> <% if errors.first.explanation && errors.first.explanation.strip.length > 0 %> <div class="w3c_explanation"><%= errors.first.explanation.strip %></div> <% end %> </div> <% end %> </div> <% end %> </div> <div class="tab-pane" id="warnings"> <% if warnings.length > 0 %> <div class="accordion"> <% warnings.group_by {|w| w.text}.sort_by {|t, w| w.length}.reverse.each do |text, warnings| %> <h3><span class="label label-warning"><%= warnings.length %></span> <%= CGI::escapeHTML(text.capitalize) %></h3> <div> <% if warnings.first.explanation && warnings.first.explanation.strip.length > 0 %> <div class="w3c_explanation"><%= warnings.first.explanation.strip %></div> <% end %> </div> <% end %> </div> <% end %> </div> </div> <footer class="well well-lg"> <p>This site validation report has been generated using the free, open source <a href="http://gem.sitevalidator.com">Site Validator ruby gem</a>.</p> <p>For deep link crawling, HTML+CSS validation, storage of results and team collaborations, you can use the <a href="https://sitevalidator.com">Site Validator app</a>.</p> <p class="small">We're independent, not associated with the W3C.</p> </footer> </div> <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script> <script type="text/javascript"> $('.accordion').accordion({active: 'false', heightStyle: 'content' }); </script> <script src="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script> <script type="text/javascript"> $('.nav-tabs a').click(function (e) { e.preventDefault(); $(this).tab('show'); }) </script> <script src="https://sitevalidator.com/cdn/highlightjs/7.3/highlight.min.js"></script> <script type="text/javascript"> hljs.initHighlightingOnLoad(); </script> </body> </html>