Initial version of the angular app.
This commit is contained in:
parent
e107d79612
commit
995ad8b679
7 changed files with 90 additions and 10 deletions
40
static/css/signin.css
Normal file
40
static/css/signin.css
Normal file
|
@ -0,0 +1,40 @@
|
|||
body {
|
||||
padding-top: 40px;
|
||||
padding-bottom: 40px;
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
.form-signin {
|
||||
max-width: 330px;
|
||||
padding: 15px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.form-signin .form-signin-heading,
|
||||
.form-signin .checkbox {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.form-signin .checkbox {
|
||||
font-weight: normal;
|
||||
}
|
||||
.form-signin .form-control {
|
||||
position: relative;
|
||||
font-size: 16px;
|
||||
height: auto;
|
||||
padding: 10px;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.form-signin .form-control:focus {
|
||||
z-index: 2;
|
||||
}
|
||||
.form-signin input[type="text"] {
|
||||
margin-bottom: -1px;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
.form-signin input[type="password"] {
|
||||
margin-bottom: 10px;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
}
|
10
static/js/app.js
Normal file
10
static/js/app.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
angular.module('quay', ['restangular']).
|
||||
config(['$routeProvider', function($routeProvider) {
|
||||
$routeProvider.
|
||||
when('/repository/', {templateUrl: '/static/partials/repo-list.html', controller: RepoListCtrl}).
|
||||
when('/', {templateUrl: '/static/partials/landing.html', controller: LandingCtrl}).
|
||||
otherwise({redirectTo: '/'});
|
||||
}]).
|
||||
config(function(RestangularProvider) {
|
||||
RestangularProvider.setBaseUrl('/api/');
|
||||
});
|
10
static/js/controllers.js
Normal file
10
static/js/controllers.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
function RepoListCtrl($scope, Restangular) {
|
||||
var repositoryFetch = Restangular.all('repository/');
|
||||
repositoryFetch.getList().then(function(resp) {
|
||||
$scope.repositories = resp.repositories;
|
||||
});
|
||||
}
|
||||
|
||||
function LandingCtrl($scope) {
|
||||
|
||||
}
|
1
static/partials/landing.html
Normal file
1
static/partials/landing.html
Normal file
|
@ -0,0 +1 @@
|
|||
<a ng-href="#/repository/">Repositories</a>
|
4
static/partials/repo-list.html
Normal file
4
static/partials/repo-list.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
<h2>Repositories</h2>
|
||||
<div ng-repeat="repository in repositories">
|
||||
{{repository.namespace}}/{{repository.name}}
|
||||
</div>
|
Reference in a new issue