Skip to content

Commit a8a7f2a

Browse files
committed
Updated Riot example
1 parent d754b2e commit a8a7f2a

File tree

3 files changed

+27
-28
lines changed

3 files changed

+27
-28
lines changed

examples/phonon-and-riot/src/tags/app.riot

+19-20
Original file line numberDiff line numberDiff line change
@@ -13,29 +13,28 @@
1313
PageTwo,
1414
},
1515
onMounted() {
16-
setTimeout(() => {
17-
phonon.options({
18-
navigator: {
19-
defaultPage: 'home',
20-
animatePages: true,
21-
enableBrowserBackButton: true,
22-
templateRootDirectory: './tpl',
23-
},
24-
i18n: null, // for this example, we do not use internationalization
25-
});
26-
const app = phonon.navigator();
16+
phonon.options({
17+
navigator: {
18+
defaultPage: 'home',
19+
animatePages: true,
20+
enableBrowserBackButton: true,
21+
templateRootDirectory: './tpl',
22+
},
23+
i18n: null, // for this example, we do not use internationalization
24+
});
2725
28-
app.on({ page: 'home', preventClose: false, content: null });
26+
const app = phonon.navigator();
2927
30-
app.on({
31-
page: 'pagetwo',
32-
preventClose: true,
33-
content: null,
34-
readyDelay: 1,
35-
});
28+
app.on({ page: 'home', preventClose: false, content: null });
3629
37-
app.start();
38-
}, 1000);
30+
app.on({
31+
page: 'pagetwo',
32+
preventClose: true,
33+
content: null,
34+
readyDelay: 1,
35+
});
36+
37+
app.start();
3938
},
4039
};
4140
</script>

examples/phonon-and-riot/src/tags/home.riot

+7-7
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
</header>
88
<div class="content">
99
<ul class="list">
10-
<li class="divider">Select a pizza</li>
11-
<li><a class="padded-list" href="#!pagetwo/margherita">Margherita</a></li>
12-
<li><a class="padded-list" href="#!pagetwo/calzone">Cheese Calzone</a></li>
13-
<li><a class="padded-list" href="#!pagetwo/pesto">Pesto Pizza</a></li>
14-
<li><a class="padded-list" href="#!pagetwo/roma">Roma</a></li>
15-
<li><a class="padded-list" href="#!pagetwo/prosciutto">Prosciutto</a></li>
16-
<li><a class="padded-list" href="#!pagetwo/funghi">Funghi</a></li>
10+
<li class="divider">Select a pizza</li>
11+
<li><a class="padded-list" href="#!pagetwo/margherita">Margherita</a></li>
12+
<li><a class="padded-list" href="#!pagetwo/calzone">Cheese Calzone</a></li>
13+
<li><a class="padded-list" href="#!pagetwo/pesto">Pesto Pizza</a></li>
14+
<li><a class="padded-list" href="#!pagetwo/roma">Roma</a></li>
15+
<li><a class="padded-list" href="#!pagetwo/prosciutto">Prosciutto</a></li>
16+
<li><a class="padded-list" href="#!pagetwo/funghi">Funghi</a></li>
1717
</ul>
1818
</div>
1919
</div>

examples/phonon-and-riot/src/tags/pagetwo.riot

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
<script>
2222
import phonon from 'phonon/dist/js/phonon-core';
23-
import dialogs from '../../../../dist/js/components/dialogs';
23+
import dialogs from 'phonon/dist/js/components/dialogs';
2424
2525
const { alert } = dialogs();
2626

0 commit comments

Comments
 (0)