summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Needham <needham.thomas@gmail.com>2012-09-19 19:46:39 +0000
committerTom Needham <needham.thomas@gmail.com>2012-09-19 19:46:49 +0000
commitd7b878b303066b3beffda5fa978d37d6d1ffa13b (patch)
tree08314489f60dccdab7fa6ba3fbb50f9de019c928
parent5f997021d110ea5e9b9e68e3284025cb70f3a661 (diff)
downloadnextcloud-server-d7b878b303066b3beffda5fa978d37d6d1ffa13b.tar.gz
nextcloud-server-d7b878b303066b3beffda5fa978d37d6d1ffa13b.zip
Dynamicly resize public shared images
-rw-r--r--apps/files_sharing/css/public.css4
-rw-r--r--[-rwxr-xr-x]apps/files_sharing/templates/public.php4
2 files changed, 6 insertions, 2 deletions
diff --git a/apps/files_sharing/css/public.css b/apps/files_sharing/css/public.css
index a700cc2169b..c6ececf65be 100644
--- a/apps/files_sharing/css/public.css
+++ b/apps/files_sharing/css/public.css
@@ -5,4 +5,6 @@ body { background:#ddd; }
#preview { min-height:30em; margin:50px auto; padding-top:2em; border-bottom:1px solid #f8f8f8; background:#eee; text-align:center; }
#noPreview { display:none; padding-top:5em; }
p.info { width:22em; text-align: center; margin:2em auto; color:#777; text-shadow:#fff 0 1px 0; }
-p.info a { font-weight:bold; color:#777; } \ No newline at end of file
+p.info a { font-weight:bold; color:#777; }
+#imgframe{ width:80%; height: 75%; margin: 0 auto; padding-bottom:2em; }
+#imgframe img{ max-height:100%; max-width: 100%; } \ No newline at end of file
diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php
index 426b45b2681..ddeab712d84 100755..100644
--- a/apps/files_sharing/templates/public.php
+++ b/apps/files_sharing/templates/public.php
@@ -16,7 +16,9 @@
<?php echo $_['folder']; ?>
<?php else: ?>
<?php if (substr($_['mimetype'], 0 , strpos($_['mimetype'], '/')) == 'image'): ?>
- <img src="<?php echo $_['downloadURL']; ?>" />
+ <div id="imgframe">
+ <img src="<?php echo $_['downloadURL']; ?>" />
+ </div>
<?php endif; ?>
<ul id="noPreview">
<li class="error">