Changeset:
89f2e1355f77
https://sourceforge.net/p/mrbs/hg-code/ci/89f2e1355f77a78030069879e37ff969d3c547e6
Author:
Campbell Morrison <[email protected]>
Date:
Mon Dec 05 08:47:54 2016 +0000
Log message:
Simplified HTML for the Go to Day/Week/Month links.
diffstat:
web/css/mrbs.css.php | 7 ++++---
web/day.php | 20 +++++++++-----------
web/month.php | 23 +++++++++--------------
web/week.php | 23 +++++++++--------------
4 files changed, 31 insertions(+), 42 deletions(-)
diffs (126 lines):
diff -r 001b47e6e80c -r 89f2e1355f77 web/css/mrbs.css.php
--- a/web/css/mrbs.css.php Sun Dec 04 18:16:32 2016 +0000
+++ b/web/css/mrbs.css.php Mon Dec 05 08:47:54 2016 +0000
@@ -259,7 +259,8 @@
font-weight: bold
}
-.date_nav div {
+.date_nav a {
+ display: block;
width: 33%;
}
@@ -278,11 +279,11 @@
text-align: right;
}
-.date_before a:before {
+.date_before:before {
content: '<<\0000a0';
}
-.date_after a:after {
+.date_after:after {
content: '\0000a0>>';
}
diff -r 001b47e6e80c -r 89f2e1355f77 web/day.php
--- a/web/day.php Sun Dec 04 18:16:32 2016 +0000
+++ b/web/day.php Mon Dec 05 08:47:54 2016 +0000
@@ -88,18 +88,16 @@
echo "</div>\n";
// Generate Go to day before and after links
+$href_before =
"day.php?area=$area$room_param&year=$yy&month=$ym&day=$yd";
+$href_now = "day.php?area=$area$room_param";
+$href_after =
"day.php?area=$area$room_param&year=$ty&month=$tm&day=$td";
+
$before_after_links_html = "
-<div class=\"date_nav screenonly\">
- <div class=\"date_before\">
- <a
href=\"day.php?year=$yy&month=$ym&day=$yd&area=$area$room_param\">"
. get_vocab("daybefore") . "</a>
- </div>
- <div class=\"date_now\">
- <a href=\"day.php?area=$area$room_param\">" . get_vocab("gototoday") .
"</a>
- </div>
- <div class=\"date_after\">
- <a
href=\"day.php?year=$ty&month=$tm&day=$td&area=$area$room_param\">"
. get_vocab("dayafter") . "</a>
- </div>
-</div>\n";
+<nav class=\"date_nav screenonly\">
+ <a class=\"date_before\" href=\"$href_before\">" . get_vocab("daybefore") .
"</a>
+ <a class=\"date_now\" href=\"$href_now;\">" . get_vocab("gototoday") . "</a>
+ <a class=\"date_after\" href=\"$href_after\">" . get_vocab("dayafter") .
"</a>
+</nav>\n";
// and output them
echo $before_after_links_html;
diff -r 001b47e6e80c -r 89f2e1355f77 web/month.php
--- a/web/month.php Sun Dec 04 18:16:32 2016 +0000
+++ b/web/month.php Mon Dec 05 08:47:54 2016 +0000
@@ -504,21 +504,16 @@
$cd--;
}
+$href_before =
"month.php?area=$area&room=$room&year=$yy&month=$ym&day=$yd";
+$href_now =
"month.php?area=$area&room=$room&year=$cy&month=$cm&day=$cd";
+$href_after =
"month.php?area=$area&room=$room&year=$ty&month=$tm&day=$td";
-$before_after_links_html = "<div class=\"screenonly\">
- <div class=\"date_nav\">
- <div class=\"date_before\">
- <a
href=\"month.php?year=$yy&month=$ym&day=$yd&area=$area&room=$room\">"
. get_vocab("monthbefore") . "</a>
- </div>
- <div class=\"date_now\">
- <a
href=\"month.php?year=$cy&month=$cm&day=$cd&area=$area&room=$room\">"
. get_vocab("gotothismonth") . "</a>
- </div>
- <div class=\"date_after\">
- <a
href=\"month.php?year=$ty&month=$tm&day=$td&area=$area&room=$room\">"
. get_vocab("monthafter") . "</a>
- </div>
- </div>
-</div>
-";
+$before_after_links_html = "
+<nav class=\"date_nav screenonly\">
+ <a class=\"date_before\" href=\"$href_before\">" . get_vocab("monthbefore")
. "</a>
+ <a class=\"date_now\" href=\"$href_now\">" . get_vocab("gotothismonth") .
"</a>
+ <a class=\"date_after\" href=\"$href_after\">" . get_vocab("monthafter") .
"</a>
+</nav>\n";
echo $before_after_links_html;
diff -r 001b47e6e80c -r 89f2e1355f77 web/week.php
--- a/web/week.php Sun Dec 04 18:16:32 2016 +0000
+++ b/web/week.php Mon Dec 05 08:47:54 2016 +0000
@@ -79,21 +79,16 @@
$td = date("d",$i);
// Show Go to week before and after links
+$href_before =
"week.php?area=$area&room=$room&year=$yy&month=$ym&day=$yd";
+$href_now = "week.php?area=$area&room=$room";
+$href_after =
"week.php?area=$area&room=$room&year=$ty&month=$tm&day=$td";
+
$before_after_links_html = "
-<div class=\"screenonly\">
- <div class=\"date_nav\">
- <div class=\"date_before\">
- <a
href=\"week.php?year=$yy&month=$ym&day=$yd&area=$area&room=$room\">"
. get_vocab("weekbefore") . "</a>
- </div>
- <div class=\"date_now\">
- <a href=\"week.php?area=$area&room=$room\">" .
get_vocab("gotothisweek") . "</a>
- </div>
- <div class=\"date_after\">
- <a
href=\"week.php?year=$ty&month=$tm&day=$td&area=$area&room=$room\">"
. get_vocab("weekafter") . "</a>
- </div>
- </div>
-</div>
-";
+<nav class=\"date_nav screenonly\">
+ <a class=\"date_before\" href=\"$href_before\">" . get_vocab("weekbefore") .
"</a>
+ <a class=\"date_now\" href=\"$href_now\">" . get_vocab("gotothisweek") .
"</a>
+ <a class=\"date_after\" href=\"$href_after\">" . get_vocab("weekafter") .
"</a>
+</nav>\n";
print $before_after_links_html;
------------------------------------------------------------------------------
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits