mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-21 16:13:00 +00:00
Hyperlink image previews to original image - fixes #153.
This commit is contained in:
parent
7317e2e2b7
commit
259b866ec9
4 changed files with 9 additions and 6 deletions
|
@ -7,7 +7,8 @@ This file holds the changelog for Pepperminty Wiki. This is the master list of t
|
|||
- [Rest API] Added support for the `mode` parameter to the `random` action.
|
||||
- Fixed various issues with both the module api & the rest api docs.
|
||||
- Add json support to the search action :D
|
||||
- Added page moves to the recent changes page (#151).
|
||||
- Added page moves to the recent changes page (#151)
|
||||
- Hyperlinked image preview on file pages to the original image (#153)
|
||||
|
||||
### Fixed
|
||||
- Properly escaped content of short code box on file pages
|
||||
|
|
|
@ -5338,11 +5338,12 @@ register_module([
|
|||
if($mime_type == "application/pdf")
|
||||
$fileTypeDisplay = "file";
|
||||
|
||||
$originalUrl = $env->storage_prefix == "./" ? $filepath : "?action=preview&size=original&page=" . rawurlencode($env->page);
|
||||
$preview_sizes = [ 256, 512, 768, 1024, 1440, 1920 ];
|
||||
$preview_html .= "\t\t\t<figure class='preview'>
|
||||
<img src='$previewUrl' />
|
||||
<a href='$originalUrl'><img src='$previewUrl' /></a>
|
||||
<nav class='image-controls'>
|
||||
<ul><li><a href='" . ($env->storage_prefix == "./" ? $filepath : "?action=preview&size=original&page=" . rawurlencode($env->page)) . "'>🌄 Original $fileTypeDisplay</a></li>";
|
||||
<ul><li><a href='$originalUrl'>🌄 Original $fileTypeDisplay</a></li>";
|
||||
if($mime_type !== "image/svg+xml")
|
||||
{
|
||||
$preview_html .= "<li>Other Sizes: ";
|
||||
|
|
|
@ -122,7 +122,7 @@
|
|||
"author": "Starbeamrainbowlabs",
|
||||
"description": "Adds the ability to upload files to Pepperminty Wiki. Uploaded files act as pages and have the special 'File\/' prefix.",
|
||||
"id": "feature-upload",
|
||||
"lastupdate": 1518645569,
|
||||
"lastupdate": 1523104505,
|
||||
"optional": false
|
||||
},
|
||||
{
|
||||
|
|
|
@ -480,11 +480,12 @@ register_module([
|
|||
if($mime_type == "application/pdf")
|
||||
$fileTypeDisplay = "file";
|
||||
|
||||
$originalUrl = $env->storage_prefix == "./" ? $filepath : "?action=preview&size=original&page=" . rawurlencode($env->page);
|
||||
$preview_sizes = [ 256, 512, 768, 1024, 1440, 1920 ];
|
||||
$preview_html .= "\t\t\t<figure class='preview'>
|
||||
<img src='$previewUrl' />
|
||||
<a href='$originalUrl'><img src='$previewUrl' /></a>
|
||||
<nav class='image-controls'>
|
||||
<ul><li><a href='" . ($env->storage_prefix == "./" ? $filepath : "?action=preview&size=original&page=" . rawurlencode($env->page)) . "'>🌄 Original $fileTypeDisplay</a></li>";
|
||||
<ul><li><a href='$originalUrl'>🌄 Original $fileTypeDisplay</a></li>";
|
||||
if($mime_type !== "image/svg+xml")
|
||||
{
|
||||
$preview_html .= "<li>Other Sizes: ";
|
||||
|
|
Loading…
Reference in a new issue