Changed html structure and css for sections

This commit is contained in:
drgomesp 2013-02-25 17:27:09 -03:00
parent 5d9accfdb5
commit 381476a2eb
3 changed files with 18 additions and 4 deletions

View File

@ -137,12 +137,13 @@ abstract class AbstractFormatter implements FormatterInterface
if($section) { if($section) {
$processedCollection[$section][$path][] = $this->processAnnotation($annotation); $processedCollection[$section][$path][] = $this->processAnnotation($annotation);
} else { } else {
$processedCollection['others'][$path][] = $this->processAnnotation($annotation); $processedCollection['_others'][$path][] = $this->processAnnotation($annotation);
} }
} }
} }
} }
ksort($processedCollection);
return $processedCollection; return $processedCollection;
} }
} }

View File

@ -169,7 +169,16 @@ table tbody tr:last-child td {
font-size: 0.9em; font-size: 0.9em;
} }
#section {
border: 1px solid #ddd;
background: #f8f8f8;
padding: 5px 20px;
margin-bottom: 15px;
}
li.resource { li.resource {
width: 100%;
margin-bottom: 10px;
border-bottom: 1px solid #dddddd; border-bottom: 1px solid #dddddd;
} }
li.resource:last-child { li.resource:last-child {
@ -226,7 +235,7 @@ li.operation {
clear: both; clear: both;
overflow: hidden; overflow: hidden;
display: block; display: block;
margin: 0 0 10px 0; margin: 0 0 10px;
padding: 0 0 0 0; padding: 0 0 0 0;
} }
li.operation div.heading { li.operation div.heading {

View File

@ -2,13 +2,14 @@
{% block content %} {% block content %}
{% for section, sections in resources %} {% for section, sections in resources %}
{% if section != 'others' %} {% if section != '_others' %}
<div id="section">
<h1>{{ section }}</h1> <h1>{{ section }}</h1>
{% endif %} {% endif %}
{% for resource, methods in sections %} {% for resource, methods in sections %}
<li class="resource"> <li class="resource">
<div class="heading"> <div class="heading">
{% if section == 'others' and resource == 'others' %} {% if section == '_others' and resource != 'others' %}
<h2>{{ resource }}</h2> <h2>{{ resource }}</h2>
{% endif %} {% endif %}
{% if resource != 'others' %} {% if resource != 'others' %}
@ -26,5 +27,8 @@
</ul> </ul>
</li> </li>
{% endfor %} {% endfor %}
{% if section != '_others' %}
</div>
{% endif %}
{% endfor %} {% endfor %}
{% endblock content %} {% endblock content %}