]> git.mjollnir.org Git - moodle.git/commitdiff
library to add the surrounding divs for custom corners and borders.
authorurs_hunkler <urs_hunkler>
Wed, 9 May 2007 14:33:42 +0000 (14:33 +0000)
committerurs_hunkler <urs_hunkler>
Wed, 9 May 2007 14:33:42 +0000 (14:33 +0000)
lib/custom_corners_lib.php [new file with mode: 0755]

diff --git a/lib/custom_corners_lib.php b/lib/custom_corners_lib.php
new file mode 100755 (executable)
index 0000000..382e096
--- /dev/null
@@ -0,0 +1,49 @@
+<?php
+/**
+ * @author Urs Hunkler
+ * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
+ *
+ * Custom corners and borders
+ * Support library
+ *
+ * 2007-05-07  File created.
+ */
+
+/**
+ * Starting part of the surrounding divs for custom corners
+ *
+ * @param boolean $clearfix, add CLASS "clearfix" to the inner div against collapsing
+ * @param boolean $return, return as string or just print it
+ */
+function print_custom_corners_start($clearfix=false, $return=false) {
+    $output = '<div class="bt"><div></div></div>';
+    $output .= "\n";
+    $output .= '<div class="i1"><div class="i2">';
+    $output .= (!empty($clearfix)) ? '<div class="i3 clearfix">' : '<div class="i3">';
+
+    if ($return) {
+        return $output;
+    } else {
+        echo $output;
+    }
+}
+
+
+/**
+ * Ending part of the surrounding divs for custom corners
+ *
+ * @param boolean $return, return as string or just print it
+ */
+function print_custom_corners_end($return=false) {
+    $output = '</div></div></div>';
+    $output .= "\n";
+    $output .= '<div class="bb"><div></div></div>';
+    
+    if ($return) {
+        return $output;
+    } else {
+        echo $output;
+    }
+}
+
+?>
\ No newline at end of file