Move home links definition into js.

This commit is contained in:
opi 2014-02-11 10:45:13 +01:00
parent 74ad4f0556
commit 5b9df09541
2 changed files with 14 additions and 18 deletions

View file

@ -234,7 +234,16 @@ app = Sammy('#main', function (sam) {
// Show development note
c.flash('info', '<b>You are using a development version.</b><br />' +
'Please note that you can use the <a href="https://doc.yunohost.org/#/moulinette" target="_blank">moulinette</a> if you want to access to more YunoHost\'s features.');
c.view('home');
// Available sections
data = {links: [
{name: "Users", path: '#/users'},
{name: "Domains", path: '#/domains'},
{name: "Applications", path: '#/apps'},
{name: "Services", path: '#/services'},
]};
c.view('home', data);
});
sam.get('#/login', function (c) {

View file

@ -5,25 +5,12 @@
</div>
<div class="list-group">
<a href="#/users" class="list-group-item slide">
<h4 class="pull-left list-group-item-heading">Users</h4>
<span class="glyphicon glyphicon-chevron-right pull-right"></span>
<div class="clearfix"></div>
</a>
<a href="#/domains" class="list-group-item slide">
<h4 class="pull-left list-group-item-heading">Domains</h4>
<span class="glyphicon glyphicon-chevron-right pull-right"></span>
<div class="clearfix"></div>
</a>
<a href="#/apps" class="list-group-item slide">
<h4 class="pull-left list-group-item-heading">Applications</h4>
<span class="glyphicon glyphicon-chevron-right pull-right"></span>
<div class="clearfix"></div>
</a>
<a href="#/services" class="list-group-item slide">
<h4 class="pull-left list-group-item-heading">Services</h4>
{{#links}}
<a href="{{path}}" class="list-group-item slide">
<h4 class="pull-left list-group-item-heading">{{name}}</h4>
<span class="glyphicon glyphicon-chevron-right pull-right"></span>
<div class="clearfix"></div>
</a>
{{/links}}
</div>