Commit 630a9d16 authored by Jan Čermák's avatar Jan Čermák

added logos in SVG with PNG fallback (using JS), language-aware Foris logos

parent 178364ed
......@@ -62,7 +62,7 @@ bottle.SimpleTemplate.defaults["user_authenticated"] =\
lambda: bottle.request.environ["beaker.session"].get("user_authenticated")
bottle.SimpleTemplate.defaults["request"] = bottle.request
bottle.SimpleTemplate.defaults["url"] = lambda name, **kwargs: reverse(name, **kwargs)
bottle.SimpleTemplate.defaults["static"] = lambda filename, *args: reverse("static", filename=filename) % args
bottle.SimpleTemplate.defaults["static"] = lambda filename, *args: reverse("static", filename=filename.replace("%LANG%", bottle.request.app.lang)) % args
# messages
messages.set_template_defaults(bottle.SimpleTemplate)
......
......@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Foris 0.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-09-25 17:38+0200\n"
"POT-Creation-Date: 2014-10-09 14:18+0200\n"
"PO-Revision-Date: 2014-02-05 13:55+0100\n"
"Last-Translator: Jan Cermak <jan.cermak@nic.cz>\n"
"Language-Team: Czech <>\n"
......@@ -571,6 +571,9 @@ msgstr "Zahodit změny"
msgid "Save changes"
msgstr "Uložit změny"
msgid "Foris - administration interface of router Turris"
msgstr "Foris - administrační rozhraní routeru Turris"
msgid "Menu"
msgstr "Menu"
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
static/img/logo-turris.png

2.28 KB | W: | H:

static/img/logo-turris.png

1.15 KB | W: | H:

