-
Notifications
You must be signed in to change notification settings - Fork 580
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: French translations, prevention of opening SVG directly in brow…
…ser through canonical url (#1430) * Fix #1377 * feat: expand images in `<img>` tag to avoid javascript attacks * Embed in img tags svg only * Remove canonical url display from directory listing for svg * Add test * Remove unused Media class * Change function of canonical url button * Remove superflous `} ` * Update NL locale * Fix: Right click "open in new tab" on canonical url now renders svg in img tag * Add zoom functionality for expanded svg images * Fix test and js lint * More js linting fixes * Allow ES6 * Update French translations * Fix css map * Update filer/templates/admin/filer/image/expand.html * Fix zoom cursors when displaying svg * ... second part
- Loading branch information
Showing
9 changed files
with
94 additions
and
115 deletions.
There are no files selected for viewing
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,28 @@ | ||
<html> | ||
<head> | ||
<style> | ||
img { | ||
cursor: zoom-out; | ||
} | ||
body.scrolling img { | ||
cursor: zoom-out; | ||
} | ||
body.scrolling img.zoom { | ||
cursor: zoom-in; | ||
} | ||
img.zoom { | ||
width: 100%; | ||
cursor: zoom-out; | ||
} | ||
</style> | ||
</head> | ||
<body style="margin: 0;"> | ||
<img style="max-width: 100%" src="{{ original_url }}" /> | ||
<img id="img" src="{{ original_url }}" onclick="this.classList.toggle('zoom')"/> | ||
<script> | ||
setInterval(function () { | ||
const img = document.getElementById('img') | ||
document.body.classList.toggle('scrolling', img.naturalWidth >= document.body.clientWidth) | ||
}, 200); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters