Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Commit 456f7dc

Browse files
committed
keep quotas in json file
1 parent cc9fa1d commit 456f7dc

File tree

3 files changed

+34
-14
lines changed

3 files changed

+34
-14
lines changed

html/index/news.handlebars

+2-13
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,8 @@
22
<div class="section news">
33
<header class="title">WHAT OUR USERS ARE SAYING</header>
44
<article class="content">
5-
<div class="echo-slider">
6-
<ul>
7-
<li>
8-
<div class="word">We use Docker on prem and Hyper_ as failover cloud. Since both sides have Docker, everything works 100% out of the box.</div>
9-
<div class="name">Hareem Haque</div>
10-
<div class="intro">Sigma Global Solutions</div>
11-
</li>
12-
<li>
13-
<div class="word">Hyper_ looks pretty competitive with Docker Cloud, or better – per-second billing, floating ips, monitoring, logging, </div>
14-
<div class="name">TJ Holowaychuk</div>
15-
<div class="intro">Founder of Apex and Express.sh</div>
16-
</li>
17-
</ul>
5+
<div id="echo-slider" class="echo-slider">
6+
<ul></ul>
187
</div>
198
<!--<ul class="latest">
209
<li class="item">

js/index.js

+20-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ require('./unslider')
55
require('./typed')
66
import lunr from 'lunr'
77
import price from './price'
8+
import quotas from './quotas.json'
89

910
const createAssciimaPlayer = function(num) {
1011
asciinema_player.core.CreatePlayer(
@@ -193,7 +194,25 @@ const bindEvents = () => {
193194
}
194195

195196
const initSlider = () => {
196-
$('.echo-slider').unslider()
197+
const tpl = (data) => {
198+
return `
199+
<li>
200+
<div class="word">${data.content}</div>
201+
<div class="name">${data.name}</div>
202+
<div class="intro">${data.title}</div>
203+
</li>
204+
`
205+
}
206+
let str = ''
207+
for (const item of quotas) {
208+
str += tpl(item)
209+
}
210+
$('#echo-slider ul').html(str)
211+
$('#echo-slider').unslider({
212+
autoplay: true,
213+
speed: 300,
214+
delay: 5000
215+
})
197216
}
198217

199218
const initTyped = async () => {

js/quotas.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[
2+
{
3+
"content": "We use Docker on prem and Hyper_ as failover cloud. Since both sides have Docker, everything works 100% out of the box.",
4+
"name": "Hareem Haque",
5+
"title": "Sigma Global Solutions"
6+
},
7+
{
8+
"content": "Hyper_ looks pretty competitive with Docker Cloud, or better – per-second billing, floating ips, monitoring, logging",
9+
"name": "TJ Holowaychuk",
10+
"title": "Founder of Apex and Express.sh"
11+
}
12+
]

0 commit comments

Comments
 (0)