diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-30 21:37:01 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-30 21:37:01 +0000 |
commit | 22d64456008cd8d2aaab35f6d8005cc112d93567 (patch) | |
tree | ed13a00b35b97bdcf18be5df30d83ddc03766677 /documentation/css | |
parent | 7f0feba983bdbc3f9ca22077c5a6719e14b26e46 (diff) | |
download | elgg-22d64456008cd8d2aaab35f6d8005cc112d93567.tar.gz elgg-22d64456008cd8d2aaab35f6d8005cc112d93567.tar.bz2 |
major addition - adding preview of CSS for developers and themers
git-svn-id: http://code.elgg.org/elgg/trunk@7781 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'documentation/css')
-rw-r--r-- | documentation/css/preview/forms.php | 214 | ||||
-rw-r--r-- | documentation/css/preview/general.php | 64 | ||||
-rw-r--r-- | documentation/css/preview/grid.php | 62 | ||||
-rw-r--r-- | documentation/css/preview/head.php | 42 | ||||
-rw-r--r-- | documentation/css/preview/index.php | 24 | ||||
-rw-r--r-- | documentation/css/preview/nav.php | 71 | ||||
-rw-r--r-- | documentation/css/preview/objects.php | 80 | ||||
-rw-r--r-- | documentation/css/preview/widgets.php | 57 |
8 files changed, 614 insertions, 0 deletions
diff --git a/documentation/css/preview/forms.php b/documentation/css/preview/forms.php new file mode 100644 index 000000000..d3a3e7647 --- /dev/null +++ b/documentation/css/preview/forms.php @@ -0,0 +1,214 @@ +<?php +/** + * Form CSS + */ + +$title = 'Forms and Buttons'; + +require dirname(__FILE__) . '/head.php'; + +?> +<body> + <div class="elgg-page" style="width: 800px; margin: 20px auto;"> + <h1 class="mbl"><?php echo $title; ?></h1> + <div class="mbl"><a href="index.php">return to index</a></div> + <h2>Form</h2> + <form action="#"> + <fieldset> + <legend>Form legend</legend> + <p> + <label for="f1">Text input:</label> + <?php echo elgg_view('input/text', array( + 'internalname' => 'f1', + 'internalid' => 'f1', + 'value' => 'input text', + )); + ?> + </p> + <p> + <label for="f2">Password input:</label> + <?php echo elgg_view('input/password', array( + 'internalname' => 'f2', + 'internalid' => 'f2', + 'value' => 'password', + )); + ?> + </p> + <p> + <label for="f3">Radio input:</label><br /> + <?php echo elgg_view('input/radio', array( + 'internalname' => 'f3', + 'internalid' => 'f3', + 'options' => array(1, 2), + )); + ?> + </p> + <p> + <label for="f4">Checkboxes input:</label><br /> + <?php echo elgg_view('input/checkboxes', array( + 'internalname' => 'f4', + 'internalid' => 'f4', + 'options' => array(1, 2), + )); + ?> + </p> + <p> + <label for="f5">Dropdown input:</label><br /> + <?php echo elgg_view('input/pulldown', array( + 'internalname' => 'f5', + 'internalid' => 'f5', + 'options' => array('option 1', 'option 2'), + )); + ?> + </p> + <p> + <label for="f6">Access input:</label> + <?php echo elgg_view('input/access', array( + 'internalname' => 'f6', + 'internalid' => 'f6', + 'value' => ACCESS_PUBLIC, + )); + ?> + </p> + <p> + <label for="f7">File input:</label> + <?php echo elgg_view('input/file', array( + 'internalname' => 'f7', + 'internalid' => 'f7', + )); + ?> + </p> + <p> + <label for="f8">URL input:</label> + <?php echo elgg_view('input/url', array( + 'internalname' => 'f8', + 'internalid' => 'f8', + 'value' => 'http://elgg.org/', + )); + ?> + </p> + <p> + <label for="f9">Tags input:</label> + <?php echo elgg_view('input/tags', array( + 'internalname' => 'f9', + 'internalid' => 'f9', + 'value' => 'one, two, three', + )); + ?> + </p> + <p> + <label for="f10">Email input:</label> + <?php echo elgg_view('input/email', array( + 'internalname' => 'f10', + 'internalid' => 'f10', + 'value' => 'noone@elgg.org', + )); + ?> + </p> + <p> + <label for="f11">Autocomplete input:</label> + <?php echo elgg_view('input/autocomplete', array( + 'internalname' => 'f11', + 'internalid' => 'f11', + 'match_on' => 'users', + )); + ?> + </p> + <p> + <label for="f12">Date picker input:</label> + <?php echo elgg_view('input/datepicker', array( + 'internalname' => 'f12', + 'internalid' => 'f12', + )); + ?> + </p> + <p> + <label for="f13">User picker input:</label> + <?php echo elgg_view('input/userpicker', array( + 'internalname' => 'f13', + 'internalid' => 'f13', + )); + ?> + </p> + <p> + <label for="f14">Long text input:</label> + <?php echo elgg_view('input/longtext', array( + 'internalname' => 'f14', + 'internalid' => 'f14', + 'value' => $ipsum, + )); + ?> + </p> + <p> + <label for="f15">Plain text input:</label> + <?php echo elgg_view('input/plaintext', array( + 'internalname' => 'f15', + 'internalid' => 'f15', + 'value' => $ipsum, + )); + ?> + </p> + </fieldset> + </form> + + <div class="mtl"> + <h2>Buttons</h2> + <p> + <?php echo elgg_view('input/submit', array( + 'internalname' => 'b1', + 'value' => 'input[type=submit]', + )); + ?> + </p> + <p> + <?php echo elgg_view('output/url', array( + 'href' => '#', + 'text' => 'a.elgg-submit-button', + 'class' => 'elgg-button elgg-submit-button', + )); + ?> + </p> + <p> + <?php echo elgg_view('output/url', array( + 'href' => '#', + 'text' => 'submit button disabled', + 'class' => 'elgg-button elgg-submit-button disabled', + )); + ?> + </p> + <p> + <?php echo elgg_view('input/button', array( + 'internalname' => 'b3', + 'value' => 'input[type=button]', + )); + ?> + </p> + <p> + <?php echo elgg_view('output/url', array( + 'href' => '#', + 'text' => 'a.elgg-cancel-button', + 'class' => 'elgg-button elgg-cancel-button', + )); + ?> + </p> + <p> + <?php echo elgg_view('output/url', array( + 'href' => '#', + 'text' => 'a.elgg-action-button', + 'class' => 'elgg-action-button', + )); + ?> + </p> + <p> + <?php echo elgg_view('output/url', array( + 'href' => '#', + 'text' => 'action button disabled', + 'class' => 'elgg-action-button disabled', + )); + ?> + </p> + </div> + + </div> +</body> +</html>
\ No newline at end of file diff --git a/documentation/css/preview/general.php b/documentation/css/preview/general.php new file mode 100644 index 000000000..681580f6f --- /dev/null +++ b/documentation/css/preview/general.php @@ -0,0 +1,64 @@ +<?php +/** + * General CSS + */ + +$title = 'General CSS'; + +require dirname(__FILE__) . '/head.php'; + +?> +<body> + <div class="elgg-page" style="width: 800px; margin: 20px auto;"> + <h1 class="mbl"><?php echo $title; ?></h1> + <div class="mbl"><a href="index.php">return to index</a></div> + <h2>Headings</h2> + <div class="mbl"> + <h1>Level 1 heading</h1> + <h2>Level 2 heading</h2> + <h3>Level 3 heading</h3> + <h4>Level 4 heading</h4> + <h5>Level 5 heading</h5> + <h6>Level 6 heading</h6> + </div> + <h2>Paragraph</h2> + <div class="mbl"> + <p>Lorem ipsum dolor sit amet, <a href="#" title="test link">test link</a> + adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec + faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero + nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl. Praesent + mattis, massa quis luctus fermentum, turpis mi volutpat justo, eu + volutpat enim diam eget metus. Maecenas ornare tortor. Donec sed tellus + eget sapien fringilla nonummy. Mauris a ante. Suspendisse quam sem, + consequat at, commodo vitae, feugiat in, nunc. Morbi imperdiet augue + quis tellus.</p> + + <p>Lorem ipsum dolor sit amet, <em>emphasis</em> + consectetuer + adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec + faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero + nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl. Praesent + mattis, massa quis luctus fermentum, turpis mi volutpat justo, eu + volutpat enim diam eget metus. Maecenas ornare tortor. Donec sed tellus + eget sapien fringilla nonummy. Mauris a ante. Suspendisse quam sem, + consequat at, commodo vitae, feugiat in, nunc. Morbi imperdiet augue + quis tellus.</p> + </div> + <h2>Misc</h2> + <p> + I am <a href="?abc123">the a tag</a> example<br /> + I am <abbr title="test">the abbr tag</abbr> example<br /> + I am <acronym>the acronym tag</acronym> example<br /> + I am <b>the b tag</b> example<br /> + I am <code>the code tag</code> example<br /> + I am <del>the del tag</del> example<br /> + I am <em>the em tag</em> example<br /> + I am <i>the i tag</i> example<br /> + I am <strong>the strong tag</strong> example<br /> + </p> + <blockquote><p>Paragraph inside Blockquote: <?php echo $ipsum; ?></p></blockquote> + <pre><strong>Preformated:</strong>Testing one row + and another</pre> + </div> +</body> +</html>
\ No newline at end of file diff --git a/documentation/css/preview/grid.php b/documentation/css/preview/grid.php new file mode 100644 index 000000000..03ed9a9e1 --- /dev/null +++ b/documentation/css/preview/grid.php @@ -0,0 +1,62 @@ +<?php +/** + * Grid CSS + */ + +$title = 'Grid'; + +require dirname(__FILE__) . '/head.php'; + +?> +<body> + <div class="elgg-page" style="width: 800px; margin: 20px auto;"> + <h1 class="mbl"><?php echo $title; ?></h1> + <div class="mbl"><a href="index.php">return to index</a></div> + <style>h3 {text-align: center;}</style> + <div class="elgg-col elgg-col-1of5"> + <h3>1/5</h3> + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> + </div> + <div class="elgg-col elgg-col-3of5"> + <h3>3/5</h3> + <div class="elgg-col elgg-col-1of2"> + <h3>1/2</h3> + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> + </div> + <div class="elgg-col elgg-col-1of2"> + <h3>1/2</h3> + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> + </div> + <div class="elgg-col elgg-col-1of3"> + <h3>1/3</h3> + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> + </div> + <div class="elgg-col elgg-col-2of3"> + <h3>2/3</h3> + <div class="elgg-col elgg-col-1of2"> + <h3>1/2</h3> + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> + </div> + <div class="elgg-col elgg-col-1of2"> + <h3>1/2</h3> + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> + </div> + <div class="elgg-col elgg-col-1of1"> + <h3>1</h3> + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> + </div> + </div> + </div> + <div class="elgg-col elgg-col-1of5"> + <h3>1/5</h3> + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> + </div> + + </div> +</body> +</html>
\ No newline at end of file diff --git a/documentation/css/preview/head.php b/documentation/css/preview/head.php new file mode 100644 index 000000000..360f56647 --- /dev/null +++ b/documentation/css/preview/head.php @@ -0,0 +1,42 @@ +<?php +/** + * head of the preview pages + */ +require_once(dirname(dirname(dirname(dirname(__FILE__)))) . "/engine/start.php"); + +$ipsum = "Sed scelerisque sagittis lorem. Phasellus sodales. Nulla urna justo, vehicula in, suscipit nec, molestie sed, tellus."; + +$screen = elgg_view_get_simplecache_url('css', 'screen'); +$ie_url = elgg_view_get_simplecache_url('css', 'ie'); +$ie6_url = elgg_view_get_simplecache_url('css', 'ie6'); + +$base = elgg_get_site_url(); +elgg_register_js("{$base}vendors/jquery/jquery-1.4.2.min.js", 'jquery'); +elgg_register_js("{$base}vendors/jquery/jquery-ui-1.7.2.min.js", 'jquery-ui'); +elgg_register_js("{$base}vendors/jquery/jquery.form.js", 'jquery.form'); + +// Set the content type +header("Content-type: text/html; charset=UTF-8"); + +?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <title><?php echo $title; ?></title> + <link rel="stylesheet" href="<?php echo $screen; ?>" type="text/css" /> + <!--[if IE 6]> + <link rel="stylesheet" type="text/css" href="<?php echo $ie_url; ?>" /> + <![endif]--> + + <!--[if gt IE 6]> + <link rel="stylesheet" type="text/css" href="<?php echo $ie6_url; ?>" /> + <![endif]--> +<?php +foreach (elgg_get_js() as $script) { +?> + <script type="text/javascript" src="<?php echo $script; ?>"></script> +<?php +} +?> +</head> diff --git a/documentation/css/preview/index.php b/documentation/css/preview/index.php new file mode 100644 index 000000000..7b9e33c4f --- /dev/null +++ b/documentation/css/preview/index.php @@ -0,0 +1,24 @@ +<?php +/** + * Main index page + */ + +$title = 'CSS Preview Pages'; + +include dirname(__FILE__) . '/head.php'; + +?> +<body> + <div class="elgg-page" style="width: 800px; margin: 20px auto;"> + <h1><?php echo $title; ?></h1> + <ul class="mtl"> + <li><a href="general.php">General CSS</a></li> + <li><a href="nav.php">Navigation CSS</a></li> + <li><a href="forms.php">Form CSS</a></li> + <li><a href="objects.php">Lists, modules, image blocks CSS</a></li> + <li><a href="grid.php">Grid CSS</a></li> + <li><a href="widgets.php">Widgets CSS</a></li> + </ul> + </div> +</body> +</html>
\ No newline at end of file diff --git a/documentation/css/preview/nav.php b/documentation/css/preview/nav.php new file mode 100644 index 000000000..3ce839472 --- /dev/null +++ b/documentation/css/preview/nav.php @@ -0,0 +1,71 @@ +<?php +/** + * Navigation CSS + */ + +$title = 'Navigation'; + +require dirname(__FILE__) . '/head.php'; + +elgg_push_breadcrumb('First', '#'); +elgg_push_breadcrumb('Second', '#'); +elgg_push_breadcrumb('Third'); + +?> +<body> + <div class="elgg-page" style="width: 800px; margin: 20px auto;"> + <h1 class="mbl"><?php echo $title; ?></h1> + <div class="mbl"><a href="index.php">return to index</a></div> + <h2>Breadcrumbs</h2> + <div class="mbl"> + <?php echo elgg_view('navigation/breadcrumbs'); ?> + </div> + <h2>Tabs</h2> + <div class="mbl"> + <?php + $tabs = array( + array('title' => 'First', 'url' => '#'), + array('title' => 'Second', 'url' => '#', 'selected' => true), + array('title' => 'Third', 'url' => '#'), + ); + echo elgg_view('navigation/tabs', array('tabs' => $tabs)); + ?> + </div> + <h2>Pagination</h2> + <div class="mbl"> + <?php + $params = array( + 'count' => 1000, + 'limit' => 10, + 'offset' => 230, + ); + echo elgg_view('navigation/pagination', $params); + ?> + </div> + <h2>Site Menu</h2> + <div class="mbl"> + <div class="elgg-page-header" style="height: 40px;"> + <?php + $params = array(); + $params['menu'] = array(); + $params['menu']['default'] = array(); + for ($i=1; $i<=5; $i++) { + $params['menu']['default'][] = new ElggMenuItem($i, "Page $i", '#'); + } + $params['menu']['default'][2]->setSelected(true); + echo elgg_view('navigation/menu/site', $params); + ?> + </div> + </div> + <h2>Page Menu</h2> + <div class="mbl pam" style="width: 200px; background-color: #cccccc;"> + <?php + $m = new ElggMenuItem(10, "Child", '#'); + $m->setParent($params['menu']['default'][1]); + $params['menu']['default'][1]->addChild($m); + echo elgg_view('navigation/menu/page', $params); + ?> + </div> + </div> +</body> +</html>
\ No newline at end of file diff --git a/documentation/css/preview/objects.php b/documentation/css/preview/objects.php new file mode 100644 index 000000000..72a41cf76 --- /dev/null +++ b/documentation/css/preview/objects.php @@ -0,0 +1,80 @@ +<?php +/** + * CSS Objects: list, module, image_block + */ + +$title = 'CSS Objects'; + +require dirname(__FILE__) . '/head.php'; + +?> +<body> + <div class="elgg-page" style="width: 960px; margin: 20px auto;"> + <h1 class="mbl"><?php echo $title; ?></h1> + <div class="mbl"><a href="index.php">return to index</a></div> + <h2>Modules</h2> + <div class="mbl clearfix"> + <div class="elgg-col elgg-col-1of3"> + <div class="pam"> + <?php + echo elgg_view('layout/objects/module', array( + 'title' => 'elgg-aside-module', + 'body' => $ipsum, + 'class' => 'elgg-aside-module', + )); + ?> + <?php + echo elgg_view('layout/objects/module', array( + 'title' => 'elgg-popup-module', + 'body' => $ipsum, + 'class' => 'elgg-popup-module', + )); + ?> + </div> + </div> + <div class="elgg-col elgg-col-1of3"> + <div class="pam"> + <?php + echo elgg_view('layout/objects/module', array( + 'title' => 'elgg-info-module', + 'body' => $ipsum, + 'class' => 'elgg-info-module', + )); + ?> + </div> + </div> + <div class="elgg-col elgg-col-1of3"> + <div class="pam"> + <?php + echo elgg_view('layout/objects/module', array( + 'title' => 'elgg-group-module', + 'body' => $ipsum, + 'class' => 'elgg-group-module', + )); + ?> + </div> + </div> + </div> + <h2>Image Block</h2> + <div class="mbl clearfix"> + <?php + $src = elgg_view('icon/user/default/small'); + $image = "<img src=\"$src\" />"; + echo elgg_view_image_block($image, $ipsum); + ?> + </div> + <h2>List</h2> + <div class="mbl clearfix"> + <?php + $obj1 = new ElggObject(); + $obj1->title = "Object 1"; + $obj1->description = $ipsum; + $obj2 = new ElggObject(); + $obj2->title = "Object 2"; + $obj2->description = $ipsum; + echo elgg_view('layout/objects/list', array('items' => array($obj1, $obj2))); + ?> + </div> + </div> +</body> +</html>
\ No newline at end of file diff --git a/documentation/css/preview/widgets.php b/documentation/css/preview/widgets.php new file mode 100644 index 000000000..3ffc4edd8 --- /dev/null +++ b/documentation/css/preview/widgets.php @@ -0,0 +1,57 @@ +<?php +/** + * Widgets CSS + */ + +$title = 'Widgets'; + +require dirname(__FILE__) . '/head.php'; + +elgg_register_plugin_hook_handler('view', 'widgets/friends/content', 'css_widget_content'); +elgg_register_plugin_hook_handler('view', 'widgets/friends/edit', 'css_widget_content'); +elgg_register_plugin_hook_handler('permissions_check', 'all', 'css_permissions_override'); + +function css_widget_content() { + global $ipsum; + return $ipsum; +} + +function css_permissions_override() { + return true; +} + + +?> +<body> + <div class="elgg-page" style="width: 800px; margin: 20px auto;"> + <h1 class="mbl"><?php echo $title; ?></h1> + <div class="mbl"><a href="index.php">return to index</a></div> +<?php +$w = array(); +for ($i=1; $i<=6; $i++) { + $obj = new ElggWidget(); + $obj->handler = 'friends'; + $obj->title = "Widget $i"; + $w[] = $obj; +} +$column1 = array($w[0], $w[1]); +$column2 = array($w[2], $w[3]); +$column3 = array($w[4], $w[5]); +$widgets = array(1 => $column1, 2 => $column2, 3 => $column3); +$num_columns = 3; +$widget_class = "elgg-col-1of{$num_columns}"; +for ($column_index = 1; $column_index <= $num_columns; $column_index++) { + $column_widgets = $widgets[$column_index]; + + echo "<div class=\"$widget_class elgg-widgets\" id=\"elgg-widget-col-$column_index\">"; + if (is_array($column_widgets) && sizeof($column_widgets) > 0) { + foreach ($column_widgets as $widget) { + echo elgg_view_entity($widget); + } + } + echo '</div>'; +} +?> + </div> +</body> +</html>
\ No newline at end of file |