Hide empty headers on index (close #125)

This commit is contained in:
Petr Sloup 2017-03-14 16:02:54 +01:00
parent b93bc5fadc
commit 37386bfb29
2 changed files with 76 additions and 72 deletions

View file

@ -19,6 +19,7 @@
<section>
<h1 class="title {{#if is_light}}light{{/if}}"><img src="/images/logo.png" alt="TileServer GL" /></h1>
<h2 class="subtitle">Vector {{#if is_light}}<s>and raster</s>{{else}}and raster{{/if}} maps with GL styles</h2>
{{#if styles}}
<h2 class="box-header">Styles</h2>
<div class="box">
{{#each styles}}
@ -64,6 +65,8 @@
</div>
{{/each}}
</div>
{{/if}}
{{#if data}}
<h2 class="box-header">Data</h2>
<div class="box">
{{#each data}}
@ -98,6 +101,7 @@
</div>
{{/each}}
</div>
{{/if}}
</section>
<footer>
<a href="https://www.klokantech.com/" target="_blank"><img src="/images/klokantech.png" /></a>

View file

@ -309,8 +309,8 @@ module.exports = function(opts, callback) {
}
});
return {
styles: styles,
data: data
styles: Object.keys(styles).length ? styles : null,
data: Object.keys(data).length ? data : null
};
});