Correction of CSS and Python code in WebCal.

svn: r11418
This commit is contained in:
Kees Bakker 2008-12-04 20:38:02 +00:00
parent 228e2b81bd
commit 4fe006e575
8 changed files with 441 additions and 236 deletions

View File

@ -91,6 +91,7 @@ img {
h1 {
font-size:1.4em;
font-weight:bold;
margin:0;
}
h2 {
display:none;
@ -118,6 +119,7 @@ h5, h6 {
p {
font-size:14px;
line-height:17px;
margin:0;
}
p#description {
padding:0 15px 1em 15px;
@ -171,12 +173,12 @@ a:visited {
/* Navigation
----------------------------------------------------- */
#navigation {
#navigation, #subnavigation {
margin:0;
padding:4px 0 0 0;
background-color:#EEE;
}
#navigation ul {
#navigation ul, #subnavigation ul {
list-style:none;
min-width:770px;
height:22px;
@ -184,12 +186,12 @@ a:visited {
padding:0 0 0 12px;
border-bottom:1px solid #999;
}
#navigation ul li {
#navigation ul li, #subnavigation ul li {
margin:0;
padding:0;
float:left;
}
#navigation ul li a {
#navigation ul li a, #subnavigation ul li a {
display:block;
font-size:12px;
line-height:100%;
@ -199,11 +201,11 @@ a:visited {
padding:5px 5px;
background-color:#EEE;
}
#navigation ul li a:hover {
#navigation ul li a:hover, #subnavigation ul li a:hover {
background-color:#CCC;
border-bottom:solid 1px #000;
}
#navigation ul li#CurrentSection a {
#navigation ul li#CurrentSection a, #subnavigation ul li#CurrentSection a {
padding-bottom:4px;
border-top:solid 1px #999;
border-right:solid 1px #999;
@ -214,6 +216,9 @@ a:visited {
#navigation ul li#CurrentSection a:hover {
background-color:#FFF;
}
#subnavigation ul li#CurrentSection a {
border-width:0 0 1px 0;
}
/* Main Table
----------------------------------------------------- */
@ -913,7 +918,7 @@ div#sourcerefs ol li ol {
line-height:130%;
color:#333;
margin:0;
padding:0;
padding:15px 0 0 0;
background-color:#CCC;
border-top:solid 1px #333;
}
@ -1022,8 +1027,7 @@ body#WebCal #CreatorInfo {
padding:.7em 5% 1em 5%;
border-top:solid 4px #999;
}
.calendar tfoot tr td.note {
height:1cm;
.calendar tfoot tr td {
vertical-align:middle;
color:#333;
background-color:#EEE;
@ -1062,7 +1066,7 @@ body#WebCal #CreatorInfo {
.calendar tbody tr td.saturday {
}
.calendar tbody tr td.sunday {
.calendar tbody tr td:first-child {
border-left:none;
}
.calendar tbody tr:first-child td {
@ -1112,3 +1116,29 @@ body#WebCal #CreatorInfo {
color:#CCC;
background-color:#EEE;
}
/* Calendar : Full Year */
body#fullyear div.content, body#fullyearlinked div.content {
width:963px;
margin:0 auto;
padding:15px 0 2px 2px;
}
body#fullyear table.calendar, body#fullyearlinked table.calendar {
float:left;
width:320px;
height:18em;
border:solid 1px #7D5925;
}
body#fullyear table.calendar thead tr th, body#fullyearlinked table.calendar thead tr th {
height:2em;
}
body#fullyear table.calendar thead tr th.monthName, body#fullyearlinked table.calendar thead tr th.monthName {
font-size:1.2em;
padding:2px 0;
}
body#fullyear table.calendar tbody tr td, body#fullyearlinked table.calendar tbody tr td {
height:3em;
}
body#fullyear table.calendar tfoot tr td, body#fullyearlinked table.calendar tfoot tr td {
display:none;
}

View File

@ -4,7 +4,7 @@ Copyright Holder and License
**************************************************************************************************
GRAMPS Cascading Style Sheet
Style Name: Basic - Lilac
Style Author: Jason Simanek (2008)
Style Author: Jason M. Simanek (2008)
Note: Adapted from GRAMPS original Modern Style stylesheet with colors from the original 'Business' stylesheet
**************************************************************************************************
This website was created with GRAMPS
@ -91,6 +91,7 @@ img {
h1 {
font-size:1.4em;
font-weight:bold;
margin:0;
}
h2 {
display:none;
@ -118,6 +119,7 @@ h5, h6 {
p {
font-size:14px;
line-height:17px;
margin:0;
}
p#description {
padding:0 15px 1em 15px;
@ -171,12 +173,12 @@ a:visited {
/* Navigation
----------------------------------------------------- */
#navigation {
#navigation, #subnavigation {
margin:0;
padding:4px 0 0 0;
background-color:#E0E0E9;
}
#navigation ul {
#navigation ul, #subnavigation ul {
list-style:none;
min-width:770px;
height:22px;
@ -184,12 +186,12 @@ a:visited {
padding:0 0 0 12px;
border-bottom:1px solid #669;
}
#navigation ul li {
#navigation ul li, #subnavigation ul li {
margin:0;
padding:0;
float:left;
}
#navigation ul li a {
#navigation ul li a, #subnavigation ul li a {
display:block;
font-size:12px;
line-height:100%;
@ -199,11 +201,11 @@ a:visited {
padding:5px 5px;
background-color:#E0E0E9;
}
#navigation ul li a:hover {
#navigation ul li a:hover, #subnavigation ul li a:hover {
background-color:#B4B4CB;
border-bottom:solid 1px #000;
}
#navigation ul li#CurrentSection a {
#navigation ul li#CurrentSection a, #subnavigation ul li#CurrentSection a {
padding-bottom:4px;
border-top:solid 1px #669;
border-right:solid 1px #669;
@ -214,6 +216,9 @@ a:visited {
#navigation ul li#CurrentSection a:hover {
background-color:#FAFAFF;
}
#subnavigation ul li#CurrentSection a {
border-width:0 0 1px 0;
}
/* Main Table
----------------------------------------------------- */
@ -913,7 +918,7 @@ div#sourcerefs ol li ol {
line-height:130%;
color:#2E2E61;
margin:0;
padding:0;
padding:15px 0 0 0;
background-color:#B4B4CB;
border-top:solid 1px #2E2E61;
}
@ -1022,8 +1027,7 @@ body#WebCal #CreatorInfo {
padding:.7em 5% 1em 5%;
border-top:solid 4px #B4B4CB;
}
.calendar tfoot tr td.note {
height:1cm;
.calendar tfoot tr td {
vertical-align:middle;
color:#2E2E61;
background-color:#EEE;
@ -1062,7 +1066,7 @@ body#WebCal #CreatorInfo {
.calendar tbody tr td.saturday {
}
.calendar tbody tr td.sunday {
.calendar tbody tr td:first-child {
border-left:none;
}
.calendar tbody tr:first-child td {
@ -1112,3 +1116,29 @@ body#WebCal #CreatorInfo {
color:#B4B4CB;
background-color:#E0E0E9;
}
/* Calendar : Full Year */
body#fullyear div.content, body#fullyearlinked div.content {
width:963px;
margin:0 auto;
padding:15px 0 2px 2px;
}
body#fullyear table.calendar, body#fullyearlinked table.calendar {
float:left;
width:320px;
height:18em;
border:solid 1px #7D5925;
}
body#fullyear table.calendar thead tr th, body#fullyearlinked table.calendar thead tr th {
height:2em;
}
body#fullyear table.calendar thead tr th.monthName, body#fullyearlinked table.calendar thead tr th.monthName {
font-size:1.2em;
padding:2px 0;
}
body#fullyear table.calendar tbody tr td, body#fullyearlinked table.calendar tbody tr td {
height:3em;
}
body#fullyear table.calendar tfoot tr td, body#fullyearlinked table.calendar tfoot tr td {
display:none;
}

