This commit is contained in:
Gary 2025-09-25 21:52:12 -07:00
parent 9cd5828b47
commit 9ef6446789
22 changed files with 601 additions and 74 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

BIN
assets/Keith-atneosen.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
assets/anon.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
assets/carl-tompkins.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 54 KiB

BIN
assets/jake-hoback.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

BIN
assets/lore-coffee.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

View File

@ -13,7 +13,7 @@
</div>
<div class="flex-container">
<div>
<a href="/creed">our creed</a>
<a href="https://shilohcode.com/creed">our creed</a>
</div>
</div>
<div class="flex-row">

View File

@ -15,7 +15,11 @@
</a>
</div>
<ul class="menu">
<li class="menu-item"><a href="#tickets">Buy Tickets</a></li>
<li class="menu-item">
<a href="https://events.shilohcode.com/event/1/shiloh-echo-25"
>Get Tickets</a
>
</li>
<li class="menu-item"><a href="#details">Explore</a></li>
<li class="menu-item"><a href="#lodging">Stay</a></li>
<li class="menu-item"><a href="#contact">Contact</a></li>

View File

@ -36,7 +36,7 @@ main {
align-items: flex-start;
}
.div-background {
background-color: antiquewhite;
background-color: #faebd7;
}
.flex-column {
-webkit-flex: 100%;
@ -69,6 +69,20 @@ main {
justify-content: space-evenly;
padding: 10px;
}
.min-flex-row {
-webkit-flex: 100%;
flex: 100%;
-webkit-flex-direction: row;
flex-direction: row;
align-items: center;
display: -webkit-flex;
display: flex;
text-align: center;
-webkit-flex-wrap: wrap;
flex-wrap: wrap;
justify-content: space-evenly;
background-color: #579c8b;
}
.flex-row-items {
-webkit-flex: content;
@ -151,6 +165,10 @@ footer {
.white {
color: white;
}
.nospace {
padding: 0px;
margin: 0px;
}
h1,
h2 {
color: #6e564f;
@ -279,6 +297,7 @@ a {
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0);
z-index: -1;
}
.bg-vid video {
@ -359,6 +378,30 @@ a {
#back-to-top.show {
bottom: 20px;
z-index: 5;
}
.hievents-widget {
width: 100%;
}
.card {
max-width: 300px;
text-align: center;
margin: 10px;
}
.title {
color: grey;
font-size: 18px;
}
div.card > a {
text-decoration: none;
font-size: 22px;
color: black;
}
div.card > img {
border-radius: 35px;
}
/* Media query for mobile devices */
@ -404,4 +447,16 @@ a {
.flex-column {
padding: 10px 5px;
}
h1,
h2 {
color: #6e564f;
text-align: center;
position: relative;
z-index: 1;
font-size: 3rem;
font-weight: 400;
}
p {
font-size: 18px;
}
}

View File

@ -43,44 +43,72 @@
<link rel="icon" href="./assets/favicon.ico" />
<link rel="icon" href="./assets/" type="image/svg+xml" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/all.min.css"
/>
<link rel="stylesheet" href="css/styles.css?v=1.0" />
<script src="./js/jquery-3.7.1.min.js"></script>
<script src="./js/main.js"></script>
<script src="./js/navbar.js"></script>
<script src="./js/back-to-top.js"></script>
<script src="./js/countdown.js"></script>
<script async src="https://events.shilohcode.com/widget.js"></script>
</head>
<body>
<header id="header"></header>
<main>
<div class="min-flex-row">
<p class="white nospace">NOV 21-23</p>
<p class="white nospace">Coalition - Bonners Ferry, ID</p>
<div class="white" id="getting-started"></div>
<script type="text/javascript">
$("#getting-started").countdown("2025/11/21", function (event) {
$(this).text(event.strftime("Time left: %D Days %H:%M:%S"));
});
</script>
</div>
<div class="flex-column bg-vid">
<div>
<h1 class="white">Attend Shiloh Echo '25</h1>
<h1 class="white">Save your seat at Shiloh Echo '25</h1>
<div class="flex-row">
<p class="white">
Shiloh Echo is North Idaho's annual gathering showcasing off-grid,
homesteading, open-source solutions. With presentations,
workshops, demonstrations, and hands-on villages focused on
sustainable and simple living.
</p>
<h3 class="white">
Presentations, workshops, demonstrations, and hands-on villages
focused on off-grid and simple living.
</h3>
<div
data-hievents-id="1"
data-hievents-primary-color="#43786b"
data-hievents-primary-text-color="#fff"
data-hievents-secondary-color="#fff"
data-hievents-secondary-text-color="#000"
data-hievents-background-color="#43786b"
data-hievents-widget-type="widget"
data-hievents-widget-version="1.0"
data-hievents-locale="en"
data-hievents-padding="20px"
data-hievents-autoresize="true"
data-hievents-continue-button-text="Continue"
class="hievents-widget"
></div>
</div>
<div class="button-row flex-row">
<div class="flex-row">
<a class="button-4" role="button" href="#details">Details</a>
<a class="button-4" role="button" href="#lodging">Lodging</a>
<a class="button-4" role="button" href="#lodging">Book Your Stay</a>
<a class="button-4" role="button" href="#contact">Contact</a>
<a class="button-4" role="button" href="#tickets">Buy Tickets</a>
<a
class="button-4"
target="_blank"
role="button"
href="https://events.shilohcode.com/event/1/shiloh-echo-25"
>Get Your Tickets</a
>
</div>
</div>
<p class="white">Sponsored by:</p>
<img
src="./assets/coaliton-logo.webp"
alt="Coalition BF Logo"
height="250px"
/>
<video
autoplay
loop
@ -93,6 +121,149 @@
/>
</video>
</div>
<div id="about" class="flex-column">
<h2>Sneak Peak:</h2>
<div class="flex-row">
<div class="card">
<img
src="./assets/Ben_toews_by_Brady_Campbell.webp"
alt="John"
style="width: 100%"
/>
<h3>Sen. Ben Toews</h3>
<p class="title">Idaho State Senator</p>
<a target="_blank" href="https://x.com/BenToews"
><i class="fa-brands fa-x-twitter"></i
></a>
<a target="_blank" href="https://www.ben4idaho.com/"
><i class="fa-solid fa-link"></i
></a>
</div>
<div class="card">
<img src="./assets/jake-hoback.webp" style="width: 100%" />
<h3>Jake Hoback</h3>
<p class="title">
Founder Hoback Customs and Iron Spear Outfitters
</p>
<p></p>
<a
target="_blank"
href="https://www.instagram.com/jakehobackknives/"
><i class="fa-brands fa-instagram"></i
></a>
<a target="_blank" href="https://ironspearoutfitters.com/"
><i class="fa-solid fa-link"></i
></a>
</div>
<div class="card">
<img src="./assets/anon.jpeg" style="width: 100%" />
<h3>Tony</h3>
<p class="title">Co-founder, CTO Shiloh Code</p>
<a target="_blank" href="https://shilohcode.com"
><i class="fa-solid fa-link"></i
></a>
</div>
</div>
<div class="flex-row">
<div class="card">
<img src="./assets/Keith-atneosen.jpeg" style="width: 100%" />
<h3>Keith Atneosen</h3>
<p class="title">
Author & Principal | Family Business Advisor, CEPA
</p>
<a target="_blank" href="https://freedomsummitconsulting.com/"
><i class="fa-solid fa-link"></i
></a>
</div>
<div class="card">
<img src="./assets/carl-tompkins.jpg" style="width: 100%" />
<h3>Carl Tompkins</h3>
<p class="title">President, The Way of Business</p>
<p></p>
<a target="_blank" href="https://freedomsummitconsulting.com/"
><i class="fa-solid fa-link"></i
></a>
</div>
<div class="card">
<img src="./assets/anon.jpeg" style="width: 100%" />
<h3>TBA</h3>
</div>
</div>
<div class="flex-row">
<div class="card">
<img src="./assets/anon.jpeg" style="width: 100%" />
<h3>TBA</h3>
</div>
<div class="card">
<img src="./assets/anon.jpeg" style="width: 100%" />
<h3>TBA</h3>
</div>
<div class="card">
<img src="./assets/anon.jpeg" style="width: 100%" />
<h3>TBA</h3>
</div>
</div>
</div>
<div id="about" class="flex-column">
<div>
<h2>Sponsors:</h2>
<a
href="https://www.thecoalitionbf.com/"
target="_blank"
rel="noopener noreferrer"
><img src="./assets/coaliton-logo.webp" height="250px"
/></a>
<a
href="https://selkirkenergysolutions.com/"
target="_blank"
rel="noopener noreferrer"
><img
src="./assets/SelkirkEnergySolutions-FF-01-1-1-e1688509897832-300x144-1.webp"
height="150px"
/></a>
<a
href="https://shilohcode.com/"
target="_blank"
rel="noopener noreferrer"
><img src="./assets/shiloh-logo-white-1.png" height="70px"
/></a>
<a
href="https://lasthourhosting.org/"
target="_blank"
rel="noopener noreferrer"
><img src="./assets/last_hour_hosting_logo_blue.png" height="50px"
/></a>
<a
href="https://skyright.com/"
target="_blank"
rel="noopener noreferrer"
><img src="./assets/skyright-web_logo-color.webp" height="150px"
/></a>
<a
href="https://offgridunlimited.com/"
target="_blank"
rel="noopener noreferrer"
><img src="./assets/offgrid-unlimited.webp" height="250px"
/></a>
<a
href="https://loreroasters.com/"
target="_blank"
rel="noopener noreferrer"
><img src="./assets/lore-coffee.webp" height="150px"
/></a>
<a
href="https://legacyluxuryre.com/"
target="_blank"
rel="noopener noreferrer"
><img src="./assets/legacy-real-estate-group.webp" height="150px"
/></a>
</div>
</div>
<div id="about" class="flex-column">
<div>
<h2>About</h2>
@ -108,49 +279,107 @@
<div id="details" class="flex-column">
<div>
<h2>Details</h2>
<h3>This year's theme is <strong>"Make Us One."</strong></h3>
<h3>Here's what you'll enjoy:</h3>
<h4>Be with your people</h4>
<p>
Concerned about
<strong
>ai, globalization, smart cities, surveillance, digital
currencies</strong
>?
Every year we gather with like-minded off-grid and simple living
practitioners. Meet leaders in our communty who share your concerns
about AI, globalization, smart cities, surveillance, and digital
currencies — people you can keep in touch with long after the event.
Sick of hearing about being replaced by the next shiny tech? Want
practical ways to protect your community and family guided by
Christian principles? This event is for you. Attend focused
presentations, hands-on workshops, live Q&A, expert panels, demos,
and themed villages where you can learn and practice real solutions.
Leave with actionable skills, trusted contacts, and project
collaborators who share your values.
</p>
<br />
<p>Tired of being told you'll be replaced by xyz technology?</p>
<br />
<p>
Want to help your local community and your family with Christian
principles?
</p>
<br />
<p><strong>This event is for you...</strong></p>
<br />
<p>
Experience presentations, workshops, Q & A, expert panels,
demonstrations, and hands-on villages.
</p>
<h3>Learn from the best in:</h3>
<p>
Decentralization, privacy, open-source, homesteading, Christian
living, permaculture, security, off-grid solutions.
</p>
<h3>Join us Nov. 21-23rd</h3>
<h4>Gain new skills</h4>
<ul>
<li><b>Decentralization</b> — resilient community-owned systems</li>
<li>
<b>Open source</b> — Tech alternatives you can own and trust
</li>
<li>
<b>Privacy & Security</b> — defending data and personal freedoms
</li>
<li>
<b>Homesteading & Offgrid</b> — self-reliance for families and
communities
</li>
<li><b>Permaculture</b> — sustainable food and land management</li>
<li>
<b>Christian living</b> — faith-based approaches to service and
stewardship
</li>
</ul>
<h4>Hear the latest</h4>
<ul>
<li>
<b>Cutting-edge briefings</b> — Short, focused talks on AI risk,
surveillance trends, digital currency developments, and the global
tech landscape.
</li>
<li>
<b>Policy & ethics panels</b> — Experts debate regulation, civil
liberties, and community safeguards so you leave informed and
prepared.
</li>
<li>
<b>Tool demos & releases</b> — See privacy-first, decentralized,
and open-source projects in action — learn what works today and
whats coming next.
</li>
<li>
<b>Community case studies</b> — Real-world examples of
faith-driven community resilience, homesteading tech, and offgrid
implementations.
</li>
<li>
<b>Interactive Q&A</b> — Direct access to researchers, developers,
and faith leaders to ask how emerging tech affects your family and
neighborhood.
</li>
</ul>
<h4>Enjoy the perks</h4>
<ul>
<li>
<b>Hands-on villages</b> — STry privacy tools, decentralization
stacks, and offgrid kits with guided mentors
</li>
<li>
<b>Networking lounges</b> — Meet peers, open-source heroes, and
local leaders aligned with Christian stewardship and community
resilience.
</li>
<li>
<b>Resource hub</b> — Take home curated guides, implementable
checklists, and open-source project links to get started
immediately.
</li>
<li>
<b>Family-friendly tracks</b> — Sessions and practical workshops
designed for families and faith communities.
</li>
<li>
<b>Giveaways & discounts</b> — Tools, course vouchers, and starter
kits for privacy, permaculture, and offgrid living.
</li>
<li>
<b>Unplugged Concerts</b> — unwind each evening with acoustic sets
that foster conversation, community, and reflection away from
screens.
</li>
</ul>
</div>
</div>
<div id="tickets" class="flex-column">
<div>
<h2>Buy Tickets</h2>
<h3>Tickets will be paid at the event.</h3>
<h3>Ticket pricing TBA</h3>
</div>
<a class="button-4" role="button" href="#contact">Questions?</a>
</div>
<div id="details" class="bg-vid flex-column">
<div>
<h2 class="white">Location</h2>
<img
src="./assets/coaliton-logo.webp"
src="./assets/coaliton-logo-white.webp"
alt="Coalition BF Logo"
width="300px"
/>
@ -178,35 +407,69 @@
<div id="speakers" class="flex-column">
<div>
<h2>Event Schedule</h2>
<p>**This schedule is not final. Check back for latest updates.</p>
<h3>Friday Night</h3>
<ul>
<li><b>5:00PM</b> — Networking and Food Trucks</li>
<li><b>6:006:10 PM</b> — Welcome</li>
<li><b>6-11PM</b> — TBA</li>
<li>
<b>5:00PM5:30PM</b> — Doors Open (check-in, badge pickup, coat
drop)
</li>
<li>
<b>5:306:00 PM</b> — Welcome Remarks & Night Overview +
Housekeeping
</li>
<li>
<b>6:00-7:00PM</b> — Food Trucks Open + Village Access + Lounges
</li>
<li><b>7:10-7:40PM</b> — Panel: Community Stories</li>
<li><b>7:40-8:00PM</b> — Break / Fellowship</li>
<li><b>8:00-8:30PM</b> — HandsOn MiniWorkshop or Demo Session</li>
<li><b>8:30-8:50PM</b> — Break / Fellowship</li>
<li><b>8:50-9:20PM</b> — Fireside talks</li>
<li><b>9:20-11PM</b> — Unplugged Concert</li>
<li><b>11:00-11:40PM</b> — Late Night Snacks + Village Walk</li>
<li>
<b>11:40-12:00AM</b> — Closing Circle & Announcements — nextday
reminders
</li>
</ul>
<h3>Saturday</h3>
<ul>
<li><b>ALL-DAY</b> — TBA</li>
<li><b>8:00-9:00AM</b> — Ruck and Polar plunge</li>
<li><b>9:00-9:30AM</b> — Food Trucks and Lore Coffee</li>
<li><b>9:30-9:40AM</b> — Welcome & Housekeeping</li>
<li><b>9:40-10:10AM</b> — Speaker TBA</li>
<li><b>10:10-10:25AM</b> — Short Break</li>
<li><b>10:25-10:55AM</b> — Speaker TBA</li>
<li><b>10:55-11:10AM</b> — Transition / Stretch Break</li>
<li><b>10:10-11:40AM</b> — Panel Session</li>
<li><b>11:40-1:00PM</b> — Lunch + Food Trucks + Village</li>
<li><b>1:00PM-1:15PM</b> — Energizer Activity + Announcements</li>
<li><b>1:15PM-1:45PM</b> — Speaker TBA</li>
<li><b>1:45PM-2:00PM</b> — Coffee Break</li>
<li><b>2:00PM-2:30PM</b> — Speaker TBA</li>
<li><b>2:30PM-2:45PM</b> — Short Break</li>
<li><b>2:45PM-3:15PM</b> — Lightning Talks</li>
<li><b>3:15PM-3:30PM</b> — Snack Break / Village Walk</li>
<li><b>3:30PM-4:00PM</b> — Shiloh Keynote</li>
<li><b>4:00PM-4:15PM</b> — Transition / Break</li>
<li><b>4:15PM-6:00PM</b> — Evening meet + Food Trucks + Village</li>
<li><b>6:00PM-9:00PM</b> — Unplugged Concert</li>
</ul>
<h3>Sunday Morning</h3>
<ul>
<li><b>TBA</b> — Gathering at Local Church</li>
<li><b>TBA</b>Morning Gathering at Local Church</li>
</ul>
</div>
</div>
<div id="lodging" class="bg-vid flex-column">
<div>
<h2 class="white">Lodging</h2>
<h3 class="white">25% Discount</h3>
<h2 class="white">Book Your Stay</h2>
<h3 class="white">Get a 25% Discount</h3>
<p class="white">
Want to make your stay even more awesome? Book a room at the cozy
Log Inn of Bonners Ferry, just next door, and get ready for a
relaxing retreat! As a special treat, mention our event and receive
25% OFF your stay! It's the perfect way to unwind and recharge after
a day of learning and connecting with like-minded folks.
Mention our event and receive 25% OFF your stay at the Log Inn!
</p>
<p class="white">Address: 43 Tobe Way, Bonners Ferry, ID 83805</p>
</div>
<a
class="button-4"
@ -259,8 +522,8 @@
</p>
<h3>Q: How do I buy tickets?</h3>
<p>
A: Tickets will be available at the event. Feel free to pay cash or
card.
A: Purchase tickets online here. Feel free to pay card or cash at the
door.
</p>
<h3>Q: Why Bonners Ferry Idaho?</h3>
<p>
@ -277,7 +540,7 @@
<h3>Q: I am interested in being a speaker</h3>
<p>
A: Please submit your resume and topic to echo@shilohcode.com for
review. Final applications are due September 26th.
review.
</p>
</div>
@ -292,13 +555,13 @@
href="mailto:echo(AT)shilohcode(DOT)com"
>email</a
>
<a class="button-4" role="button" href="sms:2087182435">text</a>
<a class="button-4" role="button" href="sms:6056080538">text</a>
</div>
</div>
</div>
</div>
</main>
<button id="back-to-top">Back to top!</button>
<button id="back-to-top">^^^</button>
<footer id="footer"></footer>
</body>

205
js/countdown.js Normal file
View File

@ -0,0 +1,205 @@
/*!
* The Final Countdown for jQuery v2.2.0 (http://hilios.github.io/jQuery.countdown/)
* Copyright (c) 2016 Edson Hilios
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
!(function (a) {
"use strict";
"function" == typeof define && define.amd ? define(["jquery"], a) : a(jQuery);
})(function (a) {
"use strict";
function b(a) {
if (a instanceof Date) return a;
if (String(a).match(g))
return (
String(a).match(/^[0-9]*$/) && (a = Number(a)),
String(a).match(/\-/) && (a = String(a).replace(/\-/g, "/")),
new Date(a)
);
throw new Error("Couldn't cast `" + a + "` to a date object.");
}
function c(a) {
var b = a.toString().replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1");
return new RegExp(b);
}
function d(a) {
return function (b) {
var d = b.match(/%(-|!)?[A-Z]{1}(:[^;]+;)?/gi);
if (d)
for (var f = 0, g = d.length; f < g; ++f) {
var h = d[f].match(/%(-|!)?([a-zA-Z]{1})(:[^;]+;)?/),
j = c(h[0]),
k = h[1] || "",
l = h[3] || "",
m = null;
(h = h[2]),
i.hasOwnProperty(h) && ((m = i[h]), (m = Number(a[m]))),
null !== m &&
("!" === k && (m = e(l, m)),
"" === k && m < 10 && (m = "0" + m.toString()),
(b = b.replace(j, m.toString())));
}
return (b = b.replace(/%%/, "%"));
};
}
function e(a, b) {
var c = "s",
d = "";
return (
a &&
((a = a.replace(/(:|;|\s)/gi, "").split(/\,/)),
1 === a.length ? (c = a[0]) : ((d = a[0]), (c = a[1]))),
Math.abs(b) > 1 ? c : d
);
}
var f = [],
g = [],
h = { precision: 100, elapse: !1, defer: !1 };
g.push(/^[0-9]*$/.source),
g.push(/([0-9]{1,2}\/){2}[0-9]{4}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),
g.push(/[0-9]{4}([\/\-][0-9]{1,2}){2}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),
(g = new RegExp(g.join("|")));
var i = {
Y: "years",
m: "months",
n: "daysToMonth",
d: "daysToWeek",
w: "weeks",
W: "weeksToMonth",
H: "hours",
M: "minutes",
S: "seconds",
D: "totalDays",
I: "totalHours",
N: "totalMinutes",
T: "totalSeconds",
},
j = function (b, c, d) {
(this.el = b),
(this.$el = a(b)),
(this.interval = null),
(this.offset = {}),
(this.options = a.extend({}, h)),
(this.instanceNumber = f.length),
f.push(this),
this.$el.data("countdown-instance", this.instanceNumber),
d &&
("function" == typeof d
? (this.$el.on("update.countdown", d),
this.$el.on("stoped.countdown", d),
this.$el.on("finish.countdown", d))
: (this.options = a.extend({}, h, d))),
this.setFinalDate(c),
this.options.defer === !1 && this.start();
};
a.extend(j.prototype, {
start: function () {
null !== this.interval && clearInterval(this.interval);
var a = this;
this.update(),
(this.interval = setInterval(function () {
a.update.call(a);
}, this.options.precision));
},
stop: function () {
clearInterval(this.interval),
(this.interval = null),
this.dispatchEvent("stoped");
},
toggle: function () {
this.interval ? this.stop() : this.start();
},
pause: function () {
this.stop();
},
resume: function () {
this.start();
},
remove: function () {
this.stop.call(this),
(f[this.instanceNumber] = null),
delete this.$el.data().countdownInstance;
},
setFinalDate: function (a) {
this.finalDate = b(a);
},
update: function () {
if (0 === this.$el.closest("html").length) return void this.remove();
var b,
c = void 0 !== a._data(this.el, "events"),
d = new Date();
(b = this.finalDate.getTime() - d.getTime()),
(b = Math.ceil(b / 1e3)),
(b = !this.options.elapse && b < 0 ? 0 : Math.abs(b)),
this.totalSecsLeft !== b &&
c &&
((this.totalSecsLeft = b),
(this.elapsed = d >= this.finalDate),
(this.offset = {
seconds: this.totalSecsLeft % 60,
minutes: Math.floor(this.totalSecsLeft / 60) % 60,
hours: Math.floor(this.totalSecsLeft / 60 / 60) % 24,
days: Math.floor(this.totalSecsLeft / 60 / 60 / 24) % 7,
daysToWeek: Math.floor(this.totalSecsLeft / 60 / 60 / 24) % 7,
daysToMonth: Math.floor(
(this.totalSecsLeft / 60 / 60 / 24) % 30.4368
),
weeks: Math.floor(this.totalSecsLeft / 60 / 60 / 24 / 7),
weeksToMonth: Math.floor(this.totalSecsLeft / 60 / 60 / 24 / 7) % 4,
months: Math.floor(this.totalSecsLeft / 60 / 60 / 24 / 30.4368),
years: Math.abs(this.finalDate.getFullYear() - d.getFullYear()),
totalDays: Math.floor(this.totalSecsLeft / 60 / 60 / 24),
totalHours: Math.floor(this.totalSecsLeft / 60 / 60),
totalMinutes: Math.floor(this.totalSecsLeft / 60),
totalSeconds: this.totalSecsLeft,
}),
this.options.elapse || 0 !== this.totalSecsLeft
? this.dispatchEvent("update")
: (this.stop(), this.dispatchEvent("finish")));
},
dispatchEvent: function (b) {
var c = a.Event(b + ".countdown");
(c.finalDate = this.finalDate),
(c.elapsed = this.elapsed),
(c.offset = a.extend({}, this.offset)),
(c.strftime = d(this.offset)),
this.$el.trigger(c);
},
}),
(a.fn.countdown = function () {
var b = Array.prototype.slice.call(arguments, 0);
return this.each(function () {
var c = a(this).data("countdown-instance");
if (void 0 !== c) {
var d = f[c],
e = b[0];
j.prototype.hasOwnProperty(e)
? d[e].apply(d, b.slice(1))
: null === String(e).match(/^[$A-Z_][0-9A-Z_$]*$/i)
? (d.setFinalDate.call(d, e), d.start())
: a.error(
"Method %s does not exist on jQuery.countdown".replace(
/\%s/gi,
e
)
);
} else new j(this, b[0], b[1]);
});
});
});