mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-12-22 13:45:02 +00:00
Add link display box for files
This commit is contained in:
parent
124c9f526e
commit
b62e28db88
4 changed files with 15 additions and 9 deletions
|
@ -245,7 +245,7 @@ input[type=button], input[type=submit] { cursor: pointer; }
|
|||
.preview img { max-width: 100%; }
|
||||
.image-controls ul { list-style-type: none; margin: 5px; padding: 5px; }
|
||||
.image-controls li { display: inline-block; margin: 5px; padding: 5px; }
|
||||
|
||||
.link-display { margin-left: 0.5rem; }
|
||||
|
||||
.printable { padding: 2rem; }
|
||||
|
||||
|
@ -254,8 +254,9 @@ h1 { text-align: center; }
|
|||
.logo { max-width: 4rem; max-height: 4rem; vertical-align: middle; }
|
||||
main:not(.printable) { padding: 2rem; background: #faf8fb; box-shadow: 0 0.1rem 1rem 0.3rem rgba(50, 50, 50, 0.5); }
|
||||
|
||||
label { display: inline-block; min-width: 7rem; }
|
||||
input[type=text], input[type=password], textarea { margin: 0.5rem 0.8rem; padding: 0.5rem 0.8rem; background: #d5cbf9; border: 0; border-radius: 0.3rem; font-size: 1rem; color: #442772; }
|
||||
label:not(.link-display-label) { display: inline-block; min-width: 7rem; }
|
||||
input[type=text]:not(.link-display), input[type=password], textarea { margin: 0.5rem 0.8rem; }
|
||||
input[type=text], input[type=password], textarea { padding: 0.5rem 0.8rem; background: #d5cbf9; border: 0; border-radius: 0.3rem; font-size: 1rem; color: #442772; }
|
||||
textarea { width: calc(100% - 2rem); min-height: 35rem; font-size: 1.25rem; }
|
||||
textarea ~ input[type=submit] { width: calc(100% - 0.3rem); margin: 0.5rem 0.8rem; padding: 0.5rem; font-weight: bolder; }
|
||||
|
||||
|
@ -1460,6 +1461,7 @@ register_module([
|
|||
// We are looking at a page that is paired with an uploaded file
|
||||
$filepath = $pageindex->{$env->page}->uploadedfilepath;
|
||||
$mime_type = $pageindex->{$env->page}->uploadedfilemime;
|
||||
$image_link = "//" . $_SERVER["SERVER_NAME"] . dirname($_SERVER["SCRIPT_NAME"]) . $filepath;
|
||||
|
||||
$preview_sizes = [ 256, 512, 768, 1024, 1536 ];
|
||||
$preview_html = "<figure class='preview'>
|
||||
|
@ -1469,7 +1471,8 @@ register_module([
|
|||
<li>Other Sizes: ";
|
||||
foreach($preview_sizes as $size)
|
||||
$preview_html .= "<a href='?action=preview&size='$size>$size" . "px</a> ";
|
||||
$preview_html .= "</li></ul></nav>
|
||||
$preview_html .= "</li>
|
||||
<li><label class='link-display-label' for='image-link'>Link:</label> <input class='link-display' type='text' value='$image_link' title='Press CTRL + C to copy.' onclick='this.select();' readonly /></li></ul></nav>
|
||||
</figure>
|
||||
<h2>File Information</h2>
|
||||
<table><tr><th>Name</th><td>" . str_replace("File/", "", $filepath) . "</td>
|
||||
|
|
|
@ -50,7 +50,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": 1445693273,
|
||||
"lastupdate": 1445716955,
|
||||
"optional": false
|
||||
},
|
||||
{
|
||||
|
|
|
@ -219,6 +219,7 @@ register_module([
|
|||
// We are looking at a page that is paired with an uploaded file
|
||||
$filepath = $pageindex->{$env->page}->uploadedfilepath;
|
||||
$mime_type = $pageindex->{$env->page}->uploadedfilemime;
|
||||
$image_link = "//" . $_SERVER["SERVER_NAME"] . dirname($_SERVER["SCRIPT_NAME"]) . $filepath;
|
||||
|
||||
$preview_sizes = [ 256, 512, 768, 1024, 1536 ];
|
||||
$preview_html = "<figure class='preview'>
|
||||
|
@ -228,7 +229,8 @@ register_module([
|
|||
<li>Other Sizes: ";
|
||||
foreach($preview_sizes as $size)
|
||||
$preview_html .= "<a href='?action=preview&size='$size>$size" . "px</a> ";
|
||||
$preview_html .= "</li></ul></nav>
|
||||
$preview_html .= "</li>
|
||||
<li><label class='link-display-label' for='image-link'>Link:</label> <input class='link-display' type='text' value='$image_link' title='Press CTRL + C to copy.' onclick='this.select();' readonly /></li></ul></nav>
|
||||
</figure>
|
||||
<h2>File Information</h2>
|
||||
<table><tr><th>Name</th><td>" . str_replace("File/", "", $filepath) . "</td>
|
||||
|
|
|
@ -242,7 +242,7 @@ input[type=button], input[type=submit] { cursor: pointer; }
|
|||
.preview img { max-width: 100%; }
|
||||
.image-controls ul { list-style-type: none; margin: 5px; padding: 5px; }
|
||||
.image-controls li { display: inline-block; margin: 5px; padding: 5px; }
|
||||
|
||||
.link-display { margin-left: 0.5rem; }
|
||||
|
||||
.printable { padding: 2rem; }
|
||||
|
||||
|
@ -251,8 +251,9 @@ h1 { text-align: center; }
|
|||
.logo { max-width: 4rem; max-height: 4rem; vertical-align: middle; }
|
||||
main:not(.printable) { padding: 2rem; background: #faf8fb; box-shadow: 0 0.1rem 1rem 0.3rem rgba(50, 50, 50, 0.5); }
|
||||
|
||||
label { display: inline-block; min-width: 7rem; }
|
||||
input[type=text], input[type=password], textarea { margin: 0.5rem 0.8rem; padding: 0.5rem 0.8rem; background: #d5cbf9; border: 0; border-radius: 0.3rem; font-size: 1rem; color: #442772; }
|
||||
label:not(.link-display-label) { display: inline-block; min-width: 7rem; }
|
||||
input[type=text]:not(.link-display), input[type=password], textarea { margin: 0.5rem 0.8rem; }
|
||||
input[type=text], input[type=password], textarea { padding: 0.5rem 0.8rem; background: #d5cbf9; border: 0; border-radius: 0.3rem; font-size: 1rem; color: #442772; }
|
||||
textarea { width: calc(100% - 2rem); min-height: 35rem; font-size: 1.25rem; }
|
||||
textarea ~ input[type=submit] { width: calc(100% - 0.3rem); margin: 0.5rem 0.8rem; padding: 0.5rem; font-weight: bolder; }
|
||||
|
||||
|
|
Loading…
Reference in a new issue