Commit 5eed759a authored by Ian Rafael T. Aragoza's avatar Ian Rafael T. Aragoza

Added Bootstrap styling to webpages.

parent b254b554
<html lang="en">
<head>
<link rel="stylesheet" href="style.css">
<title>{% block title %}My amazing site{% endblock %}</title>
{% block styles %}{% endblock %}
{% load bootstrap5 %}
{% load static %}
{% bootstrap_css %}
{% bootstrap_javascript %}
<title>{% block title %}{% endblock %}</title>
{% block styles %}{% bootstrap_css %}{% endblock %}
</head>
<body>
<div id="content">
......
......@@ -2,15 +2,54 @@
{% load static %}
{% block title %}{{ object.first_name }} {{ object.last_name }}{% endblock %}
{% block content %}
<div class="container-fluid p-5 bg-dark text-white text-center">
<h1>{{ object.first_name }} {{ object.last_name }}</h1>
<div class="container-fluid">
<div class="row">
<div class="col-4">
</div>
<div class="col-4">
<img src="{% static "authors/"|add:object.get_absolute_url|add:".jpg" %}" class="img-fluid" alt="Author portrait">
</div>
<div class="col-4">
</div>
</div>
</div>
<br>
<div class="container">
<div class="row">
<div class="col-2">
</div>
<div class="col-4">
<p>Age: {{ object.age }}</p>
</div>
<div class="col-4">
<p>Nationality: {{ object.nationality }}</p>
<p>{{ object.bio | linebreaks }}</p>
</div>
<div class="col-2">
</div>
</div>
</div>
<p><i>{{ object.bio | linebreaks }}</i></p>
</div>
<div class="container my-5 text-center">
<h3>Books by {{ object.first_name }} {{ object.last_name }} I Love:</h3>
{% for book in object.books.all %}
<p><a href="../../../../books/{{ book.get_absolute_url }}/details/"> {{ book.title }}</a></p>
{% endfor %}
<a href="/home"><p>Home</p></a>
<a href="/books"><p>Books</p></a>
<a href="/authors"><p>Authors</p></a>
<br><br>
<div class="container">
<div class="row">
<div class="col-4">
<a href="/home"><button type="button" class="btn btn-primary">Home</button></a>
</div>
<div class="col-4">
<a href="/books"><button type="button" class="btn btn-primary">Books</button></a>
</div>
<div class="col-4">
<a href="/authors"><button type="button" class="btn btn-primary">Authors</button></a>
</div>
</div>
</div>
</div>
{% endblock %}
\ No newline at end of file
{% extends 'base.html' %}
{% load static %}
{% block title %}My Favorite Books{% endblock %}
{% block title %}My Favorite Authors{% endblock %}
{% block content %}
<h1>Ian's Favorite Authors:</h1>
{% for object in object_list %}
<h1 class="container-fluid p-5 bg-dark text-white text-center">Ian's Favorite Authors:</h1>
<div class="container my-5 text-center">
{% for object in object_list %}
<p><a href="{{ object.get_absolute_url }}/details/">{{ object.first_name }} {{ object.last_name }}</a></p>
{% endfor %}
<a href="/home"><p>Home</p></a>
<a href="/books"><p>Books</p></a>
{% endfor %}
<br><br>
<div class="container">
<div class="row">
<div class="col-6">
<a href="/home"><button type="button" class="btn btn-primary">Home</button></a>
</div>
<div class="col-6">
<a href="/books"><button type="button" class="btn btn-primary">Books</button></a>
</div>
</div>
</div>
</div>
{% endblock %}
\ No newline at end of file
......@@ -2,13 +2,50 @@
{% load static %}
{% block title %}{{ object.title }}{% endblock %}
{% block content %}
<div class="container-fluid p-3 bg-dark text-white text-center">
<h1>{{ object.title }}</h1>
<p><a href="../../../../authors/{{ object.author.get_absolute_url }}/details/">{{ object.author }}</a></p>
<p>{{ object.publisher }}</p>
<p>{{ object.year_published }}</p>
<p>{{ object.ISBN }}</p>
<p>{{ object.blurb | linebreaks}}</p>
<a href="/home"><p>Home</p></a>
<a href="/books"><p>Books</p></a>
<a href="/authors"><p>Authors</p></a>
<p><a href="../../../../authors/{{ object.author.get_absolute_url }}/details/">by {{ object.author }}</a></p>
<div class="container-fluid">
<div class="row">
<div class="col-4">
</div>
<div class="col-4">
<img src="{% static "books/"|add:object.get_absolute_url|add:".jpg" %}" class="img-fluid" alt="Book cover">
</div>
<div class="col-4">
</div>
</div>
</div>
<br>
<div class="container">
<div class="row">
<div class="col-4">
<p>Published by {{ object.publisher }}</p>
</div>
<div class="col-4">
<p>Published in {{ object.year_published }}</p>
</div>
<div class="col-4">
<p>ISBN-13: {{ object.ISBN }}</p>
</div>
</div>
</div>
</div>
<div class="container my-5 text-center">
<p><i>{{ object.blurb | linebreaks}}</i></p>
<br><br>
<div class="container">
<div class="row">
<div class="col-4">
<a href="/home"><button type="button" class="btn btn-primary">Home</button></a>
</div>
<div class="col-4">
<a href="/books"><button type="button" class="btn btn-primary">Books</button></a>
</div>
<div class="col-4">
<a href="/authors"><button type="button" class="btn btn-primary">Authors</button></a>
</div>
</div>
</div>
</div>
{% endblock %}
\ No newline at end of file
......@@ -2,10 +2,21 @@
{% load static %}
{% block title %}My Favorite Books{% endblock %}
{% block content %}
<h1>Ian's Favorite Books:</h1>
{% for object in object_list %}
<h1 class="container-fluid p-5 bg-dark text-white text-center">Ian's Favorite Books:</h1>
<div class="container my-5 text-center">
{% for object in object_list %}
<p><a href="{{ object.get_absolute_url }}/details/">{{ object.title }}</a></p>
{% endfor %}
<a href="/home"><p>Home</p></a>
<a href="/authors"><p>Authors</p></a>
{% endfor %}
<br><br>
<div class="container">
<div class="row">
<div class="col-6">
<a href="/home"><button type="button" class="btn btn-primary">Home</button></a>
</div>
<div class="col-6">
<a href="/authors"><button type="button" class="btn btn-primary">Authors</button></a>
</div>
</div>
</div>
</div>
{% endblock %}
\ No newline at end of file
......@@ -2,11 +2,36 @@
{% load static %}
{% block title %}My Favorite Books and Authors{% endblock %}
{% block content %}
<h1>Welcome to {{ name }}'s Database of Favorite Books and Authors!</h1>
<p>These past few years, I've hadn't really had the chance to sit down and enjoy a good book. That said, that doesn't mean there aren't those that mean a lot to me.</p>
<p>The books I've chosen come from different points of my life, and you can see some of them show qualities that I had like whimsy, angsty, or... gay? <br>
<div class="container-fluid p-3 bg-dark text-white text-center">
<div class="container-fluid">
<div class="row">
<div class="col-5">
</div>
<div class="col-2">
<img src="{% static 'coffee.gif' %}" class="img-fluid" alt="Coffee GIF">
</div>
<div class="col-5">
</div>
</div>
</div>
<br>
<h1 class="display-4">Welcome to {{ name }}'s Database of Favorite Books and Authors!</h1>
<br>
</div>
<div class="container my-5 text-center">
<p class="lead">These past few years, I've hadn't really had the chance to sit down and enjoy a good book. That said, that doesn't mean there aren't those that mean a lot to me.</p>
<p>The books I've chosen come from different points of my life, and you can see some of them show qualities that I had like whimsy, angsty, or... gay? <br>
No matter the case, I've had adventures with each of these books, and even though I don't remember them well, they've still left a mark on me.</p>
<a href="/books"><p>Books</p></a>
<a href="/authors"><p>Authors</p></a>
<br><br>
<div class="container">
<div class="row">
<div class="col-6">
<a href="/books"><button type="button" class="btn btn-primary">Books</button></a>
</div>
<div class="col-6">
<a href="/authors"><button type="button" class="btn btn-primary">Authors</button></a>
</div>
</div>
</div>
</div>
{% endblock %}
\ No newline at end of file
......@@ -42,6 +42,7 @@ INSTALLED_APPS = [
'django.contrib.messages',
'django.contrib.staticfiles',
'bookshelf',
'bootstrap5',
]
MIDDLEWARE = [
......@@ -59,7 +60,7 @@ ROOT_URLCONF = 'ianaragoza_reading.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'DIRS': [BASE_DIR / 'templates'],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
......@@ -120,7 +121,8 @@ USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/4.1/howto/static-files/
STATIC_URL = 'static/'
STATIC_URL = '/static/'
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')]
# Default primary key field type
# https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
* Core Owl Carousel CSS File
* v1.3.3
*/
/* clearfix */
.owl-carousel .owl-wrapper:after {
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
}
/* display none until init */
.owl-carousel{
display: none;
position: relative;
width: 100%;
-ms-touch-action: pan-y;
}
.owl-carousel .owl-wrapper{
display: none;
position: relative;
-webkit-transform: translate3d(0px, 0px, 0px);
}
.owl-carousel .owl-wrapper-outer{
overflow: hidden;
position: relative;
width: 100%;
}
.owl-carousel .owl-wrapper-outer.autoHeight{
-webkit-transition: height 500ms ease-in-out;
-moz-transition: height 500ms ease-in-out;
-ms-transition: height 500ms ease-in-out;
-o-transition: height 500ms ease-in-out;
transition: height 500ms ease-in-out;
}
.owl-carousel .owl-item{
float: left;
}
.owl-controls .owl-page,
.owl-controls .owl-buttons div{
cursor: pointer;
}
.owl-controls {
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
/* mouse grab icon */
.grabbing {
cursor:url(grabbing.png) 8 8, move;
}
/* fix */
.owl-carousel .owl-wrapper,
.owl-carousel .owl-item{
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
-ms-backface-visibility: hidden;
-webkit-transform: translate3d(0,0,0);
-moz-transform: translate3d(0,0,0);
-ms-transform: translate3d(0,0,0);
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*! formstone v0.5.3 [core.js] 2015-04-17 | MIT License | formstone.it */
var Formstone=this.Formstone=function(a,b,c){"use strict";function d(a,b,c,d){var e,f={raw:{}};d=d||{};for(e in d)d.hasOwnProperty(e)&&("classes"===a?(f.raw[d[e]]=b+"-"+d[e],f[d[e]]="."+b+"-"+d[e]):(f.raw[e]=d[e],f[e]=d[e]+"."+b));for(e in c)c.hasOwnProperty(e)&&("classes"===a?(f.raw[e]=c[e].replace(/{ns}/g,b),f[e]=c[e].replace(/{ns}/g,"."+b)):(f.raw[e]=c[e].replace(/.{ns}/g,""),f[e]=c[e].replace(/{ns}/g,b)));return f}function e(){var a,b={transition:"transitionend",MozTransition:"transitionend",OTransition:"otransitionend",WebkitTransition:"webkitTransitionEnd"},d=["transition","-webkit-transition"],e={transform:"transform",MozTransform:"-moz-transform",OTransform:"-o-transform",msTransform:"-ms-transform",webkitTransform:"-webkit-transform"},f="transitionend",g="",h="",i=c.createElement("div");for(a in b)if(b.hasOwnProperty(a)&&a in i.style){f=b[a],k.support.transition=!0;break}m.transitionEnd=f+".{ns}";for(a in d)if(d.hasOwnProperty(a)&&d[a]in i.style){g=d[a];break}k.transition=g;for(a in e)if(e.hasOwnProperty(a)&&e[a]in i.style){k.support.transform=!0,h=e[a];break}k.transform=h}function f(){k.windowWidth=k.$window.width(),k.windowHeight=k.$window.height(),n=j.startTimer(n,o,g)}function g(){for(var a in k.ResizeHandlers)k.ResizeHandlers.hasOwnProperty(a)&&k.ResizeHandlers[a].callback.call(b,k.windowWidth,k.windowHeight)}function h(a,b){return parseInt(a.priority)-parseInt(b.priority)}var i=function(){this.Plugins={},this.ResizeHandlers=[],this.window=b,this.$window=a(b),this.document=c,this.$document=a(c),this.$body=null,this.windowWidth=0,this.windowHeight=0,this.userAgent=b.navigator.userAgent||b.navigator.vendor||b.opera,this.isFirefox=/Firefox/i.test(this.userAgent),this.isChrome=/Chrome/i.test(this.userAgent),this.isSafari=/Safari/i.test(this.userAgent)&&!this.isChrome,this.isMobile=/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(this.userAgent),this.isFirefoxMobile=this.isFirefox&&this.isMobile,this.transform=null,this.transition=null,this.support={file:!!(b.File&&b.FileList&&b.FileReader),history:!!(b.history&&b.history.pushState&&b.history.replaceState),matchMedia:!(!b.matchMedia&&!b.msMatchMedia),raf:!(!b.requestAnimationFrame||!b.cancelAnimationFrame),touch:!!("ontouchstart"in b||b.DocumentTouch&&c instanceof b.DocumentTouch),transition:!1,transform:!1}},j={killEvent:function(a,b){try{a.preventDefault(),a.stopPropagation(),b&&a.stopImmediatePropagation()}catch(c){}},startTimer:function(a,b,c,d){return j.clearTimer(a),d?setInterval(c,b):setTimeout(c,b)},clearTimer:function(a,b){a&&(b?clearInterval(a):clearTimeout(a),a=null)},sortAsc:function(a,b){return parseInt(b)-parseInt(a)},sortDesc:function(a,b){return parseInt(b)-parseInt(a)}},k=new i,l={base:"{ns}",element:"{ns}-element"},m={namespace:".{ns}",blur:"blur.{ns}",change:"change.{ns}",click:"click.{ns}",dblClick:"dblclick.{ns}",drag:"drag.{ns}",dragEnd:"dragend.{ns}",dragEnter:"dragenter.{ns}",dragLeave:"dragleave.{ns}",dragOver:"dragover.{ns}",dragStart:"dragstart.{ns}",drop:"drop.{ns}",error:"error.{ns}",focus:"focus.{ns}",focusIn:"focusin.{ns}",focusOut:"focusout.{ns}",input:"input.{ns}",keyDown:"keydown.{ns}",keyPress:"keypress.{ns}",keyUp:"keyup.{ns}",load:"load.{ns}",mouseDown:"mousedown.{ns}",mouseEnter:"mouseenter.{ns}",mouseLeave:"mouseleave.{ns}",mouseMove:"mousemove.{ns}",mouseOut:"mouseout.{ns}",mouseOver:"mouseover.{ns}",mouseUp:"mouseup.{ns}",resize:"resize.{ns}",scroll:"scroll.{ns}",select:"select.{ns}",touchCancel:"touchcancel.{ns}",touchEnd:"touchend.{ns}",touchLeave:"touchleave.{ns}",touchMove:"touchmove.{ns}",touchStart:"touchstart.{ns}"};i.prototype.Plugin=function(c,e){return k.Plugins[c]=function(c,e){function f(b){var d="object"===a.type(b);b=a.extend(!0,{},e.defaults||{},d?b:{});for(var f=this,g=0,h=f.length;h>g;g++){var j=f.eq(g);if(!i(j)){var k=j.data(c+"-options"),l=a.extend(!0,{$el:j},b,"object"===a.type(k)?k:{});j.addClass(e.classes.raw.element).data(r,l),e.methods._construct.apply(j,[l].concat(Array.prototype.slice.call(arguments,d?1:0)))}}return f}function g(){e.functions.iterate.apply(this,[e.methods._destruct].concat(Array.prototype.slice.call(arguments,1))),this.removeClass(e.classes.raw.element).removeData(r)}function i(a){return a.data(r)}function n(b){if(this instanceof a){var c=e.methods[b];return"object"!==a.type(b)&&b?c&&0!==b.indexOf("_")?e.functions.iterate.apply(this,[c].concat(Array.prototype.slice.call(arguments,1))):this:f.apply(this,arguments)}}function o(c){var d=e.utilities[c]||e.utilities._initialize||!1;return d?d.apply(b,Array.prototype.slice.call(arguments,"object"===a.type(c)?0:1)):void 0}function p(b){e.defaults=a.extend(!0,e.defaults,b||{})}function q(b){for(var c=this,d=0,e=c.length;e>d;d++){var f=c.eq(d),g=i(f)||{};"undefined"!==a.type(g.$el)&&b.apply(f,[g].concat(Array.prototype.slice.call(arguments,1)))}return c}var r="fs-"+c;return e.initialized=!1,e.priority=e.priority||10,e.classes=d("classes",r,l,e.classes),e.events=d("events",c,m,e.events),e.functions=a.extend({getData:i,iterate:q},j,e.functions),e.methods=a.extend(!0,{_setup:a.noop,_construct:a.noop,_destruct:a.noop,_resize:!1,destroy:g},e.methods),e.utilities=a.extend(!0,{_initialize:!1,_delegate:!1,defaults:p},e.utilities),e.widget&&(a.fn[c]=n),a[c]=e.utilities._delegate||o,e.namespace=c,e.methods._resize&&(k.ResizeHandlers.push({namespace:c,priority:e.priority,callback:e.methods._resize}),k.ResizeHandlers.sort(h)),e}(c,e),k.Plugins[c]};var n=null,o=20;return k.$window.on("resize.fs",f),f(),a(function(){k.$body=a("body");for(var b in k.Plugins)k.Plugins.hasOwnProperty(b)&&!k.Plugins[b].initialized&&(k.Plugins[b].methods._setup.call(c),k.Plugins[b].initialized=!0)}),m.clickTouchStart=m.click+" "+m.touchStart,e(),k}(jQuery,this,document);
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
$(document).ready(function(){
$('#wrapper').prepend("<script>$(window).load(function() { $('.preloader img').fadeOut();$('.preloader').delay(500).fadeOut('slow');});</script>");
$('#wrapper').prepend("<div class='preloader' style='position: fixed; width:100%;height:100%;background: white;top:0;z-index:9999;'></div>");
$('#wrapper').removeClass('behind');
});
\ No newline at end of file
This diff is collapsed.
jQuery(function($) {
"use strict";
$('input[type=text]').blur(function(){
if($.trim($(this).val()) == "")
$(this).addClass('form-incomplete');
else
$(this).removeClass('form-incomplete');
});
$('textarea').blur(function(){
if($.trim($(this).val()) == "")
$(this).addClass('form-incomplete');
else
$(this).removeClass('form-incomplete');
});
$('form').submit(function(){
event.preventDefault();
var that = mainForm,
url = $(that).attr('action'),
type = $(that).attr('method'),
dataX = {};
$(that).find("[name]").each(function(){
dataX[$(this).attr("name")] = $(this).val();
});
$('.notification-box').addClass('active');
$.ajax({
type:'POST',
url: url,
data: dataX,
success: function(response){
$('.notification-box span').html(response);
setTimeout(function(){
$('.notification-box').removeClass('active');
$('.notification-box span').html("Sending...");
}, 4000);
}
});
});
$('.sample-button-done').click(function(){
$('#sample-form').slideUp();
});
});
\ No newline at end of file
/*! WOW - v1.1.2 - 2015-04-07
* Copyright (c) 2015 Matthieu Aussaguel; Licensed MIT */(function(){var a,b,c,d,e,f=function(a,b){return function(){return a.apply(b,arguments)}},g=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=function(){function a(){}return a.prototype.extend=function(a,b){var c,d;for(c in b)d=b[c],null==a[c]&&(a[c]=d);return a},a.prototype.isMobile=function(a){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)},a.prototype.createEvent=function(a,b,c,d){var e;return null==b&&(b=!1),null==c&&(c=!1),null==d&&(d=null),null!=document.createEvent?(e=document.createEvent("CustomEvent"),e.initCustomEvent(a,b,c,d)):null!=document.createEventObject?(e=document.createEventObject(),e.eventType=a):e.eventName=a,e},a.prototype.emitEvent=function(a,b){return null!=a.dispatchEvent?a.dispatchEvent(b):b in(null!=a)?a[b]():"on"+b in(null!=a)?a["on"+b]():void 0},a.prototype.addEvent=function(a,b,c){return null!=a.addEventListener?a.addEventListener(b,c,!1):null!=a.attachEvent?a.attachEvent("on"+b,c):a[b]=c},a.prototype.removeEvent=function(a,b,c){return null!=a.removeEventListener?a.removeEventListener(b,c,!1):null!=a.detachEvent?a.detachEvent("on"+b,c):delete a[b]},a.prototype.innerHeight=function(){return"innerHeight"in window?window.innerHeight:document.documentElement.clientHeight},a}(),c=this.WeakMap||this.MozWeakMap||(c=function(){function a(){this.keys=[],this.values=[]}return a.prototype.get=function(a){var b,c,d,e,f;for(f=this.keys,b=d=0,e=f.length;e>d;b=++d)if(c=f[b],c===a)return this.values[b]},a.prototype.set=function(a,b){var c,d,e,f,g;for(g=this.keys,c=e=0,f=g.length;f>e;c=++e)if(d=g[c],d===a)return void(this.values[c]=b);return this.keys.push(a),this.values.push(b)},a}()),a=this.MutationObserver||this.WebkitMutationObserver||this.MozMutationObserver||(a=function(){function a(){"undefined"!=typeof console&&null!==console&&console.warn("MutationObserver is not supported by your browser."),"undefined"!=typeof console&&null!==console&&console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content.")}return a.notSupported=!0,a.prototype.observe=function(){},a}()),d=this.getComputedStyle||function(a){return this.getPropertyValue=function(b){var c;return"float"===b&&(b="styleFloat"),e.test(b)&&b.replace(e,function(a,b){return b.toUpperCase()}),(null!=(c=a.currentStyle)?c[b]:void 0)||null},this},e=/(\-([a-z]){1})/g,this.WOW=function(){function e(a){null==a&&(a={}),this.scrollCallback=f(this.scrollCallback,this),this.scrollHandler=f(this.scrollHandler,this),this.resetAnimation=f(this.resetAnimation,this),this.start=f(this.start,this),this.scrolled=!0,this.config=this.util().extend(a,this.defaults),this.animationNameCache=new c,this.wowEvent=this.util().createEvent(this.config.boxClass)}return e.prototype.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0,live:!0,callback:null},e.prototype.init=function(){var a;return this.element=window.document.documentElement,"interactive"===(a=document.readyState)||"complete"===a?this.start():this.util().addEvent(document,"DOMContentLoaded",this.start),this.finished=[]},e.prototype.start=function(){var b,c,d,e;if(this.stopped=!1,this.boxes=function(){var a,c,d,e;for(d=this.element.querySelectorAll("."+this.config.boxClass),e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.all=function(){var a,c,d,e;for(d=this.boxes,e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.boxes.length)if(this.disabled())this.resetStyle();else for(e=this.boxes,c=0,d=e.length;d>c;c++)b=e[c],this.applyStyle(b,!0);return this.disabled()||(this.util().addEvent(window,"scroll",this.scrollHandler),this.util().addEvent(window,"resize",this.scrollHandler),this.interval=setInterval(this.scrollCallback,50)),this.config.live?new a(function(a){return function(b){var c,d,e,f,g;for(g=[],c=0,d=b.length;d>c;c++)f=b[c],g.push(function(){var a,b,c,d;for(c=f.addedNodes||[],d=[],a=0,b=c.length;b>a;a++)e=c[a],d.push(this.doSync(e));return d}.call(a));return g}}(this)).observe(document.body,{childList:!0,subtree:!0}):void 0},e.prototype.stop=function(){return this.stopped=!0,this.util().removeEvent(window,"scroll",this.scrollHandler),this.util().removeEvent(window,"resize",this.scrollHandler),null!=this.interval?clearInterval(this.interval):void 0},e.prototype.sync=function(){return a.notSupported?this.doSync(this.element):void 0},e.prototype.doSync=function(a){var b,c,d,e,f;if(null==a&&(a=this.element),1===a.nodeType){for(a=a.parentNode||a,e=a.querySelectorAll("."+this.config.boxClass),f=[],c=0,d=e.length;d>c;c++)b=e[c],g.call(this.all,b)<0?(this.boxes.push(b),this.all.push(b),this.stopped||this.disabled()?this.resetStyle():this.applyStyle(b,!0),f.push(this.scrolled=!0)):f.push(void 0);return f}},e.prototype.show=function(a){return this.applyStyle(a),a.className=a.className+" "+this.config.animateClass,null!=this.config.callback&&this.config.callback(a),this.util().emitEvent(a,this.wowEvent),this.util().addEvent(a,"animationend",this.resetAnimation),this.util().addEvent(a,"oanimationend",this.resetAnimation),this.util().addEvent(a,"webkitAnimationEnd",this.resetAnimation),this.util().addEvent(a,"MSAnimationEnd",this.resetAnimation),a},e.prototype.applyStyle=function(a,b){var c,d,e;return d=a.getAttribute("data-wow-duration"),c=a.getAttribute("data-wow-delay"),e=a.getAttribute("data-wow-iteration"),this.animate(function(f){return function(){return f.customStyle(a,b,d,c,e)}}(this))},e.prototype.animate=function(){return"requestAnimationFrame"in window?function(a){return window.requestAnimationFrame(a)}:function(a){return a()}}(),e.prototype.resetStyle=function(){var a,b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(a.style.visibility="visible");return e},e.prototype.resetAnimation=function(a){var b;return a.type.toLowerCase().indexOf("animationend")>=0?(b=a.target||a.srcElement,b.className=b.className.replace(this.config.animateClass,"").trim()):void 0},e.prototype.customStyle=function(a,b,c,d,e){return b&&this.cacheAnimationName(a),a.style.visibility=b?"hidden":"visible",c&&this.vendorSet(a.style,{animationDuration:c}),d&&this.vendorSet(a.style,{animationDelay:d}),e&&this.vendorSet(a.style,{animationIterationCount:e}),this.vendorSet(a.style,{animationName:b?"none":this.cachedAnimationName(a)}),a},e.prototype.vendors=["moz","webkit"],e.prototype.vendorSet=function(a,b){var c,d,e,f;d=[];for(c in b)e=b[c],a[""+c]=e,d.push(function(){var b,d,g,h;for(g=this.vendors,h=[],b=0,d=g.length;d>b;b++)f=g[b],h.push(a[""+f+c.charAt(0).toUpperCase()+c.substr(1)]=e);return h}.call(this));return d},e.prototype.vendorCSS=function(a,b){var c,e,f,g,h,i;for(h=d(a),g=h.getPropertyCSSValue(b),f=this.vendors,c=0,e=f.length;e>c;c++)i=f[c],g=g||h.getPropertyCSSValue("-"+i+"-"+b);return g},e.prototype.animationName=function(a){var b;try{b=this.vendorCSS(a,"animation-name").cssText}catch(c){b=d(a).getPropertyValue("animation-name")}return"none"===b?"":b},e.prototype.cacheAnimationName=function(a){return this.animationNameCache.set(a,this.animationName(a))},e.prototype.cachedAnimationName=function(a){return this.animationNameCache.get(a)},e.prototype.scrollHandler=function(){return this.scrolled=!0},e.prototype.scrollCallback=function(){var a;return!this.scrolled||(this.scrolled=!1,this.boxes=function(){var b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],a&&(this.isVisible(a)?this.show(a):e.push(a));return e}.call(this),this.boxes.length||this.config.live)?void 0:this.stop()},e.prototype.offsetTop=function(a){for(var b;void 0===a.offsetTop;)a=a.parentNode;for(b=a.offsetTop;a=a.offsetParent;)b+=a.offsetTop;return b},e.prototype.isVisible=function(a){var b,c,d,e,f;return c=a.getAttribute("data-wow-offset")||this.config.offset,f=window.pageYOffset,e=f+Math.min(this.element.clientHeight,this.util().innerHeight())-c,d=this.offsetTop(a),b=d+a.clientHeight,e>=d&&b>=f},e.prototype.util=function(){return null!=this._util?this._util:this._util=new b},e.prototype.disabled=function(){return!this.config.mobile&&this.util().isMobile(navigator.userAgent)},e}()}).call(this);
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment