diff options
-rw-r--r-- | app/class/Media.php | 22 | ||||
-rw-r--r-- | app/view/templates/media.php | 70 | ||||
-rw-r--r-- | assets/css/home.css | 5 |
3 files changed, 63 insertions, 34 deletions
diff --git a/app/class/Media.php b/app/class/Media.php index b30b883..4053bed 100644 --- a/app/class/Media.php +++ b/app/class/Media.php @@ -111,6 +111,28 @@ class Media } + public function getsymbol() + { + switch ($this->type) { + case 'image': + $symbol = "🖼"; + break; + + case 'sound': + $symbol = "🎵"; + break; + + case 'video': + $symbol = "🎞"; + break; + + case 'other': + $symbol = "📄"; + break; + } + return $symbol; + } + // _________________________________________________ G E T ____________________________________________________ diff --git a/app/view/templates/media.php b/app/view/templates/media.php index 12d4a2f..1f70d35 100644 --- a/app/view/templates/media.php +++ b/app/view/templates/media.php @@ -71,40 +71,42 @@ <section> <div class="block"> -<h2>/<?= $mediaopt->dir() ?></h2> - - - -<table id="medialist"> -<tr> - <th>x</th> - <th><a href="<?= $mediaopt->getsortbyadress('id') ?>">id</a></th> - <th>ext</th> - <th><a href="<?= $mediaopt->getsortbyadress('type') ?>">type</a></th> - <th><a href="<?= $mediaopt->getsortbyadress('size') ?>">size</a></th> - <th>width</th> - <th>height</th> - <th>lengh</th> - <th>code</th> -</tr> - -<?php -foreach ($medialist as $media) { - ?> - <tr> - <td><input type="checkbox" name="id[]" value="<?= $media->getfulldir() ?>" form="mediaedit" id="media_<?= $media->id() ?>"></td> - <td><label for="media_<?= $media->id() ?>"><?= $media->id() ?></label></td> - <td><?= $media->extension() ?></td> - <td><a href="<?= $media->getfullpath() ?>" target="_blank"><?= $media->type() == 'image' ? '<span class="thumbnail">image 👁<img src="' . $media->getfullpath() . '"></span>' : $media->type() . '⧉' ?></a></td> - <td><?= $media->size('hr') ?></td> - <td><?= $media->width() ?></td> - <td><?= $media->height() ?></td> - <td><?= $media->length() ?></td> - <td class="code"><code><?= $media->getcode() ?></code></td> - </tr> - <?php -} -?> + <h2>/<?= $mediaopt->dir() ?></h2> + + <div class="scroll"> + + <table id="medialist"> + <tr> + <th>x</th> + <th><a href="<?= $mediaopt->getsortbyadress('id') ?>">id</a></th> + <th>ext</th> + <th><a href="<?= $mediaopt->getsortbyadress('type') ?>">type</a></th> + <th><a href="<?= $mediaopt->getsortbyadress('size') ?>">size</a></th> + <th>width</th> + <th>height</th> + <th>lengh</th> + <th>code</th> + </tr> + + <?php + foreach ($medialist as $media) { + ?> + <tr> + <td><input type="checkbox" name="id[]" value="<?= $media->getfulldir() ?>" form="mediaedit" id="media_<?= $media->id() ?>"></td> + <td><label for="media_<?= $media->id() ?>"><?= $media->id() ?></label></td> + <td><?= $media->extension() ?></td> + <td class="nowrap"><a href="<?= $media->getfullpath() ?>" target="_blank"><?= $media->type() == 'image' ? '<span class="thumbnail">' . $media->getsymbol() . '<img src="' . $media->getfullpath() . '"></span>' : $media->getsymbol() ?></a></td> + <td class="nowrap"><?= $media->size('hr') ?></td> + <td><?= $media->width() ?></td> + <td><?= $media->height() ?></td> + <td><?= $media->length() ?></td> + <td class="code"><code><?= $media->getcode() ?></code></td> + </tr> + <?php + } + ?> + + </div> </table> diff --git a/assets/css/home.css b/assets/css/home.css index 4477de9..3005b2a 100644 --- a/assets/css/home.css +++ b/assets/css/home.css @@ -503,6 +503,11 @@ footer { } +.nowrap { + white-space: nowrap; +} + + @media (max-width: 600px) { |