View File

@ -91,6 +91,7 @@ img {
h1 {
font-size:1.4em;
font-weight:bold;
margin:0;
}
h2 {
display:none;
@ -118,6 +119,7 @@ h5, h6 {
p {
font-size:14px;
line-height:17px;
margin:0;
}
p#description {
padding:0 15px 1em 15px;
@ -128,7 +130,8 @@ p a:link {
sup {
line-height:0;
}
ol { }
ol {
}
ol li a {
text-decoration:none;
}
@ -170,12 +173,12 @@ a:visited {
/* Navigation
----------------------------------------------------- */
#navigation {
#navigation, #subnavigation {
margin:0;
padding:4px 0 0 0;
background-color:#FFE09F;
}
#navigation ul {
#navigation ul, #subnavigation ul {
list-style:none;
min-width:770px;
height:22px;
@ -183,12 +186,12 @@ a:visited {
padding:0 0 0 12px;
border-bottom:1px solid #8C581C;
}
#navigation ul li {
#navigation ul li, #subnavigation ul li {
margin:0;
padding:0;
float:left;
}
#navigation ul li a {
#navigation ul li a, #subnavigation ul li a {
display:block;
font-size:12px;
line-height:100%;
@ -198,11 +201,11 @@ a:visited {
padding:5px 5px;
background-color:#FFE09F;
}
#navigation ul li a:hover {
#navigation ul li a:hover, #subnavigation ul li a:hover {
background-color:#FFC35E;
border-bottom:solid 1px #36220B;
}
#navigation ul li#CurrentSection a {
#navigation ul li#CurrentSection a, #subnavigation ul li#CurrentSection a {
padding-bottom:4px;
border-top:solid 1px #8C581C;
border-right:solid 1px #8C581C;
@ -213,6 +216,9 @@ a:visited {
#navigation ul li#CurrentSection a:hover {
background-color:#FFFBE7;
}
#subnavigation ul li#CurrentSection a {
border-width:0 0 1px 0;
}
/* Main Table
----------------------------------------------------- */
@ -912,7 +918,7 @@ div#sourcerefs ol li ol {
line-height:130%;
color:#8C581C;
margin:0;
padding:0;
padding:15px 0 0 0;
background-color:#FFC35E;
border-top:solid 1px #EA8414;
}
@ -1021,8 +1027,7 @@ body#WebCal #CreatorInfo {
padding:.7em 5% 1em 5%;
border-top:solid 4px #8C581C;
}
.calendar tfoot tr td.note {
height:1cm;
.calendar tfoot tr td {
vertical-align:middle;
color:#8C581C;
background-color:#FFFBE7;
@ -1061,7 +1066,7 @@ body#WebCal #CreatorInfo {
.calendar tbody tr td.saturday {
}
.calendar tbody tr td.sunday {
.calendar tbody tr td:first-child {
border-left:none;
}
.calendar tbody tr:first-child td {
@ -1111,3 +1116,29 @@ body#WebCal #CreatorInfo {
color:#FFE09F;
background-color:#FFFBE7;
}
/* Calendar : Full Year */
body#fullyear div.content, body#fullyearlinked div.content {
width:963px;
margin:0 auto;
padding:15px 0 2px 2px;
}
body#fullyear table.calendar, body#fullyearlinked table.calendar {
float:left;
width:320px;
height:18em;
border:solid 1px #7D5925;
}
body#fullyear table.calendar thead tr th, body#fullyearlinked table.calendar thead tr th {
height:2em;
}
body#fullyear table.calendar thead tr th.monthName, body#fullyearlinked table.calendar thead tr th.monthName {
font-size:1.2em;
padding:2px 0;
}
body#fullyear table.calendar tbody tr td, body#fullyearlinked table.calendar tbody tr td {
height:3em;
}
body#fullyear table.calendar tfoot tr td, body#fullyearlinked table.calendar tfoot tr td {
display:none;
}

View File

