1
0
Fork 0

added more download icons

This commit is contained in:
Mike Schwörer 2022-11-13 01:28:10 +01:00
parent 783411c005
commit 1597283d15
Signed by: Mikescher
GPG Key ID: D3C7172E0A70F8CF
4 changed files with 57 additions and 7 deletions

View File

@ -1,4 +1,7 @@
<svg version="1.1" xmlns="http://www.w3.org/2000/svg">
<!-- https://aydos.com/svgedit/ ( rescale path to [0 0 24 24] viewport ) -->
<path id="amazon" class="svg_path" d="M.045 18.02c.072-.116.187-.124.348-.022 3.636 2.11 7.594 3.166 11.87 3.166 2.852 0 5.668-.533 8.447-1.595l.315-.14c.138-.06.234-.1.293-.13.226-.088.39-.046.525.13.12.174.09.336-.12.48-.256.19-.6.41-1.006.654-1.244.743-2.64 1.316-4.185 1.726-1.53.406-3.045.61-4.516.61-2.265 0-4.41-.396-6.435-1.187-2.02-.794-3.82-1.91-5.43-3.35-.1-.074-.15-.15-.15-.22 0-.047.02-.09.05-.13zm6.565-6.218c0-1.005.247-1.863.743-2.577.495-.71 1.17-1.25 2.04-1.615.796-.335 1.756-.575 2.912-.72.39-.046 1.033-.103 1.92-.174v-.37c0-.93-.105-1.558-.3-1.875-.302-.43-.78-.65-1.44-.65h-.182c-.48.046-.896.196-1.246.46-.35.27-.575.63-.675 1.096-.06.3-.206.465-.435.51l-2.52-.315c-.248-.06-.372-.18-.372-.39 0-.046.007-.09.022-.15.247-1.29.855-2.25 1.82-2.88.976-.616 2.1-.975 3.39-1.05h.54c1.65 0 2.957.434 3.888 1.29.135.15.27.3.405.48.12.165.224.314.283.45.075.134.15.33.195.57.06.254.105.42.135.51.03.104.062.3.076.615.01.313.02.493.02.553v5.28c0 .376.06.72.165 1.036.105.313.21.54.315.674l.51.674c.09.136.136.256.136.36 0 .12-.06.226-.18.314-1.2 1.05-1.86 1.62-1.963 1.71-.165.135-.375.15-.63.045-.195-.166-.375-.332-.526-.496l-.31-.347c-.06-.074-.166-.21-.317-.42l-.3-.435c-.81.886-1.603 1.44-2.4 1.665-.494.15-1.093.227-1.83.227-1.11 0-2.04-.343-2.76-1.034-.72-.69-1.08-1.665-1.08-2.94l-.05-.076zm3.753-.438c0 .566.14 1.02.425 1.364.285.34.675.512 1.155.512.045 0 .106-.007.195-.02.09-.016.134-.023.166-.023.614-.16 1.08-.553 1.424-1.178.165-.28.285-.58.36-.91.09-.32.12-.59.135-.8.015-.195.015-.54.015-1.005v-.54c-.84 0-1.484.06-1.92.18-1.275.36-1.92 1.17-1.92 2.43l-.035-.02zm9.162 7.027c.03-.06.075-.11.132-.17.362-.243.714-.41 1.05-.5.55-.133 1.09-.222 1.612-.24.14-.012.28 0 .41.03.65.06 1.05.168 1.172.33.063.09.09.228.09.39v.15c0 .51-.14 1.11-.415 1.8-.278.69-.664 1.248-1.156 1.68-.073.06-.14.09-.197.09-.03 0-.06 0-.09-.012-.09-.044-.107-.12-.064-.24.54-1.26.806-2.143.806-2.64 0-.15-.03-.27-.087-.344-.145-.166-.55-.257-1.224-.257-.243 0-.533.016-.87.046-.363.045-.7.09-1 .135-.09 0-.148-.014-.18-.044-.03-.03-.036-.047-.02-.077 0-.017.006-.03.02-.063v-.06z"/>
<path id="apple" class="svg_path" d="M7.078 23.55c-.473-.316-.893-.703-1.244-1.15-.383-.463-.738-.95-1.064-1.454-.766-1.12-1.365-2.345-1.78-3.636-.5-1.502-.743-2.94-.743-4.347 0-1.57.34-2.94 1.002-4.09.49-.9 1.22-1.653 2.1-2.182.85-.53 1.84-.82 2.84-.84.35 0 .73.05 1.13.15.29.08.64.21 1.07.37.55.21.85.34.95.37.32.12.59.17.8.17.16 0 .39-.05.645-.13.145-.05.42-.14.81-.31.386-.14.692-.26.935-.35.37-.11.728-.21 1.05-.26.39-.06.777-.08 1.148-.05.71.05 1.36.2 1.94.42 1.02.41 1.843 1.05 2.457 1.96-.26.16-.5.346-.725.55-.487.43-.9.94-1.23 1.505-.43.77-.65 1.64-.644 2.52.015 1.083.29 2.035.84 2.86.387.6.904 1.114 1.534 1.536.31.21.582.355.84.45-.12.375-.252.74-.405 1.1-.347.807-.76 1.58-1.25 2.31-.432.63-.772 1.1-1.03 1.41-.402.48-.79.84-1.18 1.097-.43.285-.935.436-1.452.436-.35.015-.7-.03-1.034-.127-.29-.095-.576-.202-.856-.323-.293-.134-.596-.248-.905-.34-.38-.1-.77-.148-1.164-.147-.4 0-.79.05-1.16.145-.31.088-.61.196-.907.325-.42.175-.695.29-.855.34-.324.096-.656.154-.99.175-.52 0-1.004-.15-1.486-.45zm6.854-18.46c-.68.34-1.326.484-1.973.436-.1-.646 0-1.31.27-2.037.24-.62.56-1.18 1-1.68.46-.52 1.01-.95 1.63-1.26.66-.34 1.29-.52 1.89-.55.08.68 0 1.35-.25 2.07-.228.64-.568 1.23-1 1.76-.435.52-.975.95-1.586 1.26z"/>
<path id="download" class="svg_path" d="M10.125 0h3.75c.623 0 1.125.502 1.125 1.125v7.875h4.111c.834 0 1.252 1.008.661 1.598L12.642 17.733c-.352.352-.928.352-1.28 0L4.223 10.598c-.591-.591-.173-1.598.661-1.598H9V1.125c0-.623.502-1.125 1.125-1.125zm13.875 17.625v5.25c0 .623-.502 1.125-1.125 1.125H1.125c-.623 0-1.125-.502-1.125-1.125V17.625c0-.623.502-1.125 1.125-1.125h6.877l2.297 2.297c.942.942 2.461.942 3.403 0l2.297-2.297H22.875c.623 0 1.125.502 1.125 1.125zm-5.812 4.125c0-.516-.422-.937-.937-.937s-.937.422-.937.938 .422.938 .938.938 .938-.422.938-.937zm3 0c0-.516-.422-.937-.937-.937s-.937.422-.937.938 .422.938 .938.938 .938-.422.938-.937z"/>
@ -18,4 +21,9 @@
<path id="arrow_left" class="svg_path" d="M23.177.8C23.118.8 .778 12 .8 12.018.875 12.081 23.183 23.22 23.191 23.2 23.196 23.187 22.113 20.662 20.783 17.591L18.366 12.006 20.783 6.43C22.112 3.364 23.2.842 23.2.827 23.2.812 23.19.8 23.177.8z"/>
<path id="changelog" class="svg_path" d="M16.811 0H3v24h18V4.188L16.811 0zM16.499 1.81 19.19 4.5h-2.691V1.81zM4.5 22.5V1.499h10.5v4.501h4.5V22.5H4.5zM6 16.5 6 15 15 15 15 16.5zM6 10.5 6 9 18 9 18 10.5zM6 13.5 6 12 18 12 18 13.5z"/>
<path id="email" class="svg_path" d="M 23.977116,3.687646 C 23.887022,3.4424893 23.655038,3.2795047 23.393851,3.2795047 H 0.64035787 c -0.26118688,0 -0.49462384,0.1629377 -0.58471738,0.4081413 C 0.02817181,3.7624117 -0.0016875,3.8399431 9.374978e-5,3.9164432 9.374978e-5,3.9185526 0,20.117924 0,20.117924 c 0,0.343969 0.31424926,0.602579 0.65826408,0.602579 H 23.393758 c 0.343968,0 0.587529,-0.258563 0.587529,-0.602579 0,0 0.01744,-16.1992307 0.01739,-16.201387 0.0018,-0.076453 0.0059,-0.1540784 -0.02156,-0.228891 z M 21.674293,4.5253037 12.026034,12.719724 2.3778225,4.5253037 Z M 1.245794,5.2486799 9.1949315,12.000004 1.245794,18.751375 Z m 1.1081224,14.2260711 7.8386536,-6.65748 1.430293,1.214768 c 0.116297,0.09872 0.259734,0.148125 0.403265,0.148125 0.143531,0 0.286921,-0.04941 0.403265,-0.148125 l 1.430293,-1.214768 7.838654,6.65748 z M 22.735494,18.751375 14.786403,12.000004 22.735494,5.2486799 Z"/>
<path id="arch" class="svg_path" d="M8.745702 7.600885c.850606.717746 2.223218 1.465974 3.41458 1.932765-1.024818-.743685-2.044611-1.581948-3.062566-2.679136.847333-1.806828 1.859051-4.302471 2.902149-6.849905 1.700582 4.345199 4.870274 10.884432 9.116505 18.643009-1.153544-.633402-2.198781-.994081-3.277941-1.272723.357644 .204141 1.203057.665455 1.745484 1.03628.856901 .58581 1.649876 1.226409 2.39563 1.839807C22.645151 21.474927 23.318966 22.72407 24 23.995389c-3.386992-1.96112-6.678413-3.549748-9.375-4.040405.882813-4.897094-2.572527-7.786295-4.535626-4.669191-.755884 1.200098-.960336 3.177449-.601886 4.646839C6.078125 20.58914 2.742312 22.426851 0 23.995389 3.194204 18.20744 6.423672 12.339998 8.745702 7.600885z"/>
<path id="homebrew" class="svg_path" d="M7.938 0a.214.214 0 0 0-.206.156c-.316 1.104.179 2.15.838 2.935.153.181.313.347.476.501a2.039 2.039 0 0 0-.665.02c-1.184.233-2.193.985-2.74 2.532a3.893 3.893 0 0 0-.2 1.466 1.565 1.565 0 0 0-1.156 1.504 1.59 1.59 0 0 0 1.227 1.541l.026 12.046c0 .195.1.377.264.482a.214.214 0 0 0 .008.005c.537.31 2.047.812 5.21.812 3.238 0 4.7-.678 5.181-1.04a.214.214 0 0 0 .008-.007.571.571 0 0 0 .206-.439c.002-.344.002-1.136.002-1.604a.143.143 0 0 1 .147-.144c.397.006.869.006 1.318.005a1.826 1.826 0 0 0 1.832-1.825v-5.804a1.826 1.826 0 0 0-1.825-1.826H16.56a.14.14 0 0 1-.143-.144V10.6h.007v-.001a1.573 1.573 0 0 0 1.356-1.556c0-.816-.627-1.489-1.424-1.563-.025-1.438-.437-2.126-.736-2.58a.214.214 0 0 0-.005-.007c-.364-.51-1.193-1.282-2.275-1.316-.503-.016-.842.124-1.125.254-.217.1-.42.177-.67.22.002-1.286.945-1.981.945-1.981a.214.214 0 0 0 .05-.298s-.087-.122-.21-.26c-.121-.136-.269-.294-.47-.378a.214.214 0 0 0-.079-.017.214.214 0 0 0-.145.055 4.308 4.308 0 0 0-.875 1.101 3.42 3.42 0 0 0-.133.273 3.497 3.497 0 0 0-.381-.846C9.794.978 9.063.436 8.017.016A.214.214 0 0 0 7.939 0zm.156.524c.85.378 1.43.83 1.79 1.403.274.438.426.962.484 1.584a3.07 3.07 0 0 0-.012.462 6.897 6.897 0 0 1-.168-.052 5.487 5.487 0 0 1-1.29-1.106c-.551-.657-.935-1.46-.804-2.291zM11.8 1.618c.07.054.141.101.212.18.034.039.032.04.058.073-.332.308-1.07 1.144-.952 2.453a.214.214 0 0 0 .222.195c.469-.017.782-.172 1.056-.299.273-.126.508-.228.931-.214.875.027 1.639.715 1.939 1.134.295.449.65 1 .663 2.36a1.66 1.66 0 0 0-.41.142 1.938 1.938 0 0 0-1.77-1.16 1.94 1.94 0 0 0-1.87 1.448 1.783 1.783 0 0 0-1.356-.64c-.484 0-.91.205-1.233.517a1.873 1.873 0 0 0-1.85-1.625c-.649 0-1.218.335-1.552.84a3.1 3.1 0 0 1 .157-.735c.51-1.437 1.355-2.045 2.42-2.254.367-.073.664-.011.99.095.325.106.671.262 1.094.342a.214.214 0 0 0 .252-.245c-.112-.67.073-1.266.336-1.744a3.71 3.71 0 0 1 .663-.863zM7.44 6.611a1.442 1.442 0 0 1 1.363 1.925.214.214 0 0 0 .168.283h.005a.214.214 0 0 0 .238-.146 1.373 1.373 0 0 1 2.613-.01.214.214 0 0 0 .417-.09 1.509 1.509 0 0 1 1.504-1.664c.678 0 1.249.445 1.442 1.056a.214.214 0 0 0 .259.143l.15-.04a.214.214 0 0 0 .051-.02 1.139 1.139 0 0 1 1.702.995 1.14 1.14 0 0 1-.985 1.131.214.214 0 0 0-.001 0 2.215 2.215 0 0 0-.485.126 10.65 10.65 0 0 1-1.176.365.214.214 0 0 0-.162.186 1.276 1.276 0 0 1-.146.478 2.07 2.07 0 0 0-.239 1.111l.001.151a.438.438 0 0 1-.16.36.665.665 0 0 1-.43.14.586.586 0 0 1-.588-.59.803.803 0 0 0-.38-.681.214.214 0 0 0-.002-.002c-.24-.145-.43-.37-.532-.636a.214.214 0 0 0-.207-.138 19.469 19.469 0 0 1-5.37-.6l-.003-.002a9.007 9.007 0 0 0-.838-.194h.003a1.16 1.16 0 0 1-.937-1.134c0-.619.488-1.118 1.101-1.14a.214.214 0 0 0 .204-.176 1.443 1.443 0 0 1 1.42-1.187zm8.549 4.106v.455c0 .314.259.573.572.573h1.329a1.397 1.397 0 0 1 1.397 1.397v5.804a1.396 1.396 0 0 1-1.402 1.396.214.214 0 0 0-.002 0c-.448.002-.918 0-1.31-.005a.573.573 0 0 0-.584.573c0 .468 0 1.262-.002 1.603a.214.214 0 0 0 0 .001c0 .042-.019.08-.05.107-.346.26-1.75.95-4.915.95-3.107 0-4.587-.52-4.99-.752a.143.143 0 0 1-.065-.118l-.025-11.955c.145.033.288.07.431.11a.214.214 0 0 0 .003 0c.115.031.246.064.383.097v10.37c0 .129.069.247.18.31.453.217 1.767.732 4.071.732 2.32 0 3.595-.626 4.022-.884a.357.357 0 0 0 .164-.3l.001-10.21c.267-.075.531-.158.792-.254zm-7.99.894a.493.493 0 0 1 .494.493v8.578a.493.493 0 0 1-.493.493.493.493 0 0 1-.494-.493v-8.578A.493.493 0 0 1 8 11.611zm8.652 1.14a.663.663 0 0 0-.662.662v5.208a.663.663 0 0 0 .662.662h1.14a.663.663 0 0 0 .662-.662v-5.209a.663.663 0 0 0-.662-.662zm0 .428h1.14a.233.233 0 0 1 .233.233v5.21a.233.233 0 0 1-.233.232h-1.14a.233.233 0 0 1-.233-.233v-5.209a.233.233 0 0 1 .233-.233z" />
<path id="chocolatey" class="svg_path" d="M21.593 19.159 24 16.788l-2.407-2.469V2.124H3.713L0 1.376l2.968 3.142L0 6.987l2.968 2.469L0 11.925l2.968 2.394L0 16.788l2.968 2.371L0 22.624l3.713-.898h17.881L24 22.624 21.593 19.159zM15.095 13.367c-.81 1.08-2.07 2.34-3.15 3.06-4.23 2.88-7.921-.9-6.391-5.22.99-2.7 3.96-6.031 7.561-4.68 2.34.9 1.53 3.33.18 4.77-.45.45-1.44.27-.72-1.08.27-.54.54-1.62-.27-1.89-1.8-.63-3.87.81-4.32 2.7-.45 1.62.72 3.33 2.79 2.88 1.71-.36 3.33-1.53 3.96-2.07C15.365 11.296 15.815 12.287 15.095 13.367zM18.648 14.418c-.562.562-1.332.705-1.718.318-.387-.387-.244-1.156.318-1.718.562-.562 1.332-.705 1.718-.318C19.353 13.086 19.21 13.856 18.648 14.418zM19.146 10.574c-.562.562-1.332.705-1.718.318-.387-.387-.244-1.156.318-1.718.562-.562 1.332-.705 1.718-.318C19.851 9.242 19.709 10.012 19.146 10.574z" />
<path id="docker" class="svg_path" d="M4.82 17.273c-.683 0-1.304-.558-1.304-1.238s.558-1.242 1.304-1.242c.75 0 1.313.559 1.313 1.242 0 .68-.625 1.238-1.309 1.238zM20.832 10.512c-.137-.992-.75-1.801-1.559-2.418l-.316-.25-.254.308c-.492.559-.691 1.551-.629 2.293.059 .563.238 1.121.555 1.555-.258.133-.57.25-.813.379-.57.187-1.125.25-1.679.25h-16.039l-.063.367c-.117 1.184.063 2.422.563 3.543l.246.434v.058c1.5 2.485 4.168 3.602 7.078 3.602 5.594 0 10.18-2.418 12.355-7.633 1.426.062 2.864-.309 3.539-1.676l.18-.308-.297-.188c-.812-.496-1.922-.562-2.851-.312l-.02.004zM12.824 9.52h-2.429v2.421h2.429zM12.824 6.477h-2.429v2.421h2.429zM12.824 3.371h-2.429v2.422h2.429zM15.793 9.52h-2.414v2.421h2.422v-2.421zM6.797 9.52h-2.414v2.421h2.422v-2.421zM9.824 9.52h-2.398v2.421h2.414v-2.421zM3.797 9.52h-2.399v2.421h2.43v-2.421zM9.824 6.477h-2.398v2.421h2.414v-2.418zM6.781 6.477h-2.394v2.421h2.414v-2.418l-.016-.003z" />
</svg>

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -15,6 +15,14 @@ class Programs implements IWebsiteModule
'windowsstore',
'itunesstore',
'docker',
'aur-bin',
'aur-git',
'homebrew',
'homebrew-tap',
'chocolatey',
'homepage',
'wiki',
'alternativeto',
@ -138,6 +146,7 @@ class Programs implements IWebsiteModule
$css = '?';
$svg = '?';
$direct = false;
$alert = null;
if ($type === 'download') { $caption = 'Download'; $css = 'prgv_dl_download'; $svg = 'download'; }
if ($type === 'github') { $caption = 'Github'; $css = 'prgv_dl_github'; $svg = 'github'; }
@ -151,6 +160,13 @@ class Programs implements IWebsiteModule
if ($type === 'alternativeto') { $caption = 'AlternativeTo'; $css = 'prgv_dl_alternativeto'; $svg = 'alternativeto'; }
if ($type === 'changelog') { $caption = 'Changelog'; $css = 'prgv_dl_changelog'; $svg = 'changelog'; }
if ($type === 'docker') { $caption = 'Docker'; $css = 'prgv_dl_docker'; $svg = 'docker'; }
if ($type === 'aur-bin') { $caption = 'AUR (bin)'; $css = 'prgv_dl_aur_bin'; $svg = 'arch'; }
if ($type === 'aur-git') { $caption = 'AUR (git)'; $css = 'prgv_dl_aur_git'; $svg = 'arch'; }
if ($type === 'homebrew') { $caption = 'Homebrew'; $css = 'prgv_dl_homebrew'; $svg = 'homebrew'; }
if ($type === 'homebrew-tap') { $caption = 'Homebrew'; $css = 'prgv_dl_homebrew'; $svg = 'homebrew'; }
if ($type === 'chocolatey') { $caption = 'Chocolatey'; $css = 'prgv_dl_chocolatey'; $svg = 'chocolatey'; }
if (is_array($urldata))
{
$url = $urldata['url'];
@ -169,6 +185,12 @@ class Programs implements IWebsiteModule
$url = Programs::getDirectDownloadURL($prog);
}
if ($type === 'homebrew-tap')
{
$alert = $url;
$url = '';
}
$result []=
[
'type' => $type,
@ -177,6 +199,7 @@ class Programs implements IWebsiteModule
'href' => $url,
'css' => $css,
'isdirect' => $direct,
'alert' => $alert,
];
}
@ -238,7 +261,7 @@ class Programs implements IWebsiteModule
if ($xurl['type']==='download' && $xurl['isdirect'] && !file_exists($this->getDirectDownloadPath($prog))) return ['result'=>'err', 'message' => 'Direct download not found ' . $prog['name']];
if ($xurl['type']==='download' || $xurl['type']==='playstore' || $xurl['type']==='itunesstore') $isdl = true;
if (in_array($xurl['type'], ['download', 'playstore', 'itunesstore', 'docker', 'aur-bin', 'aur-git', 'homebrew', 'chocolatey'])) $isdl = true;
}
if (!$isdl) return ['result'=>'err', 'message' => 'No download link ' . $prog['name']];

