[static-web] add some common links at the top of the page
- From: Olav Vitters <ovitters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [static-web] add some common links at the top of the page
- Date: Fri, 1 Aug 2014 23:45:43 +0000 (UTC)
commit 5fd1574c193f47aefd2da1155205349186ff0ee7
Author: Olav Vitters <olav vitters nl>
Date: Sat Aug 2 01:45:39 2014 +0200
add some common links at the top of the page
wiki.gnome.org/gnome/css/screen.css | 4 ++++
wiki.gnome.org/gnome/gnome.py | 23 +++++------------------
2 files changed, 9 insertions(+), 18 deletions(-)
---
diff --git a/wiki.gnome.org/gnome/css/screen.css b/wiki.gnome.org/gnome/css/screen.css
index 7c507e2..f85c84e 100644
--- a/wiki.gnome.org/gnome/css/screen.css
+++ b/wiki.gnome.org/gnome/css/screen.css
@@ -14,6 +14,10 @@ textarea {
font-family: monospace;
}
+span#pagelocation span.sep {
+ display: inline;
+}
+
span.sep {
display: none;
}
diff --git a/wiki.gnome.org/gnome/gnome.py b/wiki.gnome.org/gnome/gnome.py
index bcb252f..ed84b8e 100644
--- a/wiki.gnome.org/gnome/gnome.py
+++ b/wiki.gnome.org/gnome/gnome.py
@@ -111,24 +111,8 @@ class Theme(ThemeBase):
items.append(item % (cls, link))
found[pagename] = 1
- # Add current page at end
- if not current in found:
- title = d['page'].split_title(request)
- title = self.shortenPagename(title)
- link = d['page'].link_to(request, title)
- link = re.sub(r'(<a.*?>)(.*)(</a>)', r'\1<span>\2</span>\3', link)
- cls = 'selected'
- items.append(item % (cls, link))
-
# Assemble html
- items = u''.join(items)
- html = u'''
-<div id="tabs">
- <ul id="portal-globalnav">
-%s
- </ul>
-</div> <!-- end of #tabs -->
-''' % items
+ html = u''.join(items)
return html
@@ -143,6 +127,9 @@ class Theme(ThemeBase):
"""
_ = self.request.getText
+ html_title = self.title_with_separators(d)
+ html_tabs = self.tabs(d)
+
html = [
u'''
<div id="container">
@@ -151,7 +138,7 @@ class Theme(ThemeBase):
<div id="global_domain_bar">
<div id="header_tabs">
<div id="user_tab" class="tab">''',
- self.username(d),
+ self.username(d).replace('<li>', '<li>%s</li>%s<li>' % (html_title, html_tabs), 1),
u'''
</div>
<div id="site_tab" class="tab">
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]