static/img/logo-turris.png
static/img/logo-turris.png
static/img/logo-turris.png
static/img/logo-turris.png
  • 2-up
  • Swipe
  • Onion skin
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 882 150" enable-background="new 0 0 882 150" xml:space="preserve">
<g>
<path d="M101.7,128.8c0-8.4-6.8-15.2-15.2-15.2c-8.4,0-15.2,6.8-15.2,15.2S78.2,144,86.5,144C94.9,144,101.7,137.2,101.7,128.8z"/>
<polygon points="97.5,118.4 53.1,59.8 14.9,93.9 79.1,142 "/>
<path fill="#CD232D" d="M77.1,70.1c-15.1,15.1-39.6,15.1-54.7,0C7.3,55,7.3,30.4,22.4,15.3C37.5,0.2,62,0.2,77.1,15.3
C92.2,30.4,92.2,55,77.1,70.1z"/>
<path fill="#CD232D" d="M49.9,55.9C60,66,60,82.3,49.9,92.4c-10.1,10.1-26.4,10.1-36.4,0C3.4,82.3,3.4,66,13.5,55.9
C23.6,45.9,39.9,45.9,49.9,55.9z"/>
<polygon fill="#CD232D" points="11.1,40.7 5.9,72.1 49,93.1 77.1,70.1 "/>
<g>
<path d="M175.9,58.1c0,2.7-0.5,5-1.5,7.1c-1,2.1-2.3,3.8-4,5.1c-1.7,1.4-3.6,2.4-5.8,3.1s-4.6,1.1-7.1,1.1h-16.3v31h-2V42.4h17.1
c2.3,0,4.6,0.3,6.9,0.8c2.3,0.5,4.4,1.4,6.3,2.5c1.9,1.2,3.4,2.8,4.6,4.8C175.3,52.5,175.9,55,175.9,58.1z M174,58.1
c0-2.7-0.5-4.9-1.5-6.7c-1-1.8-2.3-3.2-3.9-4.3c-1.6-1.1-3.4-1.8-5.4-2.3c-2-0.5-4-0.7-5.9-0.7h-16v28.7h16.4c2,0,3.9-0.3,5.9-0.8
c2-0.5,3.7-1.4,5.3-2.6c1.5-1.2,2.8-2.7,3.7-4.6C173.5,62.9,174,60.7,174,58.1z"/>
<path d="M226.2,105.5l-19.1-31.9h-14.8v31.9h-2V42.4h17.5c2.3,0,4.7,0.2,7,0.6c2.4,0.4,4.5,1.2,6.4,2.4c1.9,1.2,3.4,2.8,4.6,4.8
c1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,303.2,73.9z"/>
<path d="M338.1,102.1c-2.7,3.4-6.7,5-12.1,5c-3.7,0-6.9-1-9.5-2.9c-2.6-1.9-4.4-4.3-5.4-7l1.7-0.8c1.2,2.7,2.9,4.8,5.3,6.5
c2.3,1.6,5,2.5,8,2.5c2.6,0,4.7-0.4,6.5-1.3s3.2-2.1,4.4-3.6c1.1-1.5,2-3.4,2.5-5.5c0.5-2.1,0.8-4.4,0.8-6.9V42.4h2v45.9
C342.1,94.1,340.8,98.7,338.1,102.1z"/>
<path d="M360.7,105.5V42.4h36.8v1.8h-34.9v27.7h32.8v1.8h-32.8v30.1H399v1.8H360.7z"/>
<path d="M455,105c-4.1,1.6-8.2,2.4-12.4,2.4c-4.8,0-9.1-0.8-13-2.5c-3.9-1.7-7.3-4-10.2-6.9c-2.9-2.9-5.1-6.5-6.6-10.6
c-1.6-4.1-2.4-8.6-2.4-13.4c0-4.8,0.8-9.3,2.4-13.4c1.6-4.1,3.8-7.6,6.6-10.6c2.9-2.9,6.3-5.2,10.2-6.9c4-1.7,8.3-2.5,13-2.5
c3.9,0,7.7,0.7,11.5,2c3.7,1.3,6.9,3.4,9.5,6.1l-1.2,1.4c-1.2-1.3-2.7-2.5-4.2-3.4c-1.6-1-3.2-1.8-5-2.5c-1.8-0.7-3.5-1.1-5.3-1.4
c-1.8-0.3-3.5-0.4-5.2-0.4c-4.5,0-8.6,0.8-12.4,2.5c-3.7,1.6-6.9,3.9-9.5,6.7c-2.6,2.9-4.7,6.2-6.2,10c-1.5,3.8-2.2,8-2.2,12.4
c0,4.4,0.7,8.5,2.1,12.4c1.4,3.8,3.5,7.2,6.1,10c2.6,2.9,5.8,5.1,9.5,6.7c3.7,1.6,7.9,2.5,12.4,2.5c3.9,0,7.8-0.8,11.6-2.3
c3.8-1.5,7-3.8,9.5-6.8l1.4,1.3C462.4,101,459,103.4,455,105z"/>
<path d="M493,44.1v61.4h-2V44.1h-21.5v-1.8h45v1.8H493z"/>
<path d="M594.3,55.4v50.1H579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.3-4.5,5.6-6.2c2.3-1.6,4.9-2.8,7.9-3.5c2.9-0.7,5.9-1.1,8.8-1.1c3.6,0,7.2,0.7,10.9,2c3.7,1.3,7,3.2,9.8,5.8L865,58.8z
"/>
</g>
<path fill="#CD232D" d="M545,58c0,3.7-3,6.7-6.7,6.7c-3.7,0-6.6-3-6.6-6.7c0-3.7,3-6.7,6.6-6.7C542,51.3,545,54.3,545,58z"/>
<path fill="#CD232D" d="M545,90.1c0,3.7-3,6.7-6.7,6.7c-3.7,0-6.6-3-6.6-6.7c0-3.7,3-6.7,6.6-6.7C542,83.4,545,86.4,545,90.1z"/>
</g>
</svg>
......@@ -41,6 +41,7 @@ Foris.initialize = function () {
Foris.initLanChangeDetection();
Foris.initClickableHints();
Foris.initSmoothScrolling();
Foris.applySVGFallback();
};
Foris.initParsley = function () {
......@@ -121,6 +122,18 @@ Foris.initSmoothScrolling = function () {
});
};
Foris.applySVGFallback = function() {
if (!document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image", "1.1")) {
$("img[src$='.svg']").attr("src", function() {
var src = this.src.split('.');
var ext = src.pop();
if (ext != "svg") return;
src.push("png");
this.src = src.join(".");
});
}
};
Foris.updateForm = function (form) {
var serialized = form.serializeArray();
var idSelector = form.attr("id") ? " #" + form.attr("id") : "";
......
......@@ -18,10 +18,10 @@
%rebase("_layout.tpl", **locals())
<div id="header">
<div class="sidebar-content">
<a href="{{ url("config_index") }}"><img src="{{ static("img/logo-side.png") }}" alt="Foris - administrační rozhraní routeru Turris" class="header-side"></a>
<a href="{{ url("config_index") }}"><img src="{{ static("img/logo-side-%LANG%.svg") }}" alt="{{ trans("Foris - administration interface of router Turris") }}" class="header-side" width="180"></a>
<div class="header-top">
<a href="#menu" class="menu-link"><img src="{{ static("img/icon-menu.png") }}" alt="{{ trans("Menu") }}" title="{{ trans("Menu") }}"></a>
<a href="{{ url("config_index") }}"><img src="{{ static("img/logo-top.png") }}" alt="Foris - administrační rozhraní routeru Turris"></a>
<a href="{{ url("config_index") }}"><img src="{{ static("img/logo-top-%LANG%.svg") }}" alt="{{ trans("Foris - administration interface of router Turris") }}" width="240"></a>
</div>
</div>
</div>
......@@ -57,7 +57,7 @@
<div class="sidebar-cleaner"></div>
<div id="footer">
<div class="sidebar-content">
<img src="{{ static("img/logo-turris-small.png") }}" alt="{{ trans("Project:Turris") }}">
<img src="{{ static("img/logo-turris.svg") }}" alt="{{ trans("Project:Turris") }}" width="178">
</div>
</div>
%end
\ No newline at end of file
......@@ -22,7 +22,7 @@
| <a href="{{ url("change_lang", lang="en", backlink=request.fullpath) }}">ENG</a>
</div>
<h1><img src="{{ static("img/logo-turris.png") }}" alt="{{ trans("Project:Turris") }}"></h1>
<h1><img src="{{ static("img/logo-turris.svg") }}" alt="{{ trans("Project:Turris") }}" width="295"></h1>
%include("_messages")
......
......@@ -15,7 +15,7 @@
%# along with this program. If not, see <http://www.gnu.org/licenses/>.
%#
<div id="wizard-header">
<img src="{{ static("/img/logo-turris.png") }}" alt="{{ trans("Project:Turris") }}">
<img src="{{ static("/img/logo-turris.svg") }}" alt="{{ trans("Project:Turris") }}" width="295">
<div class="wizard-steps">
%if can_skip_wizard:
<a href="{{ url("wizard_skip") }}">{{ trans("Skip wizard") }}</a>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment