Skip to content
Snippets Groups Projects
Commit 10339902 authored by Ron Lucke's avatar Ron Lucke Committed by Marcus Eibrink-Lunzenauer
Browse files

biest #537

parent 46738b63
No related branches found
No related tags found
No related merge requests found
...@@ -4,7 +4,12 @@ ...@@ -4,7 +4,12 @@
<? foreach($bookmarks as $bookmark) :?> <? foreach($bookmarks as $bookmark) :?>
<li class="tile <?= htmlReady($bookmark['element']['payload']['color'])?>"> <li class="tile <?= htmlReady($bookmark['element']['payload']['color'])?>">
<a href="<?= htmlReady($bookmark['url'])?>"> <a href="<?= htmlReady($bookmark['url'])?>">
<div class="preview-image" style="background-image: url(<?= htmlReady($bookmark['element']->getImageUrl()) ?>)" ></div> <? if ($element->getImageUrl() === null) : ?>
<div class="preview-image default-image"></div>
<? else : ?>
<div class="preview-image" style="background-image: url(<?= htmlReady($element->getImageUrl()) ?>)" ></div>
<? endif; ?>
<div class="description"> <div class="description">
<header><?= htmlReady($bookmark['element']['title']) ?></header> <header><?= htmlReady($bookmark['element']['title']) ?></header>
<div class="description-text-wrapper"> <div class="description-text-wrapper">
...@@ -26,4 +31,4 @@ ...@@ -26,4 +31,4 @@
<? else: ?> <? else: ?>
<?= MessageBox::info(_('Sie haben noch keine Lesezeichen angelegt.')); ?> <?= MessageBox::info(_('Sie haben noch keine Lesezeichen angelegt.')); ?>
<? endif; ?> <? endif; ?>
</div> </div>
\ No newline at end of file
...@@ -24,7 +24,11 @@ ...@@ -24,7 +24,11 @@
<? foreach($sem_courses[$semester->id]['coursewares'] as $element) :?> <? foreach($sem_courses[$semester->id]['coursewares'] as $element) :?>
<li class="tile <?= htmlReady($element['payload']['color'])?>"> <li class="tile <?= htmlReady($element['payload']['color'])?>">
<a href="<?= URLHelper::getLink('dispatch.php/course/courseware/?cid='.$element['range_id'].'#/structural_element/'.$element['id']) ?>"> <a href="<?= URLHelper::getLink('dispatch.php/course/courseware/?cid='.$element['range_id'].'#/structural_element/'.$element['id']) ?>">
<div class="preview-image" style="background-image: url(<?= htmlReady($element->getImageUrl()) ?>)" ></div> <? if ($element->getImageUrl() === null) : ?>
<div class="preview-image default-image"></div>
<? else : ?>
<div class="preview-image" style="background-image: url(<?= htmlReady($element->getImageUrl()) ?>)" ></div>
<? endif; ?>
<div class="description"> <div class="description">
<header><?= htmlReady($element['title']) ?></header> <header><?= htmlReady($element['title']) ?></header>
<div class="description-text-wrapper"> <div class="description-text-wrapper">
......
<div class="cw-content-projects"> <div class="cw-content-projects">
<? if(!empty($elements)): ?> <? if (!empty($elements)): ?>
<ul class="cw-tiles"> <ul class="cw-tiles">
<? foreach($elements as $element) :?> <? foreach ($elements as $element) :?>
<li class="tile <?= htmlReady($element['payload']['color'])?>"> <li class="tile <?= htmlReady($element['payload']['color'])?>">
<a href="<?= URLHelper::getLink('dispatch.php/contents/courseware/courseware#/structural_element/'.$element['id']) ?>"> <a href="<?= URLHelper::getLink('dispatch.php/contents/courseware/courseware#/structural_element/'.$element['id']) ?>">
<div class="preview-image" style="background-image: url(<?= htmlReady($element->getImageUrl()) ?>)" ></div> <? if ($element->getImageUrl() === null) : ?>
<div class="preview-image default-image"></div>
<? else : ?>
<div class="preview-image" style="background-image: url(<?= htmlReady($element->getImageUrl()) ?>)" ></div>
<? endif; ?>
<div class="description"> <div class="description">
<header><?= htmlReady($element['title']) ?></header> <header><?= htmlReady($element['title']) ?></header>
<div class="description-text-wrapper"> <div class="description-text-wrapper">
...@@ -21,7 +24,7 @@ ...@@ -21,7 +24,7 @@
</li> </li>
<? endforeach; ?> <? endforeach; ?>
</ul> </ul>
<? else: ?> <? else : ?>
<div class="cw-contents-overview-teaser"> <div class="cw-contents-overview-teaser">
<div class="cw-contents-overview-teaser-content"> <div class="cw-contents-overview-teaser-content">
<header><?= _('Ihre persönlichen Lernmaterialien')?></header> <header><?= _('Ihre persönlichen Lernmaterialien')?></header>
...@@ -37,4 +40,4 @@ ...@@ -37,4 +40,4 @@
</div> </div>
</div> </div>
<? endif; ?> <? endif; ?>
</div> </div>
\ No newline at end of file
...@@ -4113,8 +4113,11 @@ cw tiles ...@@ -4113,8 +4113,11 @@ cw tiles
width: 100%; width: 100%;
background-size: auto 180px; background-size: auto 180px;
background-repeat: no-repeat; background-repeat: no-repeat;
background-color: $black; background-color: $content-color-20;
background-position: center; background-position: center;
&.default-image {
@include background-icon(courseware, clickable, 128);
}
} }
.description { .description {
height: 220px; height: 220px;
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
<router-link :to="'/structural_element/' + child.id" :title="child.attributes.title"> <router-link :to="'/structural_element/' + child.id" :title="child.attributes.title">
<div <div
class="preview-image" class="preview-image"
:class="[hasImage(child) ? '' : 'default-image']"
:style="getChildStyle(child)" :style="getChildStyle(child)"
></div> ></div>
<div class="description"> <div class="description">
...@@ -170,7 +171,10 @@ export default { ...@@ -170,7 +171,10 @@ export default {
} else { } else {
return {}; return {};
} }
} },
hasImage(child) {
return child.relationships?.image?.data !== null;
},
}, },
}; };
</script> </script>
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