'nav-sound-off' => 'nav-soundoff',
'nav-sound-on' => 'nav-soundon',
);
+
+ $shares = array('email', 'facebook', 'twitter', 'googleplus', 'linkedin', 'viadeo');
+
+ $names = array_flip($names);
+
+ foreach ($iconSets as $iconSet) {
+ $res = '<?xml version="1.0" encoding="UTF-8" ?>
+<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">';
+ $dir = WS_ICONS . '/' . $iconSet . '/mobile/';
+ $dr = opendir($dir);
+ while ($f = readdir($dr)) {
+ if ($f == '.' || $f == '..') {
+ continue;
+ }
+ $file = $dir . $f;
+ if (is_dir($file)) {
+ continue;
+ }
+ $e = explode('.', $f);
+ $ext = array_pop($e);
+ if ($ext != 'svg') {
+ continue;
+ }
+
+ $name = $e[0];
+ if (isset($names[$name])) {
+ $name = $names[$name];
+ }
+
+ $dom = new DOMDocument();
+ $dom->loadXML(file_get_contents($file));
+ $svg = $dom->getElementsByTagName('svg')[0];
+
+ $res .= "\n\t" . '<symbol id="' . $name . '" viewBox="' . $svg->getAttribute('viewBox') . '">';
+ $res .= "\n\t\t" . CubeIT_Util_Xml::innerXML($svg);
+ $res .= "\n\t" . '</symbol>';
+
+ if ($name == 'nav-fullscreen') {
+ $name = 'nav-fullscreen-exit';
+ $res .= "\n\t" . '<symbol id="' . $name . '" viewBox="' . $svg->getAttribute('viewBox') . '">';
+ $res .= "\n\t\t" . CubeIT_Util_Xml::innerXML($svg);
+ $res .= "\n\t" . '</symbol>';
+ }
+
+ }
+
+ foreach ($shares as $share) {
+ $name = 'share-' . $share;
+
+ $dom = new DOMDocument();
+ $dom->loadXML(file_get_contents(WS_ICONS . '/share/share-' . $share . '.svg'));
+ $svg = $dom->getElementsByTagName('svg')[0];
+
+ $res .= "\n\t" . '<symbol id="' . $name . '" viewBox="' . $svg->getAttribute('viewBox') . '">';
+ $res .= "\n\t\t" . CubeIT_Util_Xml::innerXML($svg);
+ $res .= "\n\t" . '</symbol>';
+
+ }
+ $res .= "\n" . ' <symbol id="nav-locales" viewBox="0 0 512 512">
+ <path d="m428 117l-174 0-4-29c-2-25-23-41-47-41l-119 0c-27 0-47 21-47 47l0 254c0 27 20 47 47 47l86 0 4 29c2 16 12 29 27 37 8 4 14 6 20 6l209 0c27 0 47-21 47-47l0-256c0-27-22-47-49-47z m-344 252c-12 0-21-11-21-21l0-254c0-12 11-20 21-20l119 0c10 0 20 8 20 18l35 277z m152 26c-15 17-21 23-25 27-2 2-4 4-6 8-2-4-4-6-4-10l-2-25z m215 23c0 12-11 20-21 20l-197 0c7-6 15-14 41-45l5-4c4-4 10-10 8-22l-31-224 172 0c12 0 21 11 21 21l0 254z m-310-268l-55 147 25 0 14-41 55 0 15 41 24 0-51-147z m-8 86l12-39c5-11 7-19 9-27 0 2 2 6 4 12 2 6 4 11 4 13l14 38-43 0z m281-9l-37 0 0-41-27 0 0 41-47 0 0 21 98 0c-2 16-8 49-26 69-29 33-64 41-64 41l6 27c2 0 43-10 78-49 35-39 35-96 35-98l-12 0 0-11z"/>
+ </symbol>
+ <symbol id="nav-search" viewBox="0 0 512 512">
+ <path d="m451 430l-129-129c22-27 34-59 34-94 0-39-16-78-43-105-59-59-153-59-211 0-57 58-57 152 0 211 29 29 66 43 105 43 35 0 67-12 94-34l129 129c2 2 6 4 10 4 4 0 9-2 11-4 4-7 4-17 0-21z m-330-139c-47-47-47-123 0-170 22-23 53-35 84-35 31 0 61 12 84 35 22 22 35 53 35 84 0 33-13 61-35 84-23 22-53 35-84 35-31 2-60-11-84-33z"/>
+ </symbol>';
+
+ $res .= "\n" . '</svg>';
+ file_put_contents(WS_ICONS . '/' . $iconSet . '/interface.svg', $res);
+ }
}
}