Skip to content

Commit

Permalink
Updated Riot example
Browse files Browse the repository at this point in the history
  • Loading branch information
qathom committed Jul 17, 2019
1 parent d754b2e commit a8a7f2a
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 28 deletions.
39 changes: 19 additions & 20 deletions examples/phonon-and-riot/src/tags/app.riot
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,28 @@
PageTwo,
},
onMounted() {
setTimeout(() => {
phonon.options({
navigator: {
defaultPage: 'home',
animatePages: true,
enableBrowserBackButton: true,
templateRootDirectory: './tpl',
},
i18n: null, // for this example, we do not use internationalization
});
const app = phonon.navigator();
phonon.options({
navigator: {
defaultPage: 'home',
animatePages: true,
enableBrowserBackButton: true,
templateRootDirectory: './tpl',
},
i18n: null, // for this example, we do not use internationalization
});
app.on({ page: 'home', preventClose: false, content: null });
const app = phonon.navigator();
app.on({
page: 'pagetwo',
preventClose: true,
content: null,
readyDelay: 1,
});
app.on({ page: 'home', preventClose: false, content: null });
app.start();
}, 1000);
app.on({
page: 'pagetwo',
preventClose: true,
content: null,
readyDelay: 1,
});
app.start();
},
};
</script>
Expand Down
14 changes: 7 additions & 7 deletions examples/phonon-and-riot/src/tags/home.riot
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
</header>
<div class="content">
<ul class="list">
<li class="divider">Select a pizza</li>
<li><a class="padded-list" href="#!pagetwo/margherita">Margherita</a></li>
<li><a class="padded-list" href="#!pagetwo/calzone">Cheese Calzone</a></li>
<li><a class="padded-list" href="#!pagetwo/pesto">Pesto Pizza</a></li>
<li><a class="padded-list" href="#!pagetwo/roma">Roma</a></li>
<li><a class="padded-list" href="#!pagetwo/prosciutto">Prosciutto</a></li>
<li><a class="padded-list" href="#!pagetwo/funghi">Funghi</a></li>
<li class="divider">Select a pizza</li>
<li><a class="padded-list" href="#!pagetwo/margherita">Margherita</a></li>
<li><a class="padded-list" href="#!pagetwo/calzone">Cheese Calzone</a></li>
<li><a class="padded-list" href="#!pagetwo/pesto">Pesto Pizza</a></li>
<li><a class="padded-list" href="#!pagetwo/roma">Roma</a></li>
<li><a class="padded-list" href="#!pagetwo/prosciutto">Prosciutto</a></li>
<li><a class="padded-list" href="#!pagetwo/funghi">Funghi</a></li>
</ul>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion examples/phonon-and-riot/src/tags/pagetwo.riot
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<script>
import phonon from 'phonon/dist/js/phonon-core';
import dialogs from '../../../../dist/js/components/dialogs';
import dialogs from 'phonon/dist/js/components/dialogs';
const { alert } = dialogs();
Expand Down

0 comments on commit a8a7f2a

Please sign in to comment.