Skip to content

Commit

Permalink
docs(tmpl): add divider
Browse files Browse the repository at this point in the history
  • Loading branch information
zarov authored and gchoqueux committed Apr 17, 2019
1 parent 765e381 commit 0f467c9
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 6 deletions.
20 changes: 14 additions & 6 deletions docs/static/styles/itowns.css
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ section {
padding: 20px;
}

a, a:visited{
a, a:visited, nav ul a, nav ul a:visited {
cursor: pointer;
color: #6091b2;
text-decoration: underline;
Expand All @@ -68,7 +68,7 @@ h1, h2, h3, h4, h5 {
}

h1 {
font-size: 42px;
font-size: 28px;
}

header h1 {
Expand All @@ -77,8 +77,12 @@ header h1 {
}

h2 {
font-size: 24px;
margin-top: 32px;
font-size: 20px;
margin-bottom: 26px;
}

nav h2 {
margin-top: 26px;
}

header h2, article h2 {
Expand All @@ -87,7 +91,6 @@ header h2, article h2 {

h3 {
font-size: 16px;
margin-top: 26px;
}

h4 {
Expand Down Expand Up @@ -148,7 +151,12 @@ code, .prettyprint code {

hr {
color: #ccc0b640;
margin-top: 26px;
margin: 26px 0;
}

hr.title-divider {
color: #ccc0b6;
margin: 20
}

p, ul, ol {
Expand Down
2 changes: 2 additions & 0 deletions docs/tmpl/nav.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
</ul>
</div>

<hr class="title-divider"/>

<h2>API</h2>
<?js for (const p in packages) { ?>
<div class="package">
Expand Down
7 changes: 7 additions & 0 deletions docs/tmpl/page.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,19 @@
<?js } ?>

<?js if (content.kind === 'class') { ?>
<hr class="title-divider"/>
<h2>Constructor</h2>
<?js= self.partial('method.tmpl', content) ?>
<?js } ?>

<?js if (content.examples && content.examples.length) { ?>
<hr class="title-divider"/>
<h2>Example</h2>
<?js= self.partial('examples.tmpl', content.examples) ?>
<?js } ?>

<?js if (content.properties && content.properties.length) { ?>
<hr class="title-divider"/>
<h2>Properties</h2>
<?js content.properties.forEach(function(property, i) { ?>
<?js= self.partial('property.tmpl', property) ?>
Expand All @@ -56,6 +59,7 @@
var methods = self.find({kind: 'function', scope: 'instance', memberof: content.longname});
if (methods && methods.length) {
?>
<hr class="title-divider"/>
<h2>Methods</h2>
<?js methods.forEach(function(method, i) { ?>
<?js= self.partial('method.tmpl', method) ?>
Expand All @@ -67,6 +71,7 @@
var statics = self.find({kind: 'function', scope: 'static', memberof: content.longname});
if (statics && statics.length) {
?>
<hr class="title-divider"/>
<h2>Static Methods</h2>
<?js statics.forEach(function(static, i) { ?>
<?js= self.partial('method.tmpl', static) ?>
Expand All @@ -78,6 +83,7 @@
var typedefs = self.find({kind: 'typedef', memberof: content.longname });
if (typedefs && typedefs.length) {
?>
<hr class="title-divider"/>
<h2>Types</h2>
<?js typedefs.forEach(function(typedef, i) { ?>
<?js= self.partial('typedef.tmpl', typedef) ?>
Expand All @@ -89,6 +95,7 @@
var events = self.find({kind: 'event', memberof: content.longname });
if (events && events.length) {
?>
<hr class="title-divider"/>
<h2>Events</h2>
<?js events.forEach(function(event, i) { ?>
<?js= self.partial('events.tmpl', event) ?>
Expand Down
1 change: 1 addition & 0 deletions docs/tmpl/source.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
if (obj.meta) {
var path = self.linkToSource(meta.filename, meta.path);
?>
<hr class="title-divider"/>
<h2>Source</h2>
<a target="_blank" href="https://github.com/itowns/itowns/blob/master/<?js= path ?>">
<?js= path ?>
Expand Down

0 comments on commit 0f467c9

Please sign in to comment.