Show a message saying nothing to show if there's no packages or no symbols.

This commit is contained in:
Eitaro Fukamachi 2015-07-22 18:24:17 +09:00
parent b6468ffbc0
commit 999e0bdabe
3 changed files with 18 additions and 4 deletions

View file

@ -107,6 +107,11 @@
(getf symbol :name)))
symbol)
(getf package :symbols)))
(setf (getf package :external-symbols)
(remove-if-not
(lambda (symbol)
(getf symbol :externalp))
(getf package :symbols)))
package)
(system-extracted-info-packages
(system-extracted-info system)))))

View file

@ -558,6 +558,10 @@ ul {
margin-bottom: 0;
overflow: scroll;
}
.nothing {
font-style: italic;
color: #888;
}
section {
margin-bottom: 40px;
}

View file

@ -47,9 +47,9 @@
{% if package.docstring %}
<div class="docstring"><pre>{{ package.docstring }}</pre></div>
{% endif %}
{% if package.external-symbols %}
<ul>
{% for symbol in package.symbols %}
{% if symbol.externalp %}
{% for symbol in package.external-symbols %}
<li class="symbol">
<span class="symbol-type label {{ symbol.type }}">{{ symbol.type | capfirst }}</span>
<code class="symbol-name">{% if symbol.setfp %}(setf {{ symbol.name }}){% else %}{{ symbol.name }}{% endif %}</code>
@ -99,13 +99,15 @@
{% endfor %}
</dl>
{% else %}
No slots
<div class="nothing">No slots.</div>
{% endif %}
{% endif %}
</li>
{% endif %}
{% endfor %}
</ul>
{% else %}
<div class="nothing">No exported symbols.</div>
{% endif %}
{% if package.reexport-symbols %}
<h3>Also exports</h3>
<ul class="also-exports">
@ -116,6 +118,9 @@
{% endif %}
</section>
{% endfor %}
{% if not system.packages %}
<div class="nothing">No packages.</div>
{% endif %}
</div>
</article>
{% endfor %}