View File

@ -49,12 +49,24 @@ $FRAME_OPTIONS->activeHeader = 'programs';
<?php
foreach ($SITE->modules->Programs()->getURLs($prog) as $xurl)
{
echo '<a class="iconbutton '.$xurl['css'].'" href="'.$xurl['href'].'">';
echo '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24">';
echo '<use xlink:href="/data/images/icons.svg#'.$xurl['svg'].'"/>';
echo '</svg>';
echo '<span>'.$xurl['caption'].'</span>';
echo '</a>';
if ($xurl['alert'] === null)
{
echo '<a class="iconbutton '.$xurl['css'].'" href="'.$xurl['href'].'">';
echo '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24">';
echo '<use xlink:href="/data/images/icons.svg#'.$xurl['svg'].'"/>';
echo '</svg>';
echo '<span>'.$xurl['caption'].'</span>';
echo '</a>';
}
else
{
echo '<a class="iconbutton '.$xurl['css'].'" onclick="alert(atob(\'' . base64_encode($xurl['alert']) . '\'))">';
echo '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24">';
echo '<use xlink:href="/data/images/icons.svg#'.$xurl['svg'].'"/>';
echo '</svg>';
echo '<span>'.$xurl['caption'].'</span>';
echo '</a>';
}
}
?>
</div>

View File

@ -699,6 +699,7 @@ return
[
'github' => 'https://github.com/Mikescher/youtube-dl-viewer',
'download' => 'https://github.com/Mikescher/youtube-dl-viewer/releases',
'docker' => 'https://hub.docker.com/r/mikescher/youtube-dl-viewer',
],
'extra_images' =>
[
@ -750,6 +751,8 @@ return
[
'github' => 'https://github.com/Mikescher/better-docker-ps',
'download' => 'https://github.com/Mikescher/better-docker-ps/releases',
'aur-bin' => 'https://aur.archlinux.org/packages/dops-bin',
'aur-git' => 'https://aur.archlinux.org/packages/dops-git',
],
],
@ -769,6 +772,10 @@ return
[
'github' => 'https://github.com/Mikescher/firefox-sync-client',
'download' => 'https://github.com/Mikescher/firefox-sync-client/releases/latest',
'aur-bin' => 'https://aur.archlinux.org/packages/ffsclient-bin',
'aur-git' => 'https://aur.archlinux.org/packages/ffsclient-git',
'homebrew-tap' => 'brew tap Mikescher/tap && brew install ffsclient',
'chocolatey' => 'https://community.chocolatey.org/packages/ffsclient',
],
],
];