@ -0,0 +1,7 @@ |
||||
PHP/KyMAN.Secrets.php |
||||
KyMAN.apache2.conf |
||||
MBST.apache2.conf |
||||
Public/data |
||||
Public/wlog |
||||
Public/dev |
||||
JSON/html.files.json |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 8.3 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 8.6 KiB |
After Width: | Height: | Size: 7.9 KiB |
@ -0,0 +1,5 @@ |
||||
<article data-type="image_links" data-i18n="{key}_description" data-i18n-without="true" title="{description}" onmousein="kyman.item_in(this, event);" onmouseout="kyman.item_out(this, event);" data-i="{i}"> |
||||
{hexagon} |
||||
<span class="name">{name}</span> |
||||
<span class="description" data-i18n="{key}_description">{description}</span> |
||||
</article> |
@ -0,0 +1,9 @@ |
||||
<article data-type="level" data-name="{name}" title="{name}" onmousein="kyman.item_in(this, event);" onmouseout="kyman.item_out(this, event);" data-i="{i}"> |
||||
{hexagon} |
||||
<span class="name">{name}</span> |
||||
<span class="levels"> |
||||
<span class="like" title="{like} %"><span class="graph" data-value="{like}%"></span><span class="value">{like}</span></span> |
||||
<span class="level" title="{level} %"><span class="graph" data-value="{level}%"></span><span class="value">{level}</span></span> |
||||
<span class="experience" title="{experience} %"><span class="graph" data-value="{experience}%"></span><span class="value">{experience}</span></span> |
||||
</span> |
||||
</article> |
@ -0,0 +1,187 @@ |
||||
<!DOCTYPE html> |
||||
<html lang="{language}" dir="ltr"> |
||||
<head> |
||||
<title data-i18n="{root_key}_title">{title}</title> |
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> |
||||
<meta charset="utf-8" /> |
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0" /> |
||||
<link rel="icon" href="/images/{author_min}-32.png" sizes="32x32" /> |
||||
<link rel="icon" href="/images/{author_min}-192.png" sizes="192x192" /> |
||||
<link rel="icon" href="/images/{author_min}-512.png" sizes="512x512" /> |
||||
<link rel="apple-touch-icon-precomposed" href="/images/{author_min}-180.png" /> |
||||
<meta name="msapplication-TileImage" content="/images/{author_min}-270.png" /> |
||||
|
||||
<meta name="licence:text" content="© 2020-2021 CopyLeft. GPLv3" /> |
||||
<meta name="licence:link" content="https://www.gnu.org/licenses/gpl-3.0.txt" /> |
||||
<meta name="licence:icon" content="https://www.gnu.org/graphics/gplv3-88x31.png" /> |
||||
|
||||
<meta name="xdoc:link" content="{url}" /> |
||||
<meta name="xdoc:author" content="{author}" /> |
||||
<meta name="xdoc:since" content="{since}" /> |
||||
<meta name="xdoc:version" content="{version}" /> |
||||
<meta name="xdoc:access" content="public" /> |
||||
|
||||
<meta name="description" data-i18n="{root_key}_description" content="{description}" /> |
||||
<meta name="keywords" data-i18n="{root_key}_keywords" content="{key_words}" /> |
||||
<meta name="author" content="{author}" /> |
||||
<meta name="copyright" content="© 2020-2021 CopyLeft" /> |
||||
<meta name="robots" content="index,follow" /> |
||||
<meta name="googlebot" content="index,follow,max-snippet:-1,max-image-preview:large,max-video-preview:-1" /> |
||||
<meta name="bingbot" content="index,follow,max-snippet:-1,max-image-preview:large,max-video-preview:-1" /> |
||||
<!--<meta http-equiv="refresh" content="30" />--> |
||||
<!--<meta http-equiv="cache-control" content="no-cache" />--> |
||||
<!--<meta http-equiv="expires" content="0" />--> |
||||
<link rel="canonical" href="{url}" /> |
||||
<link rel="alternate" href="{url}" hreflang="es" /> |
||||
<meta property="og:locale:alternate" content="es_ES" /> |
||||
<meta name="referrer" content="origin" /> |
||||
<meta name="fragment" content="!" /><!-- Para uso AJAX --> |
||||
<meta name="language" content="es" /> |
||||
<meta name="revisit-after" content="7 days" /><!-- Regreso de las arañas. Información Crawl. --> |
||||
<meta name="rating" content="general" /><!-- Tipo de contenido: general, mature, restricted, adult, 14 years, safe for kids. --> |
||||
<meta name="author" content="{author}" /> |
||||
<meta name="owner" content="{author}" /> |
||||
|
||||
<meta property="og:locale" content="es_ES" /> |
||||
<meta property="og:type" content="website" /> |
||||
<meta property="og:title" data-i18n="{root_key}_title" content="{title}" /> |
||||
<meta property="og:description" data-i18n="{root_key}_description" content="{description}" /> |
||||
<meta property="og:url" content="{url}" /> |
||||
<meta property="og:site_name" content="{project}" /> |
||||
<meta property="og:image" content="{logo}" /> |
||||
<!--<meta property="fb:admins" content="FB-AppID" />--> |
||||
<meta name="twitter:card" content="summary" /> |
||||
<meta name="twitter:description" data-i18n="{root_key}_description" content="{description}" /> |
||||
<meta name="twitter:title" data-i18n="{root_key}_title" content="{title}" /> |
||||
<!--<meta name="twitter:site" content="@KyMAN" />--> |
||||
<!--<meta name="twitter:creator" content="@KyMAN" />--> |
||||
|
||||
<meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE" /> |
||||
<!--<meta name="google-site-verification" content="123456789" />--><!-- Verificación en el Google Search Console. --> |
||||
<meta name="google" content="nositelinkssearchbox" /> |
||||
<link rel="dns-prefetch" href="{url}" /> |
||||
<!--<link rel="amphtml" href="{url}index.amp.html" />--><!-- Indica si tiene página para móviles. Tecnología AMP. --> |
||||
|
||||
<script data-type="text/javascript" data-language="ECMAScript 2015" src="https://kstats.k3y.pw/ecma/KStats.ecma.js"></script> |
||||
|
||||
<script> |
||||
|
||||
kstats = new KStats({url : "https://kstats.k3y.pw/api/cxvkzjd19i6NYcTSruw2HNzo6432xjnmRquzGN36NZffMjbn9PUCcQF1J/{session}/json/set"}); |
||||
|
||||
</script> |
||||
|
||||
<link type="text/css" rel="stylesheet" data-language="CSS3" href="https://cdn.k3y.pw/css/fonts/local/Roboto.css" data-crossorigin="anonymous" charset="utf-8" /> |
||||
<link type="text/css" rel="stylesheet" data-language="CSS3" href="https://cdn.k3y.pw/css/fonts/local/RobotoMono.css" data-crossorigin="anonymous" charset="utf-8" /> |
||||
<link type="text/css" rel="stylesheet" data-language="CSS3" href="https://cdn.k3y.pw/css/fonts/local/FontAwesome5Free.css" data-crossorigin="anonymous" charset="utf-8" /> |
||||
|
||||
<link type="text/css" rel="stylesheet" data-language="CSS3" href="/css/KyMAN.icons.css" data-crossorigin="anonymous" charset="utf-8" /> |
||||
|
||||
<style data-type="text/css" data-rel="stylesheet" data-language="CSS3" charset="utf-8"> |
||||
|
||||
html,body{ |
||||
height : 100%; |
||||
margin : 0px; |
||||
} |
||||
|
||||
</style> |
||||
|
||||
<link type="text/css" rel="stylesheet" data-language="CSS3" href="/scss/KyMAN.css" data-css-map="/scss/KyMAN.css.map" data-scss="/scss/KyMAN.scss" data-crossorigin="anonymous" charset="utf-8" /> |
||||
|
||||
<script data-type="text/javascript" data-language="ECMAScript 2015" src="/ecma/KyMAN.ecma.js" data-crossorigin="anonymous" charset="utf-8"></script> |
||||
<script data-type="text/javascript" data-language="ECMAScript 2015" src="/ecma/KyMAN.Ajax.ecma.js" data-crossorigin="anonymous" charset="utf-8"></script> |
||||
<script data-type="text/javascript" data-language="ECMAScript 2015" src="/ecma/KyMAN.Settings.ecma.js" data-crossorigin="anonymous" charset="utf-8"></script> |
||||
<script data-type="text/javascript" data-language="ECMAScript 2015" src="/ecma/KyMAN.I18N.ecma.js" data-crossorigin="anonymous" charset="utf-8"></script> |
||||
<script data-type="text/javascript" data-language="ECMAScript 2015" src="/ecma/KyMAN.Threads.ecma.js" data-crossorigin="anonymous" charset="utf-8"></script> |
||||
<script data-type="text/javascript" data-language="ECMAScript 2015" src="/ecma/KyMAN.Preload.ecma.js" data-crossorigin="anonymous" charset="utf-8"></script> |
||||
<script data-type="text/javascript" data-language="ECMAScript 2015" src="/ecma/KyMAN.Background.ecma.js" data-crossorigin="anonymous" charset="utf-8"></script> |
||||
|
||||
<script data-type="text/javascript" data-language="ECMAScript 2015" charset="utf-8"> |
||||
|
||||
kyman = new KyMAN(); |
||||
|
||||
</script> |
||||
|
||||
</head> |
||||
<body class="kyman" data-cells="40" data-cell-size="60" data-mobile="true" data-hexagons="3" data-vertical="false"> |
||||
<div class="cache"></div> |
||||
<canvas class="background"></canvas> |
||||
<header> |
||||
<h1 class="logo"> |
||||
<a href="{url}#"> |
||||
<span class="logo-dynamic-image"> |
||||
<span class="child" style="background-image:url('/images/logo_wing.svg');"></span> |
||||
<span class="child" style="background-image:url('/images/logo_wing.svg');"></span> |
||||
<span class="child" style="background-image:url('/images/logo_{author_min}.svg');"></span> |
||||
<span class="child" style="background-image:url('/images/logo_capsule.svg');"></span> |
||||
</span> |
||||
<span class="text">{author_min}</span> |
||||
</a> |
||||
</h1> |
||||
<nav class="main-menu"> |
||||
<ul> |
||||
<li><a href="/wlog" target="_blank" data-i18n="wlog" data-i18n-without="true" title="{wlog}"> |
||||
<span class="logo-dynamic-image"> |
||||
<span class="child" style="background-image:url('/images/logo_wing.svg');"></span> |
||||
<span class="child" style="background-image:url('/images/logo_wing.svg');"></span> |
||||
<span class="child image" data-images="WyJodHRwczpcL1wvd21hcmtkb3duLmszeS5wd1wvaW1hZ2VzXC93bWFya2Rvd24ucG5nIl0=" data-status="unloaded"><img /><span></span></span> |
||||
<span class="child" style="background-image:url('/images/logo_capsule_clear.svg');"></span> |
||||
</span> |
||||
<span data-i18n="wlog">{wlog}</span> |
||||
</a></li> |
||||
</ul> |
||||
</nav> |
||||
<nav class="languages"> |
||||
<ul> |
||||
<li class="espanol" data-visible="{espanol_visible}"><a href="/es" title="Español"> |
||||
<span class="logo-dynamic-image"> |
||||
<span class="child" style="background-image:url('/images/logo_wing.svg');"></span> |
||||
<span class="child" style="background-image:url('/images/logo_wing.svg');"></span> |
||||
<span class="child image" data-images="WyJodHRwczovL2kuaW1ndXIuY29tL2ltMW8wZ2MucG5nIiwiaHR0cHM6Ly9jZG4uazN5LnB3L2ltYWdlcy9mbGFncy9lc3BhbmEucG5nIiwiaHR0cHM6Ly9jZG4ubG9jYWwvaW1hZ2VzL2ZsYWdzL2VzcGFuYS5wbmciXQ==" data-status="unloaded"><img /><span></span></span> |
||||
<span class="child" style="background-image:url('/images/logo_capsule_clear.svg');"></span> |
||||
</span> |
||||
<span class="code">es_ES</span> |
||||
<span class="name">Español</span> |
||||
</a></li> |
||||
<li class="galego" data-visible="{galego_visible}"><a href="/gal" title="Galego"> |
||||
<span class="logo-dynamic-image"> |
||||
<span class="child" style="background-image:url('/images/logo_wing.svg');"></span> |
||||
<span class="child" style="background-image:url('/images/logo_wing.svg');"></span> |
||||
<span class="child image" data-images="WyJodHRwczovL2kuaW1ndXIuY29tL0JMTGVoWUEucG5nIiwiaHR0cHM6Ly9jZG4uazN5LnB3L2ltYWdlcy9mbGFncy9nYWxpY2lhLnBuZyIsImh0dHBzOi8vY2RuLmxvY2FsL2ltYWdlcy9mbGFncy9nYWxpY2lhLnBuZyJd" data-status="unloaded"><img /><span></span></span> |
||||
<span class="child" style="background-image:url('/images/logo_capsule_clear.svg');"></span> |
||||
</span> |
||||
<span class="code">gal_ES</span> |
||||
<span class="name">Gelego</span> |
||||
</a></li> |
||||
<li class="english" data-visible="{english_visible}"><a href="/en" title="English"> |
||||
<span class="logo-dynamic-image"> |
||||
<span class="child" style="background-image:url('/images/logo_wing.svg');"></span> |
||||
<span class="child" style="background-image:url('/images/logo_wing.svg');"></span> |
||||
<span class="child image" data-images="WyJodHRwczovL2kuaW1ndXIuY29tL2xDdW40dDUucG5nIiwiaHR0cHM6Ly9jZG4uazN5LnB3L2ltYWdlcy9mbGFncy9lbmdsYW5kLnBuZyIsImh0dHBzOi8vY2RuLmxvY2FsL2ltYWdlcy9mbGFncy9lbmdsYW5kLnBuZyJd" data-status="unloaded"><img /><span></span></span> |
||||
<span class="child" style="background-image:url('/images/logo_capsule_clear.svg');"></span> |
||||
</span> |
||||
<span class="code">en_UK</span> |
||||
<span class="name">English</span> |
||||
</a></li> |
||||
</ul> |
||||
</nav> |
||||
</header> |
||||
<div class="body">{html}</div> |
||||
<div class="data-fixed"></div> |
||||
<div class="data"></div> |
||||
<footer> |
||||
<a href="https://www.gnu.org/licenses/gpl-3.0.txt" target="_blank" data-i18n="license_full" data-i18n-without="true" title="{license_full}" class="license"> |
||||
<span data-i18n="license_text">{license}</span> |
||||
<img src="https://www.gnu.org/graphics/gplv3-127x51.png" alt="GPLv3" /> |
||||
</a> |
||||
</footer> |
||||
<div class="preloader"> |
||||
<div class="animation"></div> |
||||
<div class="percentage"> |
||||
<span class="text">0</span> |
||||
<span class="graph"></span> |
||||
</div> |
||||
<ul class="items"></ul> |
||||
</div> |
||||
<div class="kyman-preloader"></div> |
||||
</body> |
||||
</html> |
@ -0,0 +1,199 @@ |
||||
<!DOCTYPE html> |
||||
<html lang="{language}" dir="ltr"> |
||||
<head> |
||||
<title data-i18n="kyman_title">{title}</title> |
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> |
||||
<meta charset="utf-8" /> |
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0" /> |
||||
<link rel="icon" href="/images/KyMAN-32.png" sizes="32x32" /> |
||||
<link rel="icon" href="/images/KyMAN-192.png" sizes="192x192" /> |
||||
<link rel="icon" href="/images/KyMAN-512.png" sizes="512x512" /> |
||||
<link rel="apple-touch-icon-precomposed" href="/images/KyMAN-180.png" /> |
||||
<meta name="msapplication-TileImage" content="/images/KyMAN-270.png" /> |
||||
|
||||
<meta name="licence:text" content="© 2020-2021 CopyLeft. GPLv3" /> |
||||
<meta name="licence:link" content="https://www.gnu.org/licenses/gpl-3.0.txt" /> |
||||
<meta name="licence:icon" content="https://www.gnu.org/graphics/gplv3-88x31.png" /> |
||||
|
||||
<meta name="xdoc:link" content="{url}" /> |
||||
<meta name="xdoc:author" content="{author}" /> |
||||
<meta name="xdoc:since" content="{since}" /> |
||||
<meta name="xdoc:version" content="{version}" /> |
||||
<meta name="xdoc:access" content="public" /> |
||||
|
||||
<meta name="description" data-i18n="kyman_description" content="{description}" /> |
||||
<meta name="keywords" data-i18n="kyman_keywords" content="{key_words}" /> |
||||
<meta name="author" content="{author}" /> |
||||
<meta name="copyright" content="© 2020-2021 CopyLeft" /> |
||||
<meta name="robots" content="index,follow" /> |
||||
<meta name="googlebot" content="index,follow,max-snippet:-1,max-image-preview:large,max-video-preview:-1" /> |
||||
<meta name="bingbot" content="index,follow,max-snippet:-1,max-image-preview:large,max-video-preview:-1" /> |
||||
<!--<meta http-equiv="refresh" content="30" />--> |
||||
<!--<meta http-equiv="cache-control" content="no-cache" />--> |
||||
<!--<meta http-equiv="expires" content="0" />--> |
||||
<link rel="canonical" href="{url}" /> |
||||
<link rel="alternate" href="{url}" hreflang="es" /> |
||||
<meta property="og:locale:alternate" content="es_ES" /> |
||||
<meta name="referrer" content="origin" /> |
||||
<meta name="fragment" content="!" /><!-- Para uso AJAX --> |
||||
<meta name="language" content="es" /> |
||||
<meta name="revisit-after" content="7 days" /><!-- Regreso de las arañas. Información Crawl. --> |
||||
<meta name="rating" content="general" /><!-- Tipo de contenido: general, mature, restricted, adult, 14 years, safe for kids. --> |
||||
<meta name="author" content="{author}" /> |
||||
<meta name="owner" content="{author}" /> |
||||
|
||||
<meta property="og:locale" content="es_ES" /> |
||||
<meta property="og:type" content="website" /> |
||||
<meta property="og:title" data-i18n="kyman_title" content="{title}" /> |
||||
<meta property="og:description" data-i18n="kyman_description" content="{description}" /> |
||||
<meta property="og:url" content="{url}" /> |
||||
<meta property="og:site_name" content="{project}" /> |
||||
<meta property="og:image" content="{logo}" /> |
||||
<!--<meta property="fb:admins" content="FB-AppID" />--> |
||||
<meta name="twitter:card" content="summary" /> |
||||
<meta name="twitter:description" data-i18n="kyman_description" content="{description}" /> |
||||
<meta name="twitter:title" data-i18n="kyman_title" content="{title}" /> |
||||
<!--<meta name="twitter:site" content="@KyMAN" />--> |
||||
<!--<meta name="twitter:creator" content="@KyMAN" />--> |
||||
|
||||
<meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE" /> |
||||
<!--<meta name="google-site-verification" content="123456789" />--><!-- Verificación en el Google Search Console. --> |
||||
<meta name="google" content="nositelinkssearchbox" /> |
||||
<link rel="dns-prefetch" href="{url}" /> |
||||
<!--<link rel="amphtml" href="{url}index.amp.html" />--><!-- Indica si tiene página para móviles. Tecnología AMP. --> |
||||
|
||||
<link type="text/css" rel="stylesheet" data-language="CSS3" href="https://cdn.k3y.pw/css/fonts/local/Roboto.css" data-crossorigin="anonymous" charset="utf-8" /> |
||||
<link type="text/css" rel="stylesheet" data-language="CSS3" href="https://cdn.k3y.pw/css/fonts/local/RobotoMono.css" data-crossorigin="anonymous" charset="utf-8" /> |
||||
<link type="text/css" rel="stylesheet" data-language="CSS3" href="https://cdn.k3y.pw/css/fonts/local/FontAwesome5Free.css" data-crossorigin="anonymous" charset="utf-8" /> |
||||
<link type="text/css" rel="stylesheet" data-language="CSS3" href="https://unpkg.com/@highlightjs/cdn-assets@10.7.2/styles/default.min.css" data-crossorigin="anonymous" charset="utf-8" /> |
||||
|
||||
<script data-type="test/javascript" data-language="JavaScript 1.8.5" src="https://unpkg.com/mermaid@8.9.3/dist/mermaid.min.js" data-js-map="https://unpkg.com/mermaid@8.9.3/dist/mermaid.min.js.map" data-crossorigin="anonymous" charset="utf-8"></script> |
||||
<script data-type="test/javascript" data-language="JavaScript 1.8.5" src="https://unpkg.com/@highlightjs/cdn-assets@10.7.2/highlight.min.js" data-crossorigin="anonymous" charset="utf-8"></script> |
||||
<script data-type="test/javascript" data-language="ECMAScript 2015" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js" data-crossorigin="anonymous" charset="utf-8"></script> |
||||
|
||||
<script data-type="text/javascript" data-language="ECMAScript 2015" src="https://kstats.k3y.pw/ecma/KStats.ecma.js"></script> |
||||
|
||||
<script> |
||||
|
||||
kstats = new KStats({url : "https://kstats.k3y.pw/api/cxvkzjd19i6NYcTSruw2HNzo6432xjnmRquzGN36NZffMjbn9PUCcQF1J/{session}/json/set"}); |
||||
|
||||
</script> |
||||
|
||||
<link type="text/css" rel="stylesheet" data-language="SASS/CSS3" href="https://wmarkdown.k3y.pw/scss/WMarkDown.css" data-scss="https://wmarkdown.k3y.pw/scss/WMarkDown.scss" data-css-map="https://wmarkdown.k3y.pw/scss/WMarkDown.css.map" data-crossorigin="anonymous" charset="utf-8" /> |
||||
<link type="text/css" rel="stylesheet" data-language="CSS3" href="https://wmarkdown.k3y.pw/css/WMarkDown.icons.css" data-crossorigin="anonymous" charset="utf-8" /> |
||||
|
||||
<link type="text/css" rel="stylesheet" data-language="CSS3" href="/css/KyMAN.icons.css" data-crossorigin="anonymous" charset="utf-8" /> |
||||
|
||||
<style data-type="text/css" data-rel="stylesheet" data-language="CSS3" charset="utf-8"> |
||||
|
||||
html,body{ |
||||
height : 100%; |
||||
margin : 0px; |
||||
} |
||||
|
||||
</style> |
||||
|
||||
<script data-type="text/javascript" data-language="ECMAScript 2015" src="https://wmarkdown.k3y.pw/ecma/WMarkDown.ecma.js" data-crossorigin="anonymous" charset="utf-8"></script> |
||||
<script data-type="text/javascript" data-language="ECMAScript 2015" src="https://wmarkdown.k3y.pw/ecma/WMarkDown.Dictionary.ecma.js" data-crossorigin="anonymous" charset="utf-8"></script> |
||||
<script data-type="text/javascript" data-language="ECMAScript 2015" src="https://wmarkdown.k3y.pw/ecma/WMarkDown.Multimedia.ecma.js" data-crossorigin="anonymous" charset="utf-8"></script> |
||||
|
||||
<script data-type="text/javascript" data-language="ECMAScript 2015" charset="utf-8"> |
||||
|
||||
wmarkdown = new WMarkDown({ |
||||
dictionary_links : "https://wdictionaries.k3y.pw/?es/values,own_projects,projects,digital,common,files,kyman", |
||||
dictionary_title : "Diccionario" |
||||
}); |
||||
|
||||
/m(iguel)?bst\.(k3y\.pw|local)\//.test(window.location.href) && wmarkdown.on_ready(() => wmarkdown.preload(".wmarkdown .main-menu", main_menu => { |
||||
document.querySelectorAll("title,header .logo .text").forEach(item => item.innerText = item.innerText.replace(/KyMAN/g, "MBST")); |
||||
with(main_menu.parentNode.querySelector(".logo img")){ |
||||
setAttribute("src", "/images/MBST.png"); |
||||
setAttribute("alt", "MBST"); |
||||
}; |
||||
main_menu.parentNode.querySelector(".logo .image>span").style.backgroundImage = "url('/images/MBST.png')"; |
||||
document.querySelectorAll("[rel=icon],[rel=apple-touch-icon-precomposed]").forEach(item => item.setAttribute("href", item.getAttribute("href").replace(/KyMAN/, "MBST"))); |
||||
with(document.querySelector("meta[name=msapplication-TileImage]"))setAttribute("content", getAttribute("href").replace(/KyMAN/, "MBST")); |
||||
})); |
||||
|
||||
</script> |
||||
|
||||
</head> |
||||
<body class="wmarkdown kyman-wlog"> |
||||
<header> |
||||
<h1 class="logo"> |
||||
<a href="https://kyman.k3y.pw/wlog/#"> |
||||
<span class="image"> |
||||
<span style="background-image:url('/images/KyMAN.png');"></span> |
||||
<img src="/images/KyMAN.png" alt="KyMAN" /> |
||||
</span> |
||||
<span class="text">KyMAN</span> |
||||
</a> |
||||
</h1> |
||||
<nav class="main-menu"> |
||||
<ul> |
||||
<li><a href="/" data-i18n="portfolio" data-i18n-without="true" title="Portfolio" target="_self"> |
||||
<span data-icon="portfolio"></span> |
||||
<span data-i18n="portfolio">Portfolio</span> |
||||
</a></li> |
||||
<li><a href="/wlog" data-i18n="home" data-i18n-without="true" title="home" target="_self"> |
||||
<span data-icon="home"></span> |
||||
<span data-i18n="home">Home</span> |
||||
</a></li> |
||||
<li><a href="/dev" data-i18n="developt" data-i18n-without="true" title="Desarrollo" target="_self"> |
||||
<span data-icon="developt"></span> |
||||
<span data-i18n="developt">Desarrollo</span> |
||||
</a></li> |
||||
<li><a href="https://git.k3y.pw/KyMAN/KyMAN" data-i18n="git" data-i18n-without="true" title="Git" target="_blank"> |
||||
<span data-icon="git"></span> |
||||
<span data-i18n="git">Git</span> |
||||
</a></li> |
||||
</ul> |
||||
</nav> |
||||
</header> |
||||
<div class="body" data-headers-menu-deployed="true" data-files-menu-deployed="true"> |
||||
<fieldset class="headers-menu"> |
||||
<legend data-i18n="headers_menu" title="Menu">Menu</legend> |
||||
<nav> |
||||
<ul>{menu}</ul> |
||||
</nav> |
||||
<div class="menu-buttons"> |
||||
<button type="button" data-i18n="hide" data-i18n-without="true" title="Hide" onclick="wmarkdown.hide_menu(this, event);" data-visible="true"> |
||||
<span data-icon="hide"></span> |
||||
<span data-i18n="hide">Hide</span> |
||||
</button> |
||||
<button type="button" data-i18n="show" data-i18n-without="true" title="Show" onclick="wmarkdown.show_menu(this, event);" data-visible="false"> |
||||
<span data-icon="show"></span> |
||||
<span data-i18n="show">Show</span> |
||||
</button> |
||||
</div> |
||||
</fieldset> |
||||
<fieldset class="content"> |
||||
<legend data-i18n="content" title="Content">Content</legend> |
||||
<div class="content-box">{content}</div> |
||||
</fieldset> |
||||
<fieldset class="files"> |
||||
<legend data-i18n="files" title="Files">Files</legend> |
||||
<nav> |
||||
<ul>{files}</ul> |
||||
</nav> |
||||
<div class="menu-buttons"> |
||||
<button type="button" data-i18n="hide" data-i18n-without="true" title="Hide" onclick="wmarkdown.hide_menu(this, event);" data-visible="true"> |
||||
<span data-icon="hide"></span> |
||||
<span data-i18n="hide">Hide</span> |
||||
</button> |
||||
<button type="button" data-i18n="show" data-i18n-without="true" title="Show" onclick="wmarkdown.show_menu(this, event);" data-visible="false"> |
||||
<span data-icon="show"></span> |
||||
<span data-i18n="show">Show</span> |
||||
</button> |
||||
</div> |
||||
</fieldset> |
||||
</div> |
||||
<footer> |
||||
<a href="https://www.gnu.org/licenses/gpl-3.0.txt" target="_blank" title="GPLv3" class="license"> |
||||
<span data-i18n="license_text">© 2021-2022 CopyLeft.</span> |
||||
<img src="https://www.gnu.org/graphics/gplv3-127x51.png" alt="GPLv3" /> |
||||
</a> |
||||
<div data-preload="wmarkdown-preloader"></div> |
||||
</footer> |
||||
</body> |
||||
</html> |
@ -0,0 +1,5 @@ |
||||
<section class="block" data-name="{name}" data-i="{i}"> |
||||
<h3 data-i18n="{name}">{title}</h3> |
||||
<p data-i18n="{name}_text">{text}</p> |
||||
<div class="items">{items}</div> |
||||
</section> |
@ -0,0 +1,8 @@ |
||||
<span class="image" data-images="{icons}" data-status="unloaded" data-i="0" data-full="{full}"> |
||||
<noscript>{sources}</noscript> |
||||
<img /><span></span><svg viewBox="0 0 90 100" xmlns="http://www.w3.org/2000/svg" version="1.1"> |
||||
<defs></defs> |
||||
<polygon points="45,1 89,25 89,75 45,99 1,75 1,25" class="background" style="--data-in:{color_in};--data-out:{color_out};" /> |
||||
<polygon points="45,1 89,25 89,75 45,99 1,75 1,25" class="icon" /> |
||||
</svg> |
||||
</span> |
@ -0,0 +1,39 @@ |
||||
{ |
||||
"default_value" : null, |
||||
"autostart" : true, |
||||
"default_language" : "english", |
||||
"i18n_files" : [ |
||||
"/Public/json/KyMAN.i18n.english.json", |
||||
"/Public/json/KyMAN.i18n.espanol.json", |
||||
"/Public/json/KyMAN.i18n.galego.json" |
||||
], |
||||
"main_file" : "/JSON/KyMAN.php.cv.json", |
||||
"base_file" : "/HTML/base.html", |
||||
"block_file" : "/HTML/block.html", |
||||
"level_file" : "/HTML/Level.html", |
||||
"image_links_file" : "/HTML/ImageLinks.html", |
||||
"url" : "https://kyman.k3y.pw/", |
||||
"author" : "KyMAN", |
||||
"since" : 20211025, |
||||
"version" : 20211025, |
||||
"cv_web_project" : "KyMAN Portfolio", |
||||
"logo" : "/images/logo.png", |
||||
"alphabet" : "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz", |
||||
"length_id" : 11, |
||||
"default_color_out" : "#222", |
||||
"default_color_in" : "#888", |
||||
"hexagon_file" : "/HTML/hexagon.html", |
||||
"default_language_code" : "es", |
||||
"boss_alternatives" : [{ |
||||
"root_key" : "kyman", |
||||
"author" : "KyMAN", |
||||
"url" : "https://kyman.k3y.pw/", |
||||
"author_min" : "KyMAN" |
||||
}, { |
||||
"root_key" : "mbst", |
||||
"author" : "MiguelBST", |
||||
"url" : "https://mbst.k3y.pw/", |
||||
"extension" : "mbst", |
||||
"author_min" : "MBST" |
||||
}] |
||||
} |
@ -0,0 +1,55 @@ |
||||
<?php |
||||
|
||||
namespace KyMAN\HTML; |
||||
|
||||
class ImageLinks{ |
||||
|
||||
private $kyman = null; |
||||
private $started = false; |
||||
private $html = ''; |
||||
|
||||
public function __construct($kyman, $input = null){ |
||||
|
||||
$this->kyman = $kyman; |
||||
|
||||
} |
||||
|
||||
public function start(){ |
||||
|
||||
if($this->started) |
||||
return; |
||||
$this->started = true; |
||||
|
||||
($file = $this->kyman->settings->get("image_links_file")) && file_exists($file = __DIR__ . "/.." . $file) && ($this->html = file_get_contents($file) ?? ''); |
||||
|
||||
} |
||||
|
||||
public function draw($json){ |
||||
|
||||
$html = ''; |
||||
|
||||
foreach($json as $i => $item){ |
||||
|
||||
$l = count($item); |
||||
$colors = $this->kyman->get_colors($item[3]); |
||||
$sources = $item ? is_array($item[2]) ? $item[2] : [$item[2]] : []; |
||||
|
||||
$html .= \KyMAN::string_variables(\KyMAN::string_variables($this->html, ["hexagon" => $this->kyman->hexagon]), [ |
||||
"name" => $item[0], |
||||
"key" => $item[1], |
||||
"description" => $this->kyman->i18n->get($item[1] . "_description"), |
||||
"i" => $i, |
||||
"id" => $this->kyman->create_id(), |
||||
"color_out" => $colors[0], |
||||
"color_in" => $colors[1], |
||||
"icons" => base64_encode(json_encode($sources)), |
||||
"sources" => '<img src="' . implode('" alt="' . $item[0] . '" /><img src="', $sources) . '" alt="' . $item[0] . '" />', |
||||
"full" => ($l > 5 ? $item[5] : false) ? "true" : "false" |
||||
]); |
||||
|
||||
}; |
||||
|
||||
return $html; |
||||
} |
||||
|
||||
} |
@ -0,0 +1,64 @@ |
||||
<?php |
||||
|
||||
namespace KyMAN\HTML; |
||||
|
||||
class Level{ |
||||
|
||||
private $kyman = null; |
||||
private $started = false; |
||||
private $html = ''; |
||||
|
||||
public function __construct($kyman, $input = null){ |
||||
|
||||
$this->kyman = $kyman; |
||||
|
||||
} |
||||
|
||||
public function start(){ |
||||
|
||||
if($this->started) |
||||
return; |
||||
$this->started = true; |
||||
|
||||
($file = $this->kyman->settings->get("level_file")) && file_exists($file = __DIR__ . "/.." . $file) && ($this->html = file_get_contents($file) ?? ''); |
||||
|
||||
} |
||||
|
||||
private function nested_draw($json, $parent = null){ |
||||
|
||||
$html = ''; |
||||
|
||||
if($json) |
||||
foreach($json as $item){ |
||||
|
||||
$l = count($item); |
||||
list($color_out, $color_in) = $this->kyman->get_colors($l > 6 ? $item[6] : null); |
||||
$sources = $item ? is_array($item[5]) ? $item[5] : [$item[5]] : []; |
||||
|
||||
$html .= \KyMAN::string_variables(\KyMAN::string_variables($this->html, ["hexagon" => $this->kyman->hexagon]), [ |
||||
"name" => $item[0], |
||||
"like" => $item[1] * 100, |
||||
"level" => $item[2] * 100, |
||||
"experience" => $item[3] * 100, |
||||
"parent" => $parent ?? "-", |
||||
"id" => $this->kyman->create_id(), |
||||
"color_out" => $color_out, |
||||
"color_in" => $color_in, |
||||
"icons" => base64_encode(json_encode($sources)), |
||||
"sources" => '<img src="' . implode('" alt="' . $item[0] . '" /><img src="', $sources) . '" alt="' . $item[0] . '" />', |
||||
"full" => ($l > 8 ? $item[8] : false) ? "true" : "false" |
||||
]); |
||||
|
||||
if(count($item) > 4) |
||||
$html .= $this->nested_draw($item[4], $item[0]); |
||||
|
||||
}; |
||||
|
||||
return $html; |
||||
} |
||||
|
||||
public function draw($json){ |
||||
return $this->nested_draw($json); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,49 @@ |
||||
<?php |
||||
|
||||
namespace KyMAN; |
||||
|
||||
class HTML{ |
||||
|
||||
private $kyman = null; |
||||
private $started = false; |
||||
private $html = null; |
||||
|
||||
public $image_links = null; |
||||
public $level = null; |
||||
|
||||
public function __construct($kyman, $input = null){ |
||||
|
||||
$this->kyman = $kyman; |
||||
|
||||
class_exists('\KyMAN\HTML\ImageLinks') && ($this->image_links = new \KyMAN\HTML\ImageLinks($kyman, $input)); |
||||
class_exists('\KyMAN\HTML\Level') && ($this->level = new \KyMAN\HTML\Level($kyman, $input)); |
||||
|
||||
} |
||||
|
||||
public function start(){ |
||||
|
||||
if($this->started) |
||||
return; |
||||
$this->started = true; |
||||
|
||||
($file = $this->kyman->settings->get("block_file")) && file_exists($file = __DIR__ . "/.." . $file) && ($this->html = file_get_contents($file) ?? ''); |
||||
|
||||
$this->image_links && $this->image_links->start(); |
||||
$this->level && $this->level->start(); |
||||
|
||||
} |
||||
|
||||
public function draw($json, $i){ |
||||
|
||||
$type = $json["type"]; |
||||
|
||||
return \KyMAN::string_variables($this->html, [ |
||||
"name" => $json["name"], |
||||
"title" => $this->kyman->i18n->get($json["name"]), |
||||
"text" => $this->kyman->i18n->get($json["name"] . "_text"), |
||||
"i" => $i, |
||||
"items" => $this->$type ? $this->$type->draw($json["items"]) : '' |
||||
]); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,80 @@ |
||||
<?php |
||||
|
||||
namespace KyMAN; |
||||
|
||||
class I18N{ |
||||
|
||||
private $sentences = []; |
||||
private $selected = "english"; |
||||
private $started = false; |
||||
private $default_text = ""; |
||||
private $default_language = "english"; |
||||
private $author = "KyMAN"; |
||||
|
||||
public function __construct($kyman){ |
||||
|
||||
$this->kyman = $kyman; |
||||
|
||||
} |
||||
|
||||
public function change($language){ |
||||
|
||||
$language && $language != $this->selected && isset($this->sentences[$language]) && ($this->selected = $language); |
||||
|
||||
} |
||||
|
||||
public function set_author($name){ |
||||
$this->author = $name; |
||||
} |
||||
|
||||
public function start(){ |
||||
|
||||
if($this->started) |
||||
return; |
||||
$this->started = true; |
||||
|
||||
$default_language = $this->kyman->settings->get(["default_language", "language"]); |
||||
$this->author = $this->kyman->settings->get("author"); |
||||
|
||||
foreach(($files = $this->kyman->settings->get("i18n_files")) ? (is_array($files) ? $files : [$files]) : [] as $file) |
||||
if($file && file_exists($file = __DIR__ . "/.." . $file)) |
||||
foreach(@json_decode(file_get_contents($file), true) ?? [] as $language => $sentences){ |
||||
!isset($this->sentences[$language]) && ($this->sentences[$language] = []); |
||||
foreach($sentences as $key => $sentence) |
||||
$this->sentences[$language][$key] = $sentence; |
||||
}; |
||||
|
||||
} |
||||
|
||||
public function default($default = null){ |
||||
return is_string($default) ? $default : $this->kyman->settings->get("default_text") ?? $this->default_text; |
||||
} |
||||
|
||||
private function get_text($names, $default){ |
||||
if(!$names) |
||||
return $this->default($default); |
||||
|
||||
$used = []; |
||||
|
||||
!is_array($names) && ($names = [$names]); |
||||
|
||||
foreach(array_merge([$this->selected, $this->default_language], array_keys($this->sentences)) as $language) |
||||
if($language && !in_array($language, $used) && isset($this->sentences[$used[] = $language])) |
||||
foreach($names as $name) |
||||
if($name && isset($this->sentences[$language][$name])) |
||||
return $this->sentences[$language][$name]; |
||||
foreach($names as $name) |
||||
if(is_string($name)) |
||||
return $name; |
||||
return $this->default($default); |
||||
} |
||||
|
||||
public function get($names, $variables = null, $default = null){ |
||||
return \KyMAN::string_variables($this->get_text($names, $default), array_merge(["author" => $this->author], is_array($variables) ? $variables : [])); |
||||
} |
||||
|
||||
public function languages(){ |
||||
return array_keys($this->sentences); |
||||
} |
||||
|
||||
}; |
@ -0,0 +1,63 @@ |
||||
<?php |
||||
|
||||
namespace KyMAN; |
||||
|
||||
class Settings{ |
||||
|
||||
const default_settings = [ |
||||
"default_value" => null, |
||||
"settings_files" => __DIR__ . "/../JSON/KyMAN.php.settings.json", |
||||
"autostart" => true |
||||
]; |
||||
private $kyman = null; |
||||
private $input = null; |
||||
private $custom = null; |
||||
|
||||
private function get_value($names, $inputs = null){ |
||||
foreach(array_merge(is_array($inputs) ? (\KyMAN::is_dictionary($variable) ? [$variable] : $variable) : [], [ |
||||
$this->input, |
||||
\KyMAN\Secrets::settings, |
||||
$this->custom, |
||||
self::default_settings |
||||
]) as $input) |
||||
if(is_array($input)) |
||||
foreach($names as $name) |
||||
if($name && isset($input[$name])) |
||||
return [$input[$name], true]; |
||||
return [null, false]; |
||||
} |
||||
|
||||
public function default($default = null){ |
||||
if($default === null){ |
||||
|
||||
list($value, $ok) = $this->get_value(["default_value", "default"]); |
||||
|
||||
if($ok) |
||||
return $value; |
||||
}; |
||||
return $default; |
||||
} |
||||
|
||||
public function get($names, $inputs = null, $default = null){ |
||||
if(!$names) |
||||
return $this->default($default); |
||||
|
||||
list($value, $ok) = $this->get_value(is_array($names) ? $names : [$names], $inputs); |
||||
|
||||
return $ok ? $value : $this->default($default); |
||||
} |
||||
|
||||
public function __construct($kyman, $input){ |
||||
|
||||
$this->kyman = $kyman; |
||||
$this->input = $input; |
||||
|
||||
if($files = $this->get("settings_files")) |
||||
foreach(is_array($files) ? $files : [$files] as $file) |
||||
if($file && file_exists($file)) |
||||
foreach(@json_decode(file_get_contents($file), true) ?? [] as $key => $value) |
||||
$this->custom[$key] = $value; |
||||
|
||||
} |
||||
|
||||
} |
@ -0,0 +1,154 @@ |
||||
<?php |
||||
|
||||
class KyMAN{ |
||||
|
||||
private $started = false; |
||||
|
||||
public $settings = null; |
||||
public $i18n = null; |
||||
public $html = null; |
||||
private $alphabet = null; |
||||
private $length_id = null; |
||||
private $hashes = []; |
||||
private $default_color_out = null; |
||||
private $default_color_in = null; |
||||
public $hexagon = null; |
||||
|
||||
public static function is_dictionary($variable){ |
||||
return is_array($variable) && array_values($variable) != $variable; |
||||
} |
||||
|
||||
public static function load_file($path){ |
||||
return file_get_contents(__DIR__ . "/.." . $path); |
||||
} |
||||
|
||||
public static function string_variables($string, $variables = null, $default = null){ |
||||
|
||||
is_array($variables) ? (self::is_dictionary($variables) ? $variables = [$variables] : $variables) : $variables = []; |
||||
|
||||
return preg_replace_callback('/\{([a-z\d_]+)\}/', function($values) use($variables, $default){ |
||||
if($values[1]) |
||||
foreach($variables as $set) |
||||
if(is_array($set) && isset($set[$values[1]])) |
||||
return $set[$values[1]]; |
||||
return $default ?? $values[0]; |
||||
}, $string); |
||||
} |
||||
|
||||
public function __construct($input = null){ |
||||
|
||||
class_exists('\KyMAN\Settings') && ($this->settings = new \KyMAN\Settings($this, $input)); |
||||
class_exists('\KyMAN\I18N') && ($this->i18n = new \KyMAN\I18N($this, $input)); |
||||
class_exists('\KyMAN\HTML') && ($this->html = new \KyMAN\HTML($this, $input)); |
||||
|
||||
$this->settings && $this->settings->get("autostart") && $this->start(); |
||||
|
||||
} |
||||
|
||||
public function start(){ |
||||
|
||||
if($this->started || !$this->settings) |
||||
return; |
||||
$this->started = true; |
||||
|
||||
$this->alphabet = $this->settings->get("alphabet"); |
||||
$this->length_id = $this->settings->get("length_id"); |
||||
$this->default_color_out = $this->settings->get("default_color_out"); |
||||
$this->default_color_in = $this->settings->get("default_color_in"); |
||||
$this->hexagon = ($file = __DIR__ . "/.." . $this->settings->get("hexagon_file")) && file_exists($file) ? file_get_contents($file) : ''; |
||||
$default_language = $this->settings->get("default_language_code"); |
||||
|
||||
if($this->i18n){ |
||||
$this->i18n->start(); |
||||
if($this->html){ |
||||
$this->html->start(); |
||||
if(($file = $this->settings->get("main_file")) && file_exists($file = __DIR__ . "/.." . $file) && ($data = @json_decode(file_get_contents($file), true))){ |
||||
|
||||
$base = ($file = $this->settings->get("base_file")) && file_exists($file = __DIR__ . "/.." . $file) ? file_get_contents($file) : ''; |
||||
$boss_alternatives = $this->settings->get("boss_alternatives"); |
||||
|
||||
foreach($this->i18n->languages() as $language){ |
||||
|
||||
$html = ''; |
||||
|
||||
$this->i18n->change($language); |
||||
foreach($data as $i => $block) |
||||
$html .= $this->html->draw($block, $i); |
||||
|
||||
foreach($boss_alternatives as $boss){ |
||||
|
||||
$extension = isset($boss["extension"]) && $boss["extension"] ? "." . $boss["extension"] : ""; |
||||
|
||||
$this->i18n->set_author($boss["author"]); |
||||
|
||||
$html_processed = self::string_variables($base, array_merge([ |
||||
"html" => $html, |
||||
"license" => $this->i18n->get("cv_web_license"), |
||||
"license_full" => $this->i18n->get("cv_web_license_full"), |
||||
"title" => $this->i18n->get("cv_web_title"), |
||||
"language" => $language_code = $this->i18n->get("cv_web_language"), |
||||
"url" => $this->settings->get("url"), |
||||
"author" => $this->settings->get("author"), |
||||
"since" => $this->settings->get("since"), |
||||
"version" => $this->settings->get("version"), |
||||
"description" => $this->i18n->get("cv_web_description"), |
||||
"project" => $this->settings->get("cv_web_project"), |
||||
"logo" => $this->settings->get("logo"), |
||||
"key_words" => $this->i18n->get("cv_web_key_words"), |
||||
"espanol_visible" => $language != "espanol" ? "true" : "false", |
||||
"galego_visible" => $language != "galego" ? "true" : "false", |
||||
"english_visible" => $language != "english" ? "true" : "false", |
||||
"wlog" => $this->i18n->get("wlog") |
||||
], $boss)); |
||||
|
||||
!file_exists($path = __DIR__ . "/../Public/" . $language_code) && mkdir($path); |
||||
file_put_contents($path . "/index" . $extension . ".html", $html_processed); |
||||
$language_code == $default_language && file_put_contents(__DIR__ . "/../Public/index" . $extension . ".html", $html_processed); |
||||
}; |
||||
|
||||
}; |
||||
|
||||
}; |
||||
}; |
||||
}; |
||||
|
||||
} |
||||
|
||||
public function create_id(){ |
||||
|
||||
$hash; |
||||
$l = strlen($this->alphabet) - 1; |
||||
|
||||
do{ |
||||
$hash = ""; |
||||
while(strlen($hash .= $this->alphabet[rand(0, $l)]) < $this->length_id); |
||||
}while( |
||||
in_array($hash, $this->hashes) || |
||||
preg_match('/^\d/', $hash) |
||||
); |
||||
$this->hashes[] = $hash; |
||||
|
||||
return $hash; |
||||
} |
||||
|
||||
public function get_colors($colors){ |
||||
if(!$colors) |
||||
return [$this->default_color_out, $this->default_color_in]; |
||||
if(is_array($colors)){ |
||||
if(count($colors) > 1) |
||||
return $colors; |
||||
$colors = $colors; |
||||
} |
||||
|
||||
if(!preg_match('/^\#([\da-f]{1,2})([\da-f]{1,2})([\da-f]{1,2})$/', $colors, $matches)) |
||||
return [$this->default_color_out, $this->default_color_in]; |
||||
|
||||
$colors = [$colors, "#"]; |
||||
|
||||
for($i = 1; $i <= 3; $i ++) |
||||
$colors[1] .= substr("00" . base_convert(255 - base_convert((strlen($matches[$i]) == 1 ? $matches[$i] : "") . $matches[$i], 16, 10), 10, 16), -2); |
||||
|
||||
return $colors; |
||||
} |
||||
|
||||
} |
After Width: | Height: | Size: 841 KiB |
After Width: | Height: | Size: 1.2 MiB |
After Width: | Height: | Size: 845 B |
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 199 KiB |
After Width: | Height: | Size: 1013 KiB |
After Width: | Height: | Size: 353 KiB |
After Width: | Height: | Size: 478 KiB |
After Width: | Height: | Size: 322 KiB |
After Width: | Height: | Size: 315 KiB |
After Width: | Height: | Size: 89 KiB |
After Width: | Height: | Size: 127 KiB |
After Width: | Height: | Size: 147 KiB |
After Width: | Height: | Size: 1.0 MiB |
After Width: | Height: | Size: 837 KiB |
@ -0,0 +1,3 @@ |
||||
<?php echo base64_encode(json_encode([ |
||||
"https://wmarkdown.k3y.pw/images/wmarkdown.png" |
||||
])); |
@ -0,0 +1 @@ |
||||
.kyman-wlog [data-icon=portfolio]::before{content : "\f15c"; font-family : "FA5FR";} |
@ -0,0 +1,100 @@ |
||||
KyMAN.Ajax = function(kyman, input){ |
||||
|
||||
const self = this; |
||||
|
||||
const construct = () => {}; |
||||
|
||||
const settings = (names, inputs, _default) => { |
||||
if(kyman.settings) |
||||
return kyman.settings.get(names, inputs, _default); |
||||
|
||||
if(!names) |
||||
return _default; |
||||
|
||||
const m = (names.push ? names : (names = [names])).length, |
||||
l = (inputs.push ? inputs : (inputs = [inputs])).length; |
||||
|
||||
for(let i = 0; i < l; i ++) |
||||
if(typeof inputs[i] == "object") |
||||
for(let j = 0; j < m; j ++) |
||||
if(names[j] && inputs[i][names[j]] !== undefined) |
||||
return inputs[i][names[j]]; |
||||
return _default; |
||||
}; |
||||
|
||||
this.load = (input, callback) => { |
||||
|
||||
if(!input) |
||||
input = {}; |
||||
else if(input.substr) |
||||
input = {url : input}; |
||||
typeof callback != "function" && (callback = input.callback); |
||||
|
||||
let ended = false, |
||||
variables = settings(["ajax_variables", "variables"], input, null), |
||||
method = settings(["ajax_method", "method"], input, "get").toLowerCase(), |
||||
variables_uri = null; |
||||
const ajax = new XMLHttpRequest(), |
||||
end = message => { |
||||
if(ended) |
||||
return; |
||||
ended = true; |
||||
if(typeof callback == "function") |
||||
callback(ajax.responseText, ajax.status, ajax.readyState, message == "OK", message); |
||||
}, |
||||
timeout = settings(["ajax_timeout", "timeout"], input, 2000), |
||||
date = Date.now(), |
||||
headers = settings(["ajax_headers", "headers"], input, []); |
||||
|
||||
!headers.push && (headers = [headers]); |
||||
|
||||
if(!["get", "post"].includes(method)){ |
||||
!variables && (variables = {}); |
||||
variables.__method = method; |
||||
method = "post"; |
||||
}; |
||||
if(method == "post") |
||||
(headers.push ? headers : (headers = [])).some(header => /^content-type\:/.test(header)) && headers.push("content-type: x-www-form-urlencoded"); |
||||
|
||||
if(variables) |
||||
switch(settings(["ajax_mode", "mode"], input, "base64")){ |
||||
case "uri": |
||||
variables_uri = ""; |
||||
for(const key in variables) |
||||
variables_uri += (variables_uri ? "&" : "") + encodeURIComponent(key) + "=" + encodeURIComponent(variables[key]); |
||||
break; |
||||
case "base64": |
||||
variables_uri = encodeURIComponent(settings("variable_name")) + "=" + encodeURIComponent(btoa(JSON.stringify(variables))); |
||||
break; |
||||
}; |
||||
|
||||
ajax.open(method, settings("url", input, ""), true); |
||||
ajax.timeout = timeout; |
||||
headers.forEach(header => ajax.setRequestHeader.apply(null, header.split(": "))); |
||||
ajax.onreadystatechange = () => { |
||||
if(ended) |
||||
return; |
||||
if(ajax.readyState == 4) |
||||
end("OK"); |
||||
else if(Date.now() - date > timeout) |
||||
end("FORCED_TIMEOUT"); |
||||
}; |
||||
ajax.send(variables_uri); |
||||
|
||||
ajax.onabort = () => end("ABORTED"); |
||||
ajax.onerror = () => end("ERROR"); |
||||
ajax.ontimeout = () => end("TIMEOUT"); |
||||
|
||||
return ajax; |
||||
}; |
||||
|
||||
this.get = (file, callback) => self.load(file, callback); |
||||
|
||||
this.post = (file, variables, callback) => self.load({ |
||||
url : url, |
||||
variables : variables |
||||
}, callback); |
||||
|
||||
construct(); |
||||
|
||||
}; |
@ -0,0 +1,164 @@ |
||||
KyMAN.Background = function(kyman, input){ |
||||
|
||||
const self = this, |
||||
images = {}; |
||||
let started = false, |
||||
thread = null, |
||||
items = null, |
||||
body = null, |
||||
cells = null, |
||||
canvas = null, |
||||
context = null, |
||||
context_items = [], |
||||
size = null, |
||||
cell_size = null, |
||||
position = null; |
||||
|
||||
const construct = () => {}; |
||||
|
||||
const random_degrees = () => (Math.random() * 360) * Math.PI / 360; |
||||
|
||||
const draw_image = item => { |
||||
|
||||
const width = item.size * cell_size, |
||||
height = item.size * cell_size; |
||||
|
||||
context.save(); |
||||
context.translate((item.x * size) + position.x, (item.y * size) + position.y); |
||||
context.rotate(item.rotation); |
||||
context.drawImage(item.source, 0, 0, item.source.width, item.source.height, -width / 2, -height / 2, width, height); |
||||
context.restore(); |
||||
|
||||
}; |
||||
|
||||
const method = () => { |
||||
|
||||
const width = Number(canvas.getAttribute("width")), |
||||
height = Number(canvas.getAttribute("height")), |
||||
total_cells = (size = width > height ? width : height) / (cell_size = Number(body.getAttribute("data-cell-size"))); |
||||
|
||||
position = width > height ? {x : 0, y : (height - width) / 2} : {x : (width - height) / 2, y : 0}; |
||||
|
||||
context.beginPath(); |
||||
context.clearRect(0, 0, width, height); |
||||
context.fillStyle = "#000"; |
||||
context.fillRect(0, 0, width, height); |
||||
context_items.forEach(item => { |
||||
switch(item.animation){ |
||||
case "overlap": |
||||
if((item.sprites[0].alpha -= item.velocity) < 0){ |
||||
(item.sprites[2].alpha = 1 - (item.sprites[0].alpha = 0)); |
||||
item.sprites[0].angle = random_degrees(); |
||||
item.sprites = [ |
||||
item.sprites[1], |
||||
item.sprites[2], |
||||
item.sprites[0] |
||||
]; |
||||
}else |
||||
item.sprites[2].alpha += item.velocity; |
||||
item.sprites.forEach(sprite => { |
||||
context.globalAlpha = sprite.alpha; |
||||
draw_image(Object.assign({}, item, {rotation : sprite.angle})); |
||||
context.globalAlpha = 1; |
||||
}); |
||||
break; |
||||
default: |
||||
draw_image(item); |
||||
break; |
||||
}; |
||||
}); |
||||
context.closePath(); |
||||
|
||||
}; |
||||
|
||||
const load = (image, callback) => { |
||||
|
||||
images[image] = { |
||||
source : new Image(), |
||||
ok : false |
||||
}; |
||||
|
||||
images[image].source.src = image; |
||||
images[image].source.onload = () => { |
||||
images[image].ok = true; |
||||
callback(); |
||||
}; |
||||
images[image].source.onerror = callback; |
||||
|
||||
}; |
||||
|
||||
const build = callback => { |
||||
|
||||
let sprite; |
||||
|
||||
with(body = document.querySelector("body")){ |
||||
cells = Number(getAttribute("data-cells")); |
||||
context = (canvas = querySelector("canvas")).getContext("2d"); |
||||
}; |
||||
|
||||
items.forEach(item => { |
||||
|
||||
const probably = (Math.random() * (item.probably[1] - item.probably[0])) + item.probably[0], |
||||
minimum = item.minimum || 0; |
||||
let image, i = 0; |
||||
|
||||
while((i ++ < minimum || Math.random() < probably) && (image = images[item.sources[Math.random() * item.sources.length >> 0]]).ok){ |
||||
sprite = { |
||||
source : image.source, |
||||
x : Math.random(), |
||||
y : Math.random(), |
||||
size : (Math.random() * (item.size[1] - item.size[0])) + item.size[0], |
||||
rotation : random_degrees() |
||||
}; |
||||
if(item.animation){ |
||||
sprite.animation = item.animation; |
||||
sprite.velocity = (Math.random() * (item.velocity[1] - item.velocity[0])) + item.velocity[0]; |
||||
switch(item.animation){ |
||||
case "overlap": |
||||
sprite.sprites = [{ |
||||
angle : random_degrees(), |
||||
alpha : 1 |
||||
}, { |
||||
angle : random_degrees(), |
||||
alpha : 1 |
||||
}, { |
||||
angle : random_degrees(), |
||||
alpha : 0 |
||||
}]; |
||||
break; |
||||
}; |
||||
}; |
||||
context_items.push(sprite); |
||||
}; |
||||
|
||||
}); |
||||
|
||||
thread = kyman.threads.add(method); |
||||
typeof callback == "function" && callback(); |
||||
|
||||
}; |
||||
|
||||
this.start = callback => { |
||||
|
||||
if(started) |
||||
return; |
||||
started = true; |
||||
|
||||
if(items = kyman.settings.get("background_items")){ |
||||
|
||||
let i = 0, |
||||
loaded = 0; |
||||
const end = () => ++ loaded == i && build(callback); |
||||
|
||||
items.forEach((item, j) => (item.sources.push ? item.sources : (items[j].sources = [item.sources])).forEach(image => { |
||||
i ++; |
||||
load(image, end); |
||||
})); |
||||
|
||||
}; |
||||
|
||||
}; |
||||
|
||||
construct(); |
||||
|
||||
}; |
@ -0,0 +1,112 @@ |
||||
KyMAN.I18N = function(kyman, input){ |
||||
|
||||
const self = this, |
||||
sentences = {}; |
||||
let started = false, |
||||
selected = null, |
||||
_default = null; |
||||
|
||||
const construct = () => {}; |
||||
|
||||
this.default_text = _default => _default !== undefined ? _default : kyman.settings.get("default_text"); |
||||
|
||||
const get = (names, inputs) => { |
||||
if(!names) |
||||
return self.default_text(_default); |
||||
|
||||
const languages = [selected, _default].concat(Object.keys(sentences)), |
||||
l = languages.length, |
||||
m = (names.push ? names : (names = [names])).length, |
||||
used = []; |
||||
|
||||
for(let i = 0; i < l; i ++) |
||||
if(languages[i] && sentences[languages[i]] && !used.includes(languages[i])){ |
||||
used.push(languages[i]); |
||||
for(let j = 0; j < m; j ++) |
||||
if(names[j] && sentences[languages[i]][names[j]] !== undefined) |
||||
return sentences[languages[i]][names[j]]; |
||||
}; |
||||
for(let j = 0; j < m; j ++) |
||||
if(names[j] || typeof names[j] == "string") |
||||
return names[j]; |
||||
return self.default_text(_default); |
||||
}; |
||||
|
||||
this.get = (names, variables, _default) => kyman.string_variables(get(names, _default), variables); |
||||
|
||||
const load = (file, i, callback) => { |
||||
|
||||
if(typeof file == "object"){ |
||||
callback(file, i); |
||||
return; |
||||
}; |
||||
|
||||
if(file && file.substr){ |
||||
|
||||
let json = null; |
||||
|
||||
try{ |
||||
json = JSON.parse(file); |
||||
}catch(error){}; |
||||
|
||||
if(json){ |
||||
callback(json, i); |
||||
return; |
||||
}; |
||||
|
||||
kyman.ajax.get(file, response => { |
||||
try{ |
||||
json = JSON.parse(response); |
||||
}catch(error){}; |
||||
callback(json, i); |
||||
}); |
||||
|
||||
}; |
||||
|
||||
callback(null, i); |
||||
|
||||
}; |
||||
|
||||
this.add = (files, callback, overwrite) => { |
||||
|
||||
let i = 0, |
||||
loaded = 0; |
||||
const set = [], |
||||
end = (json, j) => { |
||||
json && (set[j] = json); |
||||
if(++ loaded < i) |
||||
return; |
||||
set.forEach(item => { |
||||
for(const language in item){ |
||||
!sentences[language] && (sentences[language] = {}); |
||||
for(const key in item[language]) |
||||
(overwrite || sentences[language][key] === undefined) && (sentences[language][key] = item[language][key]); |
||||
}; |
||||
}); |
||||
if(typeof callback == "function") |
||||
callback(); |
||||
}; |
||||
|
||||
typeof overwrite != "boolean" && (overwrite = kyman.settings.get(["i18n_overwrite", "overwrite"])); |
||||
|
||||
if(files){ |
||||
i = (files.push ? files : (files = [files])).length; |
||||
files.forEach((file, j) => load(file, j, end)); |
||||
}else |
||||
end(); |
||||
|
||||
}; |
||||
|
||||
this.start = callback => { |
||||
|
||||
if(started) |
||||
return; |
||||
started = true; |
||||
|
||||
self.add(kyman.settings.get("i18n_files"), callback, true); |
||||
|
||||
}; |
||||
|
||||
construct(); |
||||
|
||||
}; |
@ -0,0 +1,57 @@ |
||||
KyMAN.Preload = function(kyman, selector, callback, autostart){ |
||||
|
||||
const self = this; |
||||
let started = false; |
||||
|
||||
this.start = () => { |
||||
|
||||
if(started) |
||||
return; |
||||
started = true; |
||||
|
||||
if(typeof callback != "function") |
||||
return; |
||||
if(!selector){ |
||||
callback(null, false); |
||||
return; |
||||
}; |
||||
if(kyman.is_html_object(selector)){ |
||||
callback(selector, false); |
||||
return; |
||||
}; |
||||
if(!selector.substr){ |
||||
callback(null, false); |
||||
return; |
||||
}; |
||||
|
||||
let item; |
||||
|
||||
try{ |
||||
if(item = document.querySelector(selector)){ |
||||
callback(item, false); |
||||
return; |
||||
}; |
||||
}catch(error){ |
||||
callback(null, false); |
||||
return; |
||||
}; |
||||
|
||||
const date = Date.now(), |
||||
timeout = kyman.settings.get(["preload_timeout", "timeout"]), |
||||
thread = kyman.threads.add(() => { |
||||
if(item = document.querySelector(selector)){ |
||||
kyman.threads.remove(thread); |
||||
callback(item, true); |
||||
}else if(Date.now() - date > timeout){ |
||||
kyman.threads.remove(thread); |
||||
callback(null, true); |
||||
}; |
||||
}); |
||||
|
||||
}; |
||||
|
||||
const construct = () => (typeof autostart == "boolean" ? autostart : kyman.settings.get(["preload_autostart", "autostart"])) && self.start(); |
||||
|
||||
construct(); |
||||
|
||||
}; |
@ -0,0 +1,119 @@ |
||||
KyMAN.Settings = function(kyman, input){ |
||||
|
||||
const self = this, |
||||
settings = { |
||||
default_value : null, |
||||
autostart : true, |
||||
settings_files : "/json/KyMAN.settings.json", |
||||
overwrite : false, |
||||
settings_overwrite : false, |
||||
i18n_overwrite : false, |
||||
i18n_files : [ |
||||
"/json/KyMAN.i18n.english.json", |
||||
"/json/KyMAN.i18n.espanol.json", |
||||
"/json/KyMAN.i18n.galego.json" |
||||
] |
||||
}, |
||||
custom = {}; |
||||
let started = false; |
||||
|
||||
const construct = () => {}; |
||||
|
||||
const get = (names, inputs) => { |
||||
|
||||
const l = (inputs = (inputs ? inputs.push ? inputs : [inputs] : []).concat([input, custom, settings])).length, |
||||
m = names.length; |
||||
|
||||
for(let i = 0; i < l; i ++) |
||||
if(typeof inputs[i] == "object") |
||||
for(let j = 0; j < m; j ++) |
||||
if(names[j] && inputs[i][names[j]] !== undefined) |
||||
return [inputs[i][names[j]], true]; |
||||
return [null, false]; |
||||
}; |
||||
|
||||
this.get_default = _default => _default !== undefined ? _default : get(["default_value", "default"])[0]; |
||||
|
||||
this.get = (names, inputs, _default) => { |
||||
if(!names) |
||||
return self.get_default(_default); |
||||
|
||||
const [value, ok] = get(names.push ? names : [names], inputs); |
||||
|
||||
return ok ? value : self.get_default(_default); |
||||
}; |
||||
|
||||
const load = (file, i, callback) => { |
||||
|
||||
if(typeof file == "object"){ |
||||
callback(file, i); |
||||
return; |
||||
}; |
||||
|
||||
if(file && file.substr){ |
||||
|
||||
let json = null; |
||||
|
||||
try{ |
||||
json = JSON.parse(file); |
||||
}catch(error){}; |
||||
|
||||
if(json){ |
||||
callback(json, i); |
||||
return; |
||||
}; |
||||
|
||||
kyman.ajax.get(file, response => { |
||||
try{ |
||||
json = JSON.parse(response); |
||||
}catch(error){console.error(error);}; |
||||
callback(json, i); |
||||
}); |
||||
return; |
||||
|
||||
}; |
||||
|
||||
callback(null, i); |
||||
|
||||
}; |
||||
|
||||
this.add = (files, callback, overwrite) => { |
||||
|
||||
let i = 0, |
||||
loaded = 0; |
||||
const set = [], |
||||
end = (json, j) => { |
||||
json && (set[j] = json); |
||||
if(++ loaded < i) |
||||
return; |
||||
set.forEach(item => { |
||||
for(const key in item) |
||||
(overwrite || custom[key] === undefined) && (custom[key] = item[key]); |
||||
}); |
||||
if(typeof callback == "function") |
||||
callback(); |
||||
}; |
||||
|
||||
typeof overwrite != "boolean" && (overwrite = kyman.settings.get(["settings_overwrite", "overwrite"])); |
||||
|
||||
if(files){ |
||||
i = (files.push ? files : (files = [files])).length; |
||||
files.forEach((file, j) => load(file, j, end)); |
||||
}else |
||||
end(); |
||||
|
||||
}; |
||||
|
||||
this.start = callback => { |
||||
|
||||
if(started) |
||||
return; |
||||
started = true; |
||||
|
||||
self.add(self.get("settings_files"), callback, true); |
||||
|
||||
}; |
||||
|
||||
construct(); |
||||
|
||||
}; |
@ -0,0 +1,39 @@ |
||||
KyMAN.Threads = function(kyman, input){ |
||||
|
||||
const self = this, |
||||
threads = []; |
||||
let interval = null; |
||||
|
||||
const method = () => threads.forEach(thread => thread && thread()); |
||||
|
||||
this.start = frames_per_second => interval === null && (interval = setInterval(method, frames_per_second || kyman.settings.get("frames_per_second"))); |
||||
|
||||
this.stop = () => { |
||||
|
||||
if(interval === null) |
||||
return; |
||||
|
||||
clearInterval(interval); |
||||
interval = null; |
||||
|
||||
}; |
||||
|
||||
this.add = method => { |
||||
if(typeof method != "function") |
||||
return null; |
||||
|
||||
let i = 0; |
||||
const l = threads.length; |
||||
|
||||
for(; i < l; i ++) |
||||
if(!threads[i]) |
||||
break; |
||||
|
||||
threads[i] = method; |
||||
|
||||
return i; |
||||
}; |
||||
|
||||
this.remove = i => !isNaN(i) && threads[i] && (threads[i] = null); |
||||
|
||||
}; |
@ -0,0 +1,285 @@ |
||||
KyMAN = function(input){ |
||||
|
||||
const self = this, |
||||
screen = {x : 0, y : 0}, |
||||
mouse = {x : 0, y : 0}, |
||||
logo_degrees = [0, 0, 0], |
||||
scroll = {x : 0, y : 0}, |
||||
hashes = [], |
||||
svg_pattern = (` |
||||
<pattern id="{id}" patternUnits="userSpaceOnUse" x="0" y="0" width="90" height="100"> |
||||
<image x="{x}" y="{y}" width="{width}" height="{height}" xlink:href="{url}" /> |
||||
</pattern> |
||||
`);
|
||||
let started = false, |
||||
body = null, |
||||
canvas = null, |
||||
screen_thread = null, |
||||
cells = null, |
||||
logo_thread = null, |
||||
mouse_event = null, |
||||
scroll_event = null, |
||||
icons_thread = null, |
||||
hash_alphabet = null, |
||||
hash_length = null, |
||||
is_mobile = null, |
||||
check_mobile_thread = null, |
||||
check_mobile_last = null, |
||||
check_mobile_timeout = null; |
||||
|
||||
let ajax = this.ajax; |
||||
let settings = this.settings; |
||||
let i18n = this.i18n; |
||||
let threads = this.threads; |
||||
let background = this.background; |
||||
|
||||
const logo_method = () => { |
||||
|
||||
const velocity = [ |
||||
((body.offsetWidth / 2) - mouse.x) / body.offsetWidth, |
||||
((body.offsetHeight / 2) - mouse.y) / body.offsetHeight |
||||
]; |
||||
|
||||
[0, 1].forEach(i => logo_degrees[i] = (velocity[i] + logo_degrees[i]) % 360); |
||||
logo_degrees[2] = (logo_degrees[2] + ((velocity[0] + velocity[1]) / 2)) % 360 |
||||
|
||||
document.querySelectorAll(".logo-dynamic-image").forEach((item, j) => { |
||||
|
||||
const sprites = item.querySelectorAll(".child"); |
||||
|
||||
[0, 1].forEach(i => sprites[i].style.transform = "rotate(" + ((90 * i) + (90 * j) + logo_degrees[i] * (j / 2 >> 2 ? -1 : 1)) + "deg)"); |
||||
sprites[2].style.transform = "rotate(" + (logo_degrees[2] + (90 * j) * (j / 2 >> 2 ? -1 : 1)) + "deg)"; |
||||
|
||||
}); |
||||
|
||||
}; |
||||
|
||||
const screen_change = () => { |
||||
|
||||
if(screen.x == body.offsetWidth && screen.y == body.offsetHeight) |
||||
return; |
||||
|
||||
canvas.setAttribute("width", screen.x = body.offsetWidth); |
||||
canvas.setAttribute("height", screen.y = body.offsetHeight); |
||||
|
||||
let hexagons = screen.x >= 1710 ? 9 : screen < 300 ? 3 : (((screen.x / 190 >> 0) / 2 >> 0) * 2 >> 0) + 1; |
||||
const cell_size = screen[screen.x > screen.y ? "y" : "x"] / cells, |
||||
hexagons_per_line = (2 * (hexagons < 3 ? hexagons = 3 : hexagons)) - 1; |
||||
|
||||
body.setAttribute("data-cell-size", cell_size); |
||||
body.style.fontSize = cell_size + "px"; |
||||
body.setAttribute("data-hexagons", hexagons); |
||||
body.setAttribute("data-vertical", screen.x < screen.y); |
||||
|
||||
body.querySelectorAll("section").forEach(section => section.querySelectorAll("article").forEach((article, i) => { |
||||
|
||||
const line = i / hexagons_per_line >> 0; |
||||
|
||||
article.setAttribute("data-i", i % hexagons_per_line); |
||||
article.setAttribute("data-line", line); |
||||
article.setAttribute("data-pair", !!((i + line) % 2)); |
||||
|
||||
})); |
||||
|
||||
}; |
||||
|
||||
const load_images = (list, callback, i) => { |
||||
|
||||
if(i >= list.length){ |
||||
if(typeof callback == "function") |
||||
callback(null, false, !!list.length, i); |
||||
return; |
||||
}; |
||||
|
||||
try{ |
||||
|
||||
const image = new Image(); |
||||
|
||||
image.src = list[i]; |
||||
image.onload = () => { |
||||
if(typeof callback == "function") |
||||
callback(list[i], true, true, i); |
||||
}; |
||||
image.onerror = () => load_images(list, callback, i + 1); |
||||
|
||||
}catch(error){load_images(list, callback, i + 1);}; |
||||
|
||||
}; |
||||
|
||||
this.hash = () => { |
||||
|
||||
let hash; |
||||
const l = hash_alphabet.length; |
||||
|
||||
do{ |
||||
hash = ""; |
||||
while((hash += hash_alphabet[Math.random() * l >> 0]).length < hash_length); |
||||
}while( |
||||
hashes.includes(hash) || |
||||
/^\d/.test(hash) || |
||||
document.querySelector("." + hash + ",#" + hash + ",[name=" + hash + "]") |
||||
); |
||||
hashes.push(hash); |
||||
|
||||
return hash; |
||||
}; |
||||
|
||||
this.string_variables = (string, variables, _default) => { |
||||
|
||||
const l = (variables ? variables.push ? variables : (variables = [variables]) : (variables = [])).length; |
||||
|
||||
return string.replace(/\{([^\{\}]+)\}/g, (...arguments) => { |
||||
if(l) |
||||
for(let i = 0; i < l; i ++) |
||||
if(variables[i][arguments[1]] !== undefined) |
||||
return variables[i][arguments[1]]; |
||||
return _default === undefined ? arguments[0] : _default; |
||||
}); |
||||
}; |
||||
|
||||
const load_icons = () => document.querySelectorAll(".image[data-status=unloaded]").forEach(item => { |
||||
|
||||
try{ |
||||
images = JSON.parse(atob(item.getAttribute("data-images"))); |
||||
}catch(error){ |
||||
item.setAttribute("data-status", "no-json"); |
||||
return; |
||||
}; |
||||
|
||||
item.setAttribute("data-status", "loading"); |
||||
load_images(images, (url, ok, has, i) => { |
||||
if(ok){ |
||||
|
||||
const id = self.hash(), |
||||
defs = item.querySelector("defs"); |
||||
|
||||
if(defs){ |
||||
defs.innerHTML = self.string_variables(svg_pattern, Object.assign({ |
||||
id : id, |
||||
url : url |
||||
}, item.getAttribute("data-full") == "true" ? { |
||||
x : -4.5, |
||||
y : -5, |
||||
width : 99, |
||||
height : 110 |
||||
} : { |
||||
x : 9, |
||||
y : 10, |
||||
width : 72, |
||||
height : 80 |
||||
})); |
||||
setTimeout(() => { |
||||
item.setAttribute("data-status", "ok"); |
||||
item.querySelector(".icon").style.fill = "url(#" + id + ")"; |
||||
}, 20); |
||||
}; |
||||
|
||||
item.querySelector("img").src = url; |
||||
item.querySelector("img+span").style.backgroundImage = "url('" + url + "')"; |
||||
|
||||
}else |
||||
item.setAttribute("data-status", has ? "error" : "empty"); |
||||
}, 0); |
||||
|
||||
}); |
||||
|
||||
const mouse_method = event => [mouse.x, mouse.y] = [event.clientX, event.clientY]; |
||||
|
||||
const scroll_method = event => { |
||||
|
||||
[scroll.x, scroll.y] = [body.parentNode.scrollLeft, body.parentNode.scrollTop]; |
||||
body.setAttribute("data-top", scroll.y < (screen[screen.x > screen.y ? "y" : "x"] / cells) * 3); |
||||
body.setAttribute("data-bottom", scroll.y > body.parentNode.scrollHeight - body.offsetHeight - ((screen[screen.x > screen.y ? "y" : "x"] / cells) * 3)); |
||||
|
||||
}; |
||||
|
||||
const check_mobile_method = () => { |
||||
|
||||
if(Date.now() - check_mobile_last < check_mobile_timeout) |
||||
return; |
||||
|
||||
const now_is_mobile = self.is_mobile(); |
||||
|
||||
check_mobile_last = Date.now(); |
||||
if(is_mobile !== now_is_mobile) |
||||
body.setAttribute("data-mobile", is_mobile = now_is_mobile); |
||||
|
||||
}; |
||||
|
||||
this.start = () => { |
||||
|
||||
if(started || !settings) |
||||
return; |
||||
started = true; |
||||
|
||||
settings.start(() => { |
||||
threads.start(); |
||||
hash_alphabet = settings.get("hash_alphabet"); |
||||
hash_length = settings.get("hash_length"); |
||||
i18n.start(() => new KyMAN.Preload(self, ".kyman-preloader", preloader => { |
||||
if(!preloader) |
||||
return; |
||||
background.start(); |
||||
logo_thread = threads.add(logo_method); |
||||
mouse_event = addEventListener("mousemove", mouse_method); |
||||
scroll_event = addEventListener("scroll", scroll_method); |
||||
icons_thread = threads.add(load_icons); |
||||
with(body = preloader.parentNode){ |
||||
setAttribute("data-cells", cells = settings.get("cells")); |
||||
setAttribute("data-cell-size", 0); |
||||
setAttribute("data-mobile", is_mobile = self.is_mobile()); |
||||
setAttribute("data-hexagons", 3); |
||||
setAttribute("data-vertical", true); |
||||
setAttribute("data-top", !parentNode.scrollTop); |
||||
setAttribute("data-bottom", parentNode.scrollTop == parentNode.scrollHeight - offsetHeight); |
||||
}; |
||||
canvas = body.querySelector(".background"); |
||||
check_mobile_timeout = settings.get("check_mobile_timeout"); |
||||
check_mobile_last = Date.now(); |
||||
check_mobile_thread = threads.add(check_mobile_method); |
||||
preloader.remove(); |
||||
screen_thread = threads.add(screen_change); |
||||
})) |
||||
}); |
||||
|
||||
}; |
||||
|
||||
const construct = () => { |
||||
|
||||
KyMAN.Ajax && (ajax = self.ajax = new KyMAN.Ajax(self, input)); |
||||
KyMAN.Settings && (settings = self.settings = new KyMAN.Settings(self, input)); |
||||
KyMAN.I18N && (i18n = self.i18n = new KyMAN.I18N(self, input)); |
||||
KyMAN.Threads && (threads = self.threads = new KyMAN.Threads(self, input)); |
||||
KyMAN.Background && (background = self.background = new KyMAN.Background(self, input)); |
||||
|
||||
if(settings.get("autostart")) |
||||
self.start(); |
||||
|
||||
}; |
||||
|
||||
this.is_html_object = item => item && !!(item.tagName || item.nodeName); |
||||
|
||||
// http://detectmobilebrowsers.com
|
||||
this.is_mobile = () => { |
||||
|
||||
const user_agent = (navigator.userAgent || navigator.vendor || window.opera); |
||||
|
||||
return ( |
||||
/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(user_agent) || |
||||
/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(user_agent.substr(0, 4)) |
||||
); |
||||
}; |
||||
|
||||
this.item_in = (item, event) => { |
||||
if(is_mobile) |
||||
return; |
||||
}; |
||||
|
||||
this.item_out = (item, event) => { |
||||
if(is_mobile) |
||||
return; |
||||
}; |
||||
|
||||
construct(); |
||||
|
||||
}; |
@ -0,0 +1,4 @@ |
||||
<?php |
||||
|
||||
header("content-type: text/plain"); |
||||
echo shell_exec("git pull 2>&1"); |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 8.3 KiB |
After Width: | Height: | Size: 8.3 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 8.6 KiB |
After Width: | Height: | Size: 8.6 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 8.0 KiB |
After Width: | Height: | Size: 7.3 KiB |
After Width: | Height: | Size: 56 KiB |
After Width: | Height: | Size: 4.7 KiB |
After Width: | Height: | Size: 47 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 8.3 KiB |
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 6.7 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 578 B |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 957 B |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 9.6 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 26 KiB |