diff --git a/data/css/Web_Basic-Peach.css b/data/css/Web_Basic-Peach.css index 7b2d85696..468ebb8e2 100644 --- a/data/css/Web_Basic-Peach.css +++ b/data/css/Web_Basic-Peach.css @@ -975,7 +975,6 @@ table.calendar { .calendar td.highlight div.date { color: #36220B; background-color: #FFC35E; - vertical-align: middle; } /* Calendar : Previous-Next Month */ @@ -985,7 +984,6 @@ table.calendar { .calendar td.next div.date { color: #FFC35E; background-color: #FFFBE7; - vertical-align: middle; } /* Calendar : Full Year */ diff --git a/data/css/narrative-maps.css b/data/css/narrative-maps.css index 74f12726e..ab52d67f5 100644 --- a/data/css/narrative-maps.css +++ b/data/css/narrative-maps.css @@ -75,12 +75,12 @@ div#FamilyMapDetail div#references table.infolist tbody tr td.ColumnPlace { background-color: white; -webkit-filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2)); filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2)); - padding: 15px; - border-radius: 10px; + padding: 5px; + border-radius: 8px; border: 2px solid #111111; - bottom: 12px; - left: -50px; - min-width: 450px; + bottom: 8px; + left: -10px; + min-width: 500px; } #map_canvas .ol-popup:after, #map_canvas .ol-popup:before { top: 100%; @@ -108,13 +108,29 @@ div#FamilyMapDetail div#references table.infolist tbody tr td.ColumnPlace { top: 2px; right: 8px; } +#map_canvas .ol-popup-title { + background-color: #ededed; + padding: 0 0.5em; +} +#map_canvas .ol-popup-content { + color: #111; + font: bold 0.9em sans-serif; + max-height: 200px; + overflow-y: auto; + padding: 0 0.5em 15px 0.5em; +} +#map_canvas .ol-popup-content a { + color: #111; +} +#map_canvas .ol-popup-content a:visited { + color: green; +} +#map_canvas .ol-popup-content a:hover { + color: red; +} #map_canvas .ol-popup-closer:after { content: "✖"; } -#popup-content { - max-height: 250px; - overflow-y: auto; -} #map_canvas .ol-control { position: absolute; background-color: rgba(255,255,255,0.1); diff --git a/gramps/plugins/webreport/common.py b/gramps/plugins/webreport/common.py index 3814cdd4c..e000b54f6 100644 --- a/gramps/plugins/webreport/common.py +++ b/gramps/plugins/webreport/common.py @@ -289,6 +289,7 @@ STAMEN_MARKERS = """ OPENLAYER = """ var element = document.getElementById('popup'); var content = document.getElementById('popup-content'); + var ptitle = document.getElementById('popup-title'); var closer = document.getElementById('popup-closer'); var tip = document.getElementById('tooltip'); var tipcontent = document.getElementById('tooltip-content'); @@ -314,7 +315,7 @@ OPENLAYER = """ popup.setPosition(undefined); closer.blur(); return false; - }; + }; map.on('pointermove', function(evt) { evt.preventDefault() var feature = this.forEachFeatureAtPixel(evt.pixel, @@ -323,7 +324,6 @@ OPENLAYER = """ }); map.getTargetElement().style.cursor = feature ? 'pointer' : ''; if (evt.dragging) { - popup.setPosition(undefined); tooltip.setPosition(undefined); return; } @@ -344,10 +344,9 @@ OPENLAYER = """ if (feature) { var coordinate = evt.coordinate; var title = '

' + feature.get('name') + '

'; - content.innerHTML = title + feature.get('data'); + ptitle.innerHTML = title; + content.innerHTML = feature.get('data'); popup.setPosition(coordinate); - } else { - popup.setPosition(undefined); } }); }); diff --git a/gramps/plugins/webreport/person.py b/gramps/plugins/webreport/person.py index c4b0169fb..4919bb35f 100644 --- a/gramps/plugins/webreport/person.py +++ b/gramps/plugins/webreport/person.py @@ -756,7 +756,6 @@ class PersonPages(BasePage): if number_markers > 0: tracelife = "[" seq_ = 0 - old_place_title = "" links = "" ln_str = "%s" @@ -939,7 +938,10 @@ class PersonPages(BasePage): mapdetail += popup popup += Html("a", href="#", id="popup-closer", class_="ol-popup-closer") - popup += Html("div", id="popup-content") + popup += Html("div", id="popup-title", + class_="ol-popup-title") + popup += Html("div", id="popup-content", + class_="ol-popup-content") with Html("div", id="tooltip", class_="ol-popup", inline=True) as tooltip: mapdetail += tooltip diff --git a/gramps/plugins/webreport/place.py b/gramps/plugins/webreport/place.py index b973970fd..c827c9782 100644 --- a/gramps/plugins/webreport/place.py +++ b/gramps/plugins/webreport/place.py @@ -415,6 +415,8 @@ class PlacePages(BasePage): placedetail += popup popup += Html("a", href="#", id="popup-closer", class_="ol-popup-closer") + popup += Html("div", id="popup-title", + class_="ol-popup-title") popup += Html("div", id="popup-content") with Html("div", id="tooltip", class_="ol-popup", inline=True) as tooltip: