mirror of https://github.com/IoTcat/Sakura.git
parent
bb03fc3b8b
commit
256c4d91b0
36 changed files with 1344 additions and 261 deletions
File diff suppressed because one or more lines are too long
@ -0,0 +1,6 @@ |
||||
/*! |
||||
* baguetteBox.js |
||||
* @author feimosi |
||||
* @version 1.11.0 |
||||
* @url https://github.com/feimosi/baguetteBox.js |
||||
*/#baguetteBox-overlay{display:none;opacity:0;position:fixed;overflow:hidden;top:0;left:0;width:100%;height:100%;z-index:1000000;background-color:#222;background-color:rgba(0,0,0,.8);-webkit-transition:opacity .5s ease;transition:opacity .5s ease}#baguetteBox-overlay.visible{opacity:1}#baguetteBox-overlay .full-image{display:inline-block;position:relative;width:100%;height:100%;text-align:center}#baguetteBox-overlay .full-image figure{display:inline;margin:0;height:100%}#baguetteBox-overlay .full-image img{display:inline-block;width:auto;height:auto;max-height:100%;max-width:100%;vertical-align:middle;-webkit-box-shadow:0 0 8px rgba(0,0,0,.6);-moz-box-shadow:0 0 8px rgba(0,0,0,.6);box-shadow:0 0 8px rgba(0,0,0,.6)}#baguetteBox-overlay .full-image figcaption{display:block;position:absolute;bottom:0;width:100%;text-align:center;line-height:1.8;white-space:normal;color:#ccc;background-color:#000;background-color:rgba(0,0,0,.6);font-family:sans-serif}#baguetteBox-overlay .full-image:before{content:"";display:inline-block;height:50%;width:1px;margin-right:-1px}#baguetteBox-slider{position:absolute;left:0;top:0;height:100%;width:100%;white-space:nowrap;-webkit-transition:left .4s ease,-webkit-transform .4s ease;transition:left .4s ease,-webkit-transform .4s ease;transition:left .4s ease,transform .4s ease;transition:left .4s ease,transform .4s ease,-webkit-transform .4s ease,-moz-transform .4s ease}#baguetteBox-slider.bounce-from-right{-webkit-animation:bounceFromRight .4s ease-out;animation:bounceFromRight .4s ease-out}#baguetteBox-slider.bounce-from-left{-webkit-animation:bounceFromLeft .4s ease-out;animation:bounceFromLeft .4s ease-out}@-webkit-keyframes bounceFromRight{0%,100%{margin-left:0}50%{margin-left:-30px}}@keyframes bounceFromRight{0%,100%{margin-left:0}50%{margin-left:-30px}}@-webkit-keyframes bounceFromLeft{0%,100%{margin-left:0}50%{margin-left:30px}}@keyframes bounceFromLeft{0%,100%{margin-left:0}50%{margin-left:30px}}.baguetteBox-button#next-button,.baguetteBox-button#previous-button{top:50%;top:calc(50% - 30px);width:44px;height:60px}.baguetteBox-button{position:absolute;cursor:pointer;outline:0;padding:0;margin:0;border:0;-moz-border-radius:15%;border-radius:15%;background-color:#323232;background-color:rgba(50,50,50,.5);color:#ddd;font:1.6em sans-serif;-webkit-transition:background-color .4s ease;transition:background-color .4s ease}.baguetteBox-button:focus,.baguetteBox-button:hover{background-color:rgba(50,50,50,.9)}.baguetteBox-button#next-button{right:2%}.baguetteBox-button#previous-button{left:2%}.baguetteBox-button#close-button{top:20px;right:2%;right:calc(2% + 6px);width:30px;height:30px}.baguetteBox-button svg{position:absolute;left:0;top:0}.baguetteBox-spinner{width:40px;height:40px;display:inline-block;position:absolute;top:50%;left:50%;margin-top:-20px;margin-left:-20px}.baguetteBox-double-bounce1,.baguetteBox-double-bounce2{width:100%;height:100%;-moz-border-radius:50%;border-radius:50%;background-color:#fff;opacity:.6;position:absolute;top:0;left:0;-webkit-animation:bounce 2s infinite ease-in-out;animation:bounce 2s infinite ease-in-out}.baguetteBox-double-bounce2{-webkit-animation-delay:-1s;animation-delay:-1s}@-webkit-keyframes bounce{0%,100%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes bounce{0%,100%{-webkit-transform:scale(0);-moz-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1);-moz-transform:scale(1);transform:scale(1)}} |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,36 @@ |
||||
@font-face { |
||||
font-family: 'Material Icons'; |
||||
font-style: normal; |
||||
font-weight: 400; |
||||
src: url(MaterialIcons-Regular.eot); /* For IE6-8 */ |
||||
src: local('Material Icons'), |
||||
local('MaterialIcons-Regular'), |
||||
url(../iconfont/MaterialIcons-Regular.woff2) format('woff2'), |
||||
url(../iconfont/MaterialIcons-Regular.woff) format('woff'), |
||||
url(../iconfont/MaterialIcons-Regular.ttf) format('truetype'); |
||||
} |
||||
|
||||
.material-icons { |
||||
font-family: 'Material Icons'; |
||||
font-weight: normal; |
||||
font-style: normal; |
||||
font-size: 24px; /* Preferred icon size */ |
||||
display: inline-block; |
||||
line-height: 1; |
||||
text-transform: none; |
||||
letter-spacing: normal; |
||||
word-wrap: normal; |
||||
white-space: nowrap; |
||||
direction: ltr; |
||||
|
||||
/* Support for all WebKit browsers. */ |
||||
-webkit-font-smoothing: antialiased; |
||||
/* Support for Safari and Chrome. */ |
||||
text-rendering: optimizeLegibility; |
||||
|
||||
/* Support for Firefox. */ |
||||
-moz-osx-font-smoothing: grayscale; |
||||
|
||||
/* Support for IE. */ |
||||
font-feature-settings: 'liga'; |
||||
} |
@ -0,0 +1,86 @@ |
||||
/* Fix: Aplayer beautify*/ |
||||
.aplayer { |
||||
background: rgba(255, 255, 255, .3); |
||||
font-family: 'Noto Serif CJK SC', 'Noto Serif CJK', 'Source Han Serif SC', 'Source Han Serif', 'source-han-serif-sc', 'PT Serif', 'SongTi SC', 'MicroSoft Yahei', Georgia, serif; |
||||
} |
||||
|
||||
.aplayer .aplayer-lrc::before { |
||||
background: rgba(255, 255, 255, 0); |
||||
filter: none |
||||
} |
||||
|
||||
.aplayer .aplayer-lrc::after { |
||||
background: rgba(255, 255, 255, 0); |
||||
filter: none |
||||
} |
||||
|
||||
.aplayer { |
||||
box-shadow: 0 0 0 1px #eee; |
||||
border-radius: 3px; |
||||
margin: 15px 0 |
||||
} |
||||
|
||||
.aplayer .aplayer-info { |
||||
padding: 9px 7px 0 10px |
||||
} |
||||
|
||||
.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap { |
||||
margin-left: 1px; |
||||
padding-right: 3px |
||||
} |
||||
|
||||
.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar, |
||||
.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-loaded, |
||||
.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played { |
||||
height: 6px; |
||||
border-radius: 10px |
||||
} |
||||
|
||||
.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played .aplayer-thumb { |
||||
height: 12px; |
||||
width: 12px; |
||||
right: 3px; |
||||
box-shadow: 0 0 5px 0 rgba(0, 0, 0, .18); |
||||
transition: all .35s |
||||
} |
||||
|
||||
.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap .aplayer-volume-bar, |
||||
.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap .aplayer-volume-bar .aplayer-volume { |
||||
border-radius: 10px; |
||||
width: 6px |
||||
} |
||||
|
||||
.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap .aplayer-volume-bar { |
||||
right: 10.5px |
||||
} |
||||
|
||||
.aplayer .aplayer-list ol li { |
||||
border-top: none |
||||
} |
||||
|
||||
.aplayer .aplayer-list ol li.aplayer-list-light { |
||||
background: #f8f8f8 |
||||
} |
||||
|
||||
#aplayer-float { |
||||
background: rgba(255, 255, 255, 1); |
||||
margin: 0; |
||||
} |
||||
|
||||
.ap-hover { |
||||
left: -66px !important; |
||||
} |
||||
|
||||
.ap-hover:hover { |
||||
left: 0px !important; |
||||
} |
||||
|
||||
#aplayer-float .aplayer-lrc-current { |
||||
color: orange; |
||||
font-size: 15px; |
||||
font-weight: bold; |
||||
} |
||||
|
||||
.aplayer-lrc { |
||||
pointer-events: none; |
||||
} |
@ -0,0 +1,59 @@ |
||||
# coding: utf-8 |
||||
''' |
||||
Created on Apr 12, 2018 |
||||
Update on 2018-04-13 |
||||
@author: Mashiro @ https://2heng.xin |
||||
|
||||
Desc: Auto compress & minfy JavaScript codes and CSS style sheet |
||||
''' |
||||
import os |
||||
from os import listdir |
||||
from os.path import isfile, join |
||||
from jsmin import jsmin |
||||
from csscompressor import compress |
||||
import time |
||||
import codecs |
||||
|
||||
localtime = time.asctime( time.localtime(time.time()) ) |
||||
print (localtime) |
||||
|
||||
pathJS = 'js/src/' |
||||
pathJSroot = 'js/' |
||||
pathCSS = 'css/src/' |
||||
pathCSSroot = 'css/' |
||||
|
||||
jsfiles = [f for f in listdir(pathJS) if isfile(join(pathJS, f))] |
||||
cssfiles = [f for f in listdir(pathCSS) if isfile(join(pathCSS, f))] |
||||
|
||||
strJS = '/*! Generate by Mashiro. ' + localtime + '*/' |
||||
strCSS = '/*! Generate by Mashiro. ' + localtime + '*/' |
||||
|
||||
for f in jsfiles: |
||||
with codecs.open(pathJS + f, 'r', encoding='utf-8') as file: |
||||
data = file.read() |
||||
strJS = strJS + data |
||||
print(f) |
||||
|
||||
JSminified = jsmin(strJS) |
||||
|
||||
with codecs.open(pathJSroot + "lib.js", "w", encoding='utf-8') as text_file: |
||||
print(JSminified, file=text_file) |
||||
|
||||
|
||||
print('------------------JS Done------------------') |
||||
|
||||
for f in cssfiles: |
||||
with codecs.open(pathCSS + f, 'r', encoding='utf-8') as file: |
||||
data = file.read() |
||||
strCSS = strCSS + data |
||||
print(f) |
||||
|
||||
CSSminified = compress(strCSS) |
||||
|
||||
with codecs.open(pathCSSroot + "lib.css", "w", encoding='utf-8') as text_file: |
||||
print(CSSminified, file=text_file) |
||||
|
||||
print('------------------CSS Done------------------') |
||||
|
||||
key = input('Press any key to quit') |
||||
quit() |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,2 @@ |
||||
/*! line-number */ |
||||
!function(n,e){"use strict";function t(){var n=e.createElement("style");n.type="text/css",n.innerHTML=h(".{0}{border-collapse:collapse}.{0} td{padding:0}.{1}:before{content:attr({2})}",[f,m,j]),e.getElementsByTagName("head")[0].appendChild(n)}function r(t){"complete"===e.readyState?l(t):n.addEventListener("DOMContentLoaded",function(){l(t)})}function l(t){try{var r=e.querySelectorAll("code.hljs");for(var l in r)r.hasOwnProperty(l)&&i(r[l],t)}catch(o){n.console.error("LineNumbers error: ",o)}}function i(n,e){if("object"==typeof n){e=e||{singleLine:!1};var t=e.singleLine?0:1;u(function(){s(n),n.innerHTML=o(n.innerHTML,t)})}}function o(n,e){var t=c(n);if(""===t[t.length-1].trim()&&t.pop(),t.length>e){for(var r="",l=0,i=t.length;l<i;l++)r+=h('<tr><td class="{0}"><div class="{1} {2}" {3}="{5}"></div></td><td class="{4}"><div class="{1}">{6}</div></td></tr>',[v,g,m,j,p,l+1,t[l].length>0?t[l]:" "]);return h('<table class="{0}">{1}</table>',[f,r])}return n}function s(n){var e=n.childNodes;for(var t in e)if(e.hasOwnProperty(t)){var r=e[t];d(r.textContent)>0&&(r.childNodes.length>0?s(r):a(r.parentNode))}}function a(n){var e=n.className;if(/hljs-/.test(e)){for(var t=c(n.innerHTML),r=0,l="";r<t.length;r++)l+=h('<span class="{0}">{1}</span>\n',[e,t[r]]);n.innerHTML=l.trim()}}function c(n){return 0===n.length?[]:n.split(L)}function d(n){return(n.trim().match(L)||[]).length}function u(e){n.setTimeout(e,0)}function h(n,e){return n.replace(/\{(\d+)\}/g,function(n,t){return e[t]?e[t]:n})}var f="hljs-ln",g="hljs-ln-line",p="hljs-ln-code",v="hljs-ln-numbers",m="hljs-ln-n",j="data-line-number",L=/\r\n|\r|\n/g;n.hljs?(n.hljs.initLineNumbersOnLoad=r,n.hljs.lineNumbersBlock=i,t()):n.console.error("highlight.js not detected!")}(window,document); |
@ -0,0 +1 @@ |
||||
!function(n,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e():n.NProgress=e()}(this,function(){function n(n,e,t){return e>n?e:n>t?t:n}function e(n){return 100*(-1+n)}function t(n,t,r){var i;return i="translate3d"===c.positionUsing?{transform:"translate3d("+e(n)+"%,0,0)"}:"translate"===c.positionUsing?{transform:"translate("+e(n)+"%,0)"}:{"margin-left":e(n)+"%"},i.transition="all "+t+"ms "+r,i}function r(n,e){var t="string"==typeof n?n:o(n);return t.indexOf(" "+e+" ")>=0}function i(n,e){var t=o(n),i=t+e;r(t,e)||(n.className=i.substring(1))}function s(n,e){var t,i=o(n);r(n,e)&&(t=i.replace(" "+e+" "," "),n.className=t.substring(1,t.length-1))}function o(n){return(" "+(n.className||"")+" ").replace(/\s+/gi," ")}function a(n){n&&n.parentNode&&n.parentNode.removeChild(n)}var u={};u.version="0.2.0";var c=u.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};u.configure=function(n){var e,t;for(e in n)t=n[e],void 0!==t&&n.hasOwnProperty(e)&&(c[e]=t);return this},u.status=null,u.set=function(e){var r=u.isStarted();e=n(e,c.minimum,1),u.status=1===e?null:e;var i=u.render(!r),s=i.querySelector(c.barSelector),o=c.speed,a=c.easing;return i.offsetWidth,l(function(n){""===c.positionUsing&&(c.positionUsing=u.getPositioningCSS()),f(s,t(e,o,a)),1===e?(f(i,{transition:"none",opacity:1}),i.offsetWidth,setTimeout(function(){f(i,{transition:"all "+o+"ms linear",opacity:0}),setTimeout(function(){u.remove(),n()},o)},o)):setTimeout(n,o)}),this},u.isStarted=function(){return"number"==typeof u.status},u.start=function(){u.status||u.set(0);var n=function(){setTimeout(function(){u.status&&(u.trickle(),n())},c.trickleSpeed)};return c.trickle&&n(),this},u.done=function(n){return n||u.status?u.inc(.3+.5*Math.random()).set(1):this},u.inc=function(e){var t=u.status;return t?("number"!=typeof e&&(e=(1-t)*n(Math.random()*t,.1,.95)),t=n(t+e,0,.994),u.set(t)):u.start()},u.trickle=function(){return u.inc(Math.random()*c.trickleRate)},function(){var n=0,e=0;u.promise=function(t){return t&&"resolved"!==t.state()?(0===e&&u.start(),n++,e++,t.always(function(){e--,0===e?(n=0,u.done()):u.set((n-e)/n)}),this):this}}(),u.render=function(n){if(u.isRendered())return document.getElementById("nprogress");i(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=c.template;var r,s=t.querySelector(c.barSelector),o=n?"-100":e(u.status||0),l=document.querySelector(c.parent);return f(s,{transition:"all 0 linear",transform:"translate3d("+o+"%,0,0)"}),c.showSpinner||(r=t.querySelector(c.spinnerSelector),r&&a(r)),l!=document.body&&i(l,"nprogress-custom-parent"),l.appendChild(t),t},u.remove=function(){s(document.documentElement,"nprogress-busy"),s(document.querySelector(c.parent),"nprogress-custom-parent");var n=document.getElementById("nprogress");n&&a(n)},u.isRendered=function(){return!!document.getElementById("nprogress")},u.getPositioningCSS=function(){var n=document.body.style,e="WebkitTransform"in n?"Webkit":"MozTransform"in n?"Moz":"msTransform"in n?"ms":"OTransform"in n?"O":"";return e+"Perspective"in n?"translate3d":e+"Transform"in n?"translate":"margin"};var l=function(){function n(){var t=e.shift();t&&t(n)}var e=[];return function(t){e.push(t),1==e.length&&n()}}(),f=function(){function n(n){return n.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(n,e){return e.toUpperCase()})}function e(n){var e=document.body.style;if(n in e)return n;for(var t,r=i.length,s=n.charAt(0).toUpperCase()+n.slice(1);r--;)if(t=i[r]+s,t in e)return t;return n}function t(t){return t=n(t),s[t]||(s[t]=e(t))}function r(n,e,r){e=t(e),n.style[e]=r}var i=["Webkit","O","Moz","ms"],s={};return function(n,e){var t,i,s=arguments;if(2==s.length)for(t in e)i=e[t],void 0!==i&&e.hasOwnProperty(t)&&r(n,t,i);else r(n,s[1],s[2])}}();return u}); |
@ -0,0 +1,324 @@ |
||||
(function webpackUniversalModuleDefinition(root, factory) { |
||||
if(typeof exports === 'object' && typeof module === 'object') |
||||
module.exports = factory(); |
||||
else if(typeof define === 'function' && define.amd) |
||||
define([], factory); |
||||
else if(typeof exports === 'object') |
||||
exports["POWERMODE"] = factory(); |
||||
else |
||||
root["POWERMODE"] = factory(); |
||||
})(this, function() { |
||||
return /******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {}; |
||||
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) { |
||||
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId]) |
||||
/******/ return installedModules[moduleId].exports; |
||||
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = { |
||||
/******/ exports: {}, |
||||
/******/ id: moduleId, |
||||
/******/ loaded: false |
||||
/******/ }; |
||||
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); |
||||
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.loaded = true; |
||||
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports; |
||||
/******/ } |
||||
|
||||
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = modules; |
||||
|
||||
/******/ // expose the module cache
|
||||
/******/ __webpack_require__.c = installedModules; |
||||
|
||||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = ""; |
||||
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(0); |
||||
/******/ }) |
||||
/************************************************************************/ |
||||
/******/ ([ |
||||
/* 0 */ |
||||
/***/ (function(module, exports, __webpack_require__) { |
||||
|
||||
'use strict'; |
||||
|
||||
var canvas = document.createElement('canvas'); |
||||
canvas.width = window.innerWidth; |
||||
canvas.height = window.innerHeight; |
||||
canvas.style.cssText = 'position:fixed;top:0;left:0;pointer-events:none;z-index:999999'; |
||||
window.addEventListener('resize', function () { |
||||
canvas.width = window.innerWidth; |
||||
canvas.height = window.innerHeight; |
||||
}); |
||||
document.body.appendChild(canvas); |
||||
var context = canvas.getContext('2d'); |
||||
var particles = []; |
||||
var particlePointer = 0; |
||||
var rendering = false; |
||||
|
||||
POWERMODE.shake = true; |
||||
|
||||
function getRandom(min, max) { |
||||
return Math.random() * (max - min) + min; |
||||
} |
||||
|
||||
function getColor(el) { |
||||
if (POWERMODE.colorful) { |
||||
var u = getRandom(0, 360); |
||||
return 'hsla(' + getRandom(u - 10, u + 10) + ', 100%, ' + getRandom(50, 80) + '%, ' + 1 + ')'; |
||||
} else { |
||||
return window.getComputedStyle(el).color; |
||||
} |
||||
} |
||||
|
||||
function getCaret() { |
||||
var el = document.activeElement; |
||||
var bcr; |
||||
if (el.tagName === 'TEXTAREA' || |
||||
(el.tagName === 'INPUT' && el.getAttribute('type') === 'text')) { |
||||
var offset = __webpack_require__(1)(el, el.selectionEnd); |
||||
bcr = el.getBoundingClientRect(); |
||||
return { |
||||
x: offset.left + bcr.left, |
||||
y: offset.top + bcr.top, |
||||
color: getColor(el) |
||||
}; |
||||
} |
||||
var selection = window.getSelection(); |
||||
if (selection.rangeCount) { |
||||
var range = selection.getRangeAt(0); |
||||
var startNode = range.startContainer; |
||||
if (startNode.nodeType === document.TEXT_NODE) { |
||||
startNode = startNode.parentNode; |
||||
} |
||||
bcr = range.getBoundingClientRect(); |
||||
return { |
||||
x: bcr.left, |
||||
y: bcr.top, |
||||
color: getColor(startNode) |
||||
}; |
||||
} |
||||
return { x: 0, y: 0, color: 'transparent' }; |
||||
} |
||||
|
||||
function createParticle(x, y, color) { |
||||
return { |
||||
x: x, |
||||
y: y, |
||||
alpha: 1, |
||||
color: color, |
||||
velocity: { |
||||
x: -1 + Math.random() * 2, |
||||
y: -3.5 + Math.random() * 2 |
||||
} |
||||
}; |
||||
} |
||||
|
||||
function POWERMODE() { |
||||
{ // spawn particles
|
||||
var caret = getCaret(); |
||||
var numParticles = 5 + Math.round(Math.random() * 10); |
||||
while (numParticles--) { |
||||
particles[particlePointer] = createParticle(caret.x, caret.y, caret.color); |
||||
particlePointer = (particlePointer + 1) % 500; |
||||
} |
||||
} |
||||
{ // shake screen
|
||||
if (POWERMODE.shake) { |
||||
var intensity = 1 + 2 * Math.random(); |
||||
var x = intensity * (Math.random() > 0.5 ? -1 : 1); |
||||
var y = intensity * (Math.random() > 0.5 ? -1 : 1); |
||||
document.body.style.marginLeft = x + 'px'; |
||||
document.body.style.marginTop = y + 'px'; |
||||
setTimeout(function() { |
||||
document.body.style.marginLeft = ''; |
||||
document.body.style.marginTop = ''; |
||||
}, 75); |
||||
} |
||||
} |
||||
if(!rendering){ |
||||
requestAnimationFrame(loop); |
||||
} |
||||
}; |
||||
POWERMODE.colorful = false; |
||||
|
||||
function loop() { |
||||
rendering = true; |
||||
context.clearRect(0, 0, canvas.width, canvas.height); |
||||
var rendered = false; |
||||
var rect = canvas.getBoundingClientRect(); |
||||
for (var i = 0; i < particles.length; ++i) { |
||||
var particle = particles[i]; |
||||
if (particle.alpha <= 0.1) continue; |
||||
particle.velocity.y += 0.075; |
||||
particle.x += particle.velocity.x; |
||||
particle.y += particle.velocity.y; |
||||
particle.alpha *= 0.96; |
||||
context.globalAlpha = particle.alpha; |
||||
context.fillStyle = particle.color; |
||||
context.fillRect( |
||||
Math.round(particle.x - 1.5) - rect.left, |
||||
Math.round(particle.y - 1.5) - rect.top, |
||||
3, 3 |
||||
); |
||||
rendered = true; |
||||
} |
||||
if(rendered){ |
||||
requestAnimationFrame(loop); |
||||
}else{ |
||||
rendering = false; |
||||
} |
||||
} |
||||
|
||||
module.exports = POWERMODE; |
||||
|
||||
|
||||
/***/ }), |
||||
/* 1 */ |
||||
/***/ (function(module, exports) { |
||||
|
||||
/* jshint browser: true */ |
||||
|
||||
(function () { |
||||
|
||||
// The properties that we copy into a mirrored div.
|
||||
// Note that some browsers, such as Firefox,
|
||||
// do not concatenate properties, i.e. padding-top, bottom etc. -> padding,
|
||||
// so we have to do every single property specifically.
|
||||
var properties = [ |
||||
'direction', // RTL support
|
||||
'boxSizing', |
||||
'width', // on Chrome and IE, exclude the scrollbar, so the mirror div wraps exactly as the textarea does
|
||||
'height', |
||||
'overflowX', |
||||
'overflowY', // copy the scrollbar for IE
|
||||
|
||||
'borderTopWidth', |
||||
'borderRightWidth', |
||||
'borderBottomWidth', |
||||
'borderLeftWidth', |
||||
'borderStyle', |
||||
|
||||
'paddingTop', |
||||
'paddingRight', |
||||
'paddingBottom', |
||||
'paddingLeft', |
||||
|
||||
// https://developer.mozilla.org/en-US/docs/Web/CSS/font
|
||||
'fontStyle', |
||||
'fontVariant', |
||||
'fontWeight', |
||||
'fontStretch', |
||||
'fontSize', |
||||
'fontSizeAdjust', |
||||
'lineHeight', |
||||
'fontFamily', |
||||
|
||||
'textAlign', |
||||
'textTransform', |
||||
'textIndent', |
||||
'textDecoration', // might not make a difference, but better be safe
|
||||
|
||||
'letterSpacing', |
||||
'wordSpacing', |
||||
|
||||
'tabSize', |
||||
'MozTabSize' |
||||
|
||||
]; |
||||
|
||||
var isFirefox = window.mozInnerScreenX != null; |
||||
|
||||
function getCaretCoordinates(element, position, options) { |
||||
|
||||
var debug = options && options.debug || false; |
||||
if (debug) { |
||||
var el = document.querySelector('#input-textarea-caret-position-mirror-div'); |
||||
if ( el ) { el.parentNode.removeChild(el); } |
||||
} |
||||
|
||||
// mirrored div
|
||||
var div = document.createElement('div'); |
||||
div.id = 'input-textarea-caret-position-mirror-div'; |
||||
document.body.appendChild(div); |
||||
|
||||
var style = div.style; |
||||
var computed = window.getComputedStyle? getComputedStyle(element) : element.currentStyle; // currentStyle for IE < 9
|
||||
|
||||
// default textarea styles
|
||||
style.whiteSpace = 'pre-wrap'; |
||||
if (element.nodeName !== 'INPUT') |
||||
style.wordWrap = 'break-word'; // only for textarea-s
|
||||
|
||||
// position off-screen
|
||||
style.position = 'absolute'; // required to return coordinates properly
|
||||
if (!debug) |
||||
style.visibility = 'hidden'; // not 'display: none' because we want rendering
|
||||
|
||||
// transfer the element's properties to the div
|
||||
properties.forEach(function (prop) { |
||||
style[prop] = computed[prop]; |
||||
}); |
||||
|
||||
if (isFirefox) { |
||||
// Firefox lies about the overflow property for textareas: https://bugzilla.mozilla.org/show_bug.cgi?id=984275
|
||||
if (element.scrollHeight > parseInt(computed.height)) |
||||
style.overflowY = 'scroll'; |
||||
} else { |
||||
style.overflow = 'hidden'; // for Chrome to not render a scrollbar; IE keeps overflowY = 'scroll'
|
||||
} |
||||
|
||||
div.textContent = element.value.substring(0, position); |
||||
// the second special handling for input type="text" vs textarea: spaces need to be replaced with non-breaking spaces - http://stackoverflow.com/a/13402035/1269037
|
||||
if (element.nodeName === 'INPUT') |
||||
div.textContent = div.textContent.replace(/\s/g, "\u00a0"); |
||||
|
||||
var span = document.createElement('span'); |
||||
// Wrapping must be replicated *exactly*, including when a long word gets
|
||||
// onto the next line, with whitespace at the end of the line before (#7).
|
||||
// The *only* reliable way to do that is to copy the *entire* rest of the
|
||||
// textarea's content into the <span> created at the caret position.
|
||||
// for inputs, just '.' would be enough, but why bother?
|
||||
span.textContent = element.value.substring(position) || '.'; // || because a completely empty faux span doesn't render at all
|
||||
div.appendChild(span); |
||||
|
||||
var coordinates = { |
||||
top: span.offsetTop + parseInt(computed['borderTopWidth']), |
||||
left: span.offsetLeft + parseInt(computed['borderLeftWidth']) |
||||
}; |
||||
|
||||
if (debug) { |
||||
span.style.backgroundColor = '#aaa'; |
||||
} else { |
||||
document.body.removeChild(div); |
||||
} |
||||
|
||||
return coordinates; |
||||
} |
||||
|
||||
if (typeof module != "undefined" && typeof module.exports != "undefined") { |
||||
module.exports = getCaretCoordinates; |
||||
} else { |
||||
window.getCaretCoordinates = getCaretCoordinates; |
||||
} |
||||
|
||||
}()); |
||||
|
||||
/***/ }) |
||||
/******/ ]) |
||||
}); |
||||
; |
File diff suppressed because one or more lines are too long
@ -0,0 +1,2 @@ |
||||
/*! Lazy Load 2.0.0-beta.2 - MIT license - Copyright 2007-2017 Mika Tuupola */ |
||||
!function(t,e){"object"==typeof exports?module.exports=e(t):"function"==typeof define&&define.amd?define([],e(t)):t.LazyLoad=e(t)}("undefined"!=typeof global?global:this.window||this.global,function(t){"use strict";function e(t,e){this.settings=r(s,e||{}),this.images=t||document.querySelectorAll(this.settings.selector),this.observer=null,this.init()}const s={src:"data-src",srcset:"data-srcset",selector:".lazyload"},r=function(){let t={},e=!1,s=0,o=arguments.length;"[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(e=arguments[0],s++);for(;s<o;s++)!function(s){for(let o in s)Object.prototype.hasOwnProperty.call(s,o)&&(e&&"[object Object]"===Object.prototype.toString.call(s[o])?t[o]=r(!0,t[o],s[o]):t[o]=s[o])}(arguments[s]);return t};if(e.prototype={init:function(){if(!t.IntersectionObserver)return void this.loadImages();let e=this,s={root:null,rootMargin:"0px",threshold:[0]};this.observer=new IntersectionObserver(function(t){t.forEach(function(t){if(t.intersectionRatio>0){e.observer.unobserve(t.target);let s=t.target.getAttribute(e.settings.src),r=t.target.getAttribute(e.settings.srcset);"img"===t.target.tagName.toLowerCase()?(s&&(t.target.src=s),r&&(t.target.srcset=r)):t.target.style.backgroundImage="url("+s+")"}})},s),this.images.forEach(function(t){e.observer.observe(t)})},loadAndDestroy:function(){this.settings&&(this.loadImages(),this.destroy())},loadImages:function(){if(!this.settings)return;let t=this;this.images.forEach(function(e){let s=e.getAttribute(t.settings.src),r=e.getAttribute(t.settings.srcset);"img"===e.tagName.toLowerCase()?(s&&(e.src=s),r&&(e.srcset=r)):e.style.backgroundImage="url("+s+")"})},destroy:function(){this.settings&&(this.observer.disconnect(),this.settings=null)}},t.lazyload=function(t,s){return new e(t,s)},t.jQuery){const s=t.jQuery;s.fn.lazyload=function(t){return t=t||{},t.attribute=t.attribute||"data-src",new e(s.makeArray(this),t),this}}return e}); |
File diff suppressed because one or more lines are too long
@ -0,0 +1,16 @@ |
||||
// Gravatar
|
||||
function get_gravatar(email, size) { |
||||
|
||||
// MD5 (Message-Digest Algorithm) by WebToolkit
|
||||
//
|
||||
|
||||
var MD5=function(s){function L(k,d){return(k<<d)|(k>>>(32-d))}function K(G,k){var I,d,F,H,x;F=(G&2147483648);H=(k&2147483648);I=(G&1073741824);d=(k&1073741824);x=(G&1073741823)+(k&1073741823);if(I&d){return(x^2147483648^F^H)}if(I|d){if(x&1073741824){return(x^3221225472^F^H)}else{return(x^1073741824^F^H)}}else{return(x^F^H)}}function r(d,F,k){return(d&F)|((~d)&k)}function q(d,F,k){return(d&k)|(F&(~k))}function p(d,F,k){return(d^F^k)}function n(d,F,k){return(F^(d|(~k)))}function u(G,F,aa,Z,k,H,I){G=K(G,K(K(r(F,aa,Z),k),I));return K(L(G,H),F)}function f(G,F,aa,Z,k,H,I){G=K(G,K(K(q(F,aa,Z),k),I));return K(L(G,H),F)}function D(G,F,aa,Z,k,H,I){G=K(G,K(K(p(F,aa,Z),k),I));return K(L(G,H),F)}function t(G,F,aa,Z,k,H,I){G=K(G,K(K(n(F,aa,Z),k),I));return K(L(G,H),F)}function e(G){var Z;var F=G.length;var x=F+8;var k=(x-(x%64))/64;var I=(k+1)*16;var aa=Array(I-1);var d=0;var H=0;while(H<F){Z=(H-(H%4))/4;d=(H%4)*8;aa[Z]=(aa[Z]|(G.charCodeAt(H)<<d));H++}Z=(H-(H%4))/4;d=(H%4)*8;aa[Z]=aa[Z]|(128<<d);aa[I-2]=F<<3;aa[I-1]=F>>>29;return aa}function B(x){var k="",F="",G,d;for(d=0;d<=3;d++){G=(x>>>(d*8))&255;F="0"+G.toString(16);k=k+F.substr(F.length-2,2)}return k}function J(k){k=k.replace(/rn/g,"n");var d="";for(var F=0;F<k.length;F++){var x=k.charCodeAt(F);if(x<128){d+=String.fromCharCode(x)}else{if((x>127)&&(x<2048)){d+=String.fromCharCode((x>>6)|192);d+=String.fromCharCode((x&63)|128)}else{d+=String.fromCharCode((x>>12)|224);d+=String.fromCharCode(((x>>6)&63)|128);d+=String.fromCharCode((x&63)|128)}}}return d}var C=Array();var P,h,E,v,g,Y,X,W,V;var S=7,Q=12,N=17,M=22;var A=5,z=9,y=14,w=20;var o=4,m=11,l=16,j=23;var U=6,T=10,R=15,O=21;s=J(s);C=e(s);Y=1732584193;X=4023233417;W=2562383102;V=271733878;for(P=0;P<C.length;P+=16){h=Y;E=X;v=W;g=V;Y=u(Y,X,W,V,C[P+0],S,3614090360);V=u(V,Y,X,W,C[P+1],Q,3905402710);W=u(W,V,Y,X,C[P+2],N,606105819);X=u(X,W,V,Y,C[P+3],M,3250441966);Y=u(Y,X,W,V,C[P+4],S,4118548399);V=u(V,Y,X,W,C[P+5],Q,1200080426);W=u(W,V,Y,X,C[P+6],N,2821735955);X=u(X,W,V,Y,C[P+7],M,4249261313);Y=u(Y,X,W,V,C[P+8],S,1770035416);V=u(V,Y,X,W,C[P+9],Q,2336552879);W=u(W,V,Y,X,C[P+10],N,4294925233);X=u(X,W,V,Y,C[P+11],M,2304563134);Y=u(Y,X,W,V,C[P+12],S,1804603682);V=u(V,Y,X,W,C[P+13],Q,4254626195);W=u(W,V,Y,X,C[P+14],N,2792965006);X=u(X,W,V,Y,C[P+15],M,1236535329);Y=f(Y,X,W,V,C[P+1],A,4129170786);V=f(V,Y,X,W,C[P+6],z,3225465664);W=f(W,V,Y,X,C[P+11],y,643717713);X=f(X,W,V,Y,C[P+0],w,3921069994);Y=f(Y,X,W,V,C[P+5],A,3593408605);V=f(V,Y,X,W,C[P+10],z,38016083);W=f(W,V,Y,X,C[P+15],y,3634488961);X=f(X,W,V,Y,C[P+4],w,3889429448);Y=f(Y,X,W,V,C[P+9],A,568446438);V=f(V,Y,X,W,C[P+14],z,3275163606);W=f(W,V,Y,X,C[P+3],y,4107603335);X=f(X,W,V,Y,C[P+8],w,1163531501);Y=f(Y,X,W,V,C[P+13],A,2850285829);V=f(V,Y,X,W,C[P+2],z,4243563512);W=f(W,V,Y,X,C[P+7],y,1735328473);X=f(X,W,V,Y,C[P+12],w,2368359562);Y=D(Y,X,W,V,C[P+5],o,4294588738);V=D(V,Y,X,W,C[P+8],m,2272392833);W=D(W,V,Y,X,C[P+11],l,1839030562);X=D(X,W,V,Y,C[P+14],j,4259657740);Y=D(Y,X,W,V,C[P+1],o,2763975236);V=D(V,Y,X,W,C[P+4],m,1272893353);W=D(W,V,Y,X,C[P+7],l,4139469664);X=D(X,W,V,Y,C[P+10],j,3200236656);Y=D(Y,X,W,V,C[P+13],o,681279174);V=D(V,Y,X,W,C[P+0],m,3936430074);W=D(W,V,Y,X,C[P+3],l,3572445317);X=D(X,W,V,Y,C[P+6],j,76029189);Y=D(Y,X,W,V,C[P+9],o,3654602809);V=D(V,Y,X,W,C[P+12],m,3873151461);W=D(W,V,Y,X,C[P+15],l,530742520);X=D(X,W,V,Y,C[P+2],j,3299628645);Y=t(Y,X,W,V,C[P+0],U,4096336452);V=t(V,Y,X,W,C[P+7],T,1126891415);W=t(W,V,Y,X,C[P+14],R,2878612391);X=t(X,W,V,Y,C[P+5],O,4237533241);Y=t(Y,X,W,V,C[P+12],U,1700485571);V=t(V,Y,X,W,C[P+3],T,2399980690);W=t(W,V,Y,X,C[P+10],R,4293915773);X=t(X,W,V,Y,C[P+1],O,2240044497);Y=t(Y,X,W,V,C[P+8],U,1873313359);V=t(V,Y,X,W,C[P+15],T,4264355552);W=t(W,V,Y,X,C[P+6],R,2734768916);X=t(X,W,V,Y,C[P+13],O,1309151649);Y=t(Y,X,W,V,C[P+4],U,4149444226);V=t(V,Y,X,W,C[P+11],T,3174756917);W=t(W,V,Y,X,C[P+2],R,718787259);X=t(X,W,V,Y,C[P+9],O,3951481745);Y=K(Y,h);X=K(X,E);W=K(W,v);V=K(V,g)}var i=B(Y)+B(X)+B(W)+B(V);return i.toLowerCase()}; |
||||
|
||||
var size = size || 80; |
||||
|
||||
return 'https://gravatar.shino.cc/avatar/' + MD5(email) + '.jpg?s=' + size + '&d=mm'; |
||||
} |
||||
|
||||
// sync css
|
||||
!function(e){"use strict";var n=function(n,t,o){var l,r=e.document,i=r.createElement("link");if(t)l=t;else{var a=(r.body||r.getElementsByTagName("head")[0]).childNodes;l=a[a.length-1]}var d=r.styleSheets;i.rel="stylesheet",i.href=n,i.media="only x",l.parentNode.insertBefore(i,t?l:l.nextSibling);var f=function(e){for(var n=i.href,t=d.length;t--;)if(d[t].href===n)return e();setTimeout(function(){f(e)})};return i.onloadcssdefined=f,f(function(){i.media=o||"all"}),i};"undefined"!=typeof module?module.exports=n:e.loadCSS=n}("undefined"!=typeof global?global:this); |
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 14 KiB |
Loading…
Reference in new issue