From 73cbf10ce34e3a6a998ff645f05f38b9fef429ac Mon Sep 17 00:00:00 2001 From: "Rob G. Healey" Date: Tue, 6 Oct 2009 08:20:21 +0000 Subject: [PATCH] Fixed some items in Web_Visually.css. Added Download, EventsList, EventDetail, and Repository sections to Ash. Removed the things that I was trying to do with the Horizontal or Vertical placement of the alphabet navigation. Getting to be too big for me at this point. I feel like a little guppie out in the ocean. svn: r13311 --- src/data/Web_Alphabet-Horizontal.css | 84 ------ src/data/Web_Alphabet-Vertical.css | 81 ------ src/data/Web_Basic-Ash.css | 393 ++++++++++++++++---------- src/data/Web_Visually.css | 119 ++++---- src/plugins/webreport/NarrativeWeb.py | 179 ++++-------- 5 files changed, 356 insertions(+), 500 deletions(-) delete mode 100644 src/data/Web_Alphabet-Horizontal.css delete mode 100644 src/data/Web_Alphabet-Vertical.css diff --git a/src/data/Web_Alphabet-Horizontal.css b/src/data/Web_Alphabet-Horizontal.css deleted file mode 100644 index 93abf23c3..000000000 --- a/src/data/Web_Alphabet-Horizontal.css +++ /dev/null @@ -1,84 +0,0 @@ -/* - ************************************************************************************************** -Copyright Holder and License -************************************************************************************************** -GRAMPS Cascading Style Sheet -Style Name: Web_Alphabet-Horizontal.css -************************************************************************************************** -This website was created with GRAMPS -http://www.gramps-project.org --------------------------------------------------------------------------------------------------- -GRAMPS is a Free Software Project for Genealogy, offering a professional genealogy program, -and a wiki open to all. It is a community project, created, developed and governed by genealogists. - -Go to http://gramps-project.org to learn more! - --------------------------------------------------------------------------------------------------- -Copyright (C) 2009 Rob G. Healey - -This file is part of the GRAMPS program. - -GRAMPS is free software: you can redistribute it and/or modify it under the terms of the GNU General -Public License as published by the Free Software Foundation, version 2 of the License. - -GRAMPS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; -without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with GRAMPS. If not, -see . --------------------------------------------------------------------------------------------------- -# $Id: $ - - Header ------------------------------------------------------ */ -div#header { - position: fixed; - top: 0px; - left: 0px; - overflow: auto; - width: 100%; - margin: 0; -} - -/* NarrativeWeb Navigation ---------------------------------------------------------------------------------------- */ -body#NarrativeWeb div#navigation { - position: fixed; - left: 0px; - width: 100%; -} - -/* Alphabet Navigation ------------------------------------------------------ */ -div#alphabet { - position: fixed; - top: 130px; - left: 0px; - width: 100%; - margin: 0; -} -div#alphabet ul { - list-style:none; - min-width:770px; - height:24px; - margin:0; - padding: 0px 0px 0px 16px; - border-width: 2px 0px 4px 0px; - border-style: solid; -} -div#alphabet ul li:after { - content:" |"; -} -div#alphabet ul li { - margin:0; - float:left; -} -div#alphabet ul li a { - display:block; - padding: 4px 8px 4px 8px; - float:left; - font:bold 16px/100% sans; - margin:0; - text-decoration:none; -} diff --git a/src/data/Web_Alphabet-Vertical.css b/src/data/Web_Alphabet-Vertical.css deleted file mode 100644 index db62d863f..000000000 --- a/src/data/Web_Alphabet-Vertical.css +++ /dev/null @@ -1,81 +0,0 @@ -/* - ************************************************************************************************** -Copyright Holder and License -************************************************************************************************** -GRAMPS Cascading Style Sheet -Style Name: Web_Alphabet-Vertical.css -************************************************************************************************** -This website was created with GRAMPS -http://www.gramps-project.org --------------------------------------------------------------------------------------------------- -GRAMPS is a Free Software Project for Genealogy, offering a professional genealogy program, -and a wiki open to all. It is a community project, created, developed and governed by genealogists. - -Go to http://gramps-project.org to learn more! - --------------------------------------------------------------------------------------------------- -Copyright (C) 2009 Rob G. Healey - -This file is part of the GRAMPS program. - -GRAMPS is free software: you can redistribute it and/or modify it under the terms of the GNU General -Public License as published by the Free Software Foundation, version 2 of the License. - -GRAMPS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; -without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with GRAMPS. If not, -see . --------------------------------------------------------------------------------------------------- -# $Id: $ - - Header ------------------------------------------------------ */ -#header { - position: fixed; - top: 0px; - left: 0px; - overflow: auto; - width: 100%; -} - -/* Alphabet Navigation ------------------------------------------------------ */ -div#alphabet { - position: fixed; - left: 4px; - width: 40px; - height: 326px; - overflow-x: auto; - border-width: 2px 4px 2px 4px; - border-style: solid; -} -div#alphabet ul { - display: inline; - list-style: none; - padding: 0px 9px 0px 9px; - margin: 0; -} -div#alphabet ul li { - font: bold 14px/100% sans; - padding: 10px 10px 10px 0px; - margin:0; - float: left; - border-width: 0px 0px 2px 0px; - border-style: solid; -} -div#alphabet ul li:first-child { - border-top: 0; -} -div#alphabet ul li:last-child { - border-bottom: 0; -} -div#alphabet ul li a { - text-decoration: none; - display: block; - padding: 10px 0px 6px 10px; -} -div#alphabet ul li a:hover { - background-color: #C1B398; -} diff --git a/src/data/Web_Basic-Ash.css b/src/data/Web_Basic-Ash.css index 7758de179..18b5ceb9a 100644 --- a/src/data/Web_Basic-Ash.css +++ b/src/data/Web_Basic-Ash.css @@ -45,19 +45,19 @@ gray very light #EEE white #FFF -------------------------------------------------------------------------------------------------- -# $Id$ +# $Id $ NarrativeWeb Styles ---------------------------------------------------------------------------------------------- */ -body#NarrativeWeb { - padding-top: 90px; +------------------------------------------------------------------------------------------------ */ + +/* General Elements +----------------------------------------------------- */ +body { font-family:sans-serif; color:#000; + margin:0; background-color:#FFF; } - -/* General Elements ------------------------------------------------------ */ div { margin:0; padding:0; @@ -70,6 +70,7 @@ img { background:none; } .content { + padding-top: 1cm; background-color:#FFF; } .content div.snapshot { @@ -160,45 +161,82 @@ a:visited { /* Header ----------------------------------------------------- */ -#header { +div#header { + padding:15px 15px 2px 15px; + margin:0; background-color:#EEE; } #SiteTitle { - margin:0; - padding:.5em 0 0.5em 10px; - font-size: 40px; - color: #FFF; - font-style: italic; + color:#333; + margin:0 0 3px 0; } -#header p { +div#header p { font-size:1em; font-weight:bold; color:#999; margin:0; } -/* Alphabet Navigation bar +/* Footer ----------------------------------------------------- */ -#alphabet { - position: fixed; - top: 136px; - background-color: #EEE; - border-color: #000; +div#footer { + height: 60px; + clear:both; + width:100%; + font-size:12px; + line-height:130%; + color:#333; + margin:0; + padding:15px 0 0 0; + background-color:#CCC; + border-top:solid 1px #333; +} +div#footer a, div#footer a:visited { + text-decoration:none; + color:#333; +} +div#footer a:hover { + text-decoration:underline; +} +div#footer img { + border:0; + margin:0 auto; + vertical-align:middle; +} +div#footer p#createdate { + float:left; + width:40%; + text-align:left; + margin-left:10px; +} +div#footer p#copyright { + float:right; + width:40%; + text-align:right; + margin-right:10px; +} +div#footer p#copyright img { + margin-right:10px; +} +#user_footer { + width:70%; + float:left; + margin:1em; +} +#user_footer p { + font:normal 1em/1.2em serif; + margin:0; + padding:0; } /* Navigation ----------------------------------------------------- */ -#navigation, #subnavigation { +div#navigation, div#subnavigation { margin:0; padding:4px 0 0 0; background-color:#EEE; } -body#NarrativeWeb #navigation { - position: fixed; - top: 104px; - left: 0px; -} -#navigation ul, #subnavigation ul { +div#navigation ul, div#subnavigation ul { list-style:none; min-width:770px; height:22px; @@ -206,12 +244,12 @@ body#NarrativeWeb #navigation { padding:0 0 0 12px; border-bottom:1px solid #999; } -#navigation ul li, #subnavigation ul li { +div#navigation ul li, div#subnavigation ul li { margin:0; padding:0; float:left; } -#navigation ul li a, #subnavigation ul li a { +div#navigation ul li a, div#subnavigation ul li a { display:block; font-size:12px; line-height:100%; @@ -221,11 +259,11 @@ body#NarrativeWeb #navigation { padding:5px 5px; background-color:#EEE; } -#navigation ul li a:hover, #subnavigation ul li a:hover { +div#navigation ul li a:hover, div#subnavigation ul li a:hover { background-color:#CCC; border-bottom:solid 1px #000; } -#navigation ul li.CurrentSection a, #subnavigation ul li.CurrentSection a { +div#navigation ul li.CurrentSection a, div#subnavigation ul li.CurrentSection a { padding-bottom:4px; border-top:solid 1px #999; border-right:solid 1px #999; @@ -233,14 +271,51 @@ body#NarrativeWeb #navigation { border-bottom:solid 1px #FFF; background-color:#FFF; } -#navigation ul li.CurrentSection a:hover { +div#navigation ul li.CurrentSection a:hover { background-color:#FFF; - border-bottom: solid 1px #000; } -#subnavigation ul li.CurrentSection a { +div#subnavigation ul li.CurrentSection a { border-width:0 0 1px 0; } +/* Alphabet Navigation Bar +----------------------------------------------------- */ +div#alphabet { + width: 100%; + margin: 0; + background-color: #EEE; +} +div#alphabet ul { + list-style:none; + min-width:770px; + height:24px; + margin:0; + padding: 0px 0px 0px 16px; + border-width: 2px 0px 4px 0px; + border-style: solid; + border-color: #000; +} +div#alphabet ul li:after { + content:" |"; +} +div#alphabet ul li { + margin:0; + float:left; +} +div#alphabet ul li a { + display:block; + padding: 4px 8px 4px 8px; + float:left; + font:bold 16px/100% sans; + margin:0; + text-decoration:none; + color: #000; +} +div#alphabet ul li a:hover { + background-color: #000; + color: #FFF; +} + /* Main Table ----------------------------------------------------- */ table { @@ -411,23 +486,10 @@ table.individuallist tbody tr td.ColumnName a { table.individuallist tbody tr td.ColumnName a:hover { background-color:#CCC; } -#Individuals div table.infolist tr td p { +#IndividualDetail div table.infolist tr td, #Individuals div table.infolist tr td p { vertical-align:top; } -#Individuals div table.infolist tr td p a { - display:inline; -} - -/* IndividualDetail ------------------------------------------------------- */ -#IndividualDetail { - background-color:#EEE; -} -#IndividualDetail div table.infolist tr td { - font:normal .9em/1.2em sans-serif; - vertical-align:top; -} -#IndividualDetail div table.infolist tr td a { +#IndividualDetail div table.infolist tr td a, #Individuals div table.infolist tr td p a { display:inline; } #IndividualDetail table.infolist tr td a:hover { @@ -435,10 +497,8 @@ table.individuallist tbody tr td.ColumnName a:hover { } #IndividualDetail table.infolist tbody tr td.ColumnAttribute { width:10%; - color:#696969; -} -#IndividualDetail div.subsection table tr td:first-child { - padding-left:20px; + color:#999; + padding-left:5px; } /* Sources @@ -465,6 +525,72 @@ table.individuallist tbody tr td.ColumnName a:hover { padding:.1em 10px .3em 10px; } +/* EventList and EventDetail +----------------------------------------------------- */ + +div#EventList, div#EventDetail { } + +div#events table.eventlist { + margin-top: .3cm; +} +table.eventlist tbody tr.BeginName { + border-bottom: solid 1px #000; +} +table.eventlist tbody tr td { + background-color: #CCC; + padding: 4px 0px 4px 0px; + border-bottom: dashed 1px #000; +} +table.eventlist tbody tr td.ColumnEvent { + background-color: #FFF; + width: 20%; +} +table.eventlist tbody tr td.ColumnDate { + width: 16%; +} +table.eventlist tbody tr td.ColumnPlace { + background-color: #FFF; + width: 35%; +} +table.eventlist tbody tr td.ColumnSources { + background-color: #FFF; + width: 12%; +} +table.eventlist tbody tr td.ColumnNotes { + width: 25%; +} +table.eventlist tbody tr td.ColumnPerson { + background-color: #FFF; + width: 35%; +} +table.eventlist tbody tr td.ColumnPartner { + background-color: #FFF; + width: 35%; +} +div#EventList table.eventlist tbody tr td.ColumnEvent a, +div#EventList table.eventlist tbody tr td.ColumnPerson a, +div#EventList table.eventlist tbody tr td.ColumnPartner a { + display: block; + padding: .9em 10px; +} +div#EventDetail h3 { + font-size: xxx-large; +} +div#EventDetail table.eventlist { + margin: .5cm 0 .3cm 1.5cm; + width: 800px; +} +div#EventDetail table.eventlist tbody tr td.ColumnAttribute { + border-top: solid 1px #000; + font-weight: bold; + text-transform: uppercase; + width: 20%; +} +div#EventDetail table.eventlist tbody tr td.ColumnEvent { + background-color: #000; + border-top: solid 1px #000; +} + /* Gallery ----------------------------------------------------- */ #Gallery table.infolist tbody tr td.ColumnRowLabel, #Gallery table.infolist tbody tr td.ColumnDate { @@ -542,6 +668,53 @@ table.individuallist tbody tr td.ColumnName a:hover { border-color:#CCC; } +/* Download +----------------------------------------------------- */ + +#Download { + margin: 0; + padding: .5em 0 .5em 0; +} +table.download { + padding: 0; + margin: .5em 0 .5em 0; + border: solid 1px #000; + width: 100%; + nackground-color: #CCC; +} +table.download img { + float:center; +} +table.download tbody tr#Row02 { + border-bottom:solid 1px #000; +} +table.download tbody tr td { + border-style:solid; + border-color: #000; + border-width: 0px 2px 2px 2px; + text-align:left; +} +table.download td.ColumnFilename { + width:30%; + background-color: #FFF; +} +table.download td.ColumnFilename a { + display:block; + padding:10px; + font-weight:bold; + font-style: italic; + text-decoration:none; +} +table.download td.ColumnDescription { + width:45%; +} +table.download td.ColumnLicense { + width:6%; +} +table.download td.ColumnModified { + width:17%; +} + /* Contact ----------------------------------------------------- */ #Contact #summaryarea { @@ -587,61 +760,30 @@ table.individuallist tbody tr td.ColumnName a:hover { text-decoration:underline; } -/* Download ------------------------------------------------------ */ -#Download { - padding:1cm; - height:396px; +/* Repositories +------------------------------------------------------ */ +div#RepositoryList { } + +div#RepositoryList table.repolist tbody tr td { + background-color: #CCC; } -table.download { - border:solid 2px #000; - width:100%; +div#RepositoryList table.repolist tbody tr td a { + display: block; + padding: .3em 10px; } -table.download img { - float:center; +div#RepositoryList table.repolist tbody tr td.ColumnRowLabel { + width: 9%; } -table.download thead tr th { - text-align:center; - border:solid 2px #000; - color: #000; - text-transform:uppercase; +div#RepositoryList table.repolist tbody tr td.ColumnType { + width: 15%; } -table.download tbody tr#Row02 { - border-bottom:solid 2px #000; -} -table.download thead tr th, table.download tbody tr td { - padding-left:10px; - padding-top:20px; - border-style:solid; - border-color:#000; - border-width:0 2px 2px 2px; - text-align:left; -} -table.download td.Description { - width: 50%; -} -table.download td.License { - width:8%; -} -table.download td.Filename { - width:30%; -} -table.download td.Filename a { - font-weight:bold; - font-style: italic; - text-decoration:none; -} -table.download td.Filename a:hover { - text-decoration:underline; -} -table.download td.Modified { - width:12%; - font-weight:bold; +div#RepositoryList table.repolist tbody tr td.ColumnName { + background-color: #FFF; } /* Subsections ----------------------------------------------------- */ -#Home, #Introduction, #Contact { +#Home, #Introduction, #Contact { padding:1.5em 0 3em 0; } #Home p, #Introduction p, #Contact p { @@ -1011,57 +1153,6 @@ div#sourcerefs ol li ol { background-color:#EEE; } -/* Footer ------------------------------------------------------ */ -#footer { - clear:both; - width:100%; - font-size:12px; - line-height:130%; - color:#333; - margin:0; - padding:15px 0 0 0; - background-color:#CCC; - border-top:solid 1px #333; -} -#footer a, #footer a:visited { - text-decoration:none; - color:#333; -} -#footer a:hover { - text-decoration:underline; -} -#footer img { - border:0; - margin:0 auto; - vertical-align:middle; -} -#footer p#createdate { - float:left; - width:40%; - text-align:left; - margin-left:10px; -} -#footer p#copyright { - float:right; - width:40%; - text-align:right; - margin-right:10px; -} -#footer p#copyright img { - margin-right:10px; -} -#user_footer { - width:70%; - float:left; - margin:1em; -} -#user_footer p { - font:normal 1em/1.2em serif; - margin:0; - padding:0; -} - /* Calendar Styles -------------------------------------------------------------------------------------------- */ /* Calendar : General */ diff --git a/src/data/Web_Visually.css b/src/data/Web_Visually.css index fc0375d16..4611d34d7 100644 --- a/src/data/Web_Visually.css +++ b/src/data/Web_Visually.css @@ -202,6 +202,7 @@ div#header { background-color: #542; border-bottom: solid 8px #5D835F; height: 90px; + width: 100%; } #SiteTitle { margin:0; @@ -272,58 +273,28 @@ div#footer p#copyright img { padding:0; } -/* Alphabet Navigation Bar ------------------------------------------------------ */ -div#alphabet { - background-color: #6AF364; -} -div#alphabet ul { - border-color: #000; -} -div#alphabet ul li { - border-color: #000; -} -div#alphabet ul li a { - color: #000; -} -div#alphabet ul li a:hover { - background-color: #000; - color: #FFF; -} - /* Navigation ----------------------------------------------------- */ div#navigation, div#subnavigation { width: 100%; } -body#NarrativeWeb_Horizontal div#navigation { - position: fixed; - top: 104px; - left: 0px; -} -body#NarrativeWeb_Vertical div#navigation { - position: fixed; - top: 104px; - left: 4px; -} div#navigation ul, div#subnavigation ul { list-style:none; min-width:770px; - height:32px; + height: 42px; margin:0; padding: 0px 0px 0px 20px; border-bottom: solid 2px #5D835F; } div#navigation ul li, div#subnavigation ul li { - margin:0; float:left; } body#WebCal divdiv#navigation ul li a { color: #FFF; } div#navigation ul li a, div#subnavigation ul li a { - padding: 6px 10px 8px 1px; - display:block; + display: block; + padding: 12px 10px 14px 1px; float:left; font:normal 16px/100% serif; color: #000; @@ -331,16 +302,12 @@ div#navigation ul li a, div#subnavigation ul li a { margin:0; } div#navigation ul li a:hover, div#subnavigation ul li a:hover { - margin-top: -6px; - padding: 11px 11px 12px 1px; background-color: #C1B398; color: #000; } div#navigation ul li.CurrentSection a, div#subnavigation ul li.CurrentSection a { font-weight:bold; font-style: italic; - margin-top:-6px; - padding: 11px 11px 12px 10px; background-color: #CCC; color: #000; } @@ -353,6 +320,44 @@ div#subnavigation ul li.CurrentSection a { border-color: #FFF; } +/* Alphabet Navigation +----------------------------------------------------- */ +div#alphabet { + width: 100%; + margin: 0; + background-color: #6AF364; +} +div#alphabet ul { + list-style:none; + min-width:770px; + height:24px; + margin:0; + padding: 0px 0px 0px 16px; + border-width: 2px 0px 4px 0px; + border-style: solid; + border-color: #000; +} +div#alphabet ul li:after { + content:" |"; +} +div#alphabet ul li { + margin:0; + float:left; +} +div#alphabet ul li a { + display:block; + padding: 4px 8px 4px 8px; + float:left; + font:bold 16px/100% sans; + margin:0; + text-decoration:none; + color: #000; +} +div#alphabet ul li a:hover { + background-color: #000; + color: #FFF; +} + /* Main Table ----------------------------------------------------- */ table.infolist { @@ -789,56 +794,46 @@ table.exiflist tr td.ColumnValue { /* Download ----------------------------------------------------- */ -#Download { + +div#Download { margin: 0; - padding: .5em 0 .5em 0; + padding: 0px 0px .5em 0px; } -table.download { +div#Download table.download { padding: 0; margin: .5em 0 .5em 0; border: solid 1px #5D835F; width: 100%; nackground-color: #D8F3D6; } -table.download img { +div#Download table.download img { float:center; } -table.download thead tr th { - background-color: #6AF364; - color: #000; - padding: 15px 0px 0px 20px; - border-style:solid; - border-color: #000; - border-width: 0px 2px 2px 2px; - text-align:left; -} -table.download tbody tr#Row02 { +div#Download table.download tbody tr#Row02 { border-bottom:solid 2px #000; } -table.download tbody tr td { - border-style:solid; - border-color: #000; - border-width:0 2px 2px 2px; +div#Download table.download tbody tr td { + border: solid 1px #000; text-align:left; } -table.download td.ColumnFilename { +div#Download table.download td.Filename { width:30%; background-color: #FFF; } -table.download td.ColumnFilename a { - display:block; - padding:10px; +div#Download table.download td.Filename a { + display: block; + padding: 10px 10px 14px 6px; font-weight:bold; font-style: italic; text-decoration:none; } -table.download td.ColumnDescription { +div#Download table.download td.Description { width:45%; } -table.download td.ColumnLicense { +div#Download table.download td.License { width:6%; } -table.download td.ColumnModified { +div#Download table.download td.Modified { width:17%; } diff --git a/src/plugins/webreport/NarrativeWeb.py b/src/plugins/webreport/NarrativeWeb.py index b3049d38d..e751bd626 100644 --- a/src/plugins/webreport/NarrativeWeb.py +++ b/src/plugins/webreport/NarrativeWeb.py @@ -304,7 +304,6 @@ class BasePage(object): # are still required. self.html_dir = report.options['target'] self.ext = report.options['ext'] - self.alpha_nav_bar = report.options['alpha_nav_bar'] self.noid = report.options['nogid'] self.linkhome = report.options['linkhome'] self.create_media = report.options['gallery'] @@ -669,11 +668,18 @@ class BasePage(object): # return table to its callers return table - def source_link(self, handle, name, gid=None, up=False): + def source_link(self, handle, hyper_name, name, gid=None, up=False): url = self.report.build_url_fname_html(handle, 'src', up) + # begin hyperlink - hyper = Html('a', html_escape(name), href=url, title=html_escape(name)) + hyper = Html("a", html_escape(name), href = url, title = html_escape(name)) + + # adding to accomodate display_source_refs() + if hyper_name: + hyper.attr += ' name="%s" ' % hyper_name + + # add GRAMPS ID if not self.noid and gid: hyper += Html("span", '[%s]' % gid, class_ = "grampsid", inline = True) @@ -953,13 +959,7 @@ class BasePage(object): del page[0] # add narrative specific body id - # add alphabet layout direction to NarrativeWeb to allow for proper spacing for - # each individual stylesheet - alphabet_layout = "Horizontal" - if self.alpha_nav_bar == "Vertical": - alphabet_layout = "Vertical" - - body.attr = 'id="NarrativeWeb_%s" ' % alphabet_layout + body.attr = 'id="NarrativeWeb"' # create additional meta tags meta = (Html("meta", attr = _META1) + @@ -970,10 +970,6 @@ class BasePage(object): fname = "/".join(["styles", "behaviour.css"]) url1 = self.report.build_url_fname(fname, None, self.up) - # link to alphabet navigation bar layout - fname = "/".join(["styles", "alphabet-layout.css"]) - url2 = self.report.build_url_fname(fname, None, self.up) - # Link to _NARRATIVESCREEN stylesheet fname = "/".join(["styles", _NARRATIVESCREEN]) url3 = self.report.build_url_fname(fname, None, self.up) @@ -989,7 +985,6 @@ class BasePage(object): # create stylesheet and favicon links links = [Html("link", href=url5, type="image/x-icon", rel="shortcut icon"), Html("link", href=url1, type="text/css", media="screen", rel="stylesheet"), - Html("link", href = url2, type="text/css", media="screen", rel="stylesheet"), Html("link", href=url3, type="text/css", media="screen", rel="stylesheet"), Html("link", href=url4, type="text/css", media='print', rel="stylesheet") ] @@ -1280,16 +1275,17 @@ class BasePage(object): return None db = self.report.database - # source references division and title - with Html("div", class_ = "subsection", id="sourcerefs") as section: - section += Html('h4', _('Source References'), inline = True) - - ordered=Html('ol') - section += ordered + with Html("div", id="sourcerefs", class_ = "subsection") as section: + section += Html("h4", _("Source References"), inline = True) cindex = 0 for citation in bibli.get_citation_list(): cindex += 1 + + # begin ordered list + ordered1 = Html("ol") + section += ordered1 + # Add this source to the global list of sources to be displayed # on each source page. lnk = (self.report.cur_fname, self.page_title, self.gid) @@ -1303,47 +1299,35 @@ class BasePage(object): # Add this source and its references to the page source = db.get_source_from_handle(shandle) title = source.get_title() - list = Html('li') - ordered += list - - hyper = Html('a', name='sref%d' % cindex) + \ - self.source_link(source.handle, title, source.gramps_id, True) - list += hyper - - ordered1 = Html('ol') - list += ordered1 + list1 = Html("li") + \ + self.source_link(source.handle, "sref%d" % cindex, title, source.gramps_id, True) + ordered1 += list1 + # begin ordered one + ordered2 = Html("ol") + list1 += ordered2 + for key, sref in citation.get_ref_list(): tmp = [] confidence = Utils.confidence.get(sref.confidence, _('Unknown')) if confidence == _('Normal'): confidence = None - - source_data = [ - [DHEAD, _dd.display(sref.date)], - [_('Page'), sref.page], - [_('Confidence'), confidence] - ] - - for (label, data) in source_data: + for (label, data) in [(_('Date'), _dd.display(sref.date)), + (_('Page'), sref.page), + (_('Confidence'), confidence)]: if data: tmp.append("%s: %s" % (label, data)) - - # get citation note list notelist = sref.get_note_list() for notehandle in notelist: note = db.get_note_from_handle(notehandle) - - # check if note is styled text or not? note_text = self.get_note_format(note) tmp.append("%s: %s" % (_('Text'), note_text)) - - if len(tmp): - list1 = Html('li') + ( - Html('a', ';  '.join(tmp), name='sref%d%s' % (cindex, key)) + if len(tmp) > 0: + list2 = Html("li") + ( + Html("a", ';   '.join(tmp), name = "sref%d%s" % (cindex, key), inline = True) ) - ordered1 += list1 + ordered2 += list2 # return section to its callers return section @@ -2884,7 +2868,7 @@ class SourceListPage(BasePage): ) tbody += trow trow += Html("td", class_ = "ColumnName") + \ - self.source_link(handle, source.get_title(), source.gramps_id) + self.source_link(handle, "", source.get_title(), source.gramps_id) # add clearline for proper styling # add footer section @@ -3068,12 +3052,10 @@ class DownloadPage(BasePage): dlfname1 = self.report.dl_fname1 dldescr1 = self.report.dl_descr1 - dldescr = ''.join(wrapper.wrap(dldescr1)) # download and description #2 dlfname2 = self.report.dl_fname2 dldescr2 = self.report.dl_descr2 - dldescr2 = ''.join(wrapper.wrap(dldescr2)) # download copyright dlcopy = self.report.dl_copy @@ -3095,22 +3077,22 @@ class DownloadPage(BasePage): note_text = self.get_note_format(note) download += Html("p", note_text, id="description") - # begin download table + # begin download table and table head with Html("table", class_ = "infolist download") as table: download += table - # table head thead = Html("thead") table += thead + trow = Html("tr") thead += trow for (label, colclass) in [ - (_('File Name'), 'Filename'), - (DESCRHEAD, 'Description'), - (_('License'), 'License'), - (_('Last Modified'), 'Modified') ]: - trow += Html("th", label, class_ = "Column%s" % colclass, inline = True) + (_("File Name"), "Filename"), + (DESCRHEAD, "Description"), + (_("License"), "License"), + (_("Last Modified"), "Modified") ]: + trow += Html("th", label, class_ = colclass, inline = True) # if dlfname1 is not None, show it??? if dlfname1: @@ -3118,43 +3100,30 @@ class DownloadPage(BasePage): # table body tbody = Html("tbody") table += tbody + trow = Html("tr", id='Row01') tbody += trow - # table row 1, column 1 -- File fname = os.path.basename(dlfname1) - tcell = Html("td", id='Col03', class_ = "Filename") + ( + tcell = Html("td", class_ = "Filename") + ( Html('a', fname, href=dlfname1, alt=dldescr1) ) trow += tcell - # table Row 1, column 2 -- File Description - tcell = Html("td", id='Col01', class_ = "Description", - inline = True) - if dldescr1: - tcell += dldescr1 - else: - tcell += " " - trow += tcell + dldescr1 = dldescr1 or " " + trow += Html("td", dldescr1, class_ = "Description", inline = True) - # table row 1, column 3 -- Copyright License - tcell = Html("td", id='Col02', class_ = "License") - copyright = self.get_copyright_license(dlcopy) - if copyright: - tcell += copyright - else: - tcell += " " - trow += tcell + copyright = self.get_copyright_license(dlcopy) or " " + trow += Html("td", copyright, class_ = "License") - # table row 1, column 4 -- Last Modified - tcell = Html("td", id='Col04', class_ = "Modified", inline = True) + tcell = Html("td", class_ = "Modified", inline = True) + trow += tcell if os.path.exists(dlfname1): modified = os.stat(dlfname1).st_mtime last_mod = datetime.datetime.fromtimestamp(modified) tcell += last_mod else: tcell += " " - trow += tcell # if download filename #2, show it??? if dlfname2: @@ -3163,40 +3132,26 @@ class DownloadPage(BasePage): trow = Html("tr", id='Row02') tbody += trow - # table row 2, column 1 -- File fname = os.path.basename(dlfname2) - tcell = Html("td", id='Col03', class_ = "Filename") + ( + tcell = Html("td", class_ = "Filename") + ( Html('a', fname, href=dlfname2, alt=dldescr2) ) trow += tcell - # table row 2, column 2 -- Description - tcell = Html("td", id='Col01', class_ = "Description", - inline = True) - if dldescr2: - tcell += dldescr2 - else: - tcell += " " - trow += tcell + dldescr2 = dldescr2 or " " + trow += Html("td", dldescr2, class_ = "Description", inline = True) - # table row 2, column 3 -- Copyright License - tcell = Html("td", id='Col02', class_ = "License") - copyright = self.get_copyright_license(dlcopy) - if copyright: - tcell += copyright - else: - tcell += " " - trow += tcell + copyright = self.get_copyright_license(dlcopy) or " " + trow += Html("td", copyright, class_ = "License", inline = True) - # table row 2, column 4 -- Last Modified tcell = Html("td", id='Col04', class_ = "Modified", inline = True) + trow += tcell if os.path.exists(dlfname2): modified = os.stat(dlfname2).st_mtime last_mod = datetime.datetime.fromtimestamp(modified) tcell += last_mod else: tcell += " " - trow += tcell # clear line for proper styling # create footer section @@ -3372,7 +3327,7 @@ class IndividualPage(BasePage): individualdetail += sect10 # display sources - sect11 = self.display_ind_sources(self.person.get_source_references() ) + sect11 = self.display_ind_sources() if sect11 is not None: individualdetail += sect11 @@ -3537,12 +3492,13 @@ class IndividualPage(BasePage): new_center, m_center, m_handle) return tree - def display_ind_sources(self, sourcelist): + def display_ind_sources(self): """ will create the "Source References" section for a person """ - for sref in sourcelist: + for sref in self.person.get_source_references(): + print sref self.bibli.add_reference(sref) sourcerefs = self.display_source_refs(self.bibli) @@ -4606,9 +4562,6 @@ class NavWebReport(Report): # include GENDEX page or not? self.inc_gendex = self.options['inc_gendex'] - # Specify the layout for the alphabet navigation bar - self.alphabar = self.options["alpha_nav_bar"] - # Download Options Tab self.inc_download = self.options['incdownload'] self.downloadnote = self.options['downloadnote'] @@ -4783,12 +4736,6 @@ class NavWebReport(Report): fname = os.path.join(const.DATA_DIR, "behaviour.css") self.copy_file(fname, "behaviour.css", "styles") - # copy alphabet navigation bar layout - fname = os.path.join(const.DATA_DIR, "Web_Alphabet-Horizontal.css") - if self.alphabar == "Vertical": - fname = os.path.join(const.DATA_DIR, "Web_Alphabet-Vertical.css") - self.copy_file(fname, "alphabet-layout.css", "styles") - # copy screen stylesheet if self.css: fname = os.path.join(const.DATA_DIR, self.css) @@ -5545,18 +5492,6 @@ class NavWebOptions(MenuReportOptions): encoding.set_help( _("The encoding to be used for the web files")) menu.add_option(category_name, "encoding", encoding) - alpha_opts = [ - [_("Horizontal"), "Horizontal" ], - [_("Vertical"), "Vertical" ], - ] - - alpha_nav_bar = EnumeratedListOption(_("Alphabet Navigation Layout"), alpha_opts[0][1] ) - for opt in alpha_opts: - alpha_nav_bar.add_item(opt[0], opt[1] ) - alpha_nav_bar.set_help(_("Specify which direction the alphabet " - "navigation bar is presented.") ) - menu.add_option(category_name, "alpha_nav_bar", alpha_nav_bar) - linkhome = BooleanOption(_('Include link to home person on every ' 'page'), False) linkhome.set_help(_('Whether to include a link to the home person'))