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
This commit is contained in:
Rob G. Healey 2009-10-06 08:20:21 +00:00
parent b484a2b5fd
commit 73cbf10ce3
5 changed files with 356 additions and 500 deletions

View File

@ -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 <robhealey1@gmail.com>
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 <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------------------------------
# $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;
}

View File

@ -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 <robhealey1@gmail.com>
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 <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------------------------------
# $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;
}

View File

@ -45,19 +45,19 @@ gray very light #EEE
white #FFF white #FFF
-------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------
# $Id$ # $Id $
NarrativeWeb Styles NarrativeWeb Styles
--------------------------------------------------------------------------------------------- */ ------------------------------------------------------------------------------------------------ */
body#NarrativeWeb {
padding-top: 90px; /* General Elements
----------------------------------------------------- */
body {
font-family:sans-serif; font-family:sans-serif;
color:#000; color:#000;
margin:0;
background-color:#FFF; background-color:#FFF;
} }
/* General Elements
----------------------------------------------------- */
div { div {
margin:0; margin:0;
padding:0; padding:0;
@ -70,6 +70,7 @@ img {
background:none; background:none;
} }
.content { .content {
padding-top: 1cm;
background-color:#FFF; background-color:#FFF;
} }
.content div.snapshot { .content div.snapshot {
@ -160,45 +161,82 @@ a:visited {
/* Header /* Header
----------------------------------------------------- */ ----------------------------------------------------- */
#header { div#header {
padding:15px 15px 2px 15px;
margin:0;
background-color:#EEE; background-color:#EEE;
} }
#SiteTitle { #SiteTitle {
margin:0; color:#333;
padding:.5em 0 0.5em 10px; margin:0 0 3px 0;
font-size: 40px;
color: #FFF;
font-style: italic;
} }
#header p { div#header p {
font-size:1em; font-size:1em;
font-weight:bold; font-weight:bold;
color:#999; color:#999;
margin:0; margin:0;
} }
/* Alphabet Navigation bar /* Footer
----------------------------------------------------- */ ----------------------------------------------------- */
#alphabet { div#footer {
position: fixed; height: 60px;
top: 136px; clear:both;
background-color: #EEE; width:100%;
border-color: #000; 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
----------------------------------------------------- */ ----------------------------------------------------- */
#navigation, #subnavigation { div#navigation, div#subnavigation {
margin:0; margin:0;
padding:4px 0 0 0; padding:4px 0 0 0;
background-color:#EEE; background-color:#EEE;
} }
body#NarrativeWeb #navigation { div#navigation ul, div#subnavigation ul {
position: fixed;
top: 104px;
left: 0px;
}
#navigation ul, #subnavigation ul {
list-style:none; list-style:none;
min-width:770px; min-width:770px;
height:22px; height:22px;
@ -206,12 +244,12 @@ body#NarrativeWeb #navigation {
padding:0 0 0 12px; padding:0 0 0 12px;
border-bottom:1px solid #999; border-bottom:1px solid #999;
} }
#navigation ul li, #subnavigation ul li { div#navigation ul li, div#subnavigation ul li {
margin:0; margin:0;
padding:0; padding:0;
float:left; float:left;
} }
#navigation ul li a, #subnavigation ul li a { div#navigation ul li a, div#subnavigation ul li a {
display:block; display:block;
font-size:12px; font-size:12px;
line-height:100%; line-height:100%;
@ -221,11 +259,11 @@ body#NarrativeWeb #navigation {
padding:5px 5px; padding:5px 5px;
background-color:#EEE; 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; background-color:#CCC;
border-bottom:solid 1px #000; 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; padding-bottom:4px;
border-top:solid 1px #999; border-top:solid 1px #999;
border-right:solid 1px #999; border-right:solid 1px #999;
@ -233,14 +271,51 @@ body#NarrativeWeb #navigation {
border-bottom:solid 1px #FFF; border-bottom:solid 1px #FFF;
background-color:#FFF; background-color:#FFF;
} }
#navigation ul li.CurrentSection a:hover { div#navigation ul li.CurrentSection a:hover {
background-color:#FFF; 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; 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 /* Main Table
----------------------------------------------------- */ ----------------------------------------------------- */
table { table {
@ -411,23 +486,10 @@ table.individuallist tbody tr td.ColumnName a {
table.individuallist tbody tr td.ColumnName a:hover { table.individuallist tbody tr td.ColumnName a:hover {
background-color:#CCC; 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; vertical-align:top;
} }
#Individuals div table.infolist tr td p a { #IndividualDetail div table.infolist tr td a, #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 {
display:inline; display:inline;
} }
#IndividualDetail table.infolist tr td a:hover { #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 { #IndividualDetail table.infolist tbody tr td.ColumnAttribute {
width:10%; width:10%;
color:#696969; color:#999;
} padding-left:5px;
#IndividualDetail div.subsection table tr td:first-child {
padding-left:20px;
} }
/* Sources /* Sources
@ -465,6 +525,72 @@ table.individuallist tbody tr td.ColumnName a:hover {
padding:.1em 10px .3em 10px; 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
----------------------------------------------------- */ ----------------------------------------------------- */
#Gallery table.infolist tbody tr td.ColumnRowLabel, #Gallery table.infolist tbody tr td.ColumnDate { #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; 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
----------------------------------------------------- */ ----------------------------------------------------- */
#Contact #summaryarea { #Contact #summaryarea {
@ -587,61 +760,30 @@ table.individuallist tbody tr td.ColumnName a:hover {
text-decoration:underline; text-decoration:underline;
} }
/* Download /* Repositories
----------------------------------------------------- */ ------------------------------------------------------ */
#Download { div#RepositoryList { }
padding:1cm;
height:396px; div#RepositoryList table.repolist tbody tr td {
background-color: #CCC;
} }
table.download { div#RepositoryList table.repolist tbody tr td a {
border:solid 2px #000; display: block;
width:100%; padding: .3em 10px;
} }
table.download img { div#RepositoryList table.repolist tbody tr td.ColumnRowLabel {
float:center; width: 9%;
} }
table.download thead tr th { div#RepositoryList table.repolist tbody tr td.ColumnType {
text-align:center; width: 15%;
border:solid 2px #000;
color: #000;
text-transform:uppercase;
} }
table.download tbody tr#Row02 { div#RepositoryList table.repolist tbody tr td.ColumnName {
border-bottom:solid 2px #000; background-color: #FFF;
}
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;
} }
/* Subsections /* Subsections
----------------------------------------------------- */ ----------------------------------------------------- */
#Home, #Introduction, #Contact { #Home, #Introduction, #Contact {
padding:1.5em 0 3em 0; padding:1.5em 0 3em 0;
} }
#Home p, #Introduction p, #Contact p { #Home p, #Introduction p, #Contact p {
@ -1011,57 +1153,6 @@ div#sourcerefs ol li ol {
background-color:#EEE; 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 Styles
-------------------------------------------------------------------------------------------- */ -------------------------------------------------------------------------------------------- */
/* Calendar : General */ /* Calendar : General */

