changeset 4736:72bf89475004

styling: don't loop on loading kallithea-logo.png after kallithea-logo.svg failed Bad configuration of static files or static_files=false could make the page loop when trying to apply the svg/png fallback. Instead, let the error handler remove itself when it is used the first time.
author Mads Kiilerich <madski@unity3d.com>
date Tue, 06 Jan 2015 00:54:36 +0100
parents a12aef38b8b0
children 939e797c13c4
files kallithea/templates/base/base.html kallithea/templates/login.html kallithea/templates/password_reset.html kallithea/templates/register.html
diffstat 4 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/templates/base/base.html	Tue Jan 06 00:54:36 2015 +0100
+++ b/kallithea/templates/base/base.html	Tue Jan 06 00:54:36 2015 +0100
@@ -7,7 +7,7 @@
         <div id="logo">
           <a href="${h.url('home')}" style="display: block;">
             <div class="header">
-                <img src="${h.url('/images/kallithea-logo.svg')}" onerror="this.src='${h.url('/images/kallithea-logo.png')}'" alt="Kallithea"/>
+                <img src="${h.url('/images/kallithea-logo.svg')}" onerror="this.onerror='';this.src='${h.url('/images/kallithea-logo.png')}'" alt="Kallithea"/>
             </div>
             %if c.site_name:
              <div class="branding">${c.site_name}</div>
--- a/kallithea/templates/login.html	Tue Jan 06 00:54:36 2015 +0100
+++ b/kallithea/templates/login.html	Tue Jan 06 00:54:36 2015 +0100
@@ -14,7 +14,7 @@
         <div id="logo">
           <a href="${h.url('home')}" style="display: block;">
             <div class="header">
-                <img src="${h.url('/images/kallithea-logo.svg')}" onerror="this.src='${h.url('/images/kallithea-logo.png')}'" alt="Kallithea"/>
+                <img src="${h.url('/images/kallithea-logo.svg')}" onerror="this.onerror='';this.src='${h.url('/images/kallithea-logo.png')}'" alt="Kallithea"/>
             </div>
             %if c.site_name:
              <div class="branding">${c.site_name}</div>
--- a/kallithea/templates/password_reset.html	Tue Jan 06 00:54:36 2015 +0100
+++ b/kallithea/templates/password_reset.html	Tue Jan 06 00:54:36 2015 +0100
@@ -14,7 +14,7 @@
         <div id="logo">
           <a href="${h.url('home')}" style="display: block;">
             <div class="header">
-                <img src="${h.url('/images/kallithea-logo.svg')}" onerror="this.src='${h.url('/images/kallithea-logo.png')}'" alt="Kallithea"/>
+                <img src="${h.url('/images/kallithea-logo.svg')}" onerror="this.onerror='';this.src='${h.url('/images/kallithea-logo.png')}'" alt="Kallithea"/>
             </div>
             %if c.site_name:
              <div class="branding">${c.site_name}</div>
--- a/kallithea/templates/register.html	Tue Jan 06 00:54:36 2015 +0100
+++ b/kallithea/templates/register.html	Tue Jan 06 00:54:36 2015 +0100
@@ -12,7 +12,7 @@
         <div id="logo">
           <a href="${h.url('home')}" style="display: block;">
             <div class="header">
-                <img src="${h.url('/images/kallithea-logo.svg')}" onerror="this.src='${h.url('/images/kallithea-logo.png')}'" alt="Kallithea"/>
+                <img src="${h.url('/images/kallithea-logo.svg')}" onerror="this.onerror='';this.src='${h.url('/images/kallithea-logo.png')}'" alt="Kallithea"/>
             </div>
             %if c.site_name:
              <div class="branding">${c.site_name}</div>