From 22380d8cad28262751da81415cf5ab7e53dbe719 Mon Sep 17 00:00:00 2001 From: Rasmus Fuhse <krassmus@gmail.com> Date: Mon, 15 Sep 2014 23:24:42 +0200 Subject: [PATCH] make images more beautiful --- assets/pluginmarket.css | 19 +++++++++++++++++++ controllers/myplugins.php | 1 + controllers/presenting.php | 1 + views/myplugins/_edit_images.php | 6 +++--- views/presenting/details.php | 8 ++++---- 5 files changed, 28 insertions(+), 7 deletions(-) create mode 100644 assets/pluginmarket.css diff --git a/assets/pluginmarket.css b/assets/pluginmarket.css new file mode 100644 index 0000000..ee10420 --- /dev/null +++ b/assets/pluginmarket.css @@ -0,0 +1,19 @@ +.pluginmarket_galery { + list-style-type: none; + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: center; + align-items: center; +} +.pluginmarket_galery > .image { + padding: 5px; + border: 5px solid #eeeeee; + margin: 5px; +} +.pluginmarket_galery > .image input[type=checkbox] { + display: none; +} +.pluginmarket_galery > .image input[type=checkbox]:checked + * { + opacity: 0.2; +} \ No newline at end of file diff --git a/controllers/myplugins.php b/controllers/myplugins.php index 503088c..7a8cba3 100644 --- a/controllers/myplugins.php +++ b/controllers/myplugins.php @@ -9,6 +9,7 @@ class MypluginsController extends PluginController { Navigation::activateItem("/pluginmarket/myplugins"); $this->set_content_type('text/html;charset=windows-1252'); + PageLayout::addStylesheet($this->plugin->getPluginURL()."/assets/pluginmarket.css"); } public function overview_action() diff --git a/controllers/presenting.php b/controllers/presenting.php index 3b15256..53981ea 100644 --- a/controllers/presenting.php +++ b/controllers/presenting.php @@ -11,6 +11,7 @@ class PresentingController extends PluginController { if ($GLOBALS['perm']->have_perm("user")) { object_set_visit(get_class($this->plugin), "plugin"); } + PageLayout::addStylesheet($this->plugin->getPluginURL()."/assets/pluginmarket.css"); } public function overview_action() { diff --git a/views/myplugins/_edit_images.php b/views/myplugins/_edit_images.php index 3e4d88f..6c02582 100644 --- a/views/myplugins/_edit_images.php +++ b/views/myplugins/_edit_images.php @@ -4,12 +4,12 @@ <?= _("Galerie") ?> </legend> - <ol id="galery_edit"> + <ol id="galery_edit" class="pluginmarket_galery"> <? foreach ($marketplugin->images as $image) : ?> - <li> + <li class="image"> <input type="checkbox" name="delete_image[]" value="<?= htmlReady($image->getId()) ?>" id="delete_image_<?= htmlReady($image->getId()) ?>"> <div> - <img src="<?= htmlReady($image->getURL()) ?>" style="max-height: 200px;"> + <img src="<?= htmlReady($image->getURL()) ?>" style="max-height: 150px;"> <input type="hidden" name="image_order[]" value="<?= htmlReady($image->getId()) ?>"> <label for="delete_image_<?= htmlReady($image->getId()) ?>"> <?= Assets::img("icons/20/blue/delete") ?> diff --git a/views/presenting/details.php b/views/presenting/details.php index 47e8888..a22696e 100644 --- a/views/presenting/details.php +++ b/views/presenting/details.php @@ -21,16 +21,16 @@ if ($icon) { <h2><?= _("Galerie") ?></h2> -<div> +<ol id="pluginmarket_galery_view" class="pluginmarket_galery"> <? foreach ($marketplugin->images as $image) : ?> - <div> - <img src="<?= htmlReady($image->getURL()) ?>" style="max-height: 150px;"> + <div class="image"> + <img src="<?= htmlReady($image->getURL()) ?>" style="max-height: 180px;"> </div> <? endforeach ?> <? if ($marketplugin->isWritable()) : ?> <div><a href="<?= PluginEngine::getLink($plugin, array(), "myplugins/edit_images/".$marketplugin->getId()) ?>" data-dialog><?= Assets::img("icons/20/blue/add") ?></a></div> <? endif ?> -</div> +</ol> <h2><?= _("Releases") ?></h2> <table class="default"> -- GitLab