WEBCAL: Trying to have a better web calendar (#917)
* WEBCAL: Have config files for multiple databases. * WEBCAL: best management for the narrative web link * WEBCAL: use arrows, compress monthname and arrows adapt the css files accordingly * WEBCAL: use arrows in one day within a year compress monthname and arrows adapt the css files accordingly * WEBCAL: index go now to the current month. before this patch, the default month for the year calendar was the month found at the web calendar generation. Now, even if you create this report 8 months ago, the current index will point to the current month. * WEBCAL: trailing space. * WEBCAL: year glance + some pylint improvements * WEBCAL: incorrect width size with Mainz css. * WEBCAL: problem with Visually css file * WEBCAL: The table cell is highlighted when hover. * WEBCAL: better pylint score. * WEBCAL: Better rendering for full yer at a glance * WEBCAL: better rendering on small devices * WEBCAL: better quality code
This commit is contained in:
parent
fc9e5c2a4a
commit
5157700da3
@ -96,6 +96,16 @@ body > div {
|
||||
.content {
|
||||
padding: 0em 0.5em;
|
||||
}
|
||||
body#fullyearlinked table.calendar {
|
||||
float: none;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
@media only screen and (width > 1080px) {
|
||||
body#fullyearlinked table.calendar {
|
||||
float: left;
|
||||
width: 33.3%;
|
||||
}
|
||||
}
|
||||
|
||||
/* General Text
|
||||
@ -251,11 +261,6 @@ div#nav::after {
|
||||
|
||||
.nav {
|
||||
background: none; /* Works in IE too. */
|
||||
/*
|
||||
width: 200px;
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
*/
|
||||
}
|
||||
|
||||
/* Undo some of the #nav styles - to enable the class .nav */
|
||||
@ -292,7 +297,6 @@ div#nav::after {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.nav.responsive li {
|
||||
/* float: left; */
|
||||
display: block;
|
||||
text-align: left;
|
||||
background-color: #EEE;
|
||||
@ -754,16 +758,12 @@ table.calendar {
|
||||
background-color: white;
|
||||
border-bottom-style: none;
|
||||
padding-top: 1em;
|
||||
vertical-align: top;
|
||||
height: 2em;
|
||||
}
|
||||
.calendar thead th abbr {
|
||||
border-bottom-style: none;
|
||||
}
|
||||
#CreatorInfo {
|
||||
float: right;
|
||||
margin: -1em 15px 0px 0px;
|
||||
font-weight: bold;
|
||||
color: #999;
|
||||
}
|
||||
.calendar tfoot tr td {
|
||||
border-top: solid 4px #999;
|
||||
vertical-align: middle;
|
||||
@ -772,7 +772,6 @@ table.calendar {
|
||||
/* Calendar : Date Numeral */
|
||||
.calendar div.date {
|
||||
float: right;
|
||||
width: 1.8em;
|
||||
font-size: large;
|
||||
text-align: center;
|
||||
background-color: #CCC;
|
||||
@ -781,7 +780,7 @@ table.calendar {
|
||||
|
||||
/* Calendar : Date Container */
|
||||
.calendar td {
|
||||
padding: 0px 0px 0px 1ex;
|
||||
padding: 0px 5px 0px 1ex;
|
||||
border-width: 1px 0px 0px 1px;
|
||||
border-style: solid;
|
||||
border-color: #CCC;
|
||||
@ -789,7 +788,7 @@ table.calendar {
|
||||
}
|
||||
.calendar td:first-child {
|
||||
border-left-style: none;
|
||||
padding: 0px 0px 0px 1ex;
|
||||
padding: 0px 5px 0px 1ex;
|
||||
}
|
||||
.calendar tbody tr:first-child td {
|
||||
border-top-style: none;
|
||||
@ -833,8 +832,6 @@ body#fullyearlinked div.content {
|
||||
overflow: hidden;
|
||||
}
|
||||
body#fullyearlinked table.calendar {
|
||||
float: left;
|
||||
width: 33.3%;
|
||||
height: 18em;
|
||||
border: solid 1px black;
|
||||
}
|
||||
@ -851,3 +848,48 @@ body#fullyearlinked table.calendar tbody td {
|
||||
body#OneDay div.content {
|
||||
overflow: hidden;
|
||||
}
|
||||
body#OneDay h3 {
|
||||
font-size: xx-large;
|
||||
vertical-align: top;
|
||||
height: 2em;
|
||||
}
|
||||
#WebCal table.calendar tfoot {
|
||||
display: none;
|
||||
}
|
||||
#WebCal table.calendar tr td {
|
||||
word-wrap: break-word;
|
||||
padding: 2px;
|
||||
}
|
||||
#WebCal .calendar tr td .empty {
|
||||
border: 5px solid rgba(255,255,255,.0);
|
||||
}
|
||||
#WebCal .calendar tr td .clickable {
|
||||
border: 5px solid rgba(255,255,255,.0);
|
||||
}
|
||||
#WebCal .calendar tr td .clickable:hover {
|
||||
display: block;
|
||||
overflow:auto;
|
||||
word-wrap: break-word;
|
||||
cursor: text;
|
||||
border-radius: 10px 0px 10px 10px;
|
||||
border: 5px solid #555;
|
||||
padding: 0px;
|
||||
}
|
||||
body#fullyearlinked #YearGlance tbody td {
|
||||
height:48px;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
padding-left: 6px;
|
||||
}
|
||||
body#fullyearlinked #YearGlance tbody td .date {
|
||||
font-size: 30px;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
border-radius: 45px;
|
||||
float: none;
|
||||
border: 5px solid rgba(0,0,0,.0);
|
||||
}
|
||||
body#fullyearlinked #YearGlance tbody td:hover .date {
|
||||
border-radius: 45px;
|
||||
border: 5px solid;
|
||||
}
|
||||
|
@ -119,6 +119,16 @@ img {
|
||||
.content {
|
||||
padding: 0em 0.5em;
|
||||
}
|
||||
body#fullyearlinked table.calendar {
|
||||
float: none;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
@media only screen and (width > 1080px) {
|
||||
body#fullyearlinked table.calendar {
|
||||
float: left;
|
||||
width: 33.3%;
|
||||
}
|
||||
}
|
||||
|
||||
/* General Text
|
||||
@ -401,11 +411,6 @@ div#nav::after {
|
||||
|
||||
.nav {
|
||||
background: none; /* Works in IE too. */
|
||||
/*
|
||||
width: 200px;
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
*/
|
||||
}
|
||||
|
||||
/* Undo some of the #nav styles - to enable the class .nav */
|
||||
@ -436,13 +441,11 @@ div#nav::after {
|
||||
|
||||
.nav.responsive {position: absolute; display: block; z-index: 100;}
|
||||
.nav.responsive a.icon {
|
||||
/* position: absolute; */
|
||||
right: 0;
|
||||
top: 0;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.nav.responsive li {
|
||||
/* float: left; */
|
||||
display: block;
|
||||
text-align: left;
|
||||
background-color: #13A926;
|
||||
@ -741,7 +744,7 @@ div#EventDetail table.eventlist tbody tr td.ColumnAttribute {
|
||||
div#EventDetail table.eventlist tbody tr td.ColumnDate {
|
||||
border-top: solid 1px #000;
|
||||
}
|
||||
|
||||
|
||||
/* Events
|
||||
----------------------------------------------------- */
|
||||
#EventList table.infolist tr td a,
|
||||
@ -1533,7 +1536,7 @@ div#pedigree {
|
||||
/* Calendar Styles
|
||||
-------------------------------------------------------------------------------------------- */
|
||||
#OneDay, #WebCal, #YearGlance {
|
||||
width: 95%
|
||||
width: 100%
|
||||
}
|
||||
/* Calendar : General */
|
||||
.calendar {
|
||||
@ -1562,17 +1565,8 @@ div#pedigree {
|
||||
color: #542;
|
||||
padding:.3em 0 .2em 0;
|
||||
background-color: #FFF;
|
||||
}
|
||||
#CreatorInfo {
|
||||
float:right;
|
||||
color: #FFF;
|
||||
margin:-24px 10px 0 0;
|
||||
}
|
||||
#CreatorInfo a {
|
||||
color: #FFF;
|
||||
}
|
||||
#CreatorInfo a:hover {
|
||||
color: #FFF;
|
||||
vertical-align: top;
|
||||
height: 2em;
|
||||
}
|
||||
.calendar thead tr th.weekend,
|
||||
.calendar thead tr th.weekday {
|
||||
@ -1597,8 +1591,8 @@ div#pedigree {
|
||||
font-size:1.2em;
|
||||
line-height:100%;
|
||||
text-align:center;
|
||||
border: 5px solid rgba(0,0,0,.0);
|
||||
color: #542;
|
||||
margin:0 0 0 .5em;
|
||||
padding:.2em 0;
|
||||
background-color: #D8F3D6;
|
||||
}
|
||||
@ -1638,9 +1632,12 @@ div#pedigree {
|
||||
display:block;
|
||||
width:92%;
|
||||
margin:0 4%;
|
||||
padding:.2em 0 .3em 0;
|
||||
padding:.6em 0 .3em 0;
|
||||
border-top: dashed 1px #000;
|
||||
}
|
||||
.calendar tbody tr td ul li:first-child {
|
||||
border-top: 10px;
|
||||
}
|
||||
|
||||
/* Calendar : Birthday, Anniversary, Highlight */
|
||||
.calendar tbody tr td ul li em {
|
||||
@ -1671,13 +1668,10 @@ body#fullyearlinked {
|
||||
background-color: #FFF;
|
||||
}
|
||||
body#fullyearlinked div.content {
|
||||
width:963px;
|
||||
margin:0 auto;
|
||||
padding:15px 0 2px 2px;
|
||||
}
|
||||
body#fullyearlinked table.calendar {
|
||||
float:left;
|
||||
width:320px;
|
||||
height:18em;
|
||||
border:solid 1px #000;
|
||||
}
|
||||
@ -1692,10 +1686,8 @@ body#fullyearlinked table.calendar thead tr th.monthName {
|
||||
padding:2px 0;
|
||||
border-bottom: solid 1px #000;
|
||||
}
|
||||
body#fullyearlinked table.calendar tbody tr td {
|
||||
height:3em;
|
||||
}
|
||||
body#fullyearlinked table.calendar tbody tr td.emptyDays {
|
||||
height:52px;
|
||||
background-color: #FFF;
|
||||
}
|
||||
body#fullyearlinked table.calendar tbody tr td.saturday {
|
||||
@ -1733,3 +1725,43 @@ table.oneday tbody tr td.ColumnText {
|
||||
table.oneday tbody tr td.ColumnEvent {
|
||||
width: 10%;
|
||||
}
|
||||
#WebCal table.calendar tfoot {
|
||||
display: none;
|
||||
}
|
||||
#WebCal table.calendar tr td {
|
||||
word-wrap: break-word;
|
||||
padding: 2px;
|
||||
}
|
||||
#WebCal .calendar tr td .empty {
|
||||
border: 5px solid rgba(255,255,255,.0);
|
||||
}
|
||||
#WebCal .calendar tr td .clickable {
|
||||
border: 5px solid rgba(255,255,255,.0);
|
||||
}
|
||||
#WebCal .calendar tr td .clickable:hover {
|
||||
display: block;
|
||||
overflow:auto;
|
||||
word-wrap: break-word;
|
||||
cursor: text;
|
||||
border-radius: 10px 0px 10px 10px;
|
||||
border: 5px solid #000290;
|
||||
padding: 0px;
|
||||
}
|
||||
body#fullyearlinked #YearGlance tbody td {
|
||||
height:48px;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
padding-left: 3px;
|
||||
}
|
||||
body#fullyearlinked #YearGlance tbody td .date {
|
||||
font-size: 30px;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
border-radius: 45px;
|
||||
float: none;
|
||||
border: 5px solid rgba(0,0,0,.0);
|
||||
}
|
||||
body#fullyearlinked #YearGlance tbody td:hover .date {
|
||||
border-radius: 45px;
|
||||
border: 5px solid;
|
||||
}
|
||||
|
@ -96,6 +96,16 @@ body > div {
|
||||
.content {
|
||||
padding: 0em 0.5em;
|
||||
}
|
||||
body#fullyearlinked table.calendar {
|
||||
float: none;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
@media only screen and (width > 1080px) {
|
||||
body#fullyearlinked table.calendar {
|
||||
float: left;
|
||||
width: 33.3%;
|
||||
}
|
||||
}
|
||||
|
||||
/* General Text
|
||||
@ -255,11 +265,6 @@ div#nav::after {
|
||||
|
||||
.nav {
|
||||
background: none; /* Works in IE too. */
|
||||
/*
|
||||
width: 200px;
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
*/
|
||||
}
|
||||
|
||||
/* Undo some of the #nav styles - to enable the class .nav */
|
||||
@ -296,11 +301,10 @@ div#nav::after {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.nav.responsive li {
|
||||
/* float: left; */
|
||||
display: block;
|
||||
text-align: left;
|
||||
color: #454;
|
||||
background-color: #E0E6E0;
|
||||
background-color: #454;
|
||||
/* required by IE */
|
||||
float: left;
|
||||
clear: both;
|
||||
@ -809,16 +813,12 @@ table.calendar {
|
||||
background-color: white;
|
||||
border-bottom-style: none;
|
||||
padding-top: 1em;
|
||||
vertical-align: top;
|
||||
height: 2em;
|
||||
}
|
||||
.calendar thead th abbr {
|
||||
border-bottom-style: none;
|
||||
}
|
||||
#CreatorInfo {
|
||||
float: right;
|
||||
margin: -1em 15px 0px 0px;
|
||||
font-weight: bold;
|
||||
color: #7C8F7C;
|
||||
}
|
||||
.calendar tfoot tr td {
|
||||
border-top: solid 4px #7C8F7C;
|
||||
vertical-align: middle;
|
||||
@ -836,7 +836,7 @@ table.calendar {
|
||||
|
||||
/* Calendar : Date Container */
|
||||
.calendar td {
|
||||
padding: 0px 0px 0px 1ex;
|
||||
padding: 0px 5px 0px 1ex;
|
||||
border-width: 1px 0px 0px 1px;
|
||||
border-style: solid;
|
||||
border-color: #9DBF9D;
|
||||
@ -844,7 +844,7 @@ table.calendar {
|
||||
}
|
||||
.calendar td:first-child {
|
||||
border-left-style: none;
|
||||
padding: 0px 0px 0px 1ex;
|
||||
padding: 0px 5px 0px 1ex;
|
||||
}
|
||||
.calendar tbody tr:first-child td {
|
||||
border-top-style: none;
|
||||
@ -892,8 +892,6 @@ body#fullyearlinked div.content {
|
||||
overflow: hidden;
|
||||
}
|
||||
body#fullyearlinked table.calendar {
|
||||
float: left;
|
||||
width: 33.3%;
|
||||
height: 18em;
|
||||
border: solid 1px black;
|
||||
}
|
||||
@ -910,3 +908,47 @@ body#fullyearlinked table.calendar tbody td {
|
||||
body#OneDay div.content {
|
||||
overflow: hidden;
|
||||
}
|
||||
body#OneDay h3 {
|
||||
font-size: xx-large;
|
||||
vertical-align: top;
|
||||
height: 2em;
|
||||
}
|
||||
#WebCal table.calendar tfoot {
|
||||
display: none;
|
||||
}
|
||||
#WebCal table.calendar tr td {
|
||||
word-wrap: break-word;
|
||||
padding: 2px;
|
||||
}
|
||||
#WebCal .calendar tr td .empty {
|
||||
border: 5px solid rgba(255,255,255,.0);
|
||||
}
|
||||
#WebCal .calendar tr td .clickable {
|
||||
border: 5px solid rgba(255,255,255,.0);
|
||||
}
|
||||
#WebCal .calendar tr td .clickable:hover {
|
||||
display: block;
|
||||
overflow:auto;
|
||||
word-wrap: break-word;
|
||||
cursor: text;
|
||||
border-radius: 10px 0px 10px 10px;
|
||||
border: 5px solid #454;
|
||||
}
|
||||
body#fullyearlinked #YearGlance tbody td {
|
||||
height:48px;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
padding-left: 6px;
|
||||
}
|
||||
body#fullyearlinked #YearGlance tbody td .date {
|
||||
font-size: 30px;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
border-radius: 45px;
|
||||
float: none;
|
||||
border: 5px solid rgba(0,0,0,.0);
|
||||
}
|
||||
body#fullyearlinked #YearGlance tbody td:hover .date {
|
||||
border-radius: 45px;
|
||||
border: 5px solid;
|
||||
}
|
||||
|
@ -96,6 +96,16 @@ body > div {
|
||||
.content {
|
||||
padding: 0em 0.5em;
|
||||
}
|
||||
body#fullyearlinked table.calendar {
|
||||
float: none;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
@media only screen and (width > 1080px) {
|
||||
body#fullyearlinked table.calendar {
|
||||
float: left;
|
||||
width: 33.3%;
|
||||
}
|
||||
}
|
||||
|
||||
/* General Text
|
||||
@ -253,11 +263,6 @@ div#nav::after {
|
||||
|
||||
.nav {
|
||||
background: none; /* Works in IE too. */
|
||||
/*
|
||||
width: 200px;
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
*/
|
||||
}
|
||||
|
||||
/* Undo some of the #nav styles - to enable the class .nav */
|
||||
@ -294,7 +299,6 @@ div#nav::after {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.nav.responsive li {
|
||||
/* float: left; */
|
||||
display: block;
|
||||
text-align: left;
|
||||
background-color: #669;
|
||||
@ -796,19 +800,12 @@ table.calendar {
|
||||
background-color: #FAFAFF;
|
||||
border-bottom-style: none;
|
||||
padding-top: 1em;
|
||||
vertical-align: top;
|
||||
height: 2em;
|
||||
}
|
||||
.calendar thead th abbr {
|
||||
border-bottom-style: none;
|
||||
}
|
||||
#CreatorInfo {
|
||||
float: right;
|
||||
margin: -1em 15px 0px 0px;
|
||||
font-weight: bold;
|
||||
color: #669;
|
||||
}
|
||||
#CreatorInfo a[href]:hover {
|
||||
background-color: #B4B4CB;
|
||||
}
|
||||
.calendar tfoot tr td {
|
||||
border-top: solid 4px #669;
|
||||
vertical-align: middle;
|
||||
@ -826,7 +823,7 @@ table.calendar {
|
||||
|
||||
/* Calendar : Date Container */
|
||||
.calendar td {
|
||||
padding: 0px 0px 0px 1ex;
|
||||
padding: 0px 5px 0px 1ex;
|
||||
border-width: 1px 0px 0px 1px;
|
||||
border-style: solid;
|
||||
border-color: #B4B4CB;
|
||||
@ -834,7 +831,7 @@ table.calendar {
|
||||
}
|
||||
.calendar td:first-child {
|
||||
border-left-style: none;
|
||||
padding: 0px 0px 0px 1ex;
|
||||
padding: 0px 5px 0px 1ex;
|
||||
}
|
||||
.calendar tbody tr:first-child td {
|
||||
border-top-style: none;
|
||||
@ -885,8 +882,6 @@ body#fullyearlinked div.content {
|
||||
overflow: hidden;
|
||||
}
|
||||
body#fullyearlinked table.calendar {
|
||||
float: left;
|
||||
width: 33.3%;
|
||||
height: 18em;
|
||||
border: solid 1px black;
|
||||
}
|
||||
@ -903,3 +898,48 @@ body#fullyearlinked table.calendar tbody td {
|
||||
body#OneDay div.content {
|
||||
overflow: hidden;
|
||||
}
|
||||
body#OneDay h3 {
|
||||
font-size: xx-large;
|
||||
vertical-align: top;
|
||||
height: 2em;
|
||||
}
|
||||
#WebCal table.calendar tfoot {
|
||||
display: none;
|
||||
}
|
||||
#WebCal table.calendar tr td {
|
||||
word-wrap: break-word;
|
||||
padding: 2px;
|
||||
}
|
||||
#WebCal .calendar tr td .empty {
|
||||
border: 5px solid rgba(255,255,255,.0);
|
||||
}
|
||||
#WebCal .calendar tr td .clickable {
|
||||
border: 5px solid rgba(255,255,255,.0);
|
||||
}
|
||||
#WebCal .calendar tr td .clickable:hover {
|
||||
display: block;
|
||||
overflow:auto;
|
||||
word-wrap: break-word;
|
||||
cursor: text;
|
||||
border-radius: 10px 0px 10px 10px;
|
||||
border: 5px solid #2E2E61;
|
||||
padding: 0px;
|
||||
}
|
||||
body#fullyearlinked #YearGlance tbody td {
|
||||
height:48px;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
padding-left: 6px;
|
||||
}
|
||||
body#fullyearlinked #YearGlance tbody td .date {
|
||||
font-size: 30px;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
border-radius: 45px;
|
||||
float: none;
|
||||
border: 5px solid rgba(0,0,0,.0);
|
||||
}
|
||||
body#fullyearlinked #YearGlance tbody td:hover .date {
|
||||
border-radius: 45px;
|
||||
border: 5px solid;
|
||||
}
|
||||
|
@ -96,6 +96,16 @@ body > div {
|
||||
.content {
|
||||
padding: 0em 0.5em;
|
||||
}
|
||||
body#fullyearlinked table.calendar {
|
||||
float: none;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
@media only screen and (width > 1080px) {
|
||||
body#fullyearlinked table.calendar {
|
||||
float: left;
|
||||
width: 33.3%;
|
||||
}
|
||||
}
|
||||
|
||||
/* General Text
|
||||
@ -253,11 +263,6 @@ div#nav::after {
|
||||
|
||||
.nav {
|
||||
background: none; /* Works in IE too. */
|
||||
/*
|
||||
width: 200px;
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
*/
|
||||
}
|
||||
|
||||
/* Undo some of the #nav styles - to enable the class .nav */
|
||||
@ -294,7 +299,6 @@ div#nav::after {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.nav.responsive li {
|
||||
/* float: left; */
|
||||
display: block;
|
||||
text-align: left;
|
||||
background-color: #FFC35E;
|
||||
@ -805,19 +809,12 @@ table.calendar {
|
||||
background-color: #FFFBE7;
|
||||
border-bottom-style: none;
|
||||
padding-top: 1em;
|
||||
vertical-align: top;
|
||||
height: 2em;
|
||||
}
|
||||
.calendar thead th abbr {
|
||||
border-bottom-style: none;
|
||||
}
|
||||
#CreatorInfo {
|
||||
float: right;
|
||||
margin: -1em 15px 0px 0px;
|
||||
font-weight: bold;
|
||||
color: #8C581C;
|
||||
}
|
||||
#CreatorInfo a[href]:hover {
|
||||
background-color: #FFC35E;
|
||||
}
|
||||
.calendar tfoot tr td {
|
||||
border-top: solid 4px #8C581C;
|
||||
vertical-align: middle;
|
||||
@ -826,7 +823,6 @@ table.calendar {
|
||||
/* Calendar : Date Numeral */
|
||||
.calendar div.date {
|
||||
float: right;
|
||||
width: 1.8em;
|
||||
font-size: large;
|
||||
text-align: center;
|
||||
background-color: #FFC35E;
|
||||
@ -835,7 +831,7 @@ table.calendar {
|
||||
|
||||
/* Calendar : Date Container */
|
||||
.calendar td {
|
||||
padding: 0px 0px 0px 1ex;
|
||||
padding: 0px 5px 0px 1ex;
|
||||
border-width: 1px 0px 0px 1px;
|
||||
border-style: solid;
|
||||
border-color: #FFC35E;
|
||||
@ -843,7 +839,7 @@ table.calendar {
|
||||
}
|
||||
.calendar td:first-child {
|
||||
border-left-style: none;
|
||||
padding: 0px 0px 0px 1ex;
|
||||
padding: 0px 5px 0px 1ex;
|
||||
}
|
||||
.calendar tbody tr:first-child td {
|
||||
border-top-style: none;
|
||||
@ -878,6 +874,7 @@ table.calendar {
|
||||
.calendar td.highlight div.date {
|
||||
color: #36220B;
|
||||
background-color: #FFC35E;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* Calendar : Previous-Next Month */
|
||||
@ -887,6 +884,7 @@ table.calendar {
|
||||
.calendar td.next div.date {
|
||||
color: #FFC35E;
|
||||
background-color: #FFFBE7;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* Calendar : Full Year */
|
||||
@ -894,8 +892,6 @@ body#fullyearlinked div.content {
|
||||
overflow: hidden;
|
||||
}
|
||||
body#fullyearlinked table.calendar {
|
||||
float: left;
|
||||
width: 33.3%;
|
||||
height: 18em;
|
||||
border: solid 1px #36220B;
|
||||
}
|
||||
@ -912,3 +908,48 @@ body#fullyearlinked table.calendar tbody td {
|
||||
body#OneDay div.content {
|
||||
overflow: hidden;
|
||||
}
|
||||
body#OneDay h3 {
|
||||
font-size: xx-large;
|
||||
vertical-align: top;
|
||||
height: 2em;
|
||||
}
|
||||
#WebCal table.calendar tfoot {
|
||||
display: none;
|
||||
}
|
||||
#WebCal table.calendar tr td {
|
||||
word-wrap: break-word;
|
||||
padding: 2px;
|
||||
}
|
||||
#WebCal .calendar tr td .empty {
|
||||
border: 5px solid rgba(255,255,255,.0);
|
||||
}
|
||||
#WebCal .calendar tr td .clickable {
|
||||
border: 5px solid rgba(255,255,255,.0);
|
||||
}
|
||||
#WebCal .calendar tr td .clickable:hover {
|
||||
display: block;
|
||||
overflow:auto;
|
||||
word-wrap: break-word;
|
||||
cursor: text;
|
||||
border-radius: 10px 0px 10px 10px;
|
||||
border: 5px solid #EA8414;
|
||||
padding: 0px;
|
||||
}
|
||||
body#fullyearlinked #YearGlance tbody td {
|
||||
height:48px;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
padding-left: 6px;
|
||||
}
|
||||
body#fullyearlinked #YearGlance tbody td .date {
|
||||
font-size: 30px;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
border-radius: 45px;
|
||||
float: none;
|
||||
border: 5px solid rgba(0,0,0,.0);
|
||||
}
|
||||
body#fullyearlinked #YearGlance tbody td:hover .date {
|
||||
border-radius: 45px;
|
||||
border: 5px solid;
|
||||
}
|
||||
|
@ -97,6 +97,16 @@ body > div {
|
||||
.content {
|
||||
padding: 0em 0.5em;
|
||||
}
|
||||
body#fullyearlinked table.calendar {
|
||||
float: none;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
@media only screen and (width > 1080px) {
|
||||
body#fullyearlinked table.calendar {
|
||||
float: left;
|
||||
width: 33.3%;
|
||||
}
|
||||
}
|
||||
|
||||
/* General Text
|
||||
@ -254,11 +264,6 @@ div#nav::after {
|
||||
|
||||
.nav {
|
||||
background: none; /* Works in IE too. */
|
||||
/*
|
||||
width: 200px;
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
*/
|
||||
}
|
||||
|
||||
/* Undo some of the #nav styles - to enable the class .nav */
|
||||
@ -295,7 +300,6 @@ div#nav::after {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.nav.responsive li {
|
||||
/* float: left; */
|
||||
display: block;
|
||||
text-align: left;
|
||||
background-color: #EEE;
|
||||
@ -796,19 +800,12 @@ table.calendar {
|
||||
background-color: #FFF;
|
||||
border-bottom-style: none;
|
||||
padding-top: 1em;
|
||||
vertical-align: top;
|
||||
height: 2em;
|
||||
}
|
||||
.calendar thead th abbr {
|
||||
border-bottom-style: none;
|
||||
}
|
||||
#CreatorInfo {
|
||||
float: right;
|
||||
margin: -1em 15px 0px 0px;
|
||||
font-weight: bold;
|
||||
color: #7CA3DD;
|
||||
}
|
||||
#CreatorInfo a[href]:hover {
|
||||
background-color: #BFD0EA;
|
||||
}
|
||||
.calendar tfoot tr td {
|
||||
border-top: solid 4px #7CA3DD;
|
||||
vertical-align: middle;
|
||||
@ -826,7 +823,7 @@ table.calendar {
|
||||
|
||||
/* Calendar : Date Container */
|
||||
.calendar td {
|
||||
padding: 0px 0px 0px 1ex;
|
||||
padding: 0px 5px 0px 1ex;
|
||||
border-width: 1px 0px 0px 1px;
|
||||
border-style: solid;
|
||||
border-color: #BFD0EA;
|
||||
@ -834,7 +831,7 @@ table.calendar {
|
||||
}
|
||||
.calendar td:first-child {
|
||||
border-left-style: none;
|
||||
padding: 0px 0px 0px 1ex;
|
||||
padding: 0px 5px 0px 1ex;
|
||||
}
|
||||
.calendar tbody tr:first-child td {
|
||||
border-top-style: none;
|
||||
@ -885,8 +882,6 @@ body#fullyearlinked div.content {
|
||||
overflow: hidden;
|
||||
}
|
||||
body#fullyearlinked table.calendar {
|
||||
float: left;
|
||||
width: 33.3%;
|
||||
height: 18em;
|
||||
border: solid 1px black;
|
||||
}
|
||||
@ -903,3 +898,48 @@ body#fullyearlinked table.calendar tbody td {
|
||||
body#OneDay div.content {
|
||||
overflow: hidden;
|
||||
}
|
||||
body#OneDay h3 {
|
||||
font-size: xx-large;
|
||||
vertical-align: top;
|
||||
height: 2em;
|
||||
}
|
||||
#WebCal table.calendar tfoot {
|
||||
display: none;
|
||||
}
|
||||
#WebCal table.calendar tr td {
|
||||
word-wrap: break-word;
|
||||
padding: 2px;
|
||||
}
|
||||
#WebCal .calendar tr td .empty {
|
||||
border: 5px solid rgba(255,255,255,.0);
|
||||
}
|
||||
#WebCal .calendar tr td .clickable {
|
||||
border: 5px solid rgba(255,255,255,.0);
|
||||
}
|
||||
#WebCal .calendar tr td .clickable:hover {
|
||||
display: block;
|
||||
overflow:auto;
|
||||
word-wrap: break-word;
|
||||
cursor: text;
|
||||
border-radius: 10px 0px 10px 10px;
|
||||
border: 5px solid #204D91;
|
||||
padding: 0px;
|
||||
}
|
||||
body#fullyearlinked #YearGlance tbody td {
|
||||
height:48px;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
padding-left: 6px;
|
||||
}
|
||||
body#fullyearlinked #YearGlance tbody td .date {
|
||||
font-size: 30px;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
border-radius: 45px;
|
||||
float: none;
|
||||
border: 5px solid rgba(0,0,0,.0);
|
||||
}
|
||||
body#fullyearlinked #YearGlance tbody td:hover .date {
|
||||
border-radius: 45px;
|
||||
border: 5px solid;
|
||||
}
|
||||
|
@ -69,7 +69,6 @@ body {
|
||||
background: url(../images/Web_Mainz_Bkgd.png) black repeat;
|
||||
}
|
||||
body > div {
|
||||
width: 85%;
|
||||
margin: 0px auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
@ -100,8 +99,17 @@ div.snapshot a {
|
||||
.content {
|
||||
padding: 0em 0.5em;
|
||||
}
|
||||
body#fullyearlinked table.calendar {
|
||||
float: none;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
@media only screen and (width > 1080px) {
|
||||
body#fullyearlinked table.calendar {
|
||||
float: left;
|
||||
width: 33.3%;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* General Text
|
||||
-----------------------------------------------------------------*/
|
||||
@ -251,11 +259,6 @@ div#nav::after {
|
||||
|
||||
.nav {
|
||||
background: none; /* Works in IE too. */
|
||||
/*
|
||||
width: 200px;
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
*/
|
||||
}
|
||||
|
||||
/* Undo some of the #nav styles - to enable the class .nav */
|
||||
@ -292,8 +295,8 @@ div#nav::after {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.nav.responsive li {
|
||||
/* float: left; */
|
||||
display: block;
|
||||
height:1.4em;
|
||||
text-align: left;
|
||||
background-color: #D8C19F;
|
||||
/* required by IE */
|
||||
@ -747,28 +750,24 @@ table.calendar {
|
||||
.calendar thead th.monthName {
|
||||
font-size: xx-large;
|
||||
color: #767D25;
|
||||
border-bottom-color: #7D5925;
|
||||
vertical-align: top;
|
||||
height: 2em;
|
||||
border-bottom-style: none;
|
||||
}
|
||||
.calendar thead th abbr {
|
||||
border-bottom-style: none;
|
||||
}
|
||||
#CreatorInfo {
|
||||
float: right;
|
||||
margin: -1em 0px 0px 0px;
|
||||
font-weight: bold;
|
||||
font-style: italic;
|
||||
}
|
||||
.calendar tfoot td {
|
||||
border-top: double 4px #7D5925;
|
||||
}
|
||||
|
||||
/* Calendar : Date Numeral */
|
||||
.calendar div.date {
|
||||
float: right;
|
||||
width: 1.8em;
|
||||
width: 1.5em;
|
||||
font-size: large;
|
||||
font-style: italic;
|
||||
text-align: center;
|
||||
margin-top: 1px;
|
||||
background: url(../images/Web_Mainz_MidLight.png) #FFF2C6 repeat;
|
||||
}
|
||||
|
||||
@ -812,10 +811,11 @@ table.calendar {
|
||||
color: #767D25;
|
||||
}
|
||||
.calendar td ul li span.yearsmarried em {
|
||||
color: black;
|
||||
color: #767D25;
|
||||
}
|
||||
.calendar td.highlight div.date {
|
||||
color: #767D25;
|
||||
margin-top: 1px;
|
||||
background-image: none;
|
||||
background-color: #FFFFE7;
|
||||
}
|
||||
@ -828,8 +828,6 @@ table.calendar {
|
||||
|
||||
/* Calendar : Full Year */
|
||||
body#fullyearlinked table.calendar {
|
||||
float: left;
|
||||
width: 315px;
|
||||
height: 18em;
|
||||
border: solid 1px #7D5925;
|
||||
}
|
||||
@ -842,3 +840,58 @@ body#fullyearlinked table.calendar thead th.monthName {
|
||||
body#fullyearlinked table.calendar tbody td {
|
||||
height: 3em;
|
||||
}
|
||||
body#OneDay h3 {
|
||||
font-size: xx-large;
|
||||
vertical-align: top;
|
||||
height: 2em;
|
||||
text-align: center;
|
||||
}
|
||||
#WebCal table.calendar tfoot {
|
||||
display: none;
|
||||
}
|
||||
#WebCal table.calendar tr td {
|
||||
word-wrap: break-word;
|
||||
padding: 2px;
|
||||
}
|
||||
#WebCal .calendar tr td .empty {
|
||||
border: 5px solid rgba(255,255,255,.0);
|
||||
}
|
||||
#WebCal .calendar tr td .clickable {
|
||||
border: 5px solid rgba(255,255,255,.0);
|
||||
}
|
||||
#WebCal .calendar tr td .clickable:hover {
|
||||
display: block;
|
||||
overflow:auto;
|
||||
word-wrap: break-word;
|
||||
cursor: text;
|
||||
border-radius: 10px 0px 10px 10px;
|
||||
border: 5px solid #7D5925;
|
||||
padding: 0px;
|
||||
}
|
||||
body#fullyearlinked #YearGlance tbody td {
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
padding-left: 8px;
|
||||
}
|
||||
body#fullyearlinked #YearGlance tbody td .date {
|
||||
font-size: 30px;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
border-radius: 45px;
|
||||
float: none;
|
||||
border: 5px solid rgba(0,0,0,.0);
|
||||
}
|
||||
body#fullyearlinked #YearGlance tbody td.previous .date:hover,
|
||||
body#fullyearlinked #YearGlance tbody td.next .date:hover {
|
||||
border-radius: 10px;
|
||||
border: 5px solid;
|
||||
}
|
||||
body#fullyearlinked #YearGlance tbody td div.empty .date:hover {
|
||||
border-radius: 10px;
|
||||
border: 5px solid;
|
||||
}
|
||||
body#fullyearlinked #YearGlance tbody td.highlight .date:hover {
|
||||
border-radius: 45px;
|
||||
border: 5px solid;
|
||||
background: url(../images/Web_Mainz_Bkgd.png) black repeat;
|
||||
}
|
||||
|
@ -118,6 +118,16 @@ img {
|
||||
.content {
|
||||
padding: 0em 0.5em;
|
||||
}
|
||||
body#fullyearlinked table.calendar {
|
||||
float: none;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
@media only screen and (width > 1080px) {
|
||||
body#fullyearlinked table.calendar {
|
||||
float: left;
|
||||
width: 33.3%;
|
||||
}
|
||||
}
|
||||
.fullclear {
|
||||
width:100%;
|
||||
@ -301,11 +311,6 @@ div#nav::after {
|
||||
|
||||
.nav {
|
||||
background: none; /* Works in IE too. */
|
||||
/*
|
||||
width: 200px;
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
*/
|
||||
}
|
||||
|
||||
/* Undo some of the #nav styles - to enable the class .nav */
|
||||
@ -348,7 +353,6 @@ div#nav::after {
|
||||
background-color: #A97;
|
||||
}
|
||||
.nav.responsive li {
|
||||
/* float: left; */
|
||||
display: block;
|
||||
text-align: left;
|
||||
background-color: #A97;
|
||||
@ -1336,11 +1340,8 @@ body#WebCal {
|
||||
color:#542;
|
||||
padding:.3em 0 .2em 0;
|
||||
background-color:#FFF;
|
||||
}
|
||||
#CreatorInfo {
|
||||
float:right;
|
||||
color:#FFF;
|
||||
margin:-24px 10px 0 0;
|
||||
vertical-align: top;
|
||||
height: 2em;
|
||||
}
|
||||
.calendar thead tr th.weekend,
|
||||
.calendar thead tr th.weekday {
|
||||
@ -1361,14 +1362,12 @@ body#WebCal {
|
||||
|
||||
/* Calendar : Date Numeral */
|
||||
.calendar tbody tr td div.date {
|
||||
float:right;
|
||||
float:none;
|
||||
display:block;
|
||||
width:1.8em;
|
||||
font-size:1.2em;
|
||||
line-height:100%;
|
||||
text-align:center;
|
||||
color:#542;
|
||||
margin:0 0 0 .5em;
|
||||
padding:.2em 0;
|
||||
background-color:#F6F2EE;
|
||||
}
|
||||
@ -1431,6 +1430,7 @@ body#WebCal {
|
||||
.calendar tbody tr td.highlight div.date {
|
||||
color:#0A65B5;
|
||||
background-color:#C2E1FE;
|
||||
border: 5px solid rgba(255,255,255,.0);
|
||||
}
|
||||
|
||||
/* Calendar : Previous-Next Month */
|
||||
@ -1440,17 +1440,15 @@ body#WebCal {
|
||||
.calendar tbody tr td.next div.date {
|
||||
color:#A97;
|
||||
background-color:#F6F2EE;
|
||||
border: 5px solid rgba(255,255,255,.0);
|
||||
}
|
||||
|
||||
/* Calendar : Full Year */
|
||||
body#fullyearlinked div.content {
|
||||
width:963px;
|
||||
margin:0 auto;
|
||||
padding:15px 0 2px 2px;
|
||||
padding:5px 0 2px 2px;
|
||||
}
|
||||
body#fullyearlinked table.calendar {
|
||||
float:left;
|
||||
width:320px;
|
||||
height:18em;
|
||||
border:solid 1px #7D5925;
|
||||
}
|
||||
@ -1464,3 +1462,59 @@ body#fullyearlinked table.calendar thead tr th.monthName {
|
||||
body#fullyearlinked table.calendar tbody tr td {
|
||||
height:3em;
|
||||
}
|
||||
body#OneDay h3 {
|
||||
font-size: xx-large;
|
||||
vertical-align: top;
|
||||
height: 2em;
|
||||
}
|
||||
#WebCal table.calendar tfoot {
|
||||
display: none;
|
||||
}
|
||||
#WebCal table.calendar tr td {
|
||||
word-wrap: break-word;
|
||||
border-bottom:solid 1px #7D5925;
|
||||
border-right:solid 1px #7D5925;
|
||||
padding-left: 0px;
|
||||
}
|
||||
#WebCal .calendar tr td .empty {
|
||||
border: 5px solid rgba(255,255,255,.0);
|
||||
}
|
||||
#WebCal .calendar tr td .clickable {
|
||||
border: 5px solid rgba(255,255,255,.0);
|
||||
}
|
||||
#WebCal .calendar tr td .clickable:hover {
|
||||
display: block;
|
||||
overflow:auto;
|
||||
word-wrap: break-word;
|
||||
cursor: text;
|
||||
border-radius: 10px 0px 10px 10px;
|
||||
border: 5px solid #453619;
|
||||
padding: 0px;
|
||||
}
|
||||
body#fullyearlinked #YearGlance tbody td {
|
||||
height:48px;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
}
|
||||
body#fullyearlinked #YearGlance tbody td.previous {
|
||||
border-width:0px 1px 1px 0px;
|
||||
border-color:#C1B398;
|
||||
}
|
||||
body#fullyearlinked #YearGlance tbody td.next {
|
||||
border-width:1px 0px 0px 1px;
|
||||
border-color:#C1B398;
|
||||
}
|
||||
body#fullyearlinked #YearGlance tbody td .date {
|
||||
font-size: 30px;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
border-radius: 45px;
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
float: none;
|
||||
border: 5px solid rgba(0,0,0,.0);
|
||||
}
|
||||
body#fullyearlinked #YearGlance tbody td:hover .date {
|
||||
border-radius: 45px;
|
||||
border: 5px solid;
|
||||
}
|
||||
|
@ -719,10 +719,6 @@ body#WebCal h1#SiteTitle {
|
||||
padding:5pt;
|
||||
border-width:0;
|
||||
}
|
||||
#CreatorInfo {
|
||||
float:right;
|
||||
margin:0 10px 0 0;
|
||||
}
|
||||
body#WebCal a {
|
||||
text-decoration:none;
|
||||
color:#000;
|
||||
|
@ -1486,17 +1486,8 @@ body#WebCal {
|
||||
color: #542;
|
||||
padding:.3em 0 .2em 0;
|
||||
background-color: #FFF;
|
||||
}
|
||||
#CreatorInfo {
|
||||
float:right;
|
||||
color: #FFF;
|
||||
margin:-24px 10px 0 0;
|
||||
}
|
||||
#CreatorInfo a {
|
||||
color: #FFF;
|
||||
}
|
||||
#CreatorInfo a:hover {
|
||||
color: #FFF;
|
||||
vertical-align: top;
|
||||
height: 2em;
|
||||
}
|
||||
.calendar thead tr th.weekend,
|
||||
.calendar thead tr th.weekday {
|
||||
@ -1658,7 +1649,7 @@ table.oneday tbody tr td.ColumnText {
|
||||
width: 85%;
|
||||
}
|
||||
table.oneday tbody tr td.ColumnEvent {
|
||||
width; 10%;
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
/* PlaceMaps
|
||||
|
@ -49,7 +49,6 @@ import logging
|
||||
from gramps.gen.const import GRAMPS_LOCALE as glocale
|
||||
from gramps.gen.lib import Date, Name, NameType, Person
|
||||
from gramps.gen.lib.date import Today
|
||||
from gramps.plugins.webreport.common import html_escape
|
||||
from gramps.gen.const import PROGRAM_NAME, URL_HOMEPAGE
|
||||
from gramps.version import VERSION
|
||||
from gramps.gen.constfunc import win
|
||||
@ -72,6 +71,7 @@ import gramps.plugins.lib.libholiday as libholiday
|
||||
from gramps.plugins.lib.libhtml import Html, xml_lang
|
||||
from gramps.plugins.lib.libhtmlconst import _CHARACTER_SETS, _CC, _COPY_OPTIONS
|
||||
from gramps.gui.pluginmanager import GuiPluginManager
|
||||
from gramps.plugins.webreport.common import html_escape
|
||||
|
||||
from gramps.gen.lib.date import gregorian
|
||||
|
||||
@ -152,7 +152,6 @@ class WebCalReport(Report):
|
||||
self.birthday = mgobn('birthdays')
|
||||
self.anniv = mgobn('anniversaries')
|
||||
self.death_anniv = mgobn('death_anniv')
|
||||
self.home_link = mgobn('home_link')
|
||||
self.event_list = []
|
||||
|
||||
self.month_notes = [mgobn('note_' + month)
|
||||
@ -188,6 +187,10 @@ class WebCalReport(Report):
|
||||
self.holidays = {}
|
||||
|
||||
calendar.setfirstweekday(DOW_GRAMPS2ISO[self.start_dow])
|
||||
self.head = []
|
||||
# An optional link to a home page
|
||||
self.head.append((self.narweb_prefix, self._('NarrativeWeb Home'),
|
||||
self.link_to_narweb))
|
||||
|
||||
def get_note_format(self, note):
|
||||
"""
|
||||
@ -455,6 +458,28 @@ class WebCalReport(Report):
|
||||
self.encoding,
|
||||
xmllang)
|
||||
|
||||
# Add the script to control the menu
|
||||
menuscript = Html("<script>function navFunction() { "
|
||||
"var x = document.getElementById(\"dropmenu\"); "
|
||||
"if (x.className === \"nav\") { x.className += \""
|
||||
" responsive\"; } else { x.className = \"nav\"; }"
|
||||
" }</script>")
|
||||
if self.multiyear:
|
||||
head += menuscript
|
||||
|
||||
# begin header section
|
||||
if self.multiyear:
|
||||
headerdiv = Html("div", id='header') + (
|
||||
Html("<a href=\"javascript:void(0);\" class=\"navIcon\""
|
||||
" onclick=\"navFunction()\">≡</a>")) + (
|
||||
Html("h1", html_escape(title),
|
||||
id="SiteTitle", inline=True))
|
||||
else:
|
||||
headerdiv = Html("div", id='header') + (
|
||||
Html("h1", html_escape(title),
|
||||
id="SiteTitle", inline=True))
|
||||
body += headerdiv
|
||||
|
||||
# add body id tag if not None
|
||||
if body_id is not None:
|
||||
body.attr = "id = '%(idtag)s'" % {'idtag' : body_id}
|
||||
@ -505,27 +530,18 @@ class WebCalReport(Report):
|
||||
head += (meta, links)
|
||||
|
||||
# start header section and page title...
|
||||
with Html("div", id="header", role="Title-n-Navigation") as header:
|
||||
header += Html("h1", title, id="SiteTitle", inline=True)
|
||||
|
||||
# Created for ?
|
||||
msg = None
|
||||
if self.author and self.email:
|
||||
bemail = '<a href="mailto:' + self.email + '?subject='
|
||||
eemail = '">' + self.author + '</a>'
|
||||
msg = self._('the "WebCal" will be the potential-email Subject|'
|
||||
'Created for %(html_email_author_start)s'
|
||||
'WebCal%(html_email_author_end)s') % {
|
||||
'html_email_author_start' : bemail,
|
||||
'html_email_author_end' : eemail}
|
||||
elif self.author:
|
||||
msg = self._('Created for %(author)s') % {
|
||||
'author' : self.author}
|
||||
|
||||
if msg:
|
||||
header += Html("p", msg, id="CreatorInfo")
|
||||
|
||||
body += header
|
||||
script = """
|
||||
<script type="text/javascript">
|
||||
function currentmonth(y) {
|
||||
var date = new Date();
|
||||
var month = date.getMonth() + 1;
|
||||
var url = y + "/" + month + "%s";
|
||||
window.location.href = url;
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
""" % self.ext
|
||||
body += script
|
||||
return page, body
|
||||
|
||||
def year_navigation(self, nr_up, currentsection):
|
||||
@ -543,68 +559,82 @@ class WebCalReport(Report):
|
||||
self.end_year = (self.start_year + 17) if nyears > 18 else self.end_year
|
||||
|
||||
# begin year division and begin unordered list
|
||||
with Html("div", id="subnavigation",
|
||||
role="subnavigation") as submenu:
|
||||
unordered = Html("ul")
|
||||
with Html("div", class_="wrappernav",
|
||||
id="nav", role="navigation") as navigation:
|
||||
with Html("div", class_="container") as container:
|
||||
|
||||
for cal_year in range(self.start_year,
|
||||
(self.start_year + num_years)):
|
||||
url = ''
|
||||
unordered = Html("ul", class_="nav", id="dropmenu")
|
||||
|
||||
# begin subdir level
|
||||
subdirs = ['..'] * nr_up
|
||||
subdirs.append(str(cal_year))
|
||||
(url, nav_text, disp) = self.head[0]
|
||||
if disp:
|
||||
if url[:1] == '/':
|
||||
url = url + "index" + self.ext
|
||||
else:
|
||||
url_up = ['..'] * nr_up
|
||||
url_up.append(url)
|
||||
url = '/'.join(url_up) + "index" + self.ext
|
||||
hyper = Html("a", nav_text, href=url, name=url,
|
||||
title=nav_text)
|
||||
unordered.extend(Html("li", hyper, inline=True))
|
||||
|
||||
# each year will link to current month.
|
||||
# this will always need an extension added
|
||||
month = int(self.today.get_month())
|
||||
full_month_name = self.rlocale.date_displayer.long_months[month]
|
||||
full_month_name = full_month_name.lower()
|
||||
for cal_year in range(self.start_year,
|
||||
(self.start_year + num_years)):
|
||||
url = ''
|
||||
|
||||
# Note. We use '/' here because it is a URL, not a OS dependent
|
||||
# pathname.
|
||||
url = '/'.join(subdirs + [full_month_name]) + self.ext
|
||||
hyper = Html("a", self.rlocale.get_date(Date(cal_year)),
|
||||
href=url, title=str(cal_year))
|
||||
# begin subdir level
|
||||
subdirs = ['..'] * nr_up
|
||||
subdirs.append(str(cal_year))
|
||||
|
||||
# Figure out if we need <li class="CurrentSection">
|
||||
# or just plain <li>
|
||||
if str(cal_year) == currentsection:
|
||||
check_cs = 'class = "CurrentSection"'
|
||||
else:
|
||||
check_cs = False
|
||||
if check_cs:
|
||||
unordered.extend(
|
||||
Html("li", hyper, attr=check_cs, inline=True)
|
||||
)
|
||||
else:
|
||||
unordered.extend(
|
||||
Html("li", hyper, inline=True)
|
||||
)
|
||||
submenu += unordered
|
||||
return submenu
|
||||
# Note. We use '/' here because it is a URL,
|
||||
# not a OS dependent pathname.
|
||||
url = '/'.join(subdirs)
|
||||
onclic = "return currentmonth('" + url + "');"
|
||||
hyper = Html("a", self.rlocale.get_date(Date(cal_year)),
|
||||
href="#", onclick=onclic, title=str(cal_year))
|
||||
|
||||
def month_navigation(self, nr_up, year, currentsection, add_home):
|
||||
# Figure out if we need <li class="CurrentSection">
|
||||
# or just plain <li>
|
||||
if str(cal_year) == currentsection:
|
||||
check_cs = 'class = "CurrentSection"'
|
||||
else:
|
||||
check_cs = False
|
||||
if check_cs:
|
||||
unordered.extend(
|
||||
Html("li", hyper, attr=check_cs, inline=True)
|
||||
)
|
||||
else:
|
||||
unordered.extend(
|
||||
Html("li", hyper, inline=True)
|
||||
)
|
||||
container += unordered
|
||||
navigation += container
|
||||
return navigation
|
||||
|
||||
def month_navigation(self, nr_up, year, currentsection):
|
||||
"""
|
||||
Will create and display the navigation menu bar
|
||||
|
||||
nr_up = number of directories up to reach root directory
|
||||
year = year being created
|
||||
currentsection = month name being created for proper CSS styling
|
||||
add_home = if creating a link to home
|
||||
-- a link to root directory of website
|
||||
"""
|
||||
navs = []
|
||||
|
||||
# An optional link to a home page
|
||||
if self.home_link:
|
||||
navs.append((self.home_link, self._('Home'), add_home))
|
||||
navs.extend((self.rlocale.date_displayer.long_months[int(month)],
|
||||
if not self.multiyear:
|
||||
(url, nav_text, disp) = self.head[0]
|
||||
if url[:1] == '/':
|
||||
url = url + "index" + self.ext
|
||||
else:
|
||||
url = "../" + url + "index" + self.ext
|
||||
navs.append((url, nav_text, disp))
|
||||
|
||||
navs.extend((str(month),
|
||||
self.rlocale.date_displayer.short_months[int(month)], True)
|
||||
for month in range(1, 13))
|
||||
|
||||
# Add a link for year_glance() if requested
|
||||
navs.append(('fullyearlinked', self._('Year Glance'), self.fullyear))
|
||||
navs.append(('fullyearlinked', self._('Full year at a Glance'),
|
||||
self.fullyear))
|
||||
|
||||
# remove menu items if they are not True
|
||||
navs = [(u, n) for u, n, c in navs if c]
|
||||
@ -621,7 +651,7 @@ class WebCalReport(Report):
|
||||
# Note. We use '/' here because it is a URL, not a OS
|
||||
# dependent pathname need to leave home link alone,
|
||||
# so look for it ...
|
||||
if nav_text != _("Home"):
|
||||
if nav_text != self._("NarrativeWeb Home"):
|
||||
url_fname = url_fname.lower()
|
||||
url = url_fname
|
||||
add_subdirs = False
|
||||
@ -645,9 +675,7 @@ class WebCalReport(Report):
|
||||
else:
|
||||
check_cs = False
|
||||
|
||||
if url == self.home_link:
|
||||
mytitle = self._("NarrativeWeb Home")
|
||||
elif url_fname == 'fullyearlinked':
|
||||
if url_fname == 'fullyearlinked':
|
||||
mytitle = self._('Full year at a Glance')
|
||||
else:
|
||||
mytitle = self._(url_fname)
|
||||
@ -746,64 +774,64 @@ class WebCalReport(Report):
|
||||
table += thead
|
||||
|
||||
if clickable:
|
||||
name = th_txt + self.ext
|
||||
url = name.lower()
|
||||
linkable = Html("a", th_txt, href=url, name=url, title=th_txt)
|
||||
name = str(month) + self.ext
|
||||
linkable = Html("a", th_txt, href=name, name=name, title=th_txt)
|
||||
trow = Html("tr") + (
|
||||
Html("th", linkable, class_='monthName',
|
||||
colspan=7, inline=True)
|
||||
)
|
||||
thead += trow
|
||||
else:
|
||||
linkable = th_txt
|
||||
if not self.multiyear:
|
||||
self.end_year = self.start_year
|
||||
if month > 1:
|
||||
full_month_name = date_displayer.long_months[month-1]
|
||||
full_month_name = str(month-1)
|
||||
url = full_month_name.lower() + self.ext
|
||||
prevm = Date(int(year), int(month-1), 0)
|
||||
my_title = Html("a", html_escape("<"), href=url,
|
||||
my_title = Html("a", "\u276e", href=url, close=True,
|
||||
title=date_displayer.display(prevm))
|
||||
elif self.multiyear and year > self.start_year:
|
||||
full_month_name = date_displayer.long_months[12]
|
||||
full_month_name = str(12)
|
||||
url = full_month_name.lower() + self.ext
|
||||
dest = os.path.join("../", str(year-1), url)
|
||||
prevm = Date(int(year-1), 12, 0)
|
||||
my_title = Html("a", html_escape("<"), href=dest,
|
||||
my_title = Html("a", "\u276e", href=dest, close=True,
|
||||
title=date_displayer.display(prevm))
|
||||
else:
|
||||
full_month_name = date_displayer.long_months[12]
|
||||
full_month_name = str(12)
|
||||
url = full_month_name.lower() + self.ext
|
||||
dest = os.path.join("../", str(self.end_year), url)
|
||||
prevy = Date(self.end_year, 12, 0)
|
||||
my_title = Html("a", html_escape("<"), href=dest,
|
||||
my_title = Html("a", "\u276e", href=dest, close=True,
|
||||
title=date_displayer.display(prevy))
|
||||
my_title += Html("</a> ")
|
||||
my_title += Html("</a> " + month_name + " ")
|
||||
if month < 12:
|
||||
full_month_name = date_displayer.long_months[month+1]
|
||||
full_month_name = str(month+1)
|
||||
url = full_month_name.lower() + self.ext
|
||||
nextd = Date(int(year), int(month+1), 0)
|
||||
my_title += Html("a", html_escape(">"), href=url,
|
||||
my_title += Html("a", "\u276f", href=url, close=True,
|
||||
title=date_displayer.display(nextd))
|
||||
elif self.multiyear and year < self.end_year:
|
||||
full_month_name = date_displayer.long_months[1]
|
||||
full_month_name = str(1)
|
||||
url = full_month_name.lower() + self.ext
|
||||
dest = os.path.join("../", str(year+1), url)
|
||||
nextd = Date(int(year+1), 1, 0)
|
||||
my_title += Html("a", html_escape(">"), href=dest,
|
||||
my_title += Html("a", "\u276f", href=dest, close=True,
|
||||
title=date_displayer.display(nextd))
|
||||
else:
|
||||
full_month_name = date_displayer.long_months[1]
|
||||
full_month_name = str(1)
|
||||
url = full_month_name.lower() + self.ext
|
||||
dest = os.path.join("../", str(self.start_year), url)
|
||||
nexty = Date(self.start_year, 1, 0)
|
||||
my_title += Html("a", html_escape(">"), href=dest,
|
||||
my_title += Html("a", "\u276f", href=dest, close=True,
|
||||
title=date_displayer.display(nexty))
|
||||
my_title += Html("</a>")
|
||||
trow = Html("tr") + (
|
||||
Html("th", my_title, class_='monthName',
|
||||
colspan=7, inline=True)
|
||||
)
|
||||
thead += trow
|
||||
trow = Html("tr") + (
|
||||
Html("th", linkable, class_='monthName', colspan=7, inline=True)
|
||||
)
|
||||
thead += trow
|
||||
trow = Html("tr") + (Html("th", "", colspan=7, inline=True))
|
||||
thead += trow
|
||||
|
||||
# Calendar weekday names header
|
||||
trow = Html("tr")
|
||||
@ -846,6 +874,8 @@ class WebCalReport(Report):
|
||||
|
||||
# add calendar date division
|
||||
datediv = Html("div", day, class_="date", inline=True)
|
||||
clickable = Html("div", datediv, class_="clickable",
|
||||
inline=True)
|
||||
|
||||
### a day in the previous or next month ###
|
||||
if day == 0:
|
||||
@ -932,11 +962,11 @@ class WebCalReport(Report):
|
||||
# WebCal
|
||||
else:
|
||||
# add date to table cell
|
||||
tcell += datediv
|
||||
tcell += clickable
|
||||
|
||||
# list the events
|
||||
unordered = Html("ul")
|
||||
tcell += unordered
|
||||
clickable += unordered
|
||||
|
||||
for (dummy_nyears, dummy_date, text,
|
||||
event, dummy_notused,
|
||||
@ -948,11 +978,15 @@ class WebCalReport(Report):
|
||||
else True)
|
||||
# no events for this day
|
||||
else:
|
||||
# adds date division
|
||||
date = Html("div", day, class_="date",
|
||||
inline=True)
|
||||
# create empty day with date
|
||||
tcell = Html("td", class_=dayclass,
|
||||
inline=True) + (
|
||||
# adds date division
|
||||
Html("div", day, class_="date",
|
||||
Html("div", date,
|
||||
class_="empty",
|
||||
inline=True))
|
||||
# nothing for this month
|
||||
else:
|
||||
@ -1002,8 +1036,7 @@ class WebCalReport(Report):
|
||||
_('Formatting months ...'), 12) as step:
|
||||
|
||||
for month in range(1, 13):
|
||||
cal_fname = self.rlocale.date_displayer.long_months[int(month)]
|
||||
cal_fname = cal_fname.lower()
|
||||
cal_fname = str(month)
|
||||
open_file = self.create_file(cal_fname, str(year))
|
||||
|
||||
# Add xml, doctype, meta and stylesheets
|
||||
@ -1017,7 +1050,7 @@ class WebCalReport(Report):
|
||||
# Create Month Navigation Menu
|
||||
# identify currentsection for proper highlighting
|
||||
currentsection = _dd.long_months[month]
|
||||
body += self.month_navigation(nr_up, year, currentsection, True)
|
||||
body += self.month_navigation(nr_up, year, currentsection)
|
||||
|
||||
# build the calendar
|
||||
content = Html("div", class_="content", id="WebCal")
|
||||
@ -1104,7 +1137,7 @@ class WebCalReport(Report):
|
||||
|
||||
# Create Month Navigation Menu
|
||||
# identify currentsection for proper highlighting
|
||||
body += self.month_navigation(nr_up, year, "fullyearlinked", True)
|
||||
body += self.month_navigation(nr_up, year, "fullyearlinked")
|
||||
|
||||
msg = (self._('This calendar is meant to give you access '
|
||||
'to all your data at a glance compressed into one '
|
||||
@ -1172,7 +1205,7 @@ class WebCalReport(Report):
|
||||
# Create Month Navigation Menu
|
||||
# identify currentsection for proper highlighting
|
||||
currentsection = _dd.long_months[month]
|
||||
body += self.month_navigation(nr_up, year, currentsection, True)
|
||||
body += self.month_navigation(nr_up, year, currentsection)
|
||||
|
||||
# set date display as in user preferences
|
||||
content = Html("div", class_="content", id="OneDay")
|
||||
@ -1189,24 +1222,22 @@ class WebCalReport(Report):
|
||||
url = event[1] + self.ext
|
||||
prevd = Date(int(event[1][:4]), int(event[1][4:6]),
|
||||
int(event[1][6:]))
|
||||
my_title = Html("a", html_escape("<"), href=url,
|
||||
my_title = Html("a", "\u276e", href=url,
|
||||
title=self.rlocale.get_date(prevd))
|
||||
else:
|
||||
my_title = Html('<em> </em>')
|
||||
my_title += Html("</a> ")
|
||||
my_title += Html("</a>")
|
||||
my_title += " "
|
||||
my_title += self.rlocale.date_displayer.display(event_date)
|
||||
my_title += " "
|
||||
if found[2] is not None:
|
||||
url = event[2] + self.ext
|
||||
nextd = Date(int(event[2][:4]), int(event[2][4:6]),
|
||||
int(event[2][6:]))
|
||||
my_title += Html("a", html_escape(">"), href=url,
|
||||
my_title += Html("a", "\u276f", href=url,
|
||||
title=self.rlocale.get_date(nextd))
|
||||
else:
|
||||
my_title += Html('<b> </b>')
|
||||
my_title += Html("</a>")
|
||||
content += Html("h3", my_title, inline=True)
|
||||
my_title = Html("span", " ")
|
||||
my_title += self.rlocale.date_displayer.display(event_date)
|
||||
my_title += Html("span", " ")
|
||||
content += Html("h3", my_title, inline=True)
|
||||
|
||||
# list the events
|
||||
@ -1373,7 +1404,10 @@ class WebCalReport(Report):
|
||||
|
||||
# add link to NarrativeWeb
|
||||
if self.link_to_narweb:
|
||||
prfx = self.narweb_prefix
|
||||
if self.narweb_prefix[:1] != '/':
|
||||
prfx = "../" + self.narweb_prefix
|
||||
else:
|
||||
prfx = self.narweb_prefix
|
||||
text = str(Html("a", short_name,
|
||||
href=self.build_url_fname_html(
|
||||
person.handle,
|
||||
@ -1407,7 +1441,10 @@ class WebCalReport(Report):
|
||||
if (self.alive and alive) or not self.alive:
|
||||
# add link to NarrativeWeb
|
||||
if self.link_to_narweb:
|
||||
prfx = self.narweb_prefix
|
||||
if self.narweb_prefix[:1] != '/':
|
||||
prfx = "../" + self.narweb_prefix
|
||||
else:
|
||||
prfx = self.narweb_prefix
|
||||
navpfx = self.build_url_fname_html(person.handle,
|
||||
"ppl",
|
||||
prefix=prfx)
|
||||
@ -1485,7 +1522,10 @@ class WebCalReport(Report):
|
||||
first_died = d_date
|
||||
|
||||
if self.link_to_narweb:
|
||||
prefx = self.narweb_prefix
|
||||
if self.narweb_prefix[:1] != '/':
|
||||
prefx = "../" + self.narweb_prefix
|
||||
else:
|
||||
prefx = self.narweb_prefix
|
||||
reference = self.build_url_fname_html(
|
||||
spouse_handle, 'ppl',
|
||||
prefix=prefx)
|
||||
@ -1525,6 +1565,20 @@ class WebCalReport(Report):
|
||||
# begin calendar footer
|
||||
with Html("div", id="footer", role="Footer-End") as footer:
|
||||
|
||||
amsg = None
|
||||
if self.author and self.email:
|
||||
bemail = '<a href="mailto:' + self.email + '?subject='
|
||||
eemail = '">' + self.author + '</a>'
|
||||
amsg = self._('the "WebCal" will be the potential-email'
|
||||
' Subject|'
|
||||
'%(html_email_author_start)s'
|
||||
'WebCal%(html_email_author_end)s') % {
|
||||
'html_email_author_start' : bemail,
|
||||
'html_email_author_end' : eemail}
|
||||
elif self.author:
|
||||
amsg = '%(author)s' % {
|
||||
'author' : self.author}
|
||||
|
||||
# Display date as user set in preferences
|
||||
date = self.rlocale.date_displayer.display(Today())
|
||||
bhtml = '<a href="' + URL_HOMEPAGE + '">'
|
||||
@ -1533,21 +1587,20 @@ class WebCalReport(Report):
|
||||
'gramps_home_html_start' : bhtml,
|
||||
'html_end' : '</a>',
|
||||
'date' : date}
|
||||
footer += Html("p", msg, id='createdate')
|
||||
|
||||
copy_nr = self.copy
|
||||
text = ''
|
||||
if copy_nr == 0:
|
||||
if self.author:
|
||||
text = "© %s %s" % (self.today.get_year(), self.author)
|
||||
elif 0 < copy_nr < len(_CC):
|
||||
amsg = "© %s" % amsg
|
||||
msg += " (%s)" % amsg
|
||||
footer += Html("p", msg, id='createdate')
|
||||
|
||||
text = ''
|
||||
if 0 < copy_nr < len(_CC):
|
||||
subdirs = ['..'] * nr_up
|
||||
# Note. We use '/' here because it is a URL,
|
||||
# not a OS dependent pathname
|
||||
fname = '/'.join(subdirs + ['images'] + ['somerights20.gif'])
|
||||
text = _CC[copy_nr] % {'gif_fname' : fname}
|
||||
else:
|
||||
text = "© %s %s" % (self.today.get_year(), self.author)
|
||||
|
||||
footer += Html("p", text, id='copyright')
|
||||
|
||||
@ -1602,8 +1655,7 @@ class WebCalReport(Report):
|
||||
if self.fullyear:
|
||||
self.year_glance(cal_year)
|
||||
|
||||
if self.home_link:
|
||||
self.create_page_index()
|
||||
self.create_page_index()
|
||||
|
||||
# a single year
|
||||
else:
|
||||
@ -1623,7 +1675,7 @@ class WebCalReport(Report):
|
||||
if self.fullyear:
|
||||
self.year_glance(cal_year)
|
||||
|
||||
if self.home_link:
|
||||
if self.link_to_narweb:
|
||||
self.create_page_index()
|
||||
|
||||
def create_page_index(self):
|
||||
@ -1668,7 +1720,8 @@ class WebCalOptions(MenuReportOptions):
|
||||
self.__filter = None
|
||||
self.__links = None
|
||||
self.__prefix = None
|
||||
MenuReportOptions.__init__(self, name, dbase)
|
||||
db_options = name + ' ' + dbase.get_dbname()
|
||||
MenuReportOptions.__init__(self, db_options, dbase)
|
||||
self.__multiyear = None
|
||||
self.__start_year = None
|
||||
self.__end_year = None
|
||||
@ -1832,13 +1885,6 @@ class WebCalOptions(MenuReportOptions):
|
||||
maiden_name.set_help(_("Select married women's displayed surname"))
|
||||
menu.add_option(category_name, "maiden_name", maiden_name)
|
||||
|
||||
dbname = self.__db.get_dbname()
|
||||
default_link = '../../' + dbname + "_NAVWEB/index.html"
|
||||
home_link = StringOption(_('Home link'), default_link)
|
||||
home_link.set_help(_("The link to be included to direct the user to "
|
||||
"the main page of the web site"))
|
||||
menu.add_option(category_name, "home_link", home_link)
|
||||
|
||||
def __add_notes_options(self, menu):
|
||||
"""
|
||||
Options on the "Months Notes" tabs.
|
||||
|
Loading…
Reference in New Issue
Block a user