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
$children = $resource->children;
$children = $resource->children;
$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>
<h1>
<a href="#"><?= htmlReady($resource->getFullName()) ?></a>
......@@ -18,14 +18,16 @@ $has_children = count($children) > 0;
'resources/_common/_resource_tree_item',
[
'resource' => $child,
'open' => false
'open' => false
]
) ?>
<? endforeach ?>
</section>
<? else : ?>
<section>
<?= htmlReady($resource->description) ?>
</section>
<? if ((string)$resource->description !== '') : ?>
<section>
<?= htmlReady($resource->description) ?>
</section>
<? endif ?>
<? endif ?>
</article>
......@@ -81,6 +81,13 @@ article.studip {
}
}
&.empty {
> header {
margin-bottom: 0;
}
padding-bottom: 0;
}
&.toggle {
> header {
h1 > a {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment