Index: /lib/menu.php
===================================================================
--- /lib/menu.php (revision 288)
+++ /lib/menu.php (revision 289)
@@ -157,9 +157,32 @@
}
- // helper method
+ // helper methods
+
+ /** Check if a simplexml element has an attribute. Lightweight operation
+ * over the DOM.
+ * @returns boolean
+ **/
+ public static function dom_has_attribute($simplexml_element, $attribute_name) {
+ $dom = dom_import_simplexml($simplexml_element); // is a fast operation
+ return $dom->hasAttribute($attribute_name);
+ }
+
+ public static function dom_prepend_attribute($simplexml_element, $attribute_name, $content, $seperator='') {
+ if(!is_array($simplexml_element)) $simplexml_element = array($simplexml_element);
+ foreach($simplexml_element as $e)
+ $e[$attribute_name] = $content . (self::dom_has_attribute($e, $attribute_name) ? ($seperator.$e[$attribute_name]) : '');
+ }
+
+ public static function dom_append_attribute($simplexml_element, $attribute_name, $content, $seperator='') {
+ if(!is_array($simplexml_element)) $simplexml_element = array($simplexml_element);
+ foreach($simplexml_element as $e)
+ $e[$attribute_name] = (self::dom_has_attribute($e, $attribute_name) ? ($e[$attribute_name].$seperator) : '') . $content;
+ }
+
+ /**
+ * Appends a (CSS) class to a simplexml element, seperated by whitespace. Just an alias.
+ **/
public static function dom_add_class($simplexml_element, $value) {
- $dom = dom_import_simplexml($simplexml_element); // is a fast operation
- $simplexml_element['class'] =
- ($dom->hasAttribute("class") ? ($simplexml_element['class'].' '):'').$value;
+ self::dom_append_attribute($simplexml_element, 'class', $value, ' ');
}
@@ -193,7 +216,14 @@
if(count($current_a)) {
$current_li = $current_a[0]->xpath("parent::li");
- $this->dom_add_class($current_li[0], "current");
- $ancestors = $current_li[0]->xpath("ancestor-or-self::li");
- array_walk($ancestors, create_function('$i', 't29Menu::dom_add_class($i, "active");'));
+ self::dom_add_class($current_li[0], 'current');
+ self::dom_prepend_attribute($current_a, 'title', 'Aktuelle Seite', ': ');
+
+ $actives = $current_li[0]->xpath("ancestor-or-self::li");
+ array_walk($actives, function($i) { t29Menu::dom_add_class($i, 'active'); });
+
+ $ancestors = $current_li[0]->xpath("ancestor::li");
+ array_walk($ancestors, function($i) {
+ t29Menu::dom_prepend_attribute($i->xpath("./a[1]"), 'title', 'Übergeordnete Kategorie der aktuellen Seite' , ': ');
+ });
}
Index: /lib/messages.php
===================================================================
--- /lib/messages.php (revision 288)
+++ /lib/messages.php (revision 289)
@@ -2,4 +2,5 @@
/**
* t29v6 Message subsystem.
+ * now with instanciated message overwriting.
*
**/
@@ -27,4 +28,11 @@
/**
+ * Add new messages to the local overwrite array.
+ **/
+ function set($str_id, $content) {
+ $this->local_msg[$str_id] = $content;
+ }
+
+ /**
* The translate function, shorthand like the gettext shorthand.
* There's actually no long method name version :D
@@ -34,4 +42,8 @@
**/
function _($str_id, $lang=null) {
+ // local overwrites come first
+ if(isset($this->local_msg[$str_id]))
+ return $this->local_msg[$str_id];
+
$lang = ($lang && isset(self::$order[$lang])) ? $lang : $this->lang;
if(!isset(self::$msg[$str_id])) {
@@ -70,4 +82,5 @@
* out only matching entries. Example: $filter_regexp = "/^js-/"
* would filter out all JavaScript related entries.
+ * This method doesn't consider the $local_msg's.
**/
static function create_json($filter_regexp=false) {
@@ -80,4 +93,13 @@
));
}
+
+ /**
+ * Since the static messages are considered as `const`, any changes/overwrites
+ * will be applied to the instanciated object. Use the gettext for correct
+ * handling.
+ * This array simply maps message id to string without language handling since
+ * the instances don't know languages.
+ */
+ public $local_msg = array();
/**
Index: /lib/template.php
===================================================================
--- /lib/template.php (revision 288)
+++ /lib/template.php (revision 289)
@@ -37,6 +37,6 @@
// fill up configuration
// Path names in messages
- foreach(array('footer-legal-file', 'topnav-search-page') as $msg)
- $this->conf[$msg] = $this->conf['lang_path'] . $this->msg->_($msg);
+ foreach(array('footer-legal-file', 'topnav-search-page') as $msg_id)
+ $this->msg->set($msg_id, $this->conf['lang_path'].$this->msg->_($msg_id));
// store informations about the current page
@@ -129,5 +129,5 @@
conf['html_title']; ?>
-
+
@@ -149,6 +149,6 @@
?>
-
-
+
+
body_classes) ?>">
-
Index: /shared/css-v6/modules/01-boilerplate.css
===================================================================
--- /shared/css-v6/modules/01-boilerplate.css (revision 288)
+++ /shared/css-v6/modules/01-boilerplate.css (revision 289)
@@ -102,5 +102,5 @@
ul, ol { margin: 1em 0; padding: 0 0 0 40px; }
dd { margin: 0 0 0 40px; }
-nav ul, nav ol { list-style: none; list-style-image: none; margin: 0; padding: 0; }
+nav ul, nav ol, footer ul, footer ol { list-style: none; list-style-image: none; margin: 0; padding: 0; }
Index: /shared/css-v6/modules/10-window.css
===================================================================
--- /shared/css-v6/modules/10-window.css (revision 288)
+++ /shared/css-v6/modules/10-window.css (revision 289)
@@ -7,4 +7,5 @@
body {
+ /* Hintergrund oben horizontal, fuer unten siehe footer css files */
background: #cbc5bd url("/shared/img-v6/bg-v2.body.png") repeat-x;
}
@@ -25,9 +26,4 @@
/*font-family: "Futura Std Book", "Trebuchet MS";*/
font-family: "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif;
-}
-
-#footer-background-container {
- background: url("/shared/img-v6/bg-v2.body-footer.png") bottom left repeat-x;
- padding-bottom: 1px;
}
Index: /shared/css-v6/modules/11-header.css
===================================================================
--- /shared/css-v6/modules/11-header.css (revision 288)
+++ /shared/css-v6/modules/11-header.css (revision 289)
@@ -56,4 +56,9 @@
nav.horizontal .u1 > li:hover > a {
background-color: white;
+}
+
+nav.horizontal .u1 > li.active > a,
+nav.horizontal .u2 > li.active > a {
+ color: #6F2A41;
}
Index: /shared/css-v6/modules/13-footer.css
===================================================================
--- /shared/css-v6/modules/13-footer.css (revision 288)
+++ /shared/css-v6/modules/13-footer.css (revision 289)
@@ -11,7 +11,7 @@
**/
-/* Footer */
-footer {
- clear: both;
+/* Footer innerhalb des Blattes, mit Navigationselementen */
+footer.in-sheet {
+ clear: both; padding-top: 1px; /* um margin innerer elemente an der oberkante beginnen zu lassen */
height: 104px; width: 100%;
/* temp. um Navi-Kram zu uebermalen: */
@@ -26,6 +26,6 @@
position: absolute;
z-index: 5; /* ueber nav.rel */
- top: -5px; left: -5px;
- width: 910px; margin: 0 25px; /* wie #content, in breite ein paar px mehr wegen ueberstehenden bullets */
+ top: -5px; left: -5px; /* damit bullets rausschauen */
+ width: 870px; margin: 0 40px; /* wie #content, in breite ein paar px mehr wegen ueberstehenden bullets */
/* width:900px, aber 10px Toleranz damit der Beam nicht umbricht wenn
eine ungerade Anzahl an Items vorhanden ist (1px Toleranz wuerde schon reichen) */
@@ -118,11 +118,16 @@
/* Relationale Navigation */
nav.rel {
- height: 20px;
- position: absolute;
- top: 17px; left: 0;
- z-index: 0;
- width: 940px;
- text-align: center;
-}
+ position: relative;
+ margin: 26px 70px 0;
+ width: 800px;
+}
+
+nav.rel li {
+ position: absolute;
+ top: 0;
+}
+
+nav.rel li.prev { left: 0; }
+nav.rel li.next { right: 0; }
nav.rel a {
@@ -130,14 +135,14 @@
text-transform: uppercase;
display: inline-block;
- padding: 15px;
-
- font-size: 15px;
+ padding: 10px;
+ line-height: 17px;
+ font-size: 14px;
color: rgba(65,111,124,.85); /*#416f7c;*/
- background-color: #dfe9f0;
+ /*background-color: #dfe9f0;*/
font-weight: bold;
position: relative;
- height: 40px; /* wegen arrow: height+2*padding=arrowheight */
+ /*height: 40px; *//* wegen arrow: height+2*padding=arrowheight */
}
@@ -148,10 +153,6 @@
}
-nav.rel .prev a {
- text-align: right;
-}
-nav.rel .next a {
- text-align: left;
-}
+nav.rel li.prev a { text-align: right; padding-right: 16px; }
+nav.rel li.next a { text-align: left; padding-left: 16px; }
nav.rel a:after {
@@ -160,11 +161,11 @@
position: absolute;
top: 0;
- border-top: 35px solid transparent;
- border-bottom: 35px solid transparent;
- border-left: 30px solid #dfe9f0;
- border-right: 30px solid #dfe9f0;
-}
-
-nav.rel a:hover:after {
+ border-top: 27px solid transparent;
+ border-bottom: 27px solid transparent;
+ border-left: 24px solid #dfe9f0;
+ border-right: 24px solid #dfe9f0;
+}
+
+nav.rel a:focus:after, nav.rel a:active:after {
border-left-color: #40a8e2;
border-right-color: #40a8e2;
@@ -172,14 +173,18 @@
nav.rel .next a:after {
- right: -30px;
+ right: -24px;
border-right: none;
}
nav.rel .prev a:after {
- left: -30px;
+ left: -24px;
border-left: none;
}
nav.rel a:hover {
+ background-color: #dfe9f0;
+}
+
+nav.rel a:active, nav.rel a:focus {
background-color: #40a8e2;
color: white;
@@ -187,4 +192,5 @@
/* Footer Icon-Sammlung und so */
+/*
footer .right {
position: absolute;
@@ -210,2 +216,58 @@
footer .right .icons a { opacity: .5; }
footer .right .icons a:hover, footer .right .icons a:focus { opacity: 1; }
+*/
+
+/* Post-Footer */
+footer.attached {
+ /* @embed */ background: #307588 url("/shared/img-v6/bg-v2.body-footer.png") top left repeat-x;
+ margin-top: -122px;
+ padding: 122px;
+
+ color: white;
+ font-size: 14px;
+}
+
+footer.attached ul {
+ width: 1170px;
+ margin: 10px auto 20px;
+ /* padding: 0 20px; *//* ueberfluessig, Breite allein reguliert schon */
+}
+
+footer.attached li {
+ width: 370px;
+ margin-right: 10px;
+ float: left;
+}
+
+footer.attached a:link, footer.attached a:visited {
+ color: #BAF1FF;
+}
+
+footer.attached a:hover {
+ color: #3DD8FF;
+}
+
+footer.attached a.img {
+ display: block;
+ float: left;
+ text-indent: -999px;
+}
+
+footer.attached p {
+ margin-left: 80px;
+ margin-top: 0px;
+ line-height: 115%;
+}
+
+
+footer.attached li.logo a.img {
+ background-image: url("/shared/img-v6/logo.footer.png");
+ width: 46px; height: 59px;
+}
+footer.attached li.logo p { margin-left: 60px; }
+
+footer.attached li.copy a.img {
+ background-image: url("/shared/img-v6/cc-icon.png");
+ width: 90px; height: 30px;
+}
+footer.attached li.copy p { margin-left: 110px; }
Index: /shared/css-v6/modules/18-content.css
===================================================================
--- /shared/css-v6/modules/18-content.css (revision 288)
+++ /shared/css-v6/modules/18-content.css (revision 289)
@@ -32,4 +32,5 @@
font-size: 180%;
border-bottom: 3px double #aaa;
+ text-align: left; /* irgendwie meinen browser sonst `justify` */
}
Index: /shared/js-v6/modules/menu.js
===================================================================
--- /shared/js-v6/modules/menu.js (revision 288)
+++ /shared/js-v6/modules/menu.js (revision 289)
@@ -343,5 +343,14 @@
bwidth = $(".bullet",g).outerWidth();
each_width = (g.width() + bwidth*2) / count;
- a.width(Math.floor(each_width));
+ each_width = g.width() / count;
+
+
+ // problem: each_width = 16.384023... -> Math.floor liefert zu schmale Werte, direktes
+ // a.width(each_width) hingegen kann mit Fliesskomma nicht umgehen. Daher jetzt ein Ansatz,
+ // CSS3-Subpixelwerte mit ueberschaubar vielen Dezimalstellen anzuwenden.
+ roundNumber = function(num,dec) { return Math.round(num*Math.pow(10,dec))/Math.pow(10,dec); };
+ subpixel_width = roundNumber(each_width, 2);
+ a.css("width", subpixel_width+"px");
+ //a.css("width", Math.floor(each_width)+"px");
// text-Label zentriert darstellen um den Punkt
$(".text", a).css("left", function(){return(bwidth - $(this).width())/2; });