http://roadtocode.azurewebsites.net/
Zabrałem się trochę za skrypty i front,
- Przyciski kolejny/poprzedni, (lewa/prawa strzałka)
"use strict";
let Scroller = function () {
let animateOptions = {
duration: 400,
queue: false,
};
this.animate = function(y){
$('html, body').animate({
scrollTop: y
}, animateOptions);
}
};
(function ScrollerInit() {
Scroller.prototype.containerSelector = ".post";
function currentContainerNotFoundCallBack() {
Materialize.toast("I found nothing :(", 500);
}
function currentContainerSeeker(selector) {
let x = window.innerWidth / 2;
let y = window.innerHeight / 2;
let middler = $(document.elementFromPoint(x, y));
let result = middler.closest(selector);
return result;
}
Scroller.prototype.prevHandler = function () {
let searched = currentContainerSeeker(Scroller.prototype.containerSelector);
if (searched.length == 0) {
currentContainerNotFoundCallBack();
return;
}
let prevElement = searched.prev();
var scrollTo = prevElement.length == 0 ? searched.offset().top : prevElement.offset().top;
this.animate(scrollTo);
};
Scroller.prototype.nextHandler = function () {
let searched = currentContainerSeeker(Scroller.prototype.containerSelector);
if (searched.length == 0) {
currentContainerNotFoundCallBack();
return;
}
let nextElement = searched.next();
var scrollTo = nextElement.length == 0 ? searched.offset().top + searched.height() : nextElement.offset().top;
this.animate(scrollTo);
};
})();
- Poprawiono CSS, czcionka nie jest taka duża
h1{
font-size: 3rem !important;
}
h2{
font-size: 2.6rem !important;
}
h3{
font-size: 2.1rem !important;
}
h4{
font-size: 1.7rem !important;
}
h5{
font-size: 1.5rem !important;
}
h6{
font-size: 1.2rem !important;
}
- Dostęp do edycji postu/ usuwania go nie potrzebuje już autoryzacji, jest ona potrzebna do wprowadzenia zmian.
Edycja po id [Obsolete]
Edycja po nazwie
Publikowanie
4.Kompatybilność z niskimi X rozdzielczości powinna być naprawiona
5. Poprawione pobieranie, ScrollFire
nie jest już dłużej ustawiane na ostatnim dodanym divie lecz na dedykowanym.
Jest trochę lepiej?