Return-Path: X-Original-To: apmail-allura-commits-archive@www.apache.org Delivered-To: apmail-allura-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 263CA18A65 for ; Tue, 15 Dec 2015 12:32:00 +0000 (UTC) Received: (qmail 94099 invoked by uid 500); 15 Dec 2015 12:32:00 -0000 Delivered-To: apmail-allura-commits-archive@allura.apache.org Received: (qmail 94077 invoked by uid 500); 15 Dec 2015 12:32:00 -0000 Mailing-List: contact commits-help@allura.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@allura.apache.org Delivered-To: mailing list commits@allura.apache.org Received: (qmail 93992 invoked by uid 99); 15 Dec 2015 12:32:00 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Dec 2015 12:32:00 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id C3C6BDFDC5; Tue, 15 Dec 2015 12:31:59 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jetmind@apache.org To: commits@allura.apache.org Date: Tue, 15 Dec 2015 12:32:04 -0000 Message-Id: In-Reply-To: <56b2f1183982410d97a929f6c0442df8@git.apache.org> References: <56b2f1183982410d97a929f6c0442df8@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [06/15] allura git commit: ticket:866 updated template with mavbar; updated tests for nav and logo; ticket:866 updated template with mavbar; updated tests for nav and logo; Project: http://git-wip-us.apache.org/repos/asf/allura/repo Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/b3e3b119 Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/b3e3b119 Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/b3e3b119 Branch: refs/heads/ib/5940a Commit: b3e3b119680a32cae35e032fb16daf830aa50000 Parents: 58a993c Author: DeV1doR Authored: Fri Dec 4 02:12:22 2015 +0200 Committer: Igor Bondarenko Committed: Tue Dec 15 13:19:25 2015 +0200 ---------------------------------------------------------------------- Allura/allura/lib/app_globals.py | 8 +-- Allura/allura/nf/allura/css/site_style.css | 9 +-- .../templates/jinja_master/theme_macros.html | 6 +- Allura/allura/tests/functional/test_auth.py | 7 ++- Allura/allura/tests/functional/test_nav.py | 58 +++++++++----------- Allura/development.ini | 2 +- 6 files changed, 43 insertions(+), 47 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/allura/blob/b3e3b119/Allura/allura/lib/app_globals.py ---------------------------------------------------------------------- diff --git a/Allura/allura/lib/app_globals.py b/Allura/allura/lib/app_globals.py index 84ea20e..c532bdd 100644 --- a/Allura/allura/lib/app_globals.py +++ b/Allura/allura/lib/app_globals.py @@ -607,16 +607,16 @@ class Globals(object): @LazyProperty def nav_logo(self): - logo = json.loads(config.get('logo').replace("\'", '"')) + logo = json.loads(config.get('logo')) image_path = logo.get('image_path', False) if not image_path: - return {} + return False allura_path = os.path.dirname(os.path.dirname(__file__)) image_full_path = '%s/public/nf/images/%s' % ( allura_path, image_path) - if not os.path.exists(image_full_path): - return {} + if not os.path.isfile(image_full_path): + return False if not logo.get('redirect_link', False): logo['redirect_url'] = '/' http://git-wip-us.apache.org/repos/asf/allura/blob/b3e3b119/Allura/allura/nf/allura/css/site_style.css ---------------------------------------------------------------------- diff --git a/Allura/allura/nf/allura/css/site_style.css b/Allura/allura/nf/allura/css/site_style.css index 53f3a5b..50bda3b 100644 --- a/Allura/allura/nf/allura/css/site_style.css +++ b/Allura/allura/nf/allura/css/site_style.css @@ -446,7 +446,7 @@ blockquote { color: #555555; } #site-header a:first-child, #site-footer a:first-child { - margin-left: 0; + margin-left: 1em; } /* site header */ @@ -495,15 +495,12 @@ blockquote { } /* nav */ -nav .link-left { +.nav-left, .nav-logo { float: left; } -nav .link-right { +.nav-main { float: right; } -/*.link-right, .link-left { - line-height: 45px; -}*/ /* logo */ .logo { http://git-wip-us.apache.org/repos/asf/allura/blob/b3e3b119/Allura/allura/templates/jinja_master/theme_macros.html ---------------------------------------------------------------------- diff --git a/Allura/allura/templates/jinja_master/theme_macros.html b/Allura/allura/templates/jinja_master/theme_macros.html index 40f03dc..2ca9fd5 100644 --- a/Allura/allura/templates/jinja_master/theme_macros.html +++ b/Allura/allura/templates/jinja_master/theme_macros.html @@ -27,13 +27,17 @@ http://stackoverflow.com/questions/26582731/redefining-imported-jinja-macros {%- macro header(login_url, logout_url) %}