From 11c729472634682fbcaa40caa5c510d490acfa4a Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Wed, 22 Jan 2020 23:56:14 +0100 Subject: media get symbols and css fix --- app/class/Media.php | 22 ++++++++++++++ app/view/templates/media.php | 70 +++++++++++++++++++++++--------------------- 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 @@
-

/dir() ?>

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - +

/dir() ?>

+ +
+ +
xidexttypesizewidthheightlenghcode
extension() ?>type() == 'image' ? 'image 👁' : $media->type() . '⧉' ?>size('hr') ?>width() ?>height() ?>length() ?>getcode() ?>
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
xidexttypesizewidthheightlenghcode
extension() ?>type() == 'image' ? '' . $media->getsymbol() . '' : $media->getsymbol() ?>size('hr') ?>width() ?>height() ?>length() ?>getcode() ?>
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) { -- cgit v1.2.3