Permalink
Browse files

New page: My Pi

  • Loading branch information...
Thoulah committed Jan 4, 2019
1 parent a3cf3b9 commit d0085d6cf9fed7f2e43ba8f97d65ac80a60658e0
@@ -15,7 +15,7 @@
"yiisoft/yii2-swiftmailer": "*",
"yiisoft/yii2-httpclient": "^2.0",
"yiisoft/yii2-jui": "^2.0",
"twbs/bootstrap": "4.1.2 as 3.0.3",
"twbs/bootstrap": "4.1.3 as 3.0.3",
"bower-asset/fontawesome": "^5.0",
"bower-asset/jqueryui-timepicker-addon": "^1.6",
"bower-asset/to-markdown": "^3.0",

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -0,0 +1,56 @@
/**
* jQuery Unveil
* A very lightweight jQuery plugin to lazy load images
* http://luis-almeida.github.com/unveil
*
* Licensed under the MIT license.
* Copyright 2013 Luís Almeida
* https://github.com/luis-almeida
*/

;(function($) {

$.fn.unveil = function(threshold, callback) {

var $w = $(window),
th = threshold || 0,
retina = window.devicePixelRatio > 1,
attrib = retina? "data-src-retina" : "data-src",
images = this,
loaded;

this.one("unveil", function() {
var source = this.getAttribute(attrib);
source = source || this.getAttribute("data-src");
if (source) {
this.setAttribute("src", source);
if (typeof callback === "function") callback.call(this);
}
});

function unveil() {
var inview = images.filter(function() {
var $e = $(this);
if ($e.is(":hidden")) return;

var wt = $w.scrollTop(),
wb = wt + $w.height(),
et = $e.offset().top,
eb = et + $e.height();

return eb >= wt - th && et <= wb + th;
});

loaded = inview.trigger("unveil");
images = images.not(loaded);
}

$w.on("scroll.unveil resize.unveil lookup.unveil", unveil);

unveil();

return this;

};

})(window.jQuery || window.Zepto);
@@ -4,8 +4,8 @@
return [
'aliases' => [
'@assets' => '//s.mister42.me',
'@assetsroot' => __DIR__.'/../../webassets/me.mister42.s',
'@assets' => '//s.mr42.me',
'@assetsroot' => __DIR__.'/../../webassets/me.mr42.s',
'@bower' => '@vendor/bower-asset',
'@npm' => '@vendor/npm-asset',
],
@@ -98,6 +98,10 @@ public function actionBrowserconfigxml() {
return $this->renderPartial('browserconfigxml');
}
public function actionPi() {
return $this->render('pi');
}
public function actionRobotstxt() {
Yii::$app->response->format = Response::FORMAT_RAW;
Yii::$app->response->headers->add('Content-Type', 'text/plain');
Oops, something went wrong.

0 comments on commit d0085d6

Please sign in to comment.