View File

@ -202,6 +202,7 @@ div#header {
background-color: #542; background-color: #542;
border-bottom: solid 8px #5D835F; border-bottom: solid 8px #5D835F;
height: 90px; height: 90px;
width: 100%;
} }
#SiteTitle { #SiteTitle {
margin:0; margin:0;
@ -272,58 +273,28 @@ div#footer p#copyright img {
padding:0; 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 /* Navigation
----------------------------------------------------- */ ----------------------------------------------------- */
div#navigation, div#subnavigation { div#navigation, div#subnavigation {
width: 100%; 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 { div#navigation ul, div#subnavigation ul {
list-style:none; list-style:none;
min-width:770px; min-width:770px;
height:32px; height: 42px;
margin:0; margin:0;
padding: 0px 0px 0px 20px; padding: 0px 0px 0px 20px;
border-bottom: solid 2px #5D835F; border-bottom: solid 2px #5D835F;
} }
div#navigation ul li, div#subnavigation ul li { div#navigation ul li, div#subnavigation ul li {
margin:0;
float:left; float:left;
} }
body#WebCal divdiv#navigation ul li a { body#WebCal divdiv#navigation ul li a {
color: #FFF; color: #FFF;
} }
div#navigation ul li a, div#subnavigation ul li a { 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; float:left;
font:normal 16px/100% serif; font:normal 16px/100% serif;
color: #000; color: #000;
@ -331,16 +302,12 @@ div#navigation ul li a, div#subnavigation ul li a {
margin:0; margin:0;
} }
div#navigation ul li a:hover, div#subnavigation ul li a:hover { div#navigation ul li a:hover, div#subnavigation ul li a:hover {
margin-top: -6px;
padding: 11px 11px 12px 1px;
background-color: #C1B398; background-color: #C1B398;
color: #000; color: #000;
} }
div#navigation ul li.CurrentSection a, div#subnavigation ul li.CurrentSection a { div#navigation ul li.CurrentSection a, div#subnavigation ul li.CurrentSection a {
font-weight:bold; font-weight:bold;
font-style: italic; font-style: italic;
margin-top:-6px;
padding: 11px 11px 12px 10px;
background-color: #CCC; background-color: #CCC;
color: #000; color: #000;
} }
@ -353,6 +320,44 @@ div#subnavigation ul li.CurrentSection a {
border-color: #FFF; 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 /* Main Table
----------------------------------------------------- */ ----------------------------------------------------- */
table.infolist { table.infolist {
@ -789,56 +794,46 @@ table.exiflist tr td.ColumnValue {
/* Download /* Download
----------------------------------------------------- */ ----------------------------------------------------- */
#Download {
div#Download {
margin: 0; margin: 0;
padding: .5em 0 .5em 0; padding: 0px 0px .5em 0px;
} }
table.download { div#Download table.download {
padding: 0; padding: 0;
margin: .5em 0 .5em 0; margin: .5em 0 .5em 0;
border: solid 1px #5D835F; border: solid 1px #5D835F;
width: 100%; width: 100%;
nackground-color: #D8F3D6; nackground-color: #D8F3D6;
} }
table.download img { div#Download table.download img {
float:center; float:center;
} }
table.download thead tr th { div#Download table.download tbody tr#Row02 {
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 {
border-bottom:solid 2px #000; border-bottom:solid 2px #000;
} }
table.download tbody tr td { div#Download table.download tbody tr td {
border-style:solid; border: solid 1px #000;
border-color: #000;
border-width:0 2px 2px 2px;
text-align:left; text-align:left;
} }
table.download td.ColumnFilename { div#Download table.download td.Filename {
width:30%; width:30%;
background-color: #FFF; background-color: #FFF;
} }
table.download td.ColumnFilename a { div#Download table.download td.Filename a {
display:block; display: block;
padding:10px; padding: 10px 10px 14px 6px;
font-weight:bold; font-weight:bold;
font-style: italic; font-style: italic;
text-decoration:none; text-decoration:none;
} }
table.download td.ColumnDescription { div#Download table.download td.Description {
width:45%; width:45%;
} }
table.download td.ColumnLicense { div#Download table.download td.License {
width:6%; width:6%;
} }
table.download td.ColumnModified { div#Download table.download td.Modified {
width:17%; width:17%;
} }

