mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-08 17:07:03 +03:00
Vacation filter improvements
New Pgp encrypt/sign popup
This commit is contained in:
parent
c99a46a118
commit
723c2ac6b8
21 changed files with 470 additions and 27 deletions
15
vendors/svg4everybody/LICENSE.md
vendored
Normal file
15
vendors/svg4everybody/LICENSE.md
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# CC0 1.0 Universal License
|
||||
|
||||
Public Domain Dedication
|
||||
|
||||
The person(s) who associated a work with this deed has dedicated the work to the public domain by waiving all of his or her rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law.
|
||||
|
||||
You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
|
||||
|
||||
In no way are the patent or trademark rights of any person affected by CC0, nor are the rights that other persons may have in the work or in how the work is used, such as publicity or privacy rights.
|
||||
|
||||
Unless expressly stated otherwise, the person(s) who associated a work with this deed makes no warranties about the work, and disclaims liability for all uses of the work, to the fullest extent permitted by applicable law.
|
||||
|
||||
When using or citing the work, you should not imply endorsement by the author or the affirmer.
|
||||
|
||||
This is a [human-readable summary of the Legal Code](https://creativecommons.org/publicdomain/zero/1.0/) ([read the full text](https://creativecommons.org/publicdomain/zero/1.0/legalcode)).
|
||||
107
vendors/svg4everybody/README.md
vendored
Normal file
107
vendors/svg4everybody/README.md
vendored
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
# SVG for Everybody
|
||||
|
||||
[SVG for Everybody] is a script that adds [external spritemaps] support to otherwise [SVG-capable browsers].
|
||||
|
||||
To use **svg4everybody**, include the script in your document.
|
||||
|
||||
```html
|
||||
<script src="/path/to/svg4everybody.js"></script>
|
||||
```
|
||||
|
||||
To support IE6-8 as well, include the legacy script instead.
|
||||
|
||||
```html
|
||||
<script src="/path/to/svg4everybody.legacy.js"></script>
|
||||
```
|
||||
|
||||
The IE6-8 script needs to be included in the `<head>` in order to shiv the **svg** and **use** elements.
|
||||
|
||||
If running the standard script in IE9-11, be sure to set [X-UA-Compatible] higher than IE8. This can be done with a response header or the following meta tag.
|
||||
|
||||
```html
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
**spritemap.svg:**
|
||||
```html
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<symbol id="codepen" viewBox="0 0 64 64"><title>CodePen</title><path etc.../></symbol>
|
||||
<symbol id="youtube" viewBox="0 0 64 64"><title>YouTube</title><path etc.../></symbol>
|
||||
<symbol id="twitter" viewBox="0 0 64 64"><title>Twitter</title><path etc.../></symbol>
|
||||
</svg>
|
||||
```
|
||||
|
||||
This spritemap works fine in **Chrome**, **Firefox**, and **Opera**. [SVG for Everybody] polyfills the experience in **IE9-11**.
|
||||
|
||||
```html
|
||||
<svg role="img" title="CodePen"><use xlink:href="spritemap.svg#codepen"></use></svg>
|
||||
<svg role="img" title="YouTube"><use xlink:href="spritemap.svg#youtube"></use></svg>
|
||||
<svg role="img" title="Twitter"><use xlink:href="spritemap.svg#twitter"></use></svg>
|
||||
```
|
||||
|
||||

|
||||
|
||||
Older browsers falls back to PNG images.
|
||||
|
||||
```html
|
||||
<svg role="img" title="CodePen"><img src="spritemap.svg.codepen.png"></svg>
|
||||
<svg role="img" title="YouTube"><img src="spritemap.svg.youtube.png"></svg>
|
||||
<svg role="img" title="Twitter"><img src="spritemap.svg.twitter.png"></svg>
|
||||
```
|
||||
|
||||
Fallback PNGs point to the same location as their corresponding SVGs, only with the `#` hash replaced by a `.` dot, and with an appended `.png` extension.
|
||||
|
||||
## Readability and accessibility
|
||||
|
||||
Within your spritemap, each sprite may use a `<title>` element to identify itself.
|
||||
|
||||
```html
|
||||
<symbol id="codepen"><title>CodePen</title><path etc.../></symbol>
|
||||
```
|
||||
|
||||
When this sprite is used, its title will be read aloud in [JAWS](http://www.freedomscientific.com/products/fs/JAWS-product-page.asp) and [NVDA](http://www.nvaccess.org/). Then, within your document, each sprite may use a `title` attribute to identify itself.
|
||||
|
||||
```html
|
||||
<svg title="CodePen"><use xlink:href="spritemap.svg#codepen"></use></svg>
|
||||
```
|
||||
|
||||
This title will be read aloud in [VoiceOver](http://www.apple.com/accessibility/osx/voiceover/) and [NVDA](http://www.nvaccess.org/). At present, the `title` attribute is the only way to properly read aloud an SVG in VoiceOver.
|
||||
|
||||
For maximum compatibility, both the `title` attribute in the document and the `title` element in the SVG should be used.
|
||||
|
||||
ARIA roles may be used to provide even more accessibility. `role="presentation"` should be used when a sprite decorates other content.
|
||||
|
||||
```html
|
||||
<a href="//twitter.com/jon_neal"><svg role="presentation"><use xlink:href="sprite.svg#twitter"></svg> Find me on Twitter</a>
|
||||
```
|
||||
|
||||
Alternatively, `role="img"` should be used when a sprite necessitates its own description.
|
||||
|
||||
```html
|
||||
<a href="//twitter.com/jon_neal"><svg title="Find me on Twitter" role="img"><use xlink:href="sprite.svg#twitter"></svg></a>
|
||||
```
|
||||
|
||||
### Futher reading
|
||||
|
||||
- [Tips for creating accessible SVG](https://www.sitepoint.com/tips-accessible-svg/)
|
||||
- [Using ARIA to enhance SVG accessibility](http://blog.paciellogroup.com/2013/12/using-aria-enhance-svg-accessibility/)
|
||||
- [SVG symbol a good choice for icons](http://css-tricks.com/svg-symbol-good-choice-icons/)
|
||||
- [Implementing inline SVG Icons](https://kartikprabhu.com/article/inline-svg-icons)
|
||||
|
||||
## Smaller SVGs
|
||||
|
||||
SVG files, especially exported from various editors, usually contains a lot of redundant and useless information such as editor metadata, comments, hidden elements, default or non-optimal values and other stuff that can be safely removed or converted without affecting SVG rendering result.
|
||||
|
||||
Use a tool like [SVGO](https://github.com/svg/svgo) to optimize SVG spritemaps.
|
||||
|
||||
```sh
|
||||
$ [sudo] npm install -g svgo
|
||||
$ svgo spritemap.svg
|
||||
```
|
||||
|
||||
[external spritemaps]: http://css-tricks.com/svg-sprites-use-better-icon-fonts/##Browser+Support
|
||||
[SVG-capable browsers]: http://caniuse.com/svg
|
||||
[SVG for Everybody]: https://github.com/jonathantneal/svg4everybody
|
||||
[X-UA-Compatible]: http://www.modern.ie/en-us/performance/how-to-use-x-ua-compatible
|
||||
20
vendors/svg4everybody/bower.json
vendored
Normal file
20
vendors/svg4everybody/bower.json
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"name": "svg4everybody",
|
||||
"homepage": "https://github.com/jonathantneal/svg4everybody",
|
||||
"authors": [
|
||||
"Jonathan Neal <jonathantneal+github@gmail.com>"
|
||||
],
|
||||
"description": "Use external SVG spritemaps today.",
|
||||
"main": ["svg4everybody.js", "svg4everybody.legacy.js"],
|
||||
"keywords": [
|
||||
"svg",
|
||||
"spritemaps",
|
||||
"polyfill",
|
||||
"ie"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@github.com:jonathantneal/svg4everybody.git"
|
||||
},
|
||||
"license": "CC0 1.0"
|
||||
}
|
||||
18
vendors/svg4everybody/package.json
vendored
Normal file
18
vendors/svg4everybody/package.json
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"name" : "svg4everybody",
|
||||
"description" : "Use external SVG spritemaps in any browser",
|
||||
"keywords" : ["svg", "sprites", "spritemaps", "symbol", "defs", "oldie", "ie8", "ie9", "safari", "external", "icon", "fallback"],
|
||||
"author" : "Jonathan Neal <jonathantneal@hotmail.com> (http://jonathantneal.com)",
|
||||
"contributors" : [],
|
||||
"dependencies" : [],
|
||||
"main": "svg4everybody.js",
|
||||
"homepage": "https://github.com/jonathantneal/svg4everybody",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonathantneal/svg4everybody/issues"
|
||||
},
|
||||
"repository" : {
|
||||
"type": "git",
|
||||
"url": "git@github.com:jonathantneal/svg4everybody.git"
|
||||
},
|
||||
"version" : "1.0.0"
|
||||
}
|
||||
84
vendors/svg4everybody/svg4everybody.js
vendored
Normal file
84
vendors/svg4everybody/svg4everybody.js
vendored
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
/*! svg4everybody v1.0.0 | github.com/jonathantneal/svg4everybody */
|
||||
(function (document, uses, requestAnimationFrame, CACHE, IE9TO11) {
|
||||
function embed(svg, g) {
|
||||
if (g) {
|
||||
var
|
||||
viewBox = g.getAttribute('viewBox'),
|
||||
fragment = document.createDocumentFragment(),
|
||||
clone = g.cloneNode(true);
|
||||
|
||||
if (viewBox) {
|
||||
svg.setAttribute('viewBox', viewBox);
|
||||
}
|
||||
|
||||
while (clone.childNodes.length) {
|
||||
fragment.appendChild(clone.childNodes[0]);
|
||||
}
|
||||
|
||||
svg.appendChild(fragment);
|
||||
}
|
||||
}
|
||||
|
||||
function onload() {
|
||||
var xhr = this, x = document.createElement('x'), s = xhr.s;
|
||||
|
||||
x.innerHTML = xhr.responseText;
|
||||
|
||||
xhr.onload = function () {
|
||||
s.splice(0).map(function (array) {
|
||||
embed(array[0], x.querySelector('#' + array[1].replace(/(\W)/g, '\\$1')));
|
||||
});
|
||||
};
|
||||
|
||||
xhr.onload();
|
||||
}
|
||||
|
||||
function onframe() {
|
||||
var use;
|
||||
|
||||
while ((use = uses[0])) {
|
||||
var
|
||||
svg = use.parentNode,
|
||||
url = use.getAttribute('xlink:href').split('#'),
|
||||
url_root = url[0],
|
||||
url_hash = url[1];
|
||||
|
||||
svg.removeChild(use);
|
||||
|
||||
if (url_root.length) {
|
||||
var xhr = CACHE[url_root] = CACHE[url_root] || new XMLHttpRequest();
|
||||
|
||||
if (!xhr.s) {
|
||||
xhr.s = [];
|
||||
|
||||
xhr.open('GET', url_root);
|
||||
|
||||
xhr.onload = onload;
|
||||
|
||||
xhr.send();
|
||||
}
|
||||
|
||||
xhr.s.push([svg, url_hash]);
|
||||
|
||||
if (xhr.readyState === 4) {
|
||||
xhr.onload();
|
||||
}
|
||||
|
||||
} else {
|
||||
embed(svg, document.getElementById(url_hash));
|
||||
}
|
||||
}
|
||||
|
||||
requestAnimationFrame(onframe);
|
||||
}
|
||||
|
||||
if (IE9TO11) {
|
||||
onframe();
|
||||
}
|
||||
})(
|
||||
document,
|
||||
document.getElementsByTagName('use'),
|
||||
window.requestAnimationFrame || window.setTimeout,
|
||||
{},
|
||||
/Trident\/[567]\b/.test(navigator.userAgent) || /Edge\/12/.test(navigator.userAgent) || (navigator.userAgent.match(/AppleWebKit\/(\d+)/) || [])[1] < 538
|
||||
);
|
||||
97
vendors/svg4everybody/svg4everybody.legacy.js
vendored
Normal file
97
vendors/svg4everybody/svg4everybody.legacy.js
vendored
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
/*! svg4everybody v1.0.0 | github.com/jonathantneal/svg4everybody */
|
||||
(function (document, uses, requestAnimationFrame, CACHE, LTEIE8, IE9TO11) {
|
||||
function embed(svg, g) {
|
||||
if (g) {
|
||||
var
|
||||
viewBox = g.getAttribute('viewBox'),
|
||||
fragment = document.createDocumentFragment(),
|
||||
clone = g.cloneNode(true);
|
||||
|
||||
if (viewBox) {
|
||||
svg.setAttribute('viewBox', viewBox);
|
||||
}
|
||||
|
||||
while (clone.childNodes.length) {
|
||||
fragment.appendChild(clone.childNodes[0]);
|
||||
}
|
||||
|
||||
svg.appendChild(fragment);
|
||||
}
|
||||
}
|
||||
|
||||
function onload() {
|
||||
var xhr = this, x = document.createElement('x'), s = xhr.s;
|
||||
|
||||
x.innerHTML = xhr.responseText;
|
||||
|
||||
xhr.onload = function () {
|
||||
s.splice(0).map(function (array) {
|
||||
embed(array[0], x.querySelector('#' + array[1].replace(/(\W)/g, '\\$1')));
|
||||
});
|
||||
};
|
||||
|
||||
xhr.onload();
|
||||
}
|
||||
|
||||
function onframe() {
|
||||
var use;
|
||||
|
||||
while ((use = uses[0])) {
|
||||
if (LTEIE8) {
|
||||
var img = new Image(), src, q;
|
||||
|
||||
src = use.getAttribute('xlink:href');
|
||||
q = (/\?[^#]+/.exec(src) || [''])[0];
|
||||
img.src = src.replace(/\?[^#]+/, '').replace('#', '.').replace(/^\./, '') + '.png' + q;
|
||||
|
||||
use.parentNode.replaceChild(img, use);
|
||||
} else {
|
||||
var
|
||||
svg = use.parentNode,
|
||||
url = use.getAttribute('xlink:href').split('#'),
|
||||
url_root = url[0],
|
||||
url_hash = url[1];
|
||||
|
||||
svg.removeChild(use);
|
||||
|
||||
if (url_root.length) {
|
||||
var xhr = CACHE[url_root] = CACHE[url_root] || new XMLHttpRequest();
|
||||
|
||||
if (!xhr.s) {
|
||||
xhr.s = [];
|
||||
|
||||
xhr.open('GET', url_root);
|
||||
|
||||
xhr.onload = onload;
|
||||
|
||||
xhr.send();
|
||||
}
|
||||
|
||||
xhr.s.push([svg, url_hash]);
|
||||
|
||||
if (xhr.readyState === 4) {
|
||||
xhr.onload();
|
||||
}
|
||||
|
||||
} else {
|
||||
embed(svg, document.getElementById(url_hash));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
requestAnimationFrame(onframe);
|
||||
}
|
||||
|
||||
if (LTEIE8 || IE9TO11) {
|
||||
onframe();
|
||||
}
|
||||
})(
|
||||
document,
|
||||
document.getElementsByTagName('use'),
|
||||
window.requestAnimationFrame || window.setTimeout,
|
||||
{},
|
||||
/MSIE\s[1-8]\b/.test(navigator.userAgent),
|
||||
/Trident\/[567]\b/.test(navigator.userAgent) || /Edge\/12/.test(navigator.userAgent) || (navigator.userAgent.match(/AppleWebKit\/(\d+)/) || [])[1] < 538,
|
||||
document.createElement('svg'),
|
||||
document.createElement('use')
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue