Nofu/template/default/content.php

70 lines
3.6 KiB
PHP
Raw Permalink Normal View History

2024-06-14 17:20:01 +02:00
<div class="card-container <?= $config['view']; ?>">
<?php foreach ($services as $service) : ?>
<div class="card <?= $service['type'] . ' ' . $service['location']; ?>">
<?php if ($config['view'] !== 'icons') : ?>
<a href="<?= $service['link']; ?>" rel="noopener noreferrer" target="_blank">
<?php endif; ?>
<?php if ($config['view'] === 'full') : ?>
<img class="thumb" src="<?= $KTH->returnImg($service['screenshot'], 'thumbs'); ?>" alt="Thumbshot" />
<?php endif; ?>
<?php if ($config['view'] !== 'icons') : ?>
</a><?php endif; ?>
<div class="content">
<h3>
<a href="<?= $service['link']; ?>" rel="noopener noreferrer" target="_blank" title="<?= $service['title']; ?>" >
<?php if ($config['view'] === 'icons') : ?>
<img class="favicon" loading="lazy" src="<?= $KTH->returnImg($service['favicon'], 'big_favicons'); ?>" alt="Favicon" />
<?php else :; ?>
<img class="favicon" loading="lazy" src="<?= $KTH->returnImg($service['favicon'], 'favicons'); ?>" alt="Favicon" />
<?php endif; ?>
<?php if ($config['view'] !== 'icons') : ?><?= $service['title']; ?><?php endif; ?>
</a>
</h3>
<?php if ($config['view'] !== 'icons') : ?>
<p class="readMore">
2024-09-12 16:21:52 +02:00
<a tabindex=0 class="button" onkeydown="showReadMore('<?= md5($service['link']); ?>')" onclick="showReadMore('<?= md5($service['link']); ?>')">More info</a>
2024-06-14 17:20:01 +02:00
</p>
<?php endif; ?>
</div>
</div>
<div id="modal-<?= md5($service['link']); ?>" class="modal">
<!-- Modal content -->
<div class="modal-content">
<div class="modal-header">
2024-09-12 16:21:52 +02:00
<a class="close" id="close-<?= md5($service['link']); ?>" tabindex=0 >&times;</a>
2024-06-14 17:20:01 +02:00
<h2>
<img class="favicon" loading="lazy" src="<?= $KTH->returnImg($service['favicon'], 'favicons'); ?>" alt="Favicon" height="32px" />
<?= $service['title']; ?>
</h2>
<ul>
<li>Software : <a href="<?= $service['appHome']; ?>" target="_blank"><?= $service['appHome']; ?></a></li>
<li>Installation type : <?= $service['type']; ?></li>
<li>Machine : <?= $service['location']; ?></li>
</ul>
</div>
<div class="modal-body">
<p><?= $service['desc']; ?></p>
<p class="">
<a href="<?= $service['link']; ?>" rel="noopener noreferrer" target="_blank">
<img loading="lazy" class="screenshot" src="<?= $KTH->returnImg($service['screenshot'], 'screenshots'); ?>" alt="Screenshot" />
</a>
</p>
</div>
</div>
</div>
<?php endforeach; ?>
<div id="modal-userDoc" class="modal">
<!-- Modal content -->
<div class="modal-content userDoc">
<div class="modal-header">
<span class="close" id="close-userDoc">&times;</span>
</div>
<div class="modal-body">
<?= $userDoc; ?>
</div>
</div>
</div>
</div>