From 244e32cbfb72dd474b73d7fd303d2d4de13fa6b1 Mon Sep 17 00:00:00 2001 From: Heikki Hokkanen Date: Sat, 4 Aug 2007 20:46:28 +0300 Subject: [PATCH] Added tab-style navigation bar to all pages. --- statgit | 35 ++++++++++++++++++++++------------- statgit.css | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 13 deletions(-) diff --git a/statgit b/statgit index d3e28c8..ed42322 100755 --- a/statgit +++ b/statgit @@ -221,6 +221,8 @@ class HTMLReportCreator(ReportCreator): f.write('

StatGit

') + self.printNav(f) + f.write('
'); f.write('
Generated
%s
' % datetime.datetime.now().strftime(format)); f.write('
Report Period
%s to %s
' % (data.getFirstCommitDate().strftime(format), data.getLastCommitDate().strftime(format))) @@ -230,20 +232,13 @@ class HTMLReportCreator(ReportCreator): f.write('
Authors
%s
' % data.getTotalAuthors()) f.write('
'); - f.write(""" -""") - f.write('

Tags

') - f.write('') - f.write('') - for tag in data.getTags(): - f.write('' % tag) - f.write('
NameDateDevelopers
%s
') + #f.write('

Tags

') + #f.write('') + #f.write('') + #for tag in data.getTags(): + # f.write('' % tag) + #f.write('
NameDateDevelopers
%s
') f.write('\n'); f.close() @@ -252,6 +247,7 @@ class HTMLReportCreator(ReportCreator): f = open(path + '/activity.html', 'w') self.printHeader(f) f.write('

Activity

') + self.printNav(f) f.write('

Last 30 days

') @@ -300,6 +296,7 @@ class HTMLReportCreator(ReportCreator): self.printHeader(f) f.write('

Authors

') + self.printNav(f) f.write('\n

List of authors

\n\n') @@ -344,6 +341,18 @@ class HTMLReportCreator(ReportCreator): """) + + def printNav(self, f): + f.write(""" + +""") usage = """ diff --git a/statgit.css b/statgit.css index 9f4d746..a1a004d 100644 --- a/statgit.css +++ b/statgit.css @@ -42,3 +42,36 @@ td { padding-right: 0.5em; } +.nav { + border-bottom: 1px solid black; + padding: 0.3em; +} + +.nav ul { + list-style-type: none; + display: inline; + margin: none; +} + +.nav li { + display: inline; +} + +.nav li a { + background-color: white; + padding: 0.3em; + text-decoration: none; + color: black; + border: 1px solid black; + margin: 0.5em; +} + +.nav:hover li a { + background-color: #ddd; +} + +.nav li a:hover { + background-color: #ddd; + border-bottom: 1px solid #cc9; +} + -- 2.11.4.GIT