View File

@ -304,7 +304,6 @@ class BasePage(object):
# are still required. # are still required.
self.html_dir = report.options['target'] self.html_dir = report.options['target']
self.ext = report.options['ext'] self.ext = report.options['ext']
self.alpha_nav_bar = report.options['alpha_nav_bar']
self.noid = report.options['nogid'] self.noid = report.options['nogid']
self.linkhome = report.options['linkhome'] self.linkhome = report.options['linkhome']
self.create_media = report.options['gallery'] self.create_media = report.options['gallery']
@ -669,11 +668,18 @@ class BasePage(object):
# return table to its callers # return table to its callers
return table 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) url = self.report.build_url_fname_html(handle, 'src', up)
# begin hyperlink # 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: if not self.noid and gid:
hyper += Html("span", '[%s]' % gid, class_ = "grampsid", inline = True) hyper += Html("span", '[%s]' % gid, class_ = "grampsid", inline = True)
@ -953,13 +959,7 @@ class BasePage(object):
del page[0] del page[0]
# add narrative specific body id # add narrative specific body id
# add alphabet layout direction to NarrativeWeb to allow for proper spacing for body.attr = 'id="NarrativeWeb"'
# each individual stylesheet
alphabet_layout = "Horizontal"
if self.alpha_nav_bar == "Vertical":
alphabet_layout = "Vertical"
body.attr = 'id="NarrativeWeb_%s" ' % alphabet_layout
# create additional meta tags # create additional meta tags
meta = (Html("meta", attr = _META1) + meta = (Html("meta", attr = _META1) +
@ -970,10 +970,6 @@ class BasePage(object):
fname = "/".join(["styles", "behaviour.css"]) fname = "/".join(["styles", "behaviour.css"])
url1 = self.report.build_url_fname(fname, None, self.up) 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 # Link to _NARRATIVESCREEN stylesheet
fname = "/".join(["styles", _NARRATIVESCREEN]) fname = "/".join(["styles", _NARRATIVESCREEN])
url3 = self.report.build_url_fname(fname, None, self.up) url3 = self.report.build_url_fname(fname, None, self.up)
@ -989,7 +985,6 @@ class BasePage(object):
# create stylesheet and favicon links # create stylesheet and favicon links
links = [Html("link", href=url5, type="image/x-icon", rel="shortcut icon"), 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=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=url3, type="text/css", media="screen", rel="stylesheet"),
Html("link", href=url4, type="text/css", media='print', rel="stylesheet") Html("link", href=url4, type="text/css", media='print', rel="stylesheet")
] ]
@ -1280,16 +1275,17 @@ class BasePage(object):
return None return None
db = self.report.database db = self.report.database
# source references division and title with Html("div", id="sourcerefs", class_ = "subsection") as section:
with Html("div", class_ = "subsection", id="sourcerefs") as section: section += Html("h4", _("Source References"), inline = True)
section += Html('h4', _('Source References'), inline = True)
ordered=Html('ol')
section += ordered
cindex = 0 cindex = 0
for citation in bibli.get_citation_list(): for citation in bibli.get_citation_list():
cindex += 1 cindex += 1
# begin ordered list
ordered1 = Html("ol")
section += ordered1
# Add this source to the global list of sources to be displayed # Add this source to the global list of sources to be displayed
# on each source page. # on each source page.
lnk = (self.report.cur_fname, self.page_title, self.gid) 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 # Add this source and its references to the page
source = db.get_source_from_handle(shandle) source = db.get_source_from_handle(shandle)
title = source.get_title() title = source.get_title()
list = Html('li') list1 = Html("li") + \
ordered += list self.source_link(source.handle, "sref%d" % cindex, title, source.gramps_id, True)
ordered1 += list1
hyper = Html('a', name='sref%d' % cindex) + \
self.source_link(source.handle, title, source.gramps_id, True)
list += hyper
ordered1 = Html('ol')
list += ordered1
# begin ordered one
ordered2 = Html("ol")
list1 += ordered2
for key, sref in citation.get_ref_list(): for key, sref in citation.get_ref_list():
tmp = [] tmp = []
confidence = Utils.confidence.get(sref.confidence, _('Unknown')) confidence = Utils.confidence.get(sref.confidence, _('Unknown'))
if confidence == _('Normal'): if confidence == _('Normal'):
confidence = None confidence = None
for (label, data) in [(_('Date'), _dd.display(sref.date)),
source_data = [ (_('Page'), sref.page),
[DHEAD, _dd.display(sref.date)], (_('Confidence'), confidence)]:
[_('Page'), sref.page],
[_('Confidence'), confidence]
]
for (label, data) in source_data:
if data: if data:
tmp.append("%s: %s" % (label, data)) tmp.append("%s: %s" % (label, data))
# get citation note list
notelist = sref.get_note_list() notelist = sref.get_note_list()
for notehandle in notelist: for notehandle in notelist:
note = db.get_note_from_handle(notehandle) note = db.get_note_from_handle(notehandle)
# check if note is styled text or not?
note_text = self.get_note_format(note) note_text = self.get_note_format(note)
tmp.append("%s: %s" % (_('Text'), note_text)) tmp.append("%s: %s" % (_('Text'), note_text))
if len(tmp) > 0:
if len(tmp): list2 = Html("li") + (
list1 = Html('li') + ( Html("a", '; &nbsp; '.join(tmp), name = "sref%d%s" % (cindex, key), inline = True)
Html('a', '; &nbsp;'.join(tmp), name='sref%d%s' % (cindex, key))
) )
ordered1 += list1 ordered2 += list2
# return section to its callers # return section to its callers
return section return section
@ -2884,7 +2868,7 @@ class SourceListPage(BasePage):
) )
tbody += trow tbody += trow
trow += Html("td", class_ = "ColumnName") + \ 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 clearline for proper styling
# add footer section # add footer section
@ -3068,12 +3052,10 @@ class DownloadPage(BasePage):
dlfname1 = self.report.dl_fname1 dlfname1 = self.report.dl_fname1
dldescr1 = self.report.dl_descr1 dldescr1 = self.report.dl_descr1
dldescr = ''.join(wrapper.wrap(dldescr1))
# download and description #2 # download and description #2
dlfname2 = self.report.dl_fname2 dlfname2 = self.report.dl_fname2
dldescr2 = self.report.dl_descr2 dldescr2 = self.report.dl_descr2
dldescr2 = ''.join(wrapper.wrap(dldescr2))
# download copyright # download copyright
dlcopy = self.report.dl_copy dlcopy = self.report.dl_copy
@ -3095,22 +3077,22 @@ class DownloadPage(BasePage):
note_text = self.get_note_format(note) note_text = self.get_note_format(note)
download += Html("p", note_text, id="description") download += Html("p", note_text, id="description")
# begin download table # begin download table and table head
with Html("table", class_ = "infolist download") as table: with Html("table", class_ = "infolist download") as table:
download += table download += table
# table head
thead = Html("thead") thead = Html("thead")
table += thead table += thead
trow = Html("tr") trow = Html("tr")
thead += trow thead += trow
for (label, colclass) in [ for (label, colclass) in [
(_('File Name'), 'Filename'), (_("File Name"), "Filename"),
(DESCRHEAD, 'Description'), (DESCRHEAD, "Description"),
(_('License'), 'License'), (_("License"), "License"),
(_('Last Modified'), 'Modified') ]: (_("Last Modified"), "Modified") ]:
trow += Html("th", label, class_ = "Column%s" % colclass, inline = True) trow += Html("th", label, class_ = colclass, inline = True)
# if dlfname1 is not None, show it??? # if dlfname1 is not None, show it???
if dlfname1: if dlfname1:
@ -3118,43 +3100,30 @@ class DownloadPage(BasePage):
# table body # table body
tbody = Html("tbody") tbody = Html("tbody")
table += tbody table += tbody
trow = Html("tr", id='Row01') trow = Html("tr", id='Row01')
tbody += trow tbody += trow
# table row 1, column 1 -- File
fname = os.path.basename(dlfname1) fname = os.path.basename(dlfname1)
tcell = Html("td", id='Col03', class_ = "Filename") + ( tcell = Html("td", class_ = "Filename") + (
Html('a', fname, href=dlfname1, alt=dldescr1) Html('a', fname, href=dlfname1, alt=dldescr1)
) )
trow += tcell trow += tcell
# table Row 1, column 2 -- File Description dldescr1 = dldescr1 or "&nbsp;"
tcell = Html("td", id='Col01', class_ = "Description", trow += Html("td", dldescr1, class_ = "Description", inline = True)
inline = True)
if dldescr1:
tcell += dldescr1
else:
tcell += "&nbsp;"
trow += tcell
# table row 1, column 3 -- Copyright License copyright = self.get_copyright_license(dlcopy) or "&nbsp;"
tcell = Html("td", id='Col02', class_ = "License") trow += Html("td", copyright, class_ = "License")
copyright = self.get_copyright_license(dlcopy)
if copyright:
tcell += copyright
else:
tcell += "&nbsp;"
trow += tcell
# table row 1, column 4 -- Last Modified tcell = Html("td", class_ = "Modified", inline = True)
tcell = Html("td", id='Col04', class_ = "Modified", inline = True) trow += tcell
if os.path.exists(dlfname1): if os.path.exists(dlfname1):
modified = os.stat(dlfname1).st_mtime modified = os.stat(dlfname1).st_mtime
last_mod = datetime.datetime.fromtimestamp(modified) last_mod = datetime.datetime.fromtimestamp(modified)
tcell += last_mod tcell += last_mod
else: else:
tcell += "&nbsp;" tcell += "&nbsp;"
trow += tcell
# if download filename #2, show it??? # if download filename #2, show it???
if dlfname2: if dlfname2:
@ -3163,40 +3132,26 @@ class DownloadPage(BasePage):
trow = Html("tr", id='Row02') trow = Html("tr", id='Row02')
tbody += trow tbody += trow
# table row 2, column 1 -- File
fname = os.path.basename(dlfname2) fname = os.path.basename(dlfname2)
tcell = Html("td", id='Col03', class_ = "Filename") + ( tcell = Html("td", class_ = "Filename") + (
Html('a', fname, href=dlfname2, alt=dldescr2) Html('a', fname, href=dlfname2, alt=dldescr2)
) )
trow += tcell trow += tcell
# table row 2, column 2 -- Description dldescr2 = dldescr2 or "&nbsp;"
tcell = Html("td", id='Col01', class_ = "Description", trow += Html("td", dldescr2, class_ = "Description", inline = True)
inline = True)
if dldescr2:
tcell += dldescr2
else:
tcell += "&nbsp;"
trow += tcell
# table row 2, column 3 -- Copyright License copyright = self.get_copyright_license(dlcopy) or "&nbsp;"
tcell = Html("td", id='Col02', class_ = "License") trow += Html("td", copyright, class_ = "License", inline = True)
copyright = self.get_copyright_license(dlcopy)
if copyright:
tcell += copyright
else:
tcell += "&nbsp;"
trow += tcell
# table row 2, column 4 -- Last Modified
tcell = Html("td", id='Col04', class_ = "Modified", inline = True) tcell = Html("td", id='Col04', class_ = "Modified", inline = True)
trow += tcell
if os.path.exists(dlfname2): if os.path.exists(dlfname2):
modified = os.stat(dlfname2).st_mtime modified = os.stat(dlfname2).st_mtime
last_mod = datetime.datetime.fromtimestamp(modified) last_mod = datetime.datetime.fromtimestamp(modified)
tcell += last_mod tcell += last_mod
else: else:
tcell += "&nbsp;" tcell += "&nbsp;"
trow += tcell
# clear line for proper styling # clear line for proper styling
# create footer section # create footer section
@ -3372,7 +3327,7 @@ class IndividualPage(BasePage):
individualdetail += sect10 individualdetail += sect10
# display sources # display sources
sect11 = self.display_ind_sources(self.person.get_source_references() ) sect11 = self.display_ind_sources()
if sect11 is not None: if sect11 is not None:
individualdetail += sect11 individualdetail += sect11
@ -3537,12 +3492,13 @@ class IndividualPage(BasePage):
new_center, m_center, m_handle) new_center, m_center, m_handle)
return tree return tree
def display_ind_sources(self, sourcelist): def display_ind_sources(self):
""" """
will create the "Source References" section for a person 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) self.bibli.add_reference(sref)
sourcerefs = self.display_source_refs(self.bibli) sourcerefs = self.display_source_refs(self.bibli)
@ -4606,9 +4562,6 @@ class NavWebReport(Report):
# include GENDEX page or not? # include GENDEX page or not?
self.inc_gendex = self.options['inc_gendex'] 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 # Download Options Tab
self.inc_download = self.options['incdownload'] self.inc_download = self.options['incdownload']
self.downloadnote = self.options['downloadnote'] self.downloadnote = self.options['downloadnote']
@ -4783,12 +4736,6 @@ class NavWebReport(Report):
fname = os.path.join(const.DATA_DIR, "behaviour.css") fname = os.path.join(const.DATA_DIR, "behaviour.css")
self.copy_file(fname, "behaviour.css", "styles") 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 # copy screen stylesheet
if self.css: if self.css:
fname = os.path.join(const.DATA_DIR, 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")) encoding.set_help( _("The encoding to be used for the web files"))
menu.add_option(category_name, "encoding", encoding) 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 ' linkhome = BooleanOption(_('Include link to home person on every '
'page'), False) 'page'), False)
linkhome.set_help(_('Whether to include a link to the home person')) linkhome.set_help(_('Whether to include a link to the home person'))