Skip to content
Snippets Groups Projects
Commit 9f4330a9 authored by David Siegfried's avatar David Siegfried
Browse files

remove useless whitespace, closes #2340

Closes #2340

Merge request studip/studip!1530
parent e0a4a4f6
No related branches found
No related tags found
No related merge requests found
<?php <?php
$children = $resource->children; $children = $resource->children;
$has_children = count($children) > 0; $has_children = count($children) > 0;
?> ?>
<article class="studip <?= $has_children ? 'toggle' : ''?> <?= $open ? 'open' : ''?>"> <article class="studip <?= $has_children ? 'toggle' : ((string)$resource->description === '' ? 'empty' : '') ?> <?= $open ? 'open' : '' ?>">
<header> <header>
<h1> <h1>
<a href="#"><?= htmlReady($resource->getFullName()) ?></a> <a href="#"><?= htmlReady($resource->getFullName()) ?></a>
...@@ -18,14 +18,16 @@ $has_children = count($children) > 0; ...@@ -18,14 +18,16 @@ $has_children = count($children) > 0;
'resources/_common/_resource_tree_item', 'resources/_common/_resource_tree_item',
[ [
'resource' => $child, 'resource' => $child,
'open' => false 'open' => false
] ]
) ?> ) ?>
<? endforeach ?> <? endforeach ?>
</section> </section>
<? else : ?> <? else : ?>
<section> <? if ((string)$resource->description !== '') : ?>
<?= htmlReady($resource->description) ?> <section>
</section> <?= htmlReady($resource->description) ?>
</section>
<? endif ?>
<? endif ?> <? endif ?>
</article> </article>
...@@ -81,6 +81,13 @@ article.studip { ...@@ -81,6 +81,13 @@ article.studip {
} }
} }
&.empty {
> header {
margin-bottom: 0;
}
padding-bottom: 0;
}
&.toggle { &.toggle {
> header { > header {
h1 > a { h1 > a {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment