Mainz css file produces left aligned FamilyMap pages (#489)

* Mainz css file produces left aligned FamilyMap pages

Solving Mainz problem creates new ones with Basic-Blue
and Nebraska styles sheet.

Some cleanup with unused css file (GeoView.css)

Fixes #10268

* Many problems with css files and the ancestor tree

* media file not created if we have unused media.
This commit is contained in:
Serge Noiraud 2017-11-22 10:27:40 +01:00 committed by GitHub
parent f9da7ec19a
commit 88639fcd7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 54 additions and 86 deletions

View File

@ -1,54 +0,0 @@
/*
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright 2009 Serge Noiraud
#
# This program 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; either version 2 of the License, or
# (at your option) any later version.
#
# This program 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 this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
----------------------------------------------------------------------------
GeoView Style Sheet
Style Name: GeoView
Style Author: Serge Noiraud (2009)
----------------------------------------------------------------------------
This file was created for GeoView usage.
GeoView Styles
----------------------------------------------------- */
#geo-map
{
margin-left:0px;
margin-top:0px;
margin-right:auto;
margin-bottom:auto;
}
/* InfoWindow */
#geo-info {
font-size:10pt;
max-height:200px;
max-width: 600px;
min-width: 300px;
text-align: left;
padding-right: 6px;
overflow-x: auto;
overflow-y: auto;
}

View File

@ -86,6 +86,12 @@ h1 {
font-weight: bold; font-weight: bold;
padding-left: 15px; padding-left: 15px;
} }
h2 {
display:block;
margin:0;
padding:0;
text-align: center;
}
h3 { h3 {
font-size: large; font-size: large;
padding-left: 15px; padding-left: 15px;
@ -415,7 +421,7 @@ div#SourceDetail {
} }
.subsection { .subsection {
clear: both; clear: both;
overflow: hidden; overflow: visible;
} }
.subsection p { .subsection p {
margin: 0px; margin: 0px;

View File

@ -134,7 +134,6 @@ h5, h6 {
margin:1.3em 0 .5em 1em; margin:1.3em 0 .5em 1em;
} }
p#description { p#description {
max-width: 800px;
margin: 0; margin: 0;
padding: 1em 20px; padding: 1em 20px;
text-indent: 30px; text-indent: 30px;

View File

@ -86,6 +86,12 @@ h1 {
font-weight: bold; font-weight: bold;
padding-left: 15px; padding-left: 15px;
} }
h2 {
display:block;
margin:0;
padding:0;
text-align: center;
}
h3 { h3 {
font-size: large; font-size: large;
padding-left: 15px; padding-left: 15px;
@ -465,7 +471,7 @@ div#SourceDetail {
} }
.subsection { .subsection {
clear: both; clear: both;
overflow: hidden; overflow: visible;
} }
.subsection p { .subsection p {
margin: 0px; margin: 0px;

View File

@ -86,6 +86,12 @@ h1 {
font-weight: bold; font-weight: bold;
padding-left: 15px; padding-left: 15px;
} }
h2 {
display:block;
margin:0;
padding:0;
text-align: center;
}
h3 { h3 {
font-size: large; font-size: large;
padding-left: 15px; padding-left: 15px;
@ -458,7 +464,7 @@ div#SourceDetail {
} }
.subsection { .subsection {
clear: both; clear: both;
overflow: hidden; overflow: visible;
} }
.subsection p { .subsection p {
margin: 0px; margin: 0px;

View File

@ -86,6 +86,12 @@ h1 {
font-weight: bold; font-weight: bold;
padding-left: 15px; padding-left: 15px;
} }
h2 {
display:block;
margin:0;
padding:0;
text-align: center;
}
h3 { h3 {
font-size: large; font-size: large;
padding-left: 15px; padding-left: 15px;
@ -458,7 +464,7 @@ div#SourceDetail {
} }
.subsection { .subsection {
clear: both; clear: both;
overflow: hidden; overflow: visible;
} }
.subsection p { .subsection p {
margin: 0px; margin: 0px;

View File

@ -86,6 +86,12 @@ h1 {
font-weight: bold; font-weight: bold;
padding-left: 15px; padding-left: 15px;
} }
h2 {
display:block;
margin:0;
padding:0;
text-align: center;
}
h3 { h3 {
font-size: large; font-size: large;
padding-left: 15px; padding-left: 15px;
@ -458,7 +464,7 @@ div#SourceDetail {
} }
.subsection { .subsection {
clear: both; clear: both;
overflow: hidden; overflow: visible;
} }
.subsection p { .subsection p {
margin: 0px; margin: 0px;

View File

@ -67,7 +67,7 @@ body {
background: url(../images/Web_Mainz_Bkgd.png) black repeat; background: url(../images/Web_Mainz_Bkgd.png) black repeat;
} }
body > div { body > div {
width: 950px; width: 85%;
margin: 0px auto; margin: 0px auto;
background: url(../images/Web_Mainz_Mid.png) #FFF2C6 repeat; background: url(../images/Web_Mainz_Mid.png) #FFF2C6 repeat;
overflow: hidden; overflow: hidden;
@ -90,6 +90,12 @@ h1 {
font-style: italic; font-style: italic;
margin-left: 2em; margin-left: 2em;
} }
h2 {
display:block;
margin:0;
padding:0;
text-align: center;
}
h3 { h3 {
font-size: xx-large; font-size: xx-large;
font-weight: normal; font-weight: normal;
@ -143,7 +149,7 @@ div#nav ul li, #subnavigation ul li {
float: left; float: left;
} }
div#nav ul li a, #subnavigation ul li a { div#nav ul li a, #subnavigation ul li a {
display: block; display: run-in;
padding: 0.4em 0.8em 0.3em 0.8em; padding: 0.4em 0.8em 0.3em 0.8em;
font-size: smaller; font-size: smaller;
font-family: sans-serif; font-family: sans-serif;

View File

@ -114,7 +114,7 @@ h1 {
font:normal 2em/1.2em serif; font:normal 2em/1.2em serif;
} }
h2 { h2 {
display:none; display:block;
} }
h3 { h3 {
font:normal 2em/1.2em serif; font:normal 2em/1.2em serif;
@ -138,7 +138,6 @@ h5, h6 {
p#description { p#description {
color:#542; color:#542;
max-width:800px;
margin:0; margin:0;
padding:1em 20px; padding:1em 20px;
background-color:#FFF; background-color:#FFF;

View File

@ -155,7 +155,6 @@ h5, h6 {
margin:1.3em 0 .5em 1em; margin:1.3em 0 .5em 1em;
} }
p#description { p#description {
max-width:800px;
margin:0; margin:0;
padding:1em 20px; padding:1em 20px;
} }

View File

@ -45,6 +45,9 @@ Females Web_Gender_Female.png
} }
#treeContainer { #treeContainer {
position:relative; position:relative;
display: table-cell;
vertical-align: middle;
overflow: visible;
z-index:1; z-index:1;
} }
#treeContainer div.boxbg { #treeContainer div.boxbg {

