Commit 1f54afa5 authored by Dries's avatar Dries

- Patch #15655 by Goba: allow blank days in the calendar to be styled using CSS, and tidied up the calendar's CSS.
parent 8d723826
......@@ -135,8 +135,8 @@ td.menu-disabled {
margin-bottom: 1em;
}
tr.light .form-item, tr.dark .form-item {
margin-top: 0em;
margin-bottom: 0em;
margin-top: 0;
margin-bottom: 0;
white-space: nowrap;
}
.form-item input.error, .form-item textarea.error {
......@@ -305,6 +305,7 @@ tr.light .form-item, tr.dark .form-item {
.calendar table {
border-collapse: collapse;
width: 100%;
border: 1px solid #000;
}
.calendar td, .calendar th {
text-align: center;
......@@ -313,11 +314,14 @@ tr.light .form-item, tr.dark .form-item {
margin: 0;
font-size: 0.8em;
}
.calendar td.day-blank {
border: 0;
}
.tips {
margin-top: 0px;
margin-bottom: 0px;
padding-top: 0px;
padding-bottom: 0px;
margin-top: 0;
margin-bottom: 0;
padding-top: 0;
padding-bottom: 0;
font-size: 0.9em;
}
#forum .description {
......@@ -366,7 +370,7 @@ tr.light .form-item, tr.dark .form-item {
}
.profile {
clear: both;
margin: 1em 0em 1em 0em;
margin: 1em 0 1em 0;
}
.profile .picture {
float: right;
......@@ -450,7 +454,7 @@ tr.watchdog-error .active {
/* Tab navigation */
ul.primary {
border-collapse: collapse;
padding: 0em 0em 0em 1em;
padding: 0 0 0 1em;
white-space: nowrap;
list-style: none;
margin: 5px;
......@@ -468,7 +472,7 @@ ul.primary li a {
border-style: solid solid none solid;
height: auto;
margin-right: 0.5em;
padding: 0em 1em;
padding: 0 1em;
text-decoration: none;
}
ul.primary li.active a {
......
......@@ -119,10 +119,10 @@ function archive_calendar($original = 0) {
// Loop through all the days of the month:
while ($nday <= $last) {
// Set up blank days for first week of the month:
// Set up blank days for first week of the month (allowing individual blank day styling):
if ($first != $weekstart) {
$blankdays = ($first - $weekstart + 7) % 7;
$output .= " <tr class=\"row-week\"><td class=\"day-blank\" colspan=\"$blankdays\">&nbsp;</td>\n";
$output .= " <tr class=\"row-week\">" . str_repeat("<td class=\"day-blank\">&nbsp;</td>\n", $blankdays);
$first = $weekstart;
}
// Start every week on a new line:
......@@ -164,10 +164,10 @@ function archive_calendar($original = 0) {
$nday++;
}
// Complete the calendar:
// Complete the calendar (allowing individual blank day styling):
if ($sday != $weekstart) {
$end = (7 - $sday + $weekstart) % 7;
$output .= " <td class=\"day-blank\" colspan=\"$end\">&nbsp;</td>\n </tr>\n";
$output .= str_repeat("<td class=\"day-blank\">&nbsp;</td>\n", $end) . "</tr>\n";
}
$output .= "</table></div>\n\n";
......
......@@ -119,10 +119,10 @@ function archive_calendar($original = 0) {
// Loop through all the days of the month:
while ($nday <= $last) {
// Set up blank days for first week of the month:
// Set up blank days for first week of the month (allowing individual blank day styling):
if ($first != $weekstart) {
$blankdays = ($first - $weekstart + 7) % 7;
$output .= " <tr class=\"row-week\"><td class=\"day-blank\" colspan=\"$blankdays\">&nbsp;</td>\n";
$output .= " <tr class=\"row-week\">" . str_repeat("<td class=\"day-blank\">&nbsp;</td>\n", $blankdays);
$first = $weekstart;
}
// Start every week on a new line:
......@@ -164,10 +164,10 @@ function archive_calendar($original = 0) {
$nday++;
}
// Complete the calendar:
// Complete the calendar (allowing individual blank day styling):
if ($sday != $weekstart) {
$end = (7 - $sday + $weekstart) % 7;
$output .= " <td class=\"day-blank\" colspan=\"$end\">&nbsp;</td>\n </tr>\n";
$output .= str_repeat("<td class=\"day-blank\">&nbsp;</td>\n", $end) . "</tr>\n";
}
$output .= "</table></div>\n\n";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment