Merge pull request #259 from coreos-inc/landingoldcode
Delete the old landing page code
This commit is contained in:
commit
fe83fb40cd
3 changed files with 20 additions and 140 deletions
|
@ -1,7 +1,6 @@
|
|||
(function() {
|
||||
/**
|
||||
* Landing page.
|
||||
* DEPRECATED: Remove the code for viewing when logged in.
|
||||
*/
|
||||
angular.module('quayPages').config(['pages', function(pages) {
|
||||
pages.create('landing', 'landing.html', LandingCtrl, {
|
||||
|
@ -10,21 +9,14 @@
|
|||
}]);
|
||||
|
||||
function LandingCtrl($scope, $location, UserService, ApiService, Features, Config) {
|
||||
$scope.namespace = null;
|
||||
$scope.currentScreenshot = 'repo-view';
|
||||
$scope.userRegistered = false;
|
||||
|
||||
$scope.$watch('namespace', function(namespace) {
|
||||
loadMyRepos(namespace);
|
||||
});
|
||||
|
||||
UserService.updateUserIn($scope, function(user) {
|
||||
if (!user.anonymous) {
|
||||
$location.path('/repository');
|
||||
return;
|
||||
}
|
||||
|
||||
loadMyRepos($scope.namespace);
|
||||
});
|
||||
|
||||
$scope.handleUserRegistered = function() {
|
||||
|
@ -35,36 +27,6 @@
|
|||
$scope.currentScreenshot = screenshot;
|
||||
};
|
||||
|
||||
$scope.canCreateRepo = function(namespace) {
|
||||
if (!$scope.user) { return false; }
|
||||
|
||||
if (namespace == $scope.user.username) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($scope.user.organizations) {
|
||||
for (var i = 0; i < $scope.user.organizations.length; ++i) {
|
||||
var org = $scope.user.organizations[i];
|
||||
if (org.name == namespace) {
|
||||
return org.can_create_repo;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
var loadMyRepos = function(namespace) {
|
||||
if (!$scope.user || $scope.user.anonymous || !namespace) {
|
||||
return;
|
||||
}
|
||||
|
||||
var options = {'limit': 4, 'public': false, 'sort': true, 'namespace': namespace };
|
||||
$scope.my_repositories = ApiService.listReposAsResource().withOptions(options).get(function(resp) {
|
||||
return resp.repositories;
|
||||
});
|
||||
};
|
||||
|
||||
$scope.chromify = function() {
|
||||
browserchrome.update();
|
||||
|
||||
|
|
|
@ -1,57 +1,18 @@
|
|||
<div class="jumbotron landing">
|
||||
<div class="landing-background" ng-class="user.anonymous ? 'landing': 'signedin'"></div>
|
||||
<div class="landing-filter" ng-class="user.anonymous ? 'landing': 'signedin'"></div>
|
||||
<div class="landing-background landing"></div>
|
||||
<div class="landing-filter landing"></div>
|
||||
<div class="landing-content">
|
||||
<div class="cor-container">
|
||||
<div class="row messages">
|
||||
<div class="col-md-7">
|
||||
<div ng-show="user.anonymous" style="text-align: center">
|
||||
<span style="display: inline-block; background: white; padding: 10px; border-radius: 10px;">
|
||||
<img ng-src="{{ getEnterpriseLogo() }}" style="max-height: 100px;">
|
||||
</span>
|
||||
<h1>Enterprise Registry</h1>
|
||||
</div>
|
||||
|
||||
<div ng-show="!user.anonymous">
|
||||
<span class="namespace-selector" user="user" namespace="namespace" ng-show="user.organizations"></span>
|
||||
|
||||
<div class="resource-view" resource="my_repositories">
|
||||
<!-- Repos -->
|
||||
<div ng-show="my_repositories.value.length > 0">
|
||||
<h2>Top Repositories</h2>
|
||||
<div class="repo-listing" ng-repeat="repository in my_repositories.value">
|
||||
<span class="repo-circle no-background" repo="repository"></span>
|
||||
<a ng-href="/repository/{{ repository.namespace }}/{{ repository.name }}">{{repository.namespace}}/{{repository.name}}</a>
|
||||
<div class="markdown-view description" content="repository.description" first-line-only="true"></div>
|
||||
</div>
|
||||
<a href="/repository/?namespace={{ namespace }}">See All Repositories</a>
|
||||
</div>
|
||||
|
||||
<!-- No Repos -->
|
||||
<div ng-show="my_repositories.value.length == 0">
|
||||
<div class="sub-message" style="margin-top: 20px">
|
||||
<span ng-show="namespace != user.username">You don't have access to any repositories in this organization yet.</span>
|
||||
<span ng-show="namespace == user.username">You don't have any repositories yet!</span>
|
||||
<div class="options">
|
||||
<a class="btn btn-primary" href="/repository/">Browse all repositories</a>
|
||||
<a class="btn btn-success" href="/new/" ng-show="canCreateRepo(namespace)">Create a new repository</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- col -->
|
||||
|
||||
<div class="col-md-4 col-md-offset-1">
|
||||
<div ng-show="user.anonymous">
|
||||
<div class="signup-form"></div>
|
||||
</div>
|
||||
<div ng-show="!user.anonymous" class="user-welcome">
|
||||
<span class="avatar" size="128" data="user.avatar"></span>
|
||||
<div class="sub-message">Welcome <b>{{ user.username }}</b>!</div>
|
||||
<a ng-show="my_repositories.value" class="btn btn-primary" href="/repository/">Browse all repositories</a>
|
||||
<a class="btn btn-success" href="/new/">Create a new repository</a>
|
||||
</div>
|
||||
</div> <!-- col -->
|
||||
</div> <!-- row -->
|
||||
</div> <!-- cor-container -->
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div class="jumbotron landing">
|
||||
<div class="landing-background" ng-class="user.anonymous ? 'landing': 'signedin'"></div>
|
||||
<div class="landing-filter" ng-class="user.anonymous ? 'landing': 'signedin'"></div>
|
||||
<div class="landing-background landing"></div>
|
||||
<div class="landing-filter landing"></div>
|
||||
<div class="landing-content">
|
||||
<div class="co-alert co-alert-info" style="color:black;" ng-show="userRegistered">
|
||||
Thank you for registering! We have sent you an activation email.
|
||||
|
@ -10,60 +10,21 @@
|
|||
<div class="cor-container">
|
||||
<div class="row messages">
|
||||
<div class="col-md-7">
|
||||
<div ng-show="user.anonymous">
|
||||
<h1>Secure hosting for <b>private</b> Docker<a class="disclaimer-link" href="/disclaimer" target="_self">*</a> repositories</h1>
|
||||
<h3>Use the Docker images <b>your team</b> needs with the safety of <b>private</b> repositories</h3>
|
||||
<a href="/plans/?trial-plan=bus-coreos-trial" class="call-to-action">Get 20 free private repos for 6 months<i class="fa fa-arrow-right"></i></a>
|
||||
</div>
|
||||
|
||||
<div ng-show="!user.anonymous">
|
||||
<span class="namespace-selector" user="user" namespace="namespace" ng-show="user.organizations"></span>
|
||||
|
||||
<div class="resource-view" resource="my_repositories">
|
||||
<!-- Repos -->
|
||||
<div ng-show="my_repositories.value.length > 0">
|
||||
<h2>Top Repositories</h2>
|
||||
<div class="repo-listing" ng-repeat="repository in my_repositories.value">
|
||||
<span class="repo-circle no-background" repo="repository"></span>
|
||||
<a ng-href="/repository/{{ repository.namespace }}/{{ repository.name }}">{{repository.namespace}}/{{repository.name}}</a>
|
||||
<div class="markdown-view description" content="repository.description" first-line-only="true"></div>
|
||||
</div>
|
||||
<a href="/repository/?namespace={{ namespace }}">See All Repositories</a>
|
||||
</div>
|
||||
|
||||
<!-- No Repos -->
|
||||
<div ng-show="my_repositories.value.length == 0">
|
||||
<div class="sub-message" style="margin-top: 20px">
|
||||
<span ng-show="namespace != user.username">You don't have access to any repositories in this organization yet.</span>
|
||||
<span ng-show="namespace == user.username">You don't have any repositories yet!</span>
|
||||
<div class="options">
|
||||
<a class="btn btn-primary" href="/repository/">Browse all repositories</a>
|
||||
<a class="btn btn-success" href="/new/" ng-show="canCreateRepo(namespace)">Create a new repository</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- col -->
|
||||
|
||||
<div class="col-md-4 col-md-offset-1">
|
||||
<div ng-show="user.anonymous">
|
||||
<div class="signup-form" user-registered="handleUserRegistered()"
|
||||
hide-registered-message="true"></div>
|
||||
</div>
|
||||
<div ng-show="!user.anonymous" class="user-welcome">
|
||||
<span class="avatar" size="128" data="user.avatar"></span>
|
||||
<div class="sub-message">Welcome <b>{{ user.username }}</b>!</div>
|
||||
<a ng-show="my_repositories.value" class="btn btn-primary" href="/repository/">Browse all repositories</a>
|
||||
<a class="btn btn-success" href="/new/">Create a new repository</a>
|
||||
</div>
|
||||
</div> <!-- col -->
|
||||
</div> <!-- row -->
|
||||
</div> <!-- container -->
|
||||
</div>
|
||||
</div> <!-- jumbotron -->
|
||||
|
||||
<div class="rows" ng-show="user.anonymous">
|
||||
<div class="rows">
|
||||
<div class=" shoutout-row landing-section">
|
||||
<div class="cor-container">
|
||||
<div class="row">
|
||||
|
@ -267,12 +228,8 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="cor-container" ng-if="user.anonymous">
|
||||
<div class="row">
|
||||
<div style="border-top: 1px solid #eee; padding-top: 20px;" class="col-md-12">
|
||||
<div class="landing-section" style="padding: 10px; padding-bottom: 0px;">
|
||||
<a href="https://mixpanel.com/f/partner"><img src="//cdn.mxpnl.com/site_media/images/partner/badge_light.png" alt="Mobile Analytics" /></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
Reference in a new issue