View File

@ -23,7 +23,6 @@
body#FamilyMap { body#FamilyMap {
background-color: #000; background-color: #000;
padding: 0 14px; padding: 0 14px;
width: 965px;
} }
/* Family Maps /* Family Maps
@ -32,8 +31,9 @@ body#FamilyMap {
margin-left: 10px; margin-left: 10px;
margin-right: 10px; margin-right: 10px;
border: solid 4px #000; border: solid 4px #000;
width: 931px; margin: 0px auto;
height: 1000px; width: 800px;
height: 800px;
} }
/* Place Maps /* Place Maps

View File

@ -90,7 +90,6 @@ class FamilyPages(BasePage):
""" """
BasePage.__init__(self, report, title="") BasePage.__init__(self, report, title="")
self.family_dict = defaultdict(set) self.family_dict = defaultdict(set)
self.person = None
self.familymappages = None self.familymappages = None
def display_pages(self, title): def display_pages(self, title):
@ -343,12 +342,6 @@ class FamilyPages(BasePage):
for evt_ref in family.get_event_ref_list(): for evt_ref in family.get_event_ref_list():
event = self.r_db.get_event_from_handle(evt_ref.ref) event = self.r_db.get_event_from_handle(evt_ref.ref)
media_list += event.get_media_list() media_list += event.get_media_list()
thumbnail = self.disp_first_img_as_thumbnail(media_list,
family)
if thumbnail:
relationshipdetail += thumbnail
self.person = None # no longer used
relationshipdetail += Html( relationshipdetail += Html(
"h2", self.page_title, inline=True) + ( "h2", self.page_title, inline=True) + (

View File

@ -147,6 +147,8 @@ class MediaPages(BasePage):
BasePage.__init__(self, report, title) BasePage.__init__(self, report, title)
output_file, sio = self.report.create_file("media") output_file, sio = self.report.create_file("media")
# save the media file name in case we create unused media pages
self.cur_fname = self.report.cur_fname
medialistpage, head, body = self.write_header(self._('Media')) medialistpage, head, body = self.write_header(self._('Media'))
ldatec = 0 ldatec = 0
@ -276,6 +278,7 @@ class MediaPages(BasePage):
# send page out for processing # send page out for processing
# and close the file # and close the file
self.report.cur_fname = self.cur_fname
self.xhtml_writer(medialistpage, output_file, sio, ldatec) self.xhtml_writer(medialistpage, output_file, sio, ldatec)
def media_ref_link(self, handle, name, uplink=False): def media_ref_link(self, handle, name, uplink=False):

View File

@ -80,7 +80,7 @@ LOG = logging.getLogger(".NarrativeWeb")
getcontext().prec = 8 getcontext().prec = 8
_WIDTH = 160 _WIDTH = 160
_HEIGHT = 64 _HEIGHT = 120
_VGAP = 10 _VGAP = 10
_HGAP = 30 _HGAP = 30
_SHADOW = 5 _SHADOW = 5

View File

@ -139,16 +139,6 @@ def load_on_reg(dbstate, uistate, plugin):
["DropDown-Menus", 0, "Drop Down Menus", ["DropDown-Menus", 0, "Drop Down Menus",
path_css("Web_DropDown-Menus.css"), None, [], [] ], path_css("Web_DropDown-Menus.css"), None, [], [] ],
# GeoView style sheet with its image
["GeoView", 0, "GeoView",
path_css("GeoView.css"), None,
[path_img("crosshairs.png"),
path_img("gramps-geo-altmap.png"),
path_img("gramps-geo-birth.png"),
path_img("gramps-geo-death.png"),
path_img("gramps-geo-mainmap.png"),
path_img("gramps-geo-marriage.png")], [] ],
# no style sheet option # no style sheet option
["No style sheet",1, _("No style sheet"), [], None, [], [] ], ["No style sheet",1, _("No style sheet"), [], None, [], [] ],