aboutsummaryrefslogtreecommitdiff
path: root/doc-tool
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2017-02-03 16:12:56 +0100
committerFelix Mulder <felix.mulder@gmail.com>2017-02-03 17:21:05 +0100
commitcf068d4f89784f00be7595c4d38ec0cac1f611d0 (patch)
treecc6c08e849dccbe8212a030fad5b148dc464e614 /doc-tool
parenteff150f8af6b085382ff1cfb675bc7b6914f51b3 (diff)
downloaddotty-cf068d4f89784f00be7595c4d38ec0cac1f611d0.tar.gz
dotty-cf068d4f89784f00be7595c4d38ec0cac1f611d0.tar.bz2
dotty-cf068d4f89784f00be7595c4d38ec0cac1f611d0.zip
Add supertypes and annotations to entity title
Diffstat (limited to 'doc-tool')
-rw-r--r--doc-tool/resources/_layouts/api-page.html15
-rw-r--r--doc-tool/resources/css/api-page.css20
-rw-r--r--doc-tool/src/dotty/tools/dottydoc/staticsite/Template.scala1
3 files changed, 36 insertions, 0 deletions
diff --git a/doc-tool/resources/_layouts/api-page.html b/doc-tool/resources/_layouts/api-page.html
index 392c0ef2d..3d4763ec7 100644
--- a/doc-tool/resources/_layouts/api-page.html
+++ b/doc-tool/resources/_layouts/api-page.html
@@ -10,6 +10,9 @@ extraCSS:
<div id="entity-container">
<div id="entity-title">
+ <span id="entity-annotations">
+ {% for annot in entity.annotations %}@{{ annot | split: '.' | last }} {% endfor %}
+ </span>
<span id="entity-modifiers">
{{ entity.modifiers | join: " " }}
</span>
@@ -32,6 +35,18 @@ extraCSS:
{% endfor %}
<span class="no-left">]</span>
</span>
+ {% if entity.superTypes.size > 0 %}
+ <div id="super-types">
+ {% for super in entity.superTypes %}
+ {% if forloop.first %}
+ <span class="keyword">extends</span>
+ {% else %}
+ <span class="keyword">with</span>
+ {% endif %}
+ <span class="entity-super-type">{% renderLink super %}</span>
+ {% endfor %}
+ </div>
+ {% endif %}
</div>
{% if entity.comment.body %}
diff --git a/doc-tool/resources/css/api-page.css b/doc-tool/resources/css/api-page.css
index 9bcea9a27..a64317545 100644
--- a/doc-tool/resources/css/api-page.css
+++ b/doc-tool/resources/css/api-page.css
@@ -14,11 +14,31 @@ div#entity-title {
font-size: 2.5rem;
}
+div#entity-title > span#entity-annotations,
div#entity-title > span#entity-modifiers,
div#entity-title > span#entity-kind {
font-weight: 100;
}
+div#entity-title > div#super-types > span.keyword {
+ font-weight: 100;
+}
+
+div#entity-title > div#super-types > span.keyword,
+div#entity-title > div#super-types > span.entity-super-type {
+ font-size: 25px;
+}
+
+div#entity-title > div#super-types> span.entity-super-type > a,
+div#entity-title > div#super-types> span.entity-super-type > a:focus {
+ text-decoration: none;
+ color: #34495e;
+}
+
+div#entity-title > div#super-types> span.entity-super-type > a:hover {
+ text-decoration: underline;
+}
+
div#entity-title span.no-left {
margin-left: -9px;
}
diff --git a/doc-tool/src/dotty/tools/dottydoc/staticsite/Template.scala b/doc-tool/src/dotty/tools/dottydoc/staticsite/Template.scala
index 9720084f3..498b21f57 100644
--- a/doc-tool/src/dotty/tools/dottydoc/staticsite/Template.scala
+++ b/doc-tool/src/dotty/tools/dottydoc/staticsite/Template.scala
@@ -87,6 +87,7 @@ case class LiquidTemplate(path: String, content: SourceFile) extends Template wi
Template.parse(show, JEKYLL)
.`with`(ResourceInclude(params, includes))
.`with`(RenderReference(params))
+ .`with`(RenderLink(params))
.`with`(RenderTitle(params))
.`with`(Docstring(params))
.render(toJavaMap(params))