From 45680d4a8e0128bc703e36432d28ad847ed511ca Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Wed, 20 Nov 2013 16:17:47 -0500 Subject: [PATCH] Fix the footer to be on all pages (except the repo view page due to an issue), fix the double body tag issue and add padding to content pages --- static/css/quay.css | 48 ++++++++++++++++++++++-------- static/js/app.js | 8 +++-- static/js/controllers.js | 8 ++++- static/partials/guide.html | 2 +- static/partials/landing.html | 33 -------------------- static/partials/organizations.html | 2 +- static/partials/plans.html | 2 +- static/partials/view-repo.html | 2 +- templates/base.html | 35 ++++++++++++++++++---- templates/index.html | 4 ++- 10 files changed, 86 insertions(+), 58 deletions(-) diff --git a/static/css/quay.css b/static/css/quay.css index 871a82f26..34c5788c0 100644 --- a/static/css/quay.css +++ b/static/css/quay.css @@ -1,5 +1,26 @@ * { font-family: 'Droid Sans', sans-serif; + margin: 0; +} + +html, body { + height: 100%; +} + +.content-container { + padding-bottom: 70px; +} + +.wrapper { + min-height: 100%; + height: auto !important; + height: 100%; + margin: 0 auto -136px; +} + +.footer-container, .push { + height: 110px; + overflow: hidden; } .button-hidden { @@ -624,49 +645,53 @@ form input.ng-valid.ng-dirty, } } -.landing-footer { +.page-footer { background-color: white; background-image: none; padding: 10px; padding-bottom: 40px; - margin-top: 10px; + margin-top: 52px; border-top: 1px solid #eee; } -.landing-footer .row { +.page-footer .row { max-width: 100%; } -.landing-footer .copyright-container { +.page-footer .logo-container { font-size: 11px; color: black; text-align: right; padding-right: 30px; - padding-top: 20px; } -.landing-footer .copyright-container a { +.page-footer .logo-container a { display: block; + margin-top: 4px; + margin-right: 10px; } -.landing-footer .dt-logo { +.page-footer .dt-logo { vertical-align: center; max-width: 150px; } -.landing-footer .copyright { - font-size: 11px; +.page-footer .copyright { + font-size: 12px; color: black; } -.landing-footer ul { +.page-footer ul { list-style-type: none; margin: 0px; padding-left: 0px; + margin-top: 10px; } -.landing-footer li { +.page-footer li { margin: 0px; + display: inline-block; + padding: 10px; } .user-welcome { @@ -698,7 +723,6 @@ form input.ng-valid.ng-dirty, text-overflow: ellipsis; } - .entity-mini-listing { margin: 2px; } diff --git a/static/js/app.js b/static/js/app.js index 381c54185..121f5aee3 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -427,8 +427,10 @@ quayApp = angular.module('quay', ['ngRoute', 'restangular', 'angularMoment', 'an // index rule to make sure that deep links directly deep into the app continue to work. // WARNING WARNING WARNING $routeProvider. - when('/repository/:namespace/:name', {templateUrl: '/static/partials/view-repo.html', controller: RepoCtrl, reloadOnSearch: false}). - when('/repository/:namespace/:name/tag/:tag', {templateUrl: '/static/partials/view-repo.html', controller: RepoCtrl}). + when('/repository/:namespace/:name', {templateUrl: '/static/partials/view-repo.html', controller: RepoCtrl, + hideFooter: true, reloadOnSearch: false}). + when('/repository/:namespace/:name/tag/:tag', {templateUrl: '/static/partials/view-repo.html', controller: RepoCtrl, + hideFooter: true}). when('/repository/:namespace/:name/image/:image', {templateUrl: '/static/partials/image-view.html', controller: ImageViewCtrl}). when('/repository/:namespace/:name/admin', {templateUrl: '/static/partials/repo-admin.html', controller:RepoAdminCtrl}). when('/repository/', {title: 'Repositories', description: 'Public and private docker repositories list', @@ -1211,6 +1213,8 @@ quayApp.run(['$location', '$rootScope', 'Restangular', 'UserService', '$http', } else { $rootScope.description = 'Hosted private docker repositories. Includes full user management and history. Free for public repositories.'; } + + $rootScope.hideFooter = !!current.$$route.hideFooter; }); var initallyChecked = false; diff --git a/static/js/controllers.js b/static/js/controllers.js index 1f3ec5b39..813b3ee29 100644 --- a/static/js/controllers.js +++ b/static/js/controllers.js @@ -192,6 +192,12 @@ function LandingCtrl($scope, $timeout, $location, Restangular, UserService, KeyS function RepoCtrl($scope, Restangular, $routeParams, $rootScope, $location, $timeout) { $rootScope.title = 'Loading...'; + $scope.$on('$destroy', function() { + if ($scope.tree) { + $scope.tree.dispose(); + } + }); + // Watch for changes to the tag parameter. $scope.$on('$routeUpdate', function(){ $scope.setTag($location.search().tag, false); @@ -308,7 +314,7 @@ function RepoCtrl($scope, Restangular, $routeParams, $rootScope, $location, $tim // Dispose of any existing tree. if ($scope.tree) { - $scope.tree.dispose(); + $scope.tree.dispose(); } // Create the new tree. diff --git a/static/partials/guide.html b/static/partials/guide.html index 11dbf1707..4a49eade8 100644 --- a/static/partials/guide.html +++ b/static/partials/guide.html @@ -1,4 +1,4 @@ -
+
Warning: Quay requires docker version 0.6.2 or higher to work

User Guide

diff --git a/static/partials/landing.html b/static/partials/landing.html index 7cc547d22..fbde7f520 100644 --- a/static/partials/landing.html +++ b/static/partials/landing.html @@ -147,36 +147,3 @@
- - diff --git a/static/partials/organizations.html b/static/partials/organizations.html index b6ff064cc..1d9c2a96d 100644 --- a/static/partials/organizations.html +++ b/static/partials/organizations.html @@ -1,4 +1,4 @@ -
+
diff --git a/static/partials/plans.html b/static/partials/plans.html index 40eee101f..178169b79 100644 --- a/static/partials/plans.html +++ b/static/partials/plans.html @@ -1,4 +1,4 @@ -
+
Plans & Pricing
diff --git a/static/partials/view-repo.html b/static/partials/view-repo.html index f6fca33c2..841338da7 100644 --- a/static/partials/view-repo.html +++ b/static/partials/view-repo.html @@ -67,7 +67,7 @@
-
+
diff --git a/templates/base.html b/templates/base.html index 1f4bbd8a0..d0831634a 100644 --- a/templates/base.html +++ b/templates/base.html @@ -40,6 +40,7 @@ + @@ -64,7 +65,6 @@ - - - +
+ - {% block body_content %} + {% block body_content %} - {% endblock %} + {% endblock %} + +
+
+ + + diff --git a/templates/index.html b/templates/index.html index 6d9f26bc4..bec4081c8 100644 --- a/templates/index.html +++ b/templates/index.html @@ -22,7 +22,6 @@ - @@ -33,6 +32,9 @@ {% endblock %} {% block body_content %} + + +