1
0
mirror of https://github.com/stedolan/jq.git synced 2024-05-11 05:55:39 +00:00

Fix some w3c validator complaints

This commit is contained in:
David Tolnay
2015-08-13 23:34:09 -07:00
parent d36a85a369
commit e3e7cea177
4 changed files with 46 additions and 44 deletions

View File

@@ -16,6 +16,10 @@ module ExtraFilters
input.gsub(/[^a-zA-Z0-9_]/,"")
end
def no_paragraph(input)
input.gsub('<p>', '').gsub('</p>', '')
end
def json(input)
input.to_json
end

View File

@@ -10,7 +10,7 @@
<div class="jumbotron">
<div class="row">
<div class="col-sm-6">
<img src="{{root}}/jq.png" class="img-responsive"
<img src="{{root}}/jq.png" class="img-responsive" alt="jq logo"
width="400" height="220">
</div>
<div class="col-sm-6">

View File

@@ -34,49 +34,47 @@
<h2>{{section.title}}</h2>
{{section.body | markdownify}}
{% for entry in section.entries %}
<section id="{{entry.title | sanitize}}">
<h3>
{{entry.title | markdownify}}
{% if entry.subtitle %}<small>{{entry.subtitle}}</small>{% endif %}
</h3>
{{entry.body | markdownify}}
<section>
<h3>
{{entry.title | markdownify | no_paragraph}}
{% if entry.subtitle %}<small>{{entry.subtitle}}</small>{% endif %}
</h3>
{{entry.body | markdownify}}
{% if entry.examples %}
<div>
{% capture exampleID %}{{ "" | unique }}{% endcapture %}
<a data-toggle="collapse" href="#example{{exampleID}}">
<i class="glyphicon glyphicon-chevron-right"></i>
{% if entry.examples[1] %}Examples{%else%}Example{%endif%}
</a>
<div id="example{{exampleID}}" class="collapse">
{% for example in entry.examples %}
<table class="manual-example">
<tr><th></th><td class="jqprogram">jq '{{example.program | escape}}'</td></tr>
<tr><th>Input</th><td>{{example.input | escape}}</td></tr>
{% unless example.output[0] %}
<tr>
<th>Output</th>
<td><i>none</i></td>
</tr>
{% endunless %}
{% for output in example.output %}
<tr>
{% if forloop.index == 1 %}
<th>Output</th>
{% else %}
<th></th>
{% endif %}
<td>{{output | escape}}</td>
</tr>
{% if entry.examples %}
<div>
{% capture exampleID %}{{ "" | unique }}{% endcapture %}
<a data-toggle="collapse" href="#example{{exampleID}}">
<i class="glyphicon glyphicon-chevron-right"></i>
{% if entry.examples[1] %}Examples{%else%}Example{%endif%}
</a>
<div id="example{{exampleID}}" class="collapse">
{% for example in entry.examples %}
<table class="manual-example">
<tr><th></th><td class="jqprogram">jq '{{example.program | escape}}'</td></tr>
<tr><th>Input</th><td>{{example.input | escape}}</td></tr>
{% unless example.output[0] %}
<tr>
<th>Output</th>
<td><i>none</i></td>
</tr>
{% endunless %}
{% for output in example.output %}
<tr>
{% if forloop.index == 1 %}
<th>Output</th>
{% else %}
<th></th>
{% endif %}
<td>{{output | escape}}</td>
</tr>
{% endfor %}
</table>
{% endfor %}
</table>
{% endfor %}
</div>
</div>
</div>
{% endif %}
</section>
{% endif %}
</section>
{% endfor %}
</section>
{% endfor %}

View File

@@ -1,7 +1,7 @@
<div class="navbar navbar-default navbar-fixed-top">
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button aria-expanded="false" type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#nav-collapse">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#nav-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
@@ -10,7 +10,7 @@
<a class="navbar-brand" href="{{root}}/">jq</a>
</div>
<div style="height: 1px;" aria-expanded="false" class="navbar-collapse collapse" id="nav-collapse">
<div class="navbar-collapse collapse" id="nav-collapse">
<ul class="nav navbar-nav">
{% for item in navigation %}
<li {% if item.permalink == permalink %} class="active" {% endif %}>