[Rt-commit] rt branch, 4.0/custom-logo-in-mobile, updated. rt-4.0.0-184-g6c55764

Thomas Sibley trs at bestpractical.com
Thu May 5 13:12:15 EDT 2011


The branch, 4.0/custom-logo-in-mobile has been updated
       via  6c55764aa4d16ac33292f8fe16fc1e471c14d721 (commit)
      from  38eee08a1da52a18a254bb1d96e15f581bac6bbe (commit)

Summary of changes:
 share/html/Elements/Logo         |    7 +++++++
 share/html/m/_elements/footer    |    1 +
 share/html/m/_elements/header    |    1 -
 share/html/m/_elements/raw_style |   22 +++++++++++++++-------
 4 files changed, 23 insertions(+), 8 deletions(-)

- Log -----------------------------------------------------------------
commit 6c55764aa4d16ac33292f8fe16fc1e471c14d721
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Thu May 5 13:03:38 2011 -0400

    Move the custom logo to the bottom to accomodate small screens
    
    This adds an OnlyCustom option to /Elements/Logo so it only displays a
    logo if the admin has customized it (otherwise, we'd display the BPS
    logo twice).

diff --git a/share/html/Elements/Logo b/share/html/Elements/Logo
index 3a7475b..2fbb9ec 100644
--- a/share/html/Elements/Logo
+++ b/share/html/Elements/Logo
@@ -78,9 +78,16 @@ if ($user_logo) {
            and defined $content->{'data'};
 }
 
+if ($OnlyCustom
+    and not $user_logo
+    and ($ARGS{LogoURL}||RT->Config->Get('LogoURL')) =~ /bpslogo\.png$/)
+{
+    return;
+}
 </%INIT>
 <%ARGS>
 $ShowName => 1
+$OnlyCustom => 0
 $Name => undef
 $id => 'logo'
 </%ARGS>
diff --git a/share/html/m/_elements/footer b/share/html/m/_elements/footer
index 44b7253..47a2f95 100644
--- a/share/html/m/_elements/footer
+++ b/share/html/m/_elements/footer
@@ -1,3 +1,4 @@
+  <& /Elements/Logo, ShowName => 1, OnlyCustom => 1 &>
   <div id="bpscredits">
     <div id="copyright">
 <&|/l,     '', '', '2011', '<a href="http://www.bestpractical.com?rt='.$RT::VERSION.'">Best Practical Solutions, LLC</a>', &>[_1] RT [_2] Copyright 1996-[_3] [_4].</&>
diff --git a/share/html/m/_elements/header b/share/html/m/_elements/header
index 2b06d39..f8fb728 100644
--- a/share/html/m/_elements/header
+++ b/share/html/m/_elements/header
@@ -67,7 +67,6 @@ $r->headers_out->{'Cache-control'} = 'no-cache';
 <a href="<%RT->Config->Get('WebPath')%>/m/"><&|/l&>Homepage</&></a>
 </div>
 % }
-<& /Elements/Logo, ShowName => 0 &>
 % if ($title) {
 <h1><%$title%></h1>
 % }
diff --git a/share/html/m/_elements/raw_style b/share/html/m/_elements/raw_style
index fdbda09..73507ff 100644
--- a/share/html/m/_elements/raw_style
+++ b/share/html/m/_elements/raw_style
@@ -127,7 +127,7 @@ ul.menu li#active a
     color: #800000;
 }
 
-div.titlebox, #bpscredits, .ticket_menu{
+div.titlebox, #bpscredits, #logo, .ticket_menu{
     -moz-border-radius: 1em;
     -webkit-border-radius: 1em;
     margin: 0.5em;
@@ -354,6 +354,7 @@ div#login-box input[type=text], div#login-box input[type=password] {
 
 #bpscredits {
     float: right;
+    clear: right;
     text-align: right;
     width: auto;
     font-size: 0.8em;
@@ -408,17 +409,24 @@ form {
 }
 
 #logo {
-    position: absolute;
-    right: 5em;
-    top: 0;
-    height: 1.9em;
+    float: right;
+    clear: right;
+    text-align: center;
+    padding: 1em;
+    padding-bottom: 0.5em;
+    margin: 0.25em 0.5em 0.25em 0.25em;
+}
+
+#logo .rtname {
+    display: block;
+    font-size: 0.9em;
 }
 
 #logo a img {
     border: 0;
-    height: 100% !important;
+    height: 2em;
     width: auto !important;
-    float: right;
+    padding-bottom: 0.5em;
 }
 
 div.txn-content {

-----------------------------------------------------------------------


More information about the Rt-commit mailing list