5063: Mainz stylesheet bugs

svn: r17914
This commit is contained in:
Michiel Nauta 2011-07-10 19:02:33 +00:00
parent d932f23063
commit 8aa44642a9
11 changed files with 176 additions and 146 deletions

View File

@ -1223,10 +1223,10 @@ class BasePage(object):
('events', _("Events"), self.report.inc_events), ('events', _("Events"), self.report.inc_events),
('media', _("Media"), self.create_media), ('media', _("Media"), self.create_media),
('download', _("Download"), self.report.inc_download), ('download', _("Download"), self.report.inc_download),
('contact', _("Contact"), self.report.use_contact),
('sources', SHEAD, True), ('sources', SHEAD, True),
('repositories', _("Repositories"), inc_repos), ('repositories', _("Repositories"), inc_repos),
("addressbook", _("Address Book"), self.report.inc_addressbook) ("addressbook", _("Address Book"), self.report.inc_addressbook),
('contact', _("Contact"), self.report.use_contact),
] ]
navigation = Html("div", id = 'navigation') navigation = Html("div", id = 'navigation')
@ -1858,7 +1858,7 @@ class BasePage(object):
thumbnail += hyper thumbnail += hyper
if usedescr: if usedescr:
hyper += Html("pre", name, inline = True) hyper += Html("p", name, inline = True)
# return thumbnail division to its callers # return thumbnail division to its callers
return thumbnail return thumbnail
@ -4114,128 +4114,131 @@ class IndividualPage(BasePage):
ymap = "large" ymap = "large"
ymap += "YMap" ymap += "YMap"
# begin familymap division with Html("div", class_ = "content", id = "FamilyMapDetail") as mapbackground:
with Html("div", class_ = "content", id = ymap) as mapbody: body += mapbackground
body += mapbody
# page message # begin familymap division
msg = _("The place markers on this page represent a different location " with Html("div", id = ymap) as mapbody:
"based upon your spouse, your children (if any), and your personal " mapbackground += mapbody
"events and their places. The list has been sorted in chronological "
"date order. Clicking on the place’s name in the References " # page message
"will take you to that place’s page. Clicking on the markers " msg = _("The place markers on this page represent a different location "
"will display its place title.") "based upon your spouse, your children (if any), and your personal "
mapbody += Html("p", msg, id = "description") "events and their places. The list has been sorted in chronological "
"date order. Clicking on the place’s name in the References "
xmap = "" "will take you to that place’s page. Clicking on the markers "
if spanX in smallset: "will display its place title.")
xmap = "small" mapbody += Html("p", msg, id = "description")
elif spanX in middleset:
xmap = "middle" xmap = ""
elif spanX in largeset: if spanX in smallset:
xmap = "large" xmap = "small"
xmap += "XMap" elif spanX in middleset:
xmap = "middle"
# begin middle section division elif spanX in largeset:
with Html("div", id = xmap) as middlesection: xmap = "large"
mapbody += middlesection xmap += "XMap"
# begin inline javascript code # begin middle section division
# because jsc is a string, it does NOT have to properly indented with Html("div", id = xmap) as middlesection:
with Html("script", type = "text/javascript") as jsc: mapbody += middlesection
middlesection += jsc
# begin inline javascript code
jsc += """ # because jsc is a string, it does NOT have to properly indented
var map; with Html("script", type = "text/javascript") as jsc:
middlesection += jsc
function initialize() {
// create map object
map = new mxn.Mapstraction('familygooglev3', 'googlev3');
// add map controls to image
map.addControls({
pan: true,
zoom: 'large',
scale: true,
disableDoubleClickZoom: true,
keyboardShortcuts: true,
scrollwheel: false,
map_type: true
});"""
for (lat, long, p, h, d) in place_lat_long:
jsc += """ add_markers(%s, %s, "%s");""" % ( lat, long, p )
jsc += """
}"""
# if the span is larger than +- 42 which is the span of four(4) states in the USA
if spanY not in smallset and spanY not in middleset:
# set southWest and northEast boundaries as spanY is greater than 20
jsc += """ jsc += """
// boundary southWest equals bottom left GPS Coordinates var map;
var southWest = new mxn.LatLonPoint(%s, %s);""" % (minX, minY)
function initialize() {
// create map object
map = new mxn.Mapstraction('familygooglev3', 'googlev3');
// add map controls to image
map.addControls({
pan: true,
zoom: 'large',
scale: true,
disableDoubleClickZoom: true,
keyboardShortcuts: true,
scrollwheel: false,
map_type: true
});"""
for (lat, long, p, h, d) in place_lat_long:
jsc += """ add_markers(%s, %s, "%s");""" % ( lat, long, p )
jsc += """ jsc += """
// boundary northEast equals top right GPS Coordinates }"""
var northEast = new mxn.LatLonPoint(%s, %s);""" % (maxX, maxY)
# if the span is larger than +- 42 which is the span of four(4) states in the USA
if spanY not in smallset and spanY not in middleset:
# set southWest and northEast boundaries as spanY is greater than 20
jsc += """
// boundary southWest equals bottom left GPS Coordinates
var southWest = new mxn.LatLonPoint(%s, %s);""" % (minX, minY)
jsc += """
// boundary northEast equals top right GPS Coordinates
var northEast = new mxn.LatLonPoint(%s, %s);""" % (maxX, maxY)
jsc += """
var bounds = new google.maps.LatLngBounds(southWest, northEast);
map.fitBounds(bounds);"""
# include add_markers function
jsc += """ jsc += """
var bounds = new google.maps.LatLngBounds(southWest, northEast); function add_markers(latitude, longitude, title) {
map.fitBounds(bounds);"""
var latlon = new mxn.LatLonPoint(latitude, longitude);
var marker = new mxn.Marker(latlon);
marker.setInfoBubble(title);
map.addMarker(marker, true);"""
# set zoomlevel for size of map
if spanY in smallset:
zoomlevel = 7
elif spanY in middleset:
zoomlevel = 4
elif spanY in largeset:
zoomlevel = 4
else:
zoomlevel = 1
jsc += """
map.setCenterAndZoom(latlon, %d);
}""" % zoomlevel
# there is no need to add an ending "</script>",
# as it will be added automatically!
# here is where the map is held in the CSS/ Page
middlesection += Html("div", id = "familygooglev3", inline = True)
# add fullclear for proper styling
middlesection += fullclear
# include add_markers function with Html("div", class_ = "subsection", id = "references") as section:
jsc += """ mapbackground += section
function add_markers(latitude, longitude, title) { section += Html("h4", _("References"), inline = True)
var latlon = new mxn.LatLonPoint(latitude, longitude); ordered = Html("ol")
var marker = new mxn.Marker(latlon); section += ordered
marker.setInfoBubble(title); # 0 = latitude, 1 = longitude, 2 = place title, 3 = handle, 4 = date
for (lat, long, pname, handle, date) in place_lat_long:
map.addMarker(marker, true);"""
list = Html("li", self.place_link(handle, pname, up = self.up))
# set zoomlevel for size of map ordered += list
if spanY in smallset:
zoomlevel = 7 if date:
elif spanY in middleset: ordered1 = Html("ol")
zoomlevel = 4 list += ordered1
elif spanY in largeset:
zoomlevel = 4 list1 = Html("li", _dd.display(date), inline = True)
else: ordered1 += list1
zoomlevel = 1
jsc += """
map.setCenterAndZoom(latlon, %d);
}""" % zoomlevel
# there is no need to add an ending "</script>",
# as it will be added automatically!
# here is where the map is held in the CSS/ Page
middlesection += Html("div", id = "familygooglev3", inline = True)
# add fullclear for proper styling
middlesection += fullclear
with Html("div", class_ = "subsection", id = "References") as section:
body += section
section += Html("h4", _("References"), inline = True)
ordered = Html("ol")
section += ordered
# 0 = latitude, 1 = longitude, 2 = place title, 3 = handle, 4 = date
for (lat, long, pname, handle, date) in place_lat_long:
list = Html("li", self.place_link(handle, pname, up = self.up))
ordered += list
if date:
ordered1 = Html("ol")
list += ordered1
list1 = Html("li", _dd.display(date), inline = True)
ordered1 += list1
# add body onload to initialize map # add body onload to initialize map
body.attr = 'onload = "initialize();" id = "FamilyMap"' body.attr = 'onload = "initialize();" id = "FamilyMap"'

View File

@ -26,7 +26,6 @@
------------------------------------------------- */ ------------------------------------------------- */
body#FamilyMap { body#FamilyMap {
background-color: #FFF; background-color: #FFF;
color: #000;
margin: 0 auto; margin: 0 auto;
width: 1060px; width: 1060px;
padding: 0px 4px 0px 4px; padding: 0px 4px 0px 4px;
@ -83,11 +82,11 @@ div#middleYMap {
} }
div#smallYMap { div#smallYMap {
width: 800px; width: 800px;
margin: 0% 8% 0% 9%; margin: 0px 8% 10px 9%;
} }
div#YMap { div#YMap {
width: 800px; width: 800px;
margin: 0% 8% 0% 9%; margin: 0% 8% 10px 9%;
} }
/* X Map Sizes /* X Map Sizes
@ -112,10 +111,3 @@ div#familygooglev3 {
width: 100%; width: 100%;
border: double 4px #000; border: double 4px #000;
} }
/* Footer
------------------------------------------------- */
div#footer a {
text-decoration: none;
color: #FFF;
}

View File

@ -466,6 +466,9 @@ table.individuallist tbody tr td.ColumnName a:hover {
#IndividualDetail div.subsection table tr td:first-child { #IndividualDetail div.subsection table tr td:first-child {
padding-left:20px; padding-left:20px;
} }
#familymap a.familymap {
margin-left:20px;
}
/* Sources /* Sources
----------------------------------------------------- */ ----------------------------------------------------- */
@ -693,7 +696,7 @@ div.subsection{
div.subsection h4 { div.subsection h4 {
margin-bottom:.5em; margin-bottom:.5em;
} }
div.subsection table, div.subsection ol, div.subsection p { div.subsection table, div.subsection ol, div.subsection p, div.subsection > a {
font-size:.9em; font-size:.9em;
} }
div.subsection a { div.subsection a {

View File

@ -508,6 +508,13 @@ div#IndividualDetail table.infolist tbody tr td.ColumnAttribute {
div#IndividualDetail div.subsection table tr td:first-child { div#IndividualDetail div.subsection table tr td:first-child {
padding-left: 20px; padding-left: 20px;
} }
#familymap a.familymap {
margin-left:20px;
text-decoration:none;
}
#familymap a.familymap:hover {
text-decoration:underline;
}
/* Places /* Places
================================================= */ ================================================= */
@ -963,7 +970,7 @@ div.subsection {
div.subsection h4 { div.subsection h4 {
margin-bottom: .5em; margin-bottom: .5em;
} }
div.subsection table, div.subsection ol, div.subsection p { div.subsection table, div.subsection ol, div.subsection p, div.subsection > a {
font-size: .9em; font-size: .9em;
} }
div.subsection a { div.subsection a {

View File

@ -463,6 +463,9 @@ table.individuallist tbody tr td.ColumnName a:hover {
#IndividualDetail div.subsection table tr td:first-child { #IndividualDetail div.subsection table tr td:first-child {
padding-left:20px; padding-left:20px;
} }
#familymap a.familymap {
margin-left:20px;
}
/* Sources /* Sources
----------------------------------------------------- */ ----------------------------------------------------- */
@ -690,7 +693,7 @@ div.subsection{
div.subsection h4 { div.subsection h4 {
margin-bottom:.5em; margin-bottom:.5em;
} }
div.subsection table, div.subsection ol, div.subsection p { div.subsection table, div.subsection ol, div.subsection p, div.subsection > a {
font-size:.9em; font-size:.9em;
} }
div.subsection a { div.subsection a {

View File

@ -464,6 +464,9 @@ table.individuallist tbody tr td.ColumnName a:hover {
#IndividualDetail div.subsection table tr td:first-child { #IndividualDetail div.subsection table tr td:first-child {
padding-left:20px; padding-left:20px;
} }
#familymap a.familymap {
margin-left:20px;
}
/* Sources /* Sources
----------------------------------------------------- */ ----------------------------------------------------- */
@ -691,7 +694,7 @@ div.subsection{
div.subsection h4 { div.subsection h4 {
margin-bottom:.5em; margin-bottom:.5em;
} }
div.subsection table, div.subsection ol, div.subsection p { div.subsection table, div.subsection ol, div.subsection p, div.subsection > a {
font-size:.9em; font-size:.9em;
} }
div.subsection a { div.subsection a {

View File

@ -465,6 +465,9 @@ table.individuallist tbody tr td.ColumnName a:hover {
#IndividualDetail div.subsection table tr td:first-child { #IndividualDetail div.subsection table tr td:first-child {
padding-left:20px; padding-left:20px;
} }
#familymap a.familymap {
margin-left:20px;
}
/* Sources /* Sources
----------------------------------------------------- */ ----------------------------------------------------- */
@ -692,7 +695,7 @@ div.subsection{
div.subsection h4 { div.subsection h4 {
margin-bottom:.5em; margin-bottom:.5em;
} }
div.subsection table, div.subsection ol, div.subsection p { div.subsection table, div.subsection ol, div.subsection p, div.subsection > a {
font-size:.9em; font-size:.9em;
} }
div.subsection a { div.subsection a {

View File

@ -465,6 +465,9 @@ table.individuallist tbody tr td.ColumnName a:hover {
#IndividualDetail div.subsection table tr td:first-child { #IndividualDetail div.subsection table tr td:first-child {
padding-left:20px; padding-left:20px;
} }
#familymap a.familymap {
margin-left:20px;
}
/* Sources /* Sources
----------------------------------------------------- */ ----------------------------------------------------- */
@ -692,7 +695,7 @@ div.subsection{
div.subsection h4 { div.subsection h4 {
margin-bottom:.5em; margin-bottom:.5em;
} }
div.subsection table, div.subsection ol, div.subsection p { div.subsection table, div.subsection ol, div.subsection p, div.subsection > a {
font-size:.9em; font-size:.9em;
} }
div.subsection a { div.subsection a {

View File

@ -458,7 +458,7 @@ table.individuallist tbody tr td.ColumnName a {
/* IndividualDetail /* IndividualDetail
------------------------------------------------------ */ ------------------------------------------------------ */
#IndividualDetail { #IndividualDetail {
background:url(../images/Web_Mainz_MidLight.png) #FFF2C6; background:url(../images/Web_Mainz_Mid.png) #FFF2C6;
} }
#IndividualDetail div table.infolist tr td { #IndividualDetail div table.infolist tr td {
font:normal .9em/1.2em sans-serif; font:normal .9em/1.2em sans-serif;
@ -477,6 +477,9 @@ table.individuallist tbody tr td.ColumnName a {
#IndividualDetail div.subsection table tr td:first-child { #IndividualDetail div.subsection table tr td:first-child {
padding-left:20px; padding-left:20px;
} }
#familymap a.familymap {
margin-left:20px;
}
/* Sources /* Sources
----------------------------------------------------- */ ----------------------------------------------------- */
@ -682,7 +685,7 @@ table.download td.Modified {
min-height:500px; min-height:500px;
padding:1.5em 0 3em 0; padding:1.5em 0 3em 0;
} }
#Home p, #Introduction p, #Surnames p, #Individuals p, #Sources p, #Places p, #Gallery p, { #Home p, #Introduction p, #Surnames p, #Individuals p, #Sources p, #Places p, #Gallery p, #Contact p{
margin:0 20px 1em 20px; margin:0 20px 1em 20px;
padding-top:1em; padding-top:1em;
} }
@ -701,7 +704,7 @@ div.subsection{
div.subsection h4 { div.subsection h4 {
margin-bottom:.5em; margin-bottom:.5em;
} }
div.subsection table, div.subsection ol, div.subsection p { div.subsection table, div.subsection ol, div.subsection p, div.subsection > a {
font-size:.9em; font-size:.9em;
} }
div.subsection a { div.subsection a {

View File

@ -455,6 +455,9 @@ table.individuallist tbody tr td.ColumnName a:hover {
#IndividualDetail div.subsection table tr td:first-child { #IndividualDetail div.subsection table tr td:first-child {
padding-left:20px; padding-left:20px;
} }
#familymap a.familymap {
margin-left:20px;
}
/* Sources /* Sources
----------------------------------------------------- */ ----------------------------------------------------- */
@ -466,7 +469,6 @@ table.individuallist tbody tr td.ColumnName a:hover {
padding:0; padding:0;
} }
#Sources table.infolist tbody tr td.ColumnName a { #Sources table.infolist tbody tr td.ColumnName a {
font-size:.9em;
padding:.1em 10px .3em 10px; padding:.1em 10px .3em 10px;
} }
#Sources table.infolist tbody tr td.ColumnName a:hover { #Sources table.infolist tbody tr td.ColumnName a:hover {
@ -690,7 +692,7 @@ div.subsection{
div.subsection h4 { div.subsection h4 {
margin-bottom:.5em; margin-bottom:.5em;
} }
div.subsection table, div.subsection ol, div.subsection p { div.subsection table, div.subsection ol, div.subsection p, div.subsection > a {
font-size:.9em; font-size:.9em;
} }
div.subsection a { div.subsection a {
@ -937,7 +939,7 @@ div#pedigree {
font-size: 12px; font-size: 12px;
line-height: 130%; line-height: 130%;
font-family: sans-serif; font-family: sans-serif;
color: #FFF; color: #C1B398;
margin: 0; margin: 0;
padding: 0; padding: 0;
background-color: #542; background-color: #542;
@ -945,7 +947,7 @@ div#pedigree {
} }
#footer a, #footer a:visited { #footer a, #footer a:visited {
text-decoration: none; text-decoration: none;
color: #FFF; color: #C1B398;
} }
#footer a:hover { #footer a:hover {
text-decoration: underline; text-decoration: underline;
@ -960,13 +962,13 @@ div#pedigree {
width: 40%; width: 40%;
text-align: left; text-align: left;
margin-left: 10px; margin-left: 10px;
color: #FFF; color: #C1B398;
} }
#footer p#copyright { #footer p#copyright {
float: right; float: right;
width: 40%; width: 40%;
text-align: right; text-align: right;
color: #FFF; color: #C1B398;
margin-right: 10px; margin-right: 10px;
} }
#footer p#copyright img { #footer p#copyright img {

View File

@ -509,6 +509,14 @@ div#IndividualDetail table.infolist tbody tr td.ColumnAttribute {
div#IndividualDetail div.subsection table tr td:first-child { div#IndividualDetail div.subsection table tr td:first-child {
padding-left:20px; padding-left:20px;
} }
#familymap a.familymap {
margin-left:20px;
text-decoration:none;
color:rgb(0,0,0);
}
#familymap a.familymap:hover {
text-decoration:underline;
}
/* Places /* Places
----------------------------------------------------- */ ----------------------------------------------------- */
@ -935,7 +943,7 @@ div.subsection{
div.subsection h4 { div.subsection h4 {
margin-bottom:.5em; margin-bottom:.5em;
} }
div.subsection table, div.subsection ol, div.subsection p { div.subsection table, div.subsection ol, div.subsection p, div.subsection > a {
font-size:.9em; font-size:.9em;
} }
div.subsection a { div.subsection a {