Mercurial > dirlist-php
changeset 16:3c0b3a38a7fc
Stupid lightbox2 can't copy image url directly ._.
author | edogawaconan <me@myconan.net> |
---|---|
date | Wed, 22 Oct 2014 01:36:37 +0900 |
parents | 3dbddf76760a |
children | 8b222e3ffe25 |
files | index.php |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/index.php Wed Oct 22 01:17:34 2014 +0900 +++ b/index.php Wed Oct 22 01:36:37 2014 +0900 @@ -45,7 +45,7 @@ function link_to($target, $title) { $lightbox = ""; if (substr($target, -1) !== "/" && preg_match("/(jpe?g|gif|png|webp)$/i", pathinfo($target, PATHINFO_EXTENSION)) === 1) { - $lightbox = ' data-lightbox="aa" data-title="' . $target . '" '; + $lightbox = ' data-lightbox="aa" data-title="' . h('<a href="' . a($target) . '">' . h($target) . "</a>") . '" '; } return('<a href="' . a($target) . '"' . $lightbox . ">" . h($title) . "</a>"); @@ -128,6 +128,9 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/lightbox2/2.7.1/css/lightbox.css"> <style type="text/css"> + .lb-data a { color: #ccc; } + </style> + <style type="text/css"> * { box-sizing: border-box; } body { font-family: Segoe UI, sans-serif;