@ -91,6 +91,7 @@ img {
h1 {
font-size:1.4em;
font-weight:bold;
margin:0;
}
h2 {
display:none;
@ -118,6 +119,7 @@ h5, h6 {
p {
font-size:14px;
line-height:17px;
margin:0;
}
p#description {
padding:0 15px 1em 15px;
@ -171,12 +173,12 @@ a:visited {
/* Navigation
----------------------------------------------------- */
#navigation {
#navigation, #subnavigation {
margin:0;
padding:4px 0 0 0;
background-color:#EAEEF4;
}
#navigation ul {
#navigation ul, #subnavigation ul {
list-style:none;
min-width:770px;
height:22px;
@ -184,12 +186,12 @@ a:visited {
padding:0 0 0 12px;
border-bottom:1px solid #7CA3DD;
}
#navigation ul li {
#navigation ul li, #subnavigation ul li {
margin:0;
padding:0;
float:left;
}
#navigation ul li a {
#navigation ul li a, #subnavigation ul li a {
display:block;
font-size:12px;
line-height:100%;
@ -199,11 +201,11 @@ a:visited {
padding:5px 5px;
background-color:#EAEEF4;
}
#navigation ul li a:hover {
#navigation ul li a:hover, #subnavigation ul li a:hover {
background-color:#BFD0EA;
border-bottom:solid 1px #000;
}
#navigation ul li#CurrentSection a {
#navigation ul li#CurrentSection a, #subnavigation ul li#CurrentSection a {
padding-bottom:4px;
border-top:solid 1px #7CA3DD;
border-right:solid 1px #7CA3DD;
@ -214,6 +216,9 @@ a:visited {
#navigation ul li#CurrentSection a:hover {
background-color:#FFF;
}
#subnavigation ul li#CurrentSection a {
border-width:0 0 1px 0;
}
/* Main Table
----------------------------------------------------- */
@ -913,7 +918,7 @@ div#sourcerefs ol li ol {
line-height:130%;
color:#204D91;
margin:0;
padding:0;
padding:15px 0 0 0;
background-color:#BFD0EA;
border-top:solid 1px #204D91;
}
@ -1022,8 +1027,7 @@ body#WebCal #CreatorInfo {
padding:.7em 5% 1em 5%;
border-top:solid 4px #7CA3DD;
}
.calendar tfoot tr td.note {
height:1cm;
.calendar tfoot tr td {
vertical-align:middle;
color:#204D91;
background-color:#EEE;
@ -1062,7 +1066,7 @@ body#WebCal #CreatorInfo {
.calendar tbody tr td.saturday {
}
.calendar tbody tr td.sunday {
.calendar tbody tr td:first-child {
border-left:none;
}
.calendar tbody tr:first-child td {
@ -1112,3 +1116,29 @@ body#WebCal #CreatorInfo {
color:#BFD0EA;
background-color:#EAEEF4;
}
/* Calendar : Full Year */
body#fullyear div.content, body#fullyearlinked div.content {
width:963px;
margin:0 auto;
padding:15px 0 2px 2px;
}
body#fullyear table.calendar, body#fullyearlinked table.calendar {
float:left;
width:320px;
height:18em;
border:solid 1px #7D5925;
}
body#fullyear table.calendar thead tr th, body#fullyearlinked table.calendar thead tr th {
height:2em;
}
body#fullyear table.calendar thead tr th.monthName, body#fullyearlinked table.calendar thead tr th.monthName {
font-size:1.2em;
padding:2px 0;
}
body#fullyear table.calendar tbody tr td, body#fullyearlinked table.calendar tbody tr td {
height:3em;
}
body#fullyear table.calendar tfoot tr td, body#fullyearlinked table.calendar tfoot tr td {
display:none;
}

View File

@ -10,7 +10,7 @@ This website was created with GRAMPS
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 www.gramps-project.org to learn more!
Go to http://gramps-project.org to learn more!
License
----------------------------------------------------------------------------
@ -105,6 +105,7 @@ h1 {
font-size:1.8em;
font-weight:normal;
font-style:italic;
margin:0;
}
h2 {
display:none;
@ -136,6 +137,7 @@ h5, h6 {
p {
font-size:14px;
line-height:17px;
margin:0;
}
p#description {
padding:0 15px 1em 15px;
@ -180,7 +182,7 @@ a:visited {
color:#7D5925;
margin:0 0 7px 50px;
}
#Header p {
#header p {
font-size:1em;
font-weight:bold;
font-style:italic;
@ -190,26 +192,26 @@ a:visited {
/* Navigation
----------------------------------------------------- */
#navigation {
#navigation, #subnavigation {
font-family:sans-serif;
width:965px;
margin:0 auto;
padding:0;
background:url(../images/Web_Mainz_MidLight.png) #FFF2C6;
}
#navigation ul {
#navigation ul, #subnavigation ul {
list-style:none;
min-width:770px;
height:24px;
height:23px;
margin:0;
padding:0 0 0 12px;
}
#navigation ul li {
#navigation ul li, #subnavigation ul li {
margin:0;
padding:0;
float:left;
}
#navigation ul li a {
#navigation ul li a, #subnavigation ul li a {
display:block;
font-size:12px;
line-height:100%;
@ -219,22 +221,27 @@ a:visited {
margin:0;
padding:6px 8px 5px 8px;
}
#navigation ul li a:hover {
#navigation ul li a:hover, #subnavigation ul li a:hover {
background-color:#FFFFE7;
}
#navigation ul li#CurrentSection a {
#navigation ul li#CurrentSection a, #subnavigation ul li#CurrentSection a {
font-family:Georgia, serif;
font-weight:bold;
font-style:italic;
padding:5px 15px 5px 15px;
border-top:solid 1px yellow;
border-bottom:solid 1px yellow;
background-image:url(../images/Web_Mainz_Mid.png);
border-style:dashed;
border-width:1px;
border-width:1px 1px 0 1px;
border-color:#7D5925;
}
#navigation ul li#CurrentSection a:hover {
}
#subnavigation {
background-image:url(../images/Web_Mainz_Mid.png);
}
#subnavigation ul li#CurrentSection a {
border-width:0 0 1px 0;
}
/* Main Table
----------------------------------------------------- */
@ -901,7 +908,7 @@ div#sourcerefs ol li ol {
line-height:130%;
font-family:sans-serif;
margin:0 auto;
padding:0;
padding:15px 0 0 0;
background:url(../images/Web_Mainz_MidLight.png) #FFF2C6;
border-top:dashed 1px #7D5925;
}
@ -995,8 +1002,7 @@ div#sourcerefs ol li ol {
padding:.7em 5% 1em 5%;
border-top:double 4px #7D5925;
}
.calendar tfoot tr td.note {
height:1cm;
.calendar tfoot tr td {
vertical-align:middle;
color:#7D5925;
background:url(../images/Web_Mainz_Mid.png) #FFF2C6 repeat;
@ -1035,7 +1041,7 @@ div#sourcerefs ol li ol {
.calendar tbody tr td.saturday {
}
.calendar tbody tr td.sunday {
.calendar tbody tr td:first-child {
border-left:none;
}
.calendar tbody tr:first-child td {
@ -1086,3 +1092,30 @@ div#sourcerefs ol li ol {
color:#D8C19F;
background:url(../images/Web_Mainz_MidLight.png) #FFF2C6 repeat;
}
/* Calendar : Full Year */
body#fullyear div.content, body#fullyearlinked div.content {
width:963px;
margin:0 auto;
padding:15px 0 2px 2px;
background:url(../images/Web_Mainz_Mid.png) #FFF2C6 repeat;
}
body#fullyear table.calendar, body#fullyearlinked table.calendar {
float:left;
width:320px;
height:18em;
border:solid 1px #7D5925;
}
body#fullyear table.calendar thead tr th, body#fullyearlinked table.calendar thead tr th {
height:2em;
}
body#fullyear table.calendar thead tr th.monthName, body#fullyearlinked table.calendar thead tr th.monthName {
font-size:1.2em;
padding:2px 0;
}
body#fullyear table.calendar tbody tr td, body#fullyearlinked table.calendar tbody tr td {
height:3em;
}
body#fullyear table.calendar tfoot tr td, body#fullyearlinked table.calendar tfoot tr td {
display:none;
}

View File

@ -199,11 +199,11 @@ p#user_header {
/* Navigation
----------------------------------------------------- */
#navigation {
#navigation, #subnavigation {
margin:0;
padding:0;
}
#navigation ul {
#navigation ul, #subnavigation ul {
list-style:none;
min-width:770px;
height:32px;
@ -212,11 +212,11 @@ p#user_header {
background-color:#A97;
border-bottom:solid 1px #542;
}
#navigation ul li {
#navigation ul li, #subnavigation ul li {
margin:0;
float:left;
}
#navigation ul li a {
#navigation ul li a, #subnavigation ul li a {
display:block;
float:left;
font:normal 16px/100% serif;
@ -226,11 +226,11 @@ p#user_header {
padding:8px 13px;
}
#navigation ul li a:hover {
#navigation ul li a:hover, #subnavigation ul li a:hover {
background-color:#C1B398;
border-bottom:solid 1px #542;
}
#navigation ul li#CurrentSection a {
#navigation ul li#CurrentSection a, #subnavigation ul li#CurrentSection a {
font-size:19px;
margin-top:-6px;
padding-top:11px;
@ -243,6 +243,9 @@ p#user_header {
#navigation ul li#CurrentSection a:hover {
background-color:#FFF;
}
#subnavigation ul li#CurrentSection a {
border-width:0 0 1px 0;
}
/* Main Table
----------------------------------------------------- */
@ -1063,8 +1066,7 @@ body#WebCal {
padding:.7em 5% 1em 5%;
border-top:solid 4px #A97;
}
.calendar tfoot tr td.note {
height:1cm;
.calendar tfoot tr td {
vertical-align:middle;
color:#542;
background-color:#F6F2EE;
@ -1102,7 +1104,7 @@ body#WebCal {
.calendar tbody tr td.saturday {
}
.calendar tbody tr td.sunday {
.calendar tbody tr td:first-child {
border-left:none;
}
.calendar tbody tr:first-child td {
@ -1152,3 +1154,30 @@ body#WebCal {
color:#A97;
background-color:#F6F2EE;
}
/* Calendar : Full Year */
body#fullyear div.content, body#fullyearlinked div.content {
width:963px;
margin:0 auto;
padding:15px 0 2px 2px;
background:url(../images/Web_Mainz_Mid.png) #FFF2C6 repeat;
}
body#fullyear table.calendar, body#fullyearlinked table.calendar {
float:left;
width:320px;
height:18em;
border:solid 1px #7D5925;
}
body#fullyear table.calendar thead tr th, body#fullyearlinked table.calendar thead tr th {
height:2em;
}
body#fullyear table.calendar thead tr th.monthName, body#fullyearlinked table.calendar thead tr th.monthName {
font-size:1.2em;
padding:2px 0;
}
body#fullyear table.calendar tbody tr td, body#fullyearlinked table.calendar tbody tr td {
height:3em;
}
body#fullyear table.calendar tfoot tr td, body#fullyearlinked table.calendar tfoot tr td {
display:none;
}

View File

@ -124,9 +124,9 @@ h3 {
line-height:1.3em;
font-weight:normal;
font-style:italic;
color:#426E40;
text-align:center;
margin:0;
color:#426E40;
padding:.3em 20px 0 20px;
border-bottom:double 4px #000;
}
@ -194,6 +194,10 @@ a:hover {
color:#FAFAFA;
text-decoration:none;
}
.grampsid {
font:normal .8em/1.2em monospace;
color:#426E40;
}
/* Header
----------------------------------------------------- */
@ -215,24 +219,6 @@ a:hover {
text-align:center;
vertical-align:middle;
}
#GRAMPSinfo {
font:normal .8em/1.2em sans-serif;
float:right;
margin:0;
padding:.7em .8em;
color:#FAFAFA;
}
#GRAMPSinfo a {
color:#FAFAFA;
text-decoration:none;
}
#GRAMPSinfo a:hover {
background-color:#426E40;
}
.grampsid {
font:normal .8em/1.2em monospace;
color:#426E40;
}
p#user_header {
font-size:1.3em;
text-align:left;
@ -244,7 +230,7 @@ p#user_header {
/* Navigation
----------------------------------------------------- */
#navigation {
#navigation, #subnavigation {
width:100%;
height:35px;
list-style-type:none;
@ -254,24 +240,24 @@ p#user_header {
border-top:solid 4px #D30;
border-bottom:solid 4px #D30;
}
#navigation ul li {
#navigation ul li, #subnavigation ul li {
display:inline;
width:2em;
text-align:center;
margin:0;
}
#navigation ul li a {
#navigation ul li a, #subnavigation ul li a {
font-size:14px;
color:#000;
text-decoration:none;
margin:0;
padding:4px;
}
#navigation ul li a:hover {
#navigation ul li a:hover, #subnavigation ul li a:hover {
background-color:#000;
color:#FAFAFA;
}
#navigation ul li#CurrentSection a {
#navigation ul li#CurrentSection a, #subnavigation ul li#CurrentSection a {
border-right:solid 2px #D30;
border-left:solid 2px #D30;
border-top:solid 2px #D30;
@ -288,6 +274,9 @@ p#user_header {
background-color:#426E40;
color:#FAFAFA;
}
#subnavigation ul li#CurrentSection a {
border-width:0 0 1px 0;
}
/* Main Table
----------------------------------------------------- */
@ -1169,6 +1158,10 @@ div#pedigree {
padding:.2em 0 .1em 0;
background-color:#6AF364;
}
#CreatorInfo {
float:right;
margin:-24px 10px 0 0;
}
.calendar thead tr th.monthName {
font-style:italic;
width:100%;
@ -1187,6 +1180,10 @@ div#pedigree {
.calendar tbody tr.week5, .calendar tbody tr.week6 {
border-bottom:solid 1px #000;
}
/* Calendar : Date Numeral */
/* Calendar : Date Container */
.calendar tbody tr td {
vertical-align:top;
height:10em;
@ -1207,12 +1204,14 @@ div#pedigree {
.calendar tbody tr td.saturday {
border-right:solid 1px #000;
}
.calendar tbody tr td.sunday {
border-left:solid 1px #000;
.calendar tbody tr td:first-child {
border-left:none;
}
.calendar tbody tr td#emptyDays {
border:solid 1px #000;
.calendar tbody tr:first-child td {
border-top:none;
}
/* Calendar : Date Detail */
.calendar tbody tr td ul {
list-style:none;
font-family:sans-serif;
@ -1227,6 +1226,11 @@ div#pedigree {
padding:.2em 0 .3em 0;
border-top:dashed 1px #000;
}
.calendar tbody tr td ul li:first-child {
border:none;
}
/* Calendar : Birthday, Anniversary, Highlight */
.calendar tbody tr td ul li em {
font-style:normal;
color:#0A65B5;
@ -1265,3 +1269,30 @@ div#pedigree {
font-weight:bold;
font-style:italic;
}
/* Calendar : Full Year */
body#fullyear div.content, body#fullyearlinked div.content {
width:963px;
margin:0 auto;
padding:15px 0 2px 2px;
background:url(../images/Web_Mainz_Mid.png) #FFF2C6 repeat;
}
body#fullyear table.calendar, body#fullyearlinked table.calendar {
float:left;
width:320px;
height:18em;
border:solid 1px #7D5925;
}
body#fullyear table.calendar thead tr th, body#fullyearlinked table.calendar thead tr th {
height:2em;
}
body#fullyear table.calendar thead tr th.monthName, body#fullyearlinked table.calendar thead tr th.monthName {
font-size:1.2em;
padding:2px 0;
}
body#fullyear table.calendar tbody tr td, body#fullyearlinked table.calendar tbody tr td {
height:3em;
}
body#fullyear table.calendar tfoot tr td, body#fullyearlinked table.calendar tfoot tr td {
display:none;
}

View File

@ -44,9 +44,9 @@ Refactoring. This is an ongoing job until this plugin is in a better shape.
TODO list:
- change filename for one_day pages to yyyy/mm/dd.html (just numbers)
- progress bar, rethink its usage
- in year navigation, use month in link, or 'fullyear'
- untangle calendar_build, it's too complex the way it is
- correct surname (prefix missing, or misinterpreted)
- add_day_item and self.calendar seem to be adding list entries as list (list of list)
- use standard Gramps method to display surname, see _get_regular_surname
- daylight saving not just for USA and Europe
- move the close_file() from one_day() to caller
"""
@ -105,8 +105,6 @@ from DateHandler import parser as _dp
# constants
#
#------------------------------------------------------------------------
_CALENDARSCREEN = "calendar-screen.css"
_CALENDARPRINT = "calendar-print.css"
# This information defines the list of styles in the Web calendar
# options dialog as well as the location of the corresponding SCREEN
@ -325,9 +323,8 @@ class WebCalReport(Report):
my_date = '...'
else:
my_date = '...' #Incomplete date as in about, circa, etc.
item = [(my_date, text, event)] # ???? Why is this a list?
day_list.append(item)
day_list.append((my_date, text, event))
month_dict[day] = day_list
self.calendar[month] = month_dict
@ -405,14 +402,14 @@ class WebCalReport(Report):
"""
Copies all the necessary files
"""
# Copy the _CALENDARSCREEN stylesheet
# Copy the normal stylesheet
if self.css != "":
fname = os.path.join(const.DATA_DIR, self.css)
self.copy_file(fname, _CALENDARSCREEN, "styles")
self.copy_file(fname, self.css, "styles")
# copy calendar-print stylesheet
# copy print stylesheet
fname = os.path.join(const.DATA_DIR, "Web_Print-Default.css")
self.copy_file(fname, _CALENDARPRINT, "styles")
self.copy_file(fname, "Web_Print-Default.css", "styles")
# Copy GRAMPS favicon
fname = os.path.join(const.IMAGE_DIR, "favicon.ico")
@ -452,7 +449,7 @@ class WebCalReport(Report):
# add a link to blank_year() if requested
navs.append(('blankyear', _('Blank Calendar'), self.blankyear))
of.write('<div id="navigation">\n')
of.write('<div id="subnavigation">\n')
of.write('\t<ul>\n')
for url_fname, nav_text, cond in navs:
@ -532,7 +529,7 @@ class WebCalReport(Report):
of.write('\t</ul>\n')
of.write('</div>\n\n')
def calendar_common(self, of, nr_up, year, currsec1, title, body_id, use_home=False, add_print=False):
def calendar_common(self, of, nr_up, year, currsec1, title, body_id, use_home=False, add_print=True):
"""
Will create the common information for each calendar being created
"""
@ -556,6 +553,10 @@ class WebCalReport(Report):
of.write('%s</p>\n' % msg)
of.write('</div>\n') # end header
if self.multiyear:
# create Year Navigation menu
self.display_year_navs(of, nr_up, str(year))
# adjust the months being created if self.partyear is True
# and year is eequal to current year, then start_month is current month
self.start_month = 1
@ -567,6 +568,8 @@ class WebCalReport(Report):
# identify currentsection for proper highlighting
self.display_month_navs(of, nr_up, year, currsec1, use_home)
of.write('<div class="content">\n')
def calendar_build(self, of, cal, year, month):
"""
This does the work of building the calendar
@ -584,7 +587,7 @@ class WebCalReport(Report):
# Note. GrampsLocale has sunday => 1, monday => 2, etc
# We slice out the first empty element.
day_names = GrampsLocale.short_days
day_names = GrampsLocale.long_days
# Translate a Gramps day number into a HTMLclass
def get_class_for_daycol(col):
@ -622,7 +625,9 @@ class WebCalReport(Report):
of.write('\t\t<tr>\n')
for day_col in range(7):
dayclass = get_class_for_daycol(day_col)
of.write('\t\t\t<th class="%s">%s</th>\n' % (dayclass, get_name_for_daycol(day_col)))
dayname = get_name_for_daycol(day_col)
#of.write('\t\t\t<th class="%s">%s</th>\n' % (dayclass, get_name_for_daycol(day_col)))
of.write('\t\t\t<th class="%s"><abbr title="%s">%s</abbr></th>\n' % (dayclass, dayname, dayname[0]))
of.write('\t\t</tr>\n')
of.write('\t</thead>\n')
@ -652,10 +657,11 @@ class WebCalReport(Report):
nweeks = len(monthinfo)
for week_row in range(0, nweeks):
week = monthinfo[week_row]
of.write('\t\t<tr class="week%d">\n' % week_row)
of.write('\t\t<tr class="week%d">\n' % (week_row+1))
for day_col in range(0, 7):
dayclass = get_class_for_daycol(day_col)
hilightday = 'highlight ' + dayclass
day = week[day_col]
if day == 0: # a day in the previous or next month
@ -666,46 +672,51 @@ class WebCalReport(Report):
specday = firstweek_nextmonth[day_col]
specclass = "next " + dayclass
if specclass[0] == 'p': # previous day of last month
of.write('\t\t\t<td id="prevday%d" ' % specday)
else: # next day of next month
of.write('\t\t\t<td id="nextday%d" ' % specday)
of.write('class="%s">\n' % specclass)
#if specclass[0] == 'p': # previous day of last month
# of.write('\t\t\t<td id="prevday%d" ' % specday)
#else: # next day of next month
# of.write('\t\t\t<td id="nextday%d" ' % specday)
of.write('\t\t\t<td class="%s">\n' % specclass)
of.write('\t\t\t\t<div class="date">%d</div>\n' % specday)
of.write('\t\t\t</td>\n')
else: # normal day number in current month
if cal == "by": # blank_year() doesn't need any highlighting or hyperlinks
of.write('\t\t\t<td id="day%d" class="%s">\n' % (day, dayclass))
of.write('\t\t\t<td id="%s%02d" class="%s">\n' % (shrt_month, day, dayclass))
of.write('\t\t\t\t<div class="date">%d</div>\n' % day)
of.write('\t\t\t</td>\n')
else:
thisday = datetime.date.fromordinal(current_ord)
of.write('\t\t\t<td id="day%d" ' % day)
of.write('\t\t\t<td id="%s%02d" ' % (shrt_month, day))
if thisday.month == month: # Something this month
holiday_list = self.holidays.get(month, {}).get(thisday.day, [])
bday_anniv_list = self.calendar.get(month, {}).get(thisday.day, [])
if (holiday_list > []) or (bday_anniv_list > []):
specclass = 'highlight ' + dayclass
of.write('class="%s">\n' % specclass)
evt_date = time.strptime('%d/%d/%d' % (year, month, day), '%Y/%m/%d')
# Year at a Glance
if cal == "yg":
# Notice the code in one_day(): cal_fname = '%s%d%s' % (shrt_month, day, self.ext)
# TODO. Create file for one_day()
fname = '%s%d%s' % (shrt_month, day, self.ext)
of.write('\t\t\t\t<a id="%s%d" href="%s/%s" title="%s%d">\n'
% (shrt_month, day, lng_month, fname, shrt_month, day))
of.write('\t\t\t\t\t<div class="date">%d</div>\n' % day)
of.write('\t\t\t\t</a>\n')
did_some = self.one_day(of, year, evt_date, cal, holiday_list, bday_anniv_list)
if did_some:
# Notice the code in one_day(): cal_fname = '%s%d%s' % (shrt_month, day, self.ext)
# TODO. Create file for one_day()
# The HREF is relative to the year path.
fname = '%s%d%s' % (shrt_month, day, self.ext)
fname = '/'.join([lng_month, fname])
of.write('class="%s">\n' % hilightday)
of.write('\t\t\t\t<a id="%s%d" href="%s" title="%s%d">\n'
% (shrt_month, day, fname, shrt_month, day))
of.write('\t\t\t\t\t<div class="date">%d</div>\n' % day)
of.write('\t\t\t\t</a>\n')
else:
of.write('class="%s">\n' % dayclass)
of.write('\t\t\t\t<div class="date">%d</div>\n' % day)
# WebCal
elif cal == 'wc':
elif cal == 'wc':
of.write('class="%s">\n' % hilightday)
of.write('\t\t\t\t<div class="date">%d</div>\n' % day)
# year_glance() and normal_cal() both need this to itemize the list
self.one_day(of, year, evt_date, cal, holiday_list, bday_anniv_list)
self.one_day(of, year, evt_date, cal, holiday_list, bday_anniv_list)
# no holiday/ bday/ anniversary this day
else:
@ -726,6 +737,16 @@ class WebCalReport(Report):
# close the week/ row
of.write('\t\t</tr>\n')
if cal == "yg":
# Fill up till we have 6 rows, so that the months align properly
for i in range(nweeks, 6):
of.write('\t\t<tr class="week%d">\n' % (i+1))
of.write('\t\t\t<td colspan="7"></td>\n')
of.write('\t\t</tr>\n')
# close table body
of.write('\t</tbody>\n')
def write_header(self, of, nr_up, title, add_print=True):
"""
This creates the header for the Calendars including style embedded for special purpose
@ -747,20 +768,19 @@ class WebCalReport(Report):
of.write('\t<meta name="author" content="%s" />\n\n' % self.author)
subdirs = ['..'] * nr_up
# Note. We use '/' here because it is a URL, not a OS dependent pathname
fname1 = '/'.join(subdirs + ['styles'] + [_CALENDARSCREEN])
fname2 = '/'.join(subdirs + ['styles'] + [_CALENDARPRINT])
fname3 = '/'.join(subdirs + ['images'] + ['favicon.ico'])
# link to _CALENDARSCREEN stylesheet
of.write('\t<link rel="stylesheet" href="%s" type="text/css" media="screen" />\n' % fname1)
# link to stylesheet
fname = '/'.join(subdirs + ['styles'] + [self.css])
of.write('\t<link rel="stylesheet" href="%s" type="text/css" media="screen" />\n' % fname)
# link to _CALENDARPRINT stylesheet
if add_print:
of.write('\t<link rel="stylesheet" href="%s" type="text/css" media="print" />\n' % fname2)
fname = '/'.join(subdirs + ['styles'] + ["Web_Print-Default.css"])
of.write('\t<link rel="stylesheet" href="%s" type="text/css" media="print" />\n' % fname)
# link to GRAMPS favicon
of.write('\t<link rel="shortcut icon" href="%s" type="image/icon" />\n' % fname3)
fname = '/'.join(subdirs + ['images'] + ['favicon.ico'])
of.write('\t<link rel="shortcut icon" href="%s" type="image/icon" />\n' % fname)
of.write('</head>\n\n')
@ -771,6 +791,9 @@ class WebCalReport(Report):
root of the directory tree (i.e. to self.html_dir).
"""
of.write('<div class="fullclear"></div>\n')
of.write('</div>\n') # Closing "content"
of.write('<div id="footer">\n')
# Display date as user set in preferences
@ -846,61 +869,56 @@ class WebCalReport(Report):
if holiday_list > []:
for p in holiday_list:
for line in p.splitlines():
item = [(event_date, line, _('Holiday'))]
day_list.append(item)
day_list.append((event_date, line, _('Holiday')))
# birthday/ anniversary on this day
if bday_anniv_list > []:
# TODO. Eliminate one level of list. See add_day_item.
for line in bday_anniv_list:
for date, text, event in line:
for date, text, event in bday_anniv_list:
# '...' signifies an incomplete date for an event. See add_day_item()
# '...' signifies an incomplete date for an event. See add_day_item()
txt_str = None
if date != '...':
years = year - date.year
# a birthday
if event == 'birthday':
if years == 1:
txt_str = _('%(short_name)s, <em>%(age)d</em> year old') % {
'short_name' : text,
'age' : years}
elif 2 <= years <= 105:
txt_str = _('%(short_name)s, <em>%(age)d</em> years old') % {
'short_name' : text,
'age' : years}
# TODO. Think about this limit a bit more.
# if age is greater than 105,
# STOP! Do Nothing!!!
else:
txt_str = None
# an anniversary
elif event == 'anniversary':
# if married years is less than 76 years
if 1 <= years < 75:
txt_str = _('%(couple)s, <em>%(nyears)d</em> year anniversary') % {
'couple' : text,
'nyears' : years}
txt_str = '<span class="yearsmarried">%s</span>' % txt_str
# TODO. Think about this limit a bit more.
# if married years is greater than 75 years,
# STOP! Do Nothing!!!
else:
txt_str = None
# incomplete date
else:
txt_str = None
if date != '...':
years = year - date.year
# a birthday
if event == 'birthday':
if years == 1:
txt_str = _('%(short_name)s, <em>%(age)d</em> year old') % {
'short_name' : text,
'age' : years}
elif 2 <= years <= 105:
txt_str = _('%(short_name)s, <em>%(age)d</em> years old') % {
'short_name' : text,
'age' : years}
# TODO. Think about this limit a bit more.
# if age is greater than 105,
# STOP! Do Nothing!!!
else:
txt_str = None
# an anniversary
elif event == 'anniversary':
# if married years is less than 76 years
if 1 <= years < 75:
txt_str = _('%(couple)s, <em>%(nyears)d</em> year anniversary') % {
'couple' : text,
'nyears' : years}
txt_str = '<span class="yearsmarried">%s</span>' % txt_str
# TODO. Think about this limit a bit more.
# if married years is greater than 75 years,
# STOP! Do Nothing!!!
else:
txt_str = None
# incomplete date
else:
txt_str = None
if txt_str is not None:
# TODO. Eliminate one level list of list
item = [(date, txt_str, event)]
day_list.append(item)
if txt_str is not None:
day_list.append((date, txt_str, event))
# something for this day
if day_list > []:
@ -908,7 +926,6 @@ class WebCalReport(Report):
if cal == 'yg':
# This is a one_day in the year-at-a-glance calendar
nr_up = 2 # number of directory levels to reach self.html_dir
# slice up event_date to get year, month, and day
year, month, day = event_date[0], event_date[1], event_date[2]
@ -917,7 +934,7 @@ class WebCalReport(Report):
lng_month = _get_long_month_name(month)
shrt_month = _get_short_month_name(month)
# Name the file, and create it
# Name the file, and create it (see code in calendar_build)
cal_fname = '%s%d%s' % (shrt_month, day, self.ext)
fpath = os.path.join(str(year), lng_month)
of = self.create_file(cal_fname, fpath)
@ -927,26 +944,23 @@ class WebCalReport(Report):
my_date.set_yr_mon_day(year, month, day)
my_date = _dd.display(my_date)
# create calendar common info for each calendar
self.calendar_common(of, nr_up, year, lng_month, _('One Day Within A Year'), my_date)
if self.multiyear:
# create Year Navigation menu
self.display_year_navs(of, nr_up, str(year))
self.calendar_common(of, 2, year, lng_month, _('One Day Within A Year'), my_date)
of.write('\t<h1 id="OneDay">%s</h1>\n' % my_date)
of.write('\t<h3 id="OneDay">%s</h3>\n' % my_date)
of.write('\t<ul>\n')
for line in day_list:
# TODO. Eliminate one level list of list
for date, text, event in line:
of.write('\t\t<li>%s</li>\n' % text)
for date, text, event in day_list:
of.write('\t\t<li>%s</li>\n' % text)
of.write('\t</ul>\n')
# Only close the file for "Year At A Glance"
if cal == 'yg':
self.write_footer(of, nr_up)
self.write_footer(of, 2)
self.close_file(of)
# Let caller know we did output something.
return day_list > []
def blank_year(self, year):
"""
This method will create the Printable Full Year One Page Calendar...
@ -964,11 +978,7 @@ class WebCalReport(Report):
else:
title = _('Blank Calendar')
# create calendar common info for each calendar
self.calendar_common(of, nr_up, year, 'blankyear', title, 'blankcal')
if self.multiyear:
# create Year Navigation menu
self.display_year_navs(of, nr_up, str(year))
self.calendar_common(of, nr_up, year, 'blankyear', title, 'fullyear')
# generate progress pass for "Blank Year"
self.progress.set_pass(_('Creating Blank Year calendars'), self.end_month - self.start_month)
@ -978,8 +988,9 @@ class WebCalReport(Report):
# build the calendar
self.calendar_build(of, "by", year, month)
# close table body
of.write('\t</tbody>\n')
of.write('<tfoot>\n')
of.write('\t<tr><td colspan="7"></td></tr>\n')
of.write('</tfoot>\n')
of.write('</table>\n\n')
# increase progress bar
@ -1003,19 +1014,17 @@ class WebCalReport(Report):
# page title
title = _("%(year)d, At A Glance") % {'year' : year}
# create calendar common info for each calendar
self.calendar_common(of, nr_up, year, 'fullyear', title, 'yearglance')
if self.multiyear:
# create Year Navigation menu
self.display_year_navs(of, nr_up, str(year))
self.calendar_common(of, nr_up, year, 'fullyear', title, 'fullyearlinked')
# page description
of.write('<div class="content">\n')
of.write('<p id="description">\n')
# TODO. The "red square" is only valid for some style sheets.
of.write(_('This calendar is meant to give you access to all your data at a glance '
'compressed into one page. Clicking on a <strong>red square</strong> will take you to a '
'page that shows all the events for that date!\n'))
of.write('</p>\n\n')
'compressed into one page. Clicking on a date will take you to a '
'page that shows all the events for that date, if there are any!\n'))
of.write('</p>\n')
of.write('</div>\n\n')
# generate progress pass for "Year At A Glance"
self.progress.set_pass(_('Creating Year At A Glance calendars'), self.end_month - self.start_month)
@ -1024,25 +1033,13 @@ class WebCalReport(Report):
# build the calendar
self.calendar_build(of, "yg", year, month)
# Note. The week rows are filled up to make them all 6 weeks long.
nweeks = len(calendar.monthcalendar(year, month))
for i in range(nweeks+1, 7):
of.write('\t\t<tr class="week%d">\n' % i)
of.write('\t\t\t<td id="emptyDays" colspan="7">\n')
of.write('\t\t\t</td>\n')
of.write('\t\t</tr>\n')
# close table body before writing note
of.write('\t</tbody>\n')
# create note section for "Year At A Glance"
note = self.month_notes[month-1].strip()
note = note or "&nbsp;"
of.write('\t<tfoot>\n')
of.write('\t\t<tr>\n')
of.write('\t\t\t<td class="note" colspan="7">\n')
of.write('\t\t\t\t%s\n' % note)
of.write('\t\t\t</td>\n')
of.write('\t\t\t<td colspan="7">%s</td>\n' % note)
of.write('\t\t</tr>\n')
of.write('\t</tfoot>\n')
of.write('</table>\n\n')
@ -1173,24 +1170,17 @@ class WebCalReport(Report):
cal_fname = _get_long_month_name(month)
of = self.create_file(cal_fname, str(year))
# create calendar common info for each calendar
self.calendar_common(of, nr_up, year, cal_fname, self.title_text, 'WebCal', use_home=True)
if self.multiyear:
# create Year Navigation menu
self.display_year_navs(of, nr_up, str(year))
# build the calendar
self.calendar_build(of, "wc", year, month)
# close table body before note section
of.write('\t</tbody>\n')
# create note section for "WebCal"
note = self.month_notes[month-1].strip()
note = note or "&nbsp;"
of.write('\t<tfoot>\n')
of.write('\t\t<tr>\n')
of.write('\t\t\t<td class="note" colspan="7">%s</td>\n' % note)
of.write('\t\t\t<td colspan="7">%s</td>\n' % note)
of.write('\t\t</tr>\n')
of.write('\t</tfoot>\n')
of.write('</table>\n\n')
@ -1263,6 +1253,7 @@ class WebCalReport(Report):
father_name = father.get_primary_name()
father_lastname = _get_regular_surname(sex, father_name)
short_name = _get_short_name(person, father_lastname)
# Huh? Why translate this?
text = _('%(short_name)s') % {'short_name' : short_name}
self.add_day_item(text, year, month, day